-
Notifications
You must be signed in to change notification settings - Fork 50
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
WIP: Create a backwards compatible flow for xo
/xclbin
generation with Calyx-AXI-wrapper
#2267
base: main
Are you sure you want to change the base?
Conversation
…control of a component
TODO: Hook up the slices in the highest level module for ap_done, ap_start. Also thinnk about go done signals/how these connect to rest of wrapper
* Prepare fifo for case idiom * Attempt with . Failing due to empty control * Delete calyx-py/test/correctness/queues/fifo.futil
TODO: Hook up ap_start from controller in wrapper to the main_compute module
This works around #2198 causing combinational loops
…lob does not find any .v files
…evel'. This generator will not work with the old verilog-wrapper
This is no longer an argument to our YXI-wrapped kernels; it only exists in the old Verilog-generator stuff. We maybe want to revert/make this optional at some point to make `xclrun` compatible with the old version too?
This allows us to not change the `kernel.xml` we use in the old wrapper vs the new wrapper and still get correct results
calyx-py/calyx/builder.py
Outdated
def output_with_attributes( | ||
self, | ||
name: str, | ||
size: int, | ||
attribute_literals: List[Union[str, Tuple[str, int]]], | ||
) -> ExprBuilder: | ||
"""Declare an output port on the component with attributes. | ||
|
||
Returns an expression builder for the port. | ||
""" | ||
return self._port_with_attributes(name, size, False, attribute_literals) | ||
|
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.
This is some unrelated cleanup, the output
method already exists and does the same thing
fud2/rsrc/gen_xo.tcl
Outdated
@@ -43,4 +43,4 @@ ipx::save_core [ipx::current_core] | |||
close_project -delete | |||
|
|||
# Package the project as an .xo file. | |||
package_xo -xo_path ${xoname} -kernel_name Toplevel -ip_directory ${path_to_packaged} -kernel_xml ./kernel.xml | |||
package_xo -xo_path ${xoname} -kernel_name wrapper -ip_directory ${path_to_packaged} -kernel_xml ./kernel.xml |
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.
TODO: Another breaking change from the verilog wrapper. probably just change the name of wrapper
to Toplevel
fud2/scripts/axi.rhai
Outdated
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.
This whole file is largely just clean up, getting rid of dead code/simplifying some sed commands
fud2/scripts/xilinx.rhai
Outdated
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.
These are the fud2 changes
yxi/axi-calyx/cocotb/axi_test.py
Outdated
timeout = 5000 | ||
#Base addresses for memories | ||
await tb.control_manager.write(0x0010, encode([0x0],4)) | ||
await tb.control_manager.write(0x0014, encode([0x0],4)) | ||
await tb.control_manager.write(0x0018, encode([0x0],4)) | ||
await tb.control_manager.write(0x001C, encode([0x0],4)) | ||
await tb.control_manager.write(0x0020, encode([0x0],4)) | ||
await tb.control_manager.write(0x0024, encode([0x0],4)) | ||
#Assert ap_start by writing 1 to 0x0000 | ||
await tb.control_manager.write(0x0000, encode([0x1],1)) |
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.
TODO: Change this from being hardcoded to be dynamic and also dependent on if we are targeting Xilinx or not
yxi/xml/xml_generator.py
Outdated
@@ -23,7 +23,7 @@ def gen_xml(yxi): | |||
root, | |||
"kernel", | |||
{ | |||
"name": yxi["toplevel"], | |||
"name": "wrapper", |
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.
TODO: Might need to change this from wrapper
to Toplevel
according to the backwards compatibility fix implemented, mentioned above.
…ith verilog AXI wrapper
@sampsyo @nathanielnrn what should we do with this PR? I assume @nathanielnrn has massively less time to directly work on this so we should make a decision about how we're going to merge things or close them out. |
At the highest level this PR should allow for correct
xclbin
s to be produced from Calyx programs.Broadly speaking this PR does 2 things (sorry for combining them, but some small fixes are sprinkled throughout making things hard to separate into their own changes):
axi_controller_generator.py
which is meant to create a subordinate adhering to Xilinx's control spec. There might be some issues with this as executing on hardwares seems to hang at the moment, and the only difference between the generated verilog is the addition of the controller subordinate AFAIK..xo
. This is different from the previous.futil
to.xo
(which should eventually be deprecated), and is the "correct" way to create a.xo
with the new Calyx-AXI-wrappers.I'll do my best to comment the PR heavily to explain which changes affect what.
Furthermore, not sure if the controller itself needs a deep dive w.r.t code review. There are probably problems with it, that require waveform debugging to uncover.
EDIT: More work than I thought regarding backwards compatibility. Commented where changes are needed
In general there are a few outstanding TODOs even after this PR is merged. I'll make issues about these:
axi-generator.py
toaxi_generator.py