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

Introduce calyx -> axi-wrapped-calyx fud2 path #1994

Merged
merged 25 commits into from
Apr 22, 2024
Merged

Introduce calyx -> axi-wrapped-calyx fud2 path #1994

merged 25 commits into from
Apr 22, 2024

Conversation

nathanielnrn
Copy link
Contributor

This path allows "normal" calyx programs to be wrapped in a dynamically generated axi-wrapper with a --through axi-wrapped invocation of fud2.

This currently only works on programs using @external, as opposed to ref. See #1993.
But since there is parity (barring the above) with the current, clunky bash script I think this it probably makes sense to merge this while #1993 gets worked on.

@nathanielnrn nathanielnrn added C: FPGA Changes for the FPGA backend C: fud2 experimental driver labels Apr 3, 2024
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's not commit these test files to the repo

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be done with a sed command to remove all matching lines that start with import

let tmp_yxi = format!("{}.yxi", file_name);

//Get yxi file from main compute program.
//TODO(nate): Can this use the `yxi` operation instead of hardcoding the build cmd calyx rule with arguments?
Copy link
Contributor Author

@nathanielnrn nathanielnrn Apr 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this TODO was the only thing I wasn't sure about w.r.t best fud2 practices @sampsyo. Going to merge for now but can change this in a future PR.

@nathanielnrn nathanielnrn force-pushed the axi-fud2 branch 5 times, most recently from 24354b1 to f0418a5 Compare April 22, 2024 18:23
@nathanielnrn nathanielnrn merged commit 619fbcc into main Apr 22, 2024
18 checks passed
@nathanielnrn nathanielnrn deleted the axi-fud2 branch April 22, 2024 20:50
jiahanxie353 pushed a commit to jiahanxie353/calyx that referenced this pull request May 29, 2024
* merge Fud2 example (calyxir#1965)

* Sketch an example fud2 op

* Fix typo

---------

Co-authored-by: Adrian Sampson <adrian@radbox.org>

* axi-generator.py takes yxi file as argument (run python3 axi-generator.py input.yxi)

* bash script for whole axi workflow

* add input.yxi to axi-generator.py call in sim.sh

* pass runt test?

* diff between generated-axi-with-vec-add and fudaxi/cat.futil

* to verilog should theoretically work

* pass diff

* axi.sh works on fixed-vec-add-w-imports

* add futil to yxi operation to fud2

* almost working axi-gen

* Update fud2 calyx -> axi-wrapped-calyx path.

Testing locally on vec add, the hard-coded cocotb tests pass, meaning
there is parity with the previous bash scripts

* fud2 formatting

* update fud2 snapshots

* cleanup of extra files

* formatting of axi-generator

* make dedicated test dir for yxi

* tidy up old comments

* remove extra fixed-vec-add-w-imports.futil

* add runt tests for fud2 invocation

* update dockerfile to install fud2 attempt1

* dockerfile and fud2 attempt 2

---------

Co-authored-by: Elise Song <111922608+eys29@users.noreply.github.com>
Co-authored-by: Adrian Sampson <adrian@radbox.org>
Co-authored-by: eys29 <eys29@cornell.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: FPGA Changes for the FPGA backend C: fud2 experimental driver
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants