-
Notifications
You must be signed in to change notification settings - Fork 150
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
Support verilator
in clash-testsuite
#2019
Conversation
5d4a6b9
to
20aed6b
Compare
a42d822
to
3ff309d
Compare
3ff309d
to
7fe2d70
Compare
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 overall
-- TODO: Since tasty doesn't provide one, we should really provide a better | ||
-- set of combinators for describing test dependencies. That way we can have | ||
-- some more principled way of having a test structure like |
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.
It's definitely Tasty's weakest point. Basically we already work our way around it by passing down names so we can construct the absolute name of the test at test location. It would be some much more intuitive if you could just do something like: TestGroupSeq [ ... ]
. But alas..
clash-lib/src/Clash/Driver.hs
Outdated
-- If we are generating (System)Verilog, we could potentially verilate | ||
-- the results. Clash can output a C++ shim for doing this automatically. | ||
fileNames2 <- | ||
case hdl of | ||
VHDL -> pure fileNames1 | ||
_ -> writeVerilatorShim hdlDir topNm fileNames1 | ||
|
||
writeManifest manPath manifest0{fileNames=fileNames2} |
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'd love for this to become a separate executable someday. It feel icky to have this all dumped in Driver
.
7fe2d70
to
ef58a4c
Compare
It is now possible to selectively enable tests which use a specific vendor tool by passing a flag to the testsuite driver, e.g. --verilator for running tests with verilator. If a tool is not given it's tests pass (as the tasty API does not allow deciding to skip a test inside IsTest.run). If the tool is not found the error is not tidied up instead of showing the contents of stderr. This is a somewhat crude first attempt at addressing #2012.
ef58a4c
to
6f970bc
Compare
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.
Noice :)
This PR adds support for using
verilator
in (System)Verilog tests in the testsuite. This largely consists of changes to black boxes whichverilator
does not support to include C++ definitions which can be used for simulation instead.Still TODO:
clockGen
when thetbClockGen
black box is accepted