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

counter: add register to set counter value #197

Merged
merged 1 commit into from
Jul 18, 2024
Merged

Conversation

EmilioPeJu
Copy link
Contributor

  • Setting the counter take precedence over a trigger event, that way the block will output the set value at least for one tick
  • It is possible to set a value while the block is disabled (this allows to control the pos bus value without having to actually count)
  • Timing tests were added for two cases: setting a value while enabled and setting a value while disabled
  • Python counter simulation script was updated to consider the set register

- Setting the counter takes precedence over a trigger event, that way the
block will output the set value at least for one tick
- It is possible to set a value while the block is disabled (this allows to
control the pos bus value without having to actually count)
- Timing tests were added for two cases: setting a value while enabled and
setting a value while disabled
- Python counter simulation script was updated to consider the set register
Copy link
Contributor

@glennchid glennchid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the use case for the SET value? Should it have priority over the enable signal, i.e. if SET value or provided, then ENABLE, should the counter count from ST or from START?

Copy link
Contributor

@glennchid glennchid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, provided we are happy with the behaviour of SET vs START.

@EmilioPeJu EmilioPeJu merged commit 36e7381 into master Jul 18, 2024
23 checks passed
@EmilioPeJu EmilioPeJu deleted the set-counter branch July 18, 2024 15:24
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

Successfully merging this pull request may close these issues.

3 participants