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

rust-hdl and circt #25

Open
jcdutton opened this issue Jun 25, 2023 · 2 comments
Open

rust-hdl and circt #25

jcdutton opened this issue Jun 25, 2023 · 2 comments

Comments

@jcdutton
Copy link

Would it be possible to have rust-hdl output to circt. https://circt.llvm.org/
One could then use the LLVM/MLIR to optimize the output before outputting System Verilog or VHDL.
For example rust is already compiled via LLVM, why not compile rust-hdl via CIRCT ?
If one tries to create Verilog from rust-hdl directly, one kind of skips the optimization opportunities.

@samitbasu
Copy link
Owner

@jcdutton - it looks interesting, but the documentation is a bit hard to follow. Do you have some pointers to how to actually use circt to build something?

@jcdutton
Copy link
Author

jcdutton commented Jul 2, 2023

As you can see from the diagram on the https://circt.llvm.org/. There are several routes to get to FPGA through circt.
I would suggest looking at "Chisel" and "polygeist" as starting points.
Chisel lowers to firrtl, so maybe lowering rush-hdl to firrt would suit.
polygeist lowers to MLIR SCF, AFFINE, ARITH, CF. So if rush-hdl is more like polygeist, lowering the same way polygeist does might be best.
The Polygeist path permits many more higher level optimizations than the firrtl path.
If you try an Chisel example, and then a polygeist example and see what you find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants