Skip to content
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

[tb,ffi] Implement Rust FFI and testbench integration #2181

Open
wants to merge 40 commits into
base: main
Choose a base branch
from
Open

Conversation

ethanuppal
Copy link
Member

I'm not good at fud2 stuff but I think I'm on the right track

@ethanuppal ethanuppal self-assigned this Jun 30, 2024
@ethanuppal ethanuppal added S: In progress Issue is being worked on rust labels Jun 30, 2024
@ethanuppal
Copy link
Member Author

Ideally I'd like to move the logic in the tb tool into fud2, but I don't really see that being possible.

@ethanuppal ethanuppal requested review from sampsyo and jku20 June 30, 2024 06:11
@ethanuppal
Copy link
Member Author

Also closes #2162

@ethanuppal ethanuppal linked an issue Jun 30, 2024 that may be closed by this pull request
@ethanuppal
Copy link
Member Author

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)

@ethanuppal ethanuppal changed the title Implement testbench integration [fud2,tb] Implement testbench integration Jul 3, 2024
@ethanuppal
Copy link
Member Author

Waiting on #2193

@ethanuppal
Copy link
Member Author

fud2 tests failing because of I hack I added before multi-input ops were a thing. @jku20, I assume they are now?

@ethanuppal
Copy link
Member Author

For some reason, it seems all my commits became unverified?

@ethanuppal
Copy link
Member Author

Now they're verified again...

@rachitnigam
Copy link
Contributor

@ethanuppal what's the status of this PR and what would it take to get it merged?

@ethanuppal
Copy link
Member Author

ethanuppal commented Aug 5, 2024

@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.

@ethanuppal
Copy link
Member Author

This is blocked on there being no usable support for relative paths in procedural macros.

@github-actions github-actions bot removed the S: Stale label Oct 29, 2024
@rachitnigam
Copy link
Contributor

There are two options:

  1. 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
  2. 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.

@rachitnigam
Copy link
Contributor

Marking this as stale. @ethanuppal feel free to remove and add thoughts if on how we can get this merged without the nightly features.

@ethanuppal
Copy link
Member Author

I'm going to remove stale since we found a way to get relative paths working.

@ethanuppal ethanuppal changed the title [fud2,tb] Implement testbench integration [tb,ffi] Implement Rust FFI and testbench integration Nov 7, 2024
@ethanuppal
Copy link
Member Author

@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?

@EclecticGriffin
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Toward a calyx testbench
3 participants