-
Notifications
You must be signed in to change notification settings - Fork 12
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
Verilator-compatible testbench, phase 2/2 #1094
Conversation
Michael's pull request throws a little monkey wrench into this one #1093 I think what I'd like to do is
|
UpdateI incorporated changes from Michael's recent PR 1093, the main new things are
I ran a full regression on the latest changes, results are here (spoiler alert: they passed): I restarted the failed @mcoduoza is the normal CI (plus the additional tests above) good enough to say that this works with your PR-1093 changes, or do we need to do some separate check on that? |
Hi Steve, thanks for making these changes. Yes, the normal garnet CI and aha CI are enough to say that this works with my PR. Could you repoint garnet in your hetero-cgra-fixhttps://github.com/StanfordAHA/aha/tree/hetero-cgra-fix branch to the latest garnet commit here? (i.e. your "slight mod to vcs-test driver" commit). Once this PR passes the garnet CI and the hetero-cgra-fix passes the aha CI, we are good to go and can merge everything at once. |
Sure no problem. I pushed the changes and the new build is scheduled to run here: There is no substantive difference between the 'vcs-test driver' garnet commit and the one that is currently running in build 10896, but it's definitely a good idea to get a clean run with the latest changes. And then I suppose you will want us to file a pull request on |
Yep, we can file a PR directly from hetero-cgra-fix |
|
Sounds good |
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.
LGTM
I am changing our garnet testbench to be verilator-compatible, meaning that it can successfully run a single regression test to completion (pointwise). This pull request is phase two of two, completing the changes.
To make the code work with verilator, I did the following
gtkwave
;In addition, I changed how the testbench deals with interrupts from the CGRA and global buffer in a way that, I think, simplifies the code and makes it more robust. Also, it eliminates some unnecessary forking that had previously been required. To see the relevant changes, look in the code for
Env_wait_interrupt()
andEnv_clear_interrupt()
.A full regression using this code finished successfully after 16 hours https://buildkite.com/stanford-aha/garnet/builds/5354.
A guide to the file changes
Ten files were changed
Below: How was each file changed?
ci.yml
Inconsequential changes that do not alter previous functionality.
CGRA.cpp
This is the driver file for Verilator, it invokes the same
top.sv
module as that used by Vcs.top.sv
Same as before, except added a block of code to support Verilator wave-tracing to a
vcd
file.garnet_test.sv
Rewritten to use global tasks instead of classes.
environment.sv
p_ifc.clk
instead ofvifc_proc.cbd
.wait_interrupt()
andclear_interrupt()
tasks.axil_driver.sv, proc_driver.sv
proc_driver
had to be conditioned such that verilator has a one-cycle delay after each word is transferred, while vcs only works correctly if the delay happens before each transfer. I left a "FIXME" comment, somebody should really track this down sometime.axil_ifc.sv, proc_ifc.sv
These two files had to be rewritten because Verilator did not understnad the "clocking" structure that was being used. Interestingly, changing the code to use normal non-clocking signals seems to work just as well for Vcs as well(!)
tb_cgra.f
This dependency-enumerating support file was rewritten to exclude
proc_driver.sv
andaxil_driver.sv
, because these two files are now located via#include
pre-processor directive insideenvironment.sv
.