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

Fix copy_done and send_done to be asserted at the correct time #1079

Closed
Tracked by #1072
nathanielnrn opened this issue Jul 6, 2022 · 2 comments · Fixed by #1103
Closed
Tracked by #1072

Fix copy_done and send_done to be asserted at the correct time #1079

nathanielnrn opened this issue Jul 6, 2022 · 2 comments · Fixed by #1103
Labels
C: FPGA Changes for the FPGA backend

Comments

@nathanielnrn
Copy link
Contributor

nathanielnrn commented Jul 6, 2022

Part of #1072

@nathanielnrn
Copy link
Contributor Author

Need to understand how calyx programs in turn interact with rust to generate the code, i.e how can we find the correct number of cycles to go through. Also thinking about how to parametrically decide memory size

@sampsyo
Copy link
Contributor

sampsyo commented Jul 7, 2022

Here is where those signals are being defined in our Verilog generator:
https://github.com/cucapra/calyx/blob/33a2cf73b2c54ea014dddeea227fbc715a74648b/src/backend/xilinx/memory_axi.rs#L130-L138

It looks like the intent there is to say that the copying is done (copy_done is asserted) when we have copied memory_size elements, and analogously with sending. But memory_size is hard-coded to 32!
https://github.com/cucapra/calyx/blob/33a2cf73b2c54ea014dddeea227fbc715a74648b/src/backend/xilinx/memory_axi.rs#L105

Of course, we want to get this size from the actual memory in the Calyx program…

Seems like we will need to change the memory_module function to take this size information as a parameter. Fortunately, at the point where we call that, it looks like we have access to the actual memory itself:
https://github.com/cucapra/calyx/blob/ce7fce008d2978c187083e082632c3ffc02856a5/src/backend/xilinx/toplevel.rs#L55-L62

@rachitnigam rachitnigam added the C: FPGA Changes for the FPGA backend label Jul 8, 2022
@nathanielnrn nathanielnrn linked a pull request Jul 14, 2022 that will close this issue
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants