-
Notifications
You must be signed in to change notification settings - Fork 31
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
Error building ghdl plugin for yosys #168
Comments
@mithro @msaligane Now I think it is a feasible solution for me to synthesize vhdl file. But I stuck at building plugin. |
Can you check with @antonblanchard how he synthesized Microwatt (VHDL) |
@minghungumich how do you want to build the ghdl-yosys-plugin? As a module (https://github.com/ghdl/ghdl-yosys-plugin#build-as-a-module-shared-library) or built into yosys (https://github.com/ghdl/ghdl-yosys-plugin#build-as-part-of-yosys-not-recommended)? Note that on Windows, the second (non recommended) approach needs to be used, because Yosys cannot load plugins dynamically on that platform. |
@msaligane I believe that @antonblanchard uses containers with GHDL, Yosys and the plugin already available. See https://github.com/antonblanchard/microwatt/blob/master/Makefile#L37-L49. Containers from ghdl/docker are used for simulation, and containers from hdl/containers are used for synthesis. In those containers, the plugin is built as a module. See also https://github.com/ghdl/ghdl-yosys-plugin/blob/master/ci.sh#L37-L82. |
@minghungumich, note that the regular GHDL executable allows to "synthesize" VHDL >= 2008 to either VHDL 1993 or Verilog 2005. That's done through |
@umarcor I want to build it as a module and use it as a plugin loaded into yosys. Then I can either use this to convert into verilog or read_vhdl directly. |
@umarcor I try to use this way, but the release package I found from fpga-tool-chain looks like this latest version did not support --out=verilog options. |
Then, we should probably start with using a version of GHDL which is not coming from fpga-toolchain. As you found out, it's archived and outdated. Can you get any other version of GHDL? Either from your system package manager, using containers or building it yourself? What's you host OS? |
My host OS is CentOS7, and I also see lots of problem built in the same platform from GitHub issue. I think container should be the most promising way for me. |
@umarcor Now I am able to convert some vhdl file to verilog file. I will try to synthesize and see if it has any problem. |
@umarcor I found although the input output port will be kept. But the parameter definition will be gone. For example, in one of the vhd file, I have parameter RATIO for signal
But in the output verilog file, it just directly converts to the fixed number of bits.
|
Well, that's expected. You are doing a synthesis and the output is a netlist.
|
Hi, I just encountered the same problem as above @minghungumich (I'm from NTU as well XD), so do you resolve the issue by container? or can you briefly describe how to resolve it? I'm using a workstation and not sure if I could use the container. I'm using the latest GHDL as well:
Thanks a lot! |
Can you file the error message ? |
First I cannot build ghdl locally, so I use the latest release from fpga-tool-chain.
And I am able to run binary
ghdl
, but when I try to build ghdl plugin for yosys. It displays the following error.Then I try to add include directory for yosys in Makefile manually.
It still companies about
xxx was not declared in this scope
like thisThe text was updated successfully, but these errors were encountered: