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

Would be nice if Clock() type exposed 'clock ticks' to 'simulation ticks' ratio. #34

Closed
NickShaffner opened this issue Jul 28, 2016 · 4 comments

Comments

@NickShaffner
Copy link
Contributor

This would be particularly useful for being able to delay a certain number of clock ticks. Adding a delay() generator method to the clock type would be another means of exposing this.

ex:

something.next = False
yield glbl.clock.delay(1)
something.next = True
@cfelton
Copy link
Owner

cfelton commented Jul 30, 2016

@NickShaffner this sounds reasonable, my gut says a slightly different name: wait or pause possibly, mainly to avoid confusion with myhdl.delay.

@NickShaffner
Copy link
Contributor Author

NickShaffner commented Jul 30, 2016

@cfelton I can see that - wait() would work for me. Also about the clock ticks to simulation ticks constant - how about 'ticks'? (since _hticks is used as half ticks in the clock already).

@NickShaffner
Copy link
Contributor Author

NickShaffner commented Aug 5, 2016

#40 has Clock.ticks and Clock.delay. @cfelton - it made sense to me to use delay() instead of wait() in the end because it's really doing exactly the same thing as delay() does for the simulation clock. In fact, it might be cool if the simulation clock was somehow exposed as a Clock() object. (but that's the subject for another pull request :))

@NickShaffner
Copy link
Contributor Author

Added in: #40

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

2 participants