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

[fud] xclbin stage should use Xilinx paths, etc., from the configuration rather than hard-coding them #1037

Open
andrewb1999 opened this issue Jun 14, 2022 · 4 comments
Labels
C: FPGA Changes for the FPGA backend C: fud Calyx Driver S: Available Can be worked upon

Comments

@andrewb1999
Copy link
Collaborator

In xclbin.py the locations of vivado and v++ are hard-coded instead of being based on some value in the configuration file. This prevents the xclbin stage from working on computers where vivado is installed in a different location. If someone can let me know of the proper way to fix this issue I'll submit a pull request with the changes.

@rachitnigam
Copy link
Contributor

The jq stage might be a good example for how to do this: https://github.com/cucapra/calyx/blob/master/fud/fud/stages/jq.py#L24

Essentially, you get access to the config field in _define_steps where you can get the value of a configuration variable and use it. The hardcoding in xclbin.py happens here: https://github.com/cucapra/calyx/blob/master/fud/fud/stages/xilinx/xclbin.py#L98

We can replace it with self.config["stages", self.name, "exec"]. Out of curiousity, what are you using this for? @nathanielnrn is working on making emulation.py the default way to synthesize things through Vivado and might be worth coordinating with.

@andrewb1999
Copy link
Collaborator Author

Yeah I realized after I wrote this that there is still ongoing work to get Calyx running on xilinx fpgas. I eventually want to run on real FPGAs, but I can pause this for now while development work is still ongoing.

@andrewb1999
Copy link
Collaborator Author

Closing for now while the xilinx flow is still in development, will reopen if it is still relevant in the future.

@sampsyo
Copy link
Contributor

sampsyo commented Jun 15, 2022

Yo! Yes, this is indeed a problem! The overall issue is actually tracked in #856. The configuration of all this stuff is a total mess; some places it's hard-coded, and some places it's configured redundantly across multiple different stages' isolated configurations; etc.

If you're cool with it, I'll actually reopen this in order to track the very specific/near-term problem of adding configuration options to the xclbin stage… we should absolutely do that before completely solving #856 by rethinking/collapsing all the various messy options into one set as that issue suggests.

Perhaps an even more pertinent example of what needs to be done here is in the analogous configuration in the vestigial emulation stage:
https://github.com/cucapra/calyx/blob/fcbd6bcc5201b07de6dde534f1c4af9d0bb35457/fud/fud/stages/xilinx/emulation.py#L39

@sampsyo sampsyo reopened this Jun 15, 2022
@sampsyo sampsyo changed the title The xclbin stage does not respect vivado and v++ location [fud] xclbin stage should use Xilinx paths, etc., from the configuration rather than hard-coding them Jun 15, 2022
@rachitnigam rachitnigam added S: Available Can be worked upon C: fud Calyx Driver labels Jun 18, 2022
@sampsyo sampsyo added the C: FPGA Changes for the FPGA backend label Jul 15, 2022
This was referenced Jul 19, 2022
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: fud Calyx Driver S: Available Can be worked upon
Projects
None yet
Development

No branches or pull requests

3 participants