-
Notifications
You must be signed in to change notification settings - Fork 175
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
nmigen.lib: Add RoundRobin #450
Conversation
Currently implementing @jfng's suggestions (code styling, better doc, etc.). |
…tion test for width=1
…ccount and use varying requests values
nmigen/lib/roundrobin.py
Outdated
"""Round-robin scheduler. | ||
|
||
For a given set of requests, the round-robin scheduler will | ||
grant one request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this should be elaborated. Something like (phrasing needs to be improved):
For a given set of requests, the round-robin scheduler will grant one request. Once it grants a request, if any other requests are active, it grants the next active request with a greater number, restarting from zero once it reaches the highest one. Use :class:
EnableInserter
to control when the scheduler advances.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tweaked a little bit what you wrote. What do you think?
Great, thanks for the work! There's only one remaining concern I have: should |
That's the way it was in omigen because there was only one scheduler. I seriously doubt that we're going to have other schedulers in nMigen, but just in case we could name the module |
I think we can name the module |
Co-authored-by: whitequark <whitequark@whitequark.org>
Co-authored-by: whitequark <whitequark@whitequark.org>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Fixes #448