Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LimitTimer can be created with Frequency '-1' and resetting it sets freq to 0. #595

Open
Mes-ser opened this issue Mar 25, 2024 · 0 comments

Comments

@Mes-ser
Copy link

Mes-ser commented Mar 25, 2024

Description

When LimitTimer is used, you need to provide frequency which is != 0, so when value -1 is used the constructor takes it, then while doing reset on LimitTimer, the frequency is set to 0.

Expected behaviour

No possibility to set frequency to <= 0.

How to reproduce?

Renode instance with created machine, and loaded peripheral which use LimitTimer (Let's call it Task) which was created with frequency set to -1

  • In Monitor window call "machine GetTimeSourceInfo"
  • Check frequency for 'Task', should be '-1'
  • Reset this object by calling 'Task.Reset()' method on it
  • In Monitor windows call "machine GetTimeSourceInfo"
  • Our Task now has frequency set to '0'

Environment

Please, provide the following information:

  • Windows 10 / Ubuntu 23.10
  • Renode version: v1.15.0.30170 / 1.14.0

Do you plan to address this issue and file a PR?

Not right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant