-
Notifications
You must be signed in to change notification settings - Fork 280
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
honor the 'ready' signal from the GCD output #153
honor the 'ready' signal from the GCD output #153
Conversation
2.6_chiseltest.ipynb
Outdated
"// test for backpressure\n", | ||
"test(new DecoupledGcd(16)) { dut =>\n", | ||
" dut.input.initSource().setSourceClock(dut.clock)\n", | ||
" dut.output.initSink().setSinkClock(dut.clock)\n", |
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.
What I want to do is to use slower clock for the sink so that there is greater chance that a fork
+ join
approach runs into a backpressure scenario but I don't know how to write a ClockDivider here? @edwardcwang or @ducky64 do you maybe have some directions?
2.6_chiseltest.ipynb
Outdated
" dut.input.enqueueNow(inputVal)\n", | ||
" dut.output.ready.poke(false.B)\n", | ||
" for(_ <- 0 to 10) {\n", | ||
" dut.clock.step(1)\n", |
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.
this is my poor mans solution for the clock divider - set the ouput in a non-ready state and idle for come cycles.
Looks like #154 did fix CI for PRs from forks so that's good. |
@wunderabt I think the clock divider approach has a lot of issues that would be overkill to try and solve in this context. As a simple example, take a look at example of backpressure/input-stall randomly adding extra steps in the dequeue block creates backpressure, adding extra steps in the enqueue block stalls input. |
I agree; just having the dequeue block artificially take longer to compute would be easier. |
@wunderabt I am closing this. The GCD example produces back-pressure automatically as it takes input dependent number of multiple cycles to compute a single GCD. If you run the base standard example you can see that it takes ~600 cycles to compute 100 GCD values. This only works if the decoupled helpers are handling the back-pressure properly. |
Hi @chick thanks for looking into this! I agree to closing this PullRequest as it wasn't a good solution to the issue. But I'm still in doubt whether #134 is adressed yet. On the input side the back-pressure is handled correctly - as you say, the computation takes time and while it's computing no new inputs are accepted via For me the question remains how the |
I've taken that example and used it in #161 |
An attempt to fix issue #134