calyx
calyx copied to clipboard
[fud2,tb] Implement testbench integration
I'm not good at fud2 stuff but I think I'm on the right track
Ideally I'd like to move the logic in the tb tool into fud2, but I don't really see that being possible.
Also closes #2162
A TODO thing would be to take advantage of the fact that the verilog incoming is calyx and write a new tester that allows you to interface with calyx components preserving the invariants (in addition to just being able to use cocotb and verilator as currently)
Waiting on #2193
fud2 tests failing because of I hack I added before multi-input ops were a thing. @jku20, I assume they are now?
For some reason, it seems all my commits became unverified?
Now they're verified again...
@ethanuppal what's the status of this PR and what would it take to get it merged?
@rachitnigam I've been working with @EclecticGriffin on using cider2 programmatically; once I have the adder component test working (under tools/tb/examples/calyx/), I'll fix all the issues so that it can be merged.
@rachitnigam it works!! (for main components due to a limitation in cider right now where you can't run anything else; a hack involves just modifying the Context by setting the entrypoint string
This pull request has not seen activity in 14 days and is being marked as stale. If you're continuing work on this, please reply and state how to get this PR in a mergeable state or what issues it is blocked on. If the PR is not ready for review, please mark it as a draft. The PR will be closed in 7 days if there is no further activity.
This is blocked on there being no usable support for relative paths in procedural macros.
There are two options:
- We figure out a different approach for the testbench that does not rely on the macro magic but is still useful for users writing complex testbenches, or
- We require users to provide a shim of the component they want to test and generate the ports based on that
I also have a broader question: there are currently no users of this harness. Is there any buy-in from the various teams to use this? That might better inform which use cases actually matter.
Marking this as stale. @ethanuppal feel free to remove and add thoughts if on how we can get this merged without the nightly features.
I'm going to remove stale since we found a way to get relative paths working.
@EclecticGriffin when you get a chance, could you take a look at why the interpreter tests are failing? Is it the fix I made to subtraction (which is fuzz-tested to be correct in an example I wrote through calyx FFI!) breaking it due to subtraction underflow?
This tool is out of date with respect to the way values work in Cider currently. We replaced the janky Value implementation with baa::BitVecValue. You'll need to merge in the mainline changes but that should fix this
As per @ekiwi I'm going to split this into smaller commits to ease the review process. Unfortunately we will lose the nice semantic history because I didn't make cherry-pickable commits, so I'll link to this PR as a reference (although it will be closed).
This pull request has not seen activity in 14 days and is being marked as stale. If you're continuing work on this, please reply and state how to get this PR in a mergeable state or what issues it is blocked on. If the PR is not ready for review, please mark it as a draft. The PR will be closed in 7 days if there is no further activity.