-
Notifications
You must be signed in to change notification settings - Fork 47
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
Complete AXI wrapper generator #1934
Conversation
Done with input/output, cells, wires, and groups (there are none) TODO: Control sequence
TBD If the spec is implemented properly (probably not) TODO: 1. Get AXI working with cocotb tests 2. Hook up runt tests 3. Refactor/minimize generator code 4... Fud2 integration?
Issue before was the vec_add was wrong, we need 4 bits instead of 3, even though we're counting 0-7 because of the presence of a <= check (so we need to get to 8 for our while loop to terminate)
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.
Wahoo!! This looks great! I say go right ahead and merge as is.
On the subject of next steps and making end-to-end runs of arbitrary programs easy: I can think of one other thing we will need to do which does not already have an issue associated with it. Namely, I believe that axi-combined-tests.py
will need to be extended a bit to take in an YXI JSON file. (It currently hard-codes the memory sizes/names, I think?) That is, the same YXI file can go into both this testbench and also the wrapper generator.
paths = ["yxi/axi-calyx/axi-generator.py"] | ||
cmd = """ | ||
python3 {} | ||
""" |
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.
Looks good for now! In the future, you can imagine this using a set of YXI inputs as the test files, so we see different AXI-wrapper code generated for each one.
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 mentioned this in #1928, which is not very fleshed out currently, but I think(?) points to what you're getting at.
This PR introduces a working
axi-generator.py
which takes in anyxi
specification for a Calyx program and generates an AXI wrapper that can be integrated with said program.The AXI wrapper uses a read -> compute -> write scheme in that it reads all of its data via AXI, populating internal
ref
memories, before invoking somemain
module that is expected to perform a computation on those memories, and then writing the results back to the host via AXI.This PR adds some concrete examples to be used as a working example to make changes off of.
Namely, a wrapped version of
vec_add
is added atyxi/axi-calyx/generated-axi-with-vec-add.futil.
This is the result of concatenating a fixed (some bit width adjustments)
vec_add
atfixed-vec-add.futil
to the wrapper generated by passing the following yxi toaxi-generator.py
:It seems to me like the immediate next step should be getting this integrated to work with
fud2
and ensure that this wrapper works on more programs than justvec_add.
#1932 #1933 and #1918 work towards that goal.We will also need to eventually figure out the subordinate control scheme to eventually work with XRT, but I think it can make sense for that to happen after the
fud2
integration is done. Happy to hear other thoughts, though.