Closed hpretl closed 2 weeks ago
@donn Maybe the above issue just boils down to the question: How is OpenLane calling yosys
, and how do you load modules like ghdl
?
I don't understand nix, but it looks like there is some kind of wrapper involved? https://github.com/efabless/openlane2/blob/7691a45f4bbafc77ab70f30c22d9698d462e41c7/nix/yosys.nix
@hpretl That's correct. We wrap the Yosys binary to load the modules, including GHDL and Lighter (upstream Nixpkgs does this as well too.)
Something like this in place of the yosys binary should work:
#!/bin/sh
exec -a "$0" <path/to/yosys-bin> -m ghdl "$@"
We implemented now a wrapper similar to the above one in our IIC-OSIC-TOOLS. An alternative way, I think cleaner, is that OpenLane adapts the calling of yosys. Like using yosys
for Verilog, or using yosys -m gdhl
for VHDL, or yosys -m systemverilog
.
Or just use yosys -m ghdl -m systemverilog
in any case, if this modules are available.
@donn What do you think?
Doable- will think about it, I'm messing with Yosys stuff atm
Please notify me when you change things because then I will remove the Yosys wrapper again :-)
2.2.0 loads plugins explicitly, however, it introduces another issue because you need to pull in https://github.com/YosysHQ/yosys/pull/4553 until it gets merged
Anyways, should be in the next release. Thank you for your patience
Description
A user tried to use the VHDL flow in OpenLane in our IIC-OSIC-TOOLS image, see https://github.com/iic-jku/IIC-OSIC-TOOLS/issues/43.
The error is that the command
ghdl
is not working inside Yosys. If I start Yosys just bythen running
ghdl
inside, it throws the errorERROR: No such command: ghdl (type 'help' for a command overview)
.If I start Yosys with
then running
ghdl
inside Yosys works fine!Question: What is wrong with the OpenLane setup in our image?
Expected Behavior
VHDLClassic flow should work.
Environment report
Reproduction material
None needed.
Relevant log output