-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add Mixed HDL Blink example #338
Conversation
@xobs - Do we know any VHDL supporters who could review this? |
FYI - @tcal-x |
/cc @GlenNicholls @hackfin @ktbarrett @LarsAsplund @marph91 @Paebbels @rodrigomelo9 @tgingold @tmeissner Guys, would you please have a look at this PR? It's about mixed HDL synthesis (with ghdl-yosys-plugin and Yosys).
All examples describe the same circuit/design. The purpose is for users to see the differences/equivalencies between languages, and most important, to know how to combine them. Corresponding docs are found at https://umarcor.github.io/fomu-workshop/hdl.html |
I will have a look 🙂 |
Co-authored-by: T. Meissner <[email protected]>
Co-authored-by: T. Meissner <[email protected]>
The PR looks good for me as an VHDL (and part time Verilog) guy. The code looks similar to that we have at work when mixing VHDL & Verilog code to process it with the vendor tools (Synplify, Lattice LSE and Vivado in our case). |
@umarcor - I'm happy to move forward, are you ready for this to be merged? |
Sounds good to me! |
Close #334
NOTE: this PR is based on #334.
However, in #334 container images are used to workaround GHDL being missing in Fomu toolchain. Here, open-tool-forge/fpga-toolchain is used instead. Using fpga-toolchain or containers for VHDL and/or mixed HDL projects is equivalent. Moreover, fpga-toolchain seems to be a valid replacement for part of Fomu toolchain (im-tomu/fomu-toolchain#20). Therefore, I will keep this PR as a draft until either #334 or im-tomu/fomu-toolchain#20 are merged. When those are merged, I will update the docs and Makefiles accordingly.This PR adds subdir
mixed-hdl/blink
. It is equivalent toverilog/blink
orvhdl/blink
, but instead of using a single HDL language, VHDL and Verilog are used at the same time. Four possible use cases are provided:blink.vhd
+clkgen.v
blink.v
+clkgen.vhdl
blink.vhd
+clkgen.vhdl
blink.v
+clkgen.v
The makefile builds the first one by default, but users can change between them by modifying two envvars in the Makefile:
VHDL_SYN_FILES
andVERILOG_SYN_FILES
.The README and the docs are updated.
NOTE: instantiating Verilog modules/components with parameters/generics into VHDL works ok, but there seems to be some issue when VHDL components with generics are instantiated in Verilog. See ghdl/ghdl-yosys-plugin#136. Nevertheless, the Verilog modules instantiated in this PR do not have parameters/generics; thus, that's not a blocking factor.