ghdl / ghdl-yosys-plugin

VHDL synthesis (based on ghdl)
GNU General Public License v3.0
295 stars 32 forks source link

How to run unisim using cxxrtl #197

Open aniketabhiraj2004 opened 1 week ago

aniketabhiraj2004 commented 1 week ago

yosys -m ghdl -p "ghdl --std=93c --ieee=synopsys -fexplicit -Whide -Wspecs dut2; write_cxxrtl blink.cpp"

/----------------------------------------------------------------------------\ | yosys -- Yosys Open SYnthesis Suite | | Copyright (C) 2012 - 2024 Claire Xenia Wolf claire@yosyshq.com | | Distributed under an ISC-like license, type "license" to see terms | ----------------------------------------------------------------------------/ Yosys 0.42+28 (git sha1 ede3750a6, g++ 10.2.0 -fPIC -Os)

-- Running command `ghdl --std=93c --ieee=synopsys -fexplicit -Whide -Wspecs dut2; write_cxxrtl blink.cpp' --

  1. Executing GHDL. /tools/Xilinx/Vivado/2019.2/data/vhdl/src/unisims/primitive/FIFO18E2.vhd:420:27:error: no declaration for "gsr" glblGSR <= TO_X01(GSR); ^ ERROR: vhdl import failed.
tgingold commented 1 week ago

Apparently, there are some global signals which aren't yet supported. You could probably try to modify unisim to remove them.

If you have a reproducer (not using unisim, which is not open source), I could try to add support for it.

aniketabhiraj2004 commented 1 week ago

Can you suggest some open source reproducer.

aniketabhiraj2004 commented 6 days ago

Can you suggest some open source reproducer.

Xiretza commented 6 days ago

Can you suggest some open source reproducer.

That's what's being asked of you. For the issue to be fixed, there needs to be a design that reproduces the issue without using proprietary libraries - you're in the best position to create such a design, since you just need to modify your existing reproducer to not use unisim.

befedo commented 6 days ago

yosys -m ghdl -p "ghdl --std=93c --ieee=synopsys -fexplicit -Whide -Wspecs dut2; write_cxxrtl blink.cpp"

/---------------------------------------------------------------------------- | yosys -- Yosys Open SYnthesis Suite | | Copyright (C) 2012 - 2024 Claire Xenia Wolf claire@yosyshq.com | | Distributed under an ISC-like license, type "license" to see terms | ----------------------------------------------------------------------------/ Yosys 0.42+28 (git sha1 ede3750a6, g++ 10.2.0 -fPIC -Os)

-- Running command `ghdl --std=93c --ieee=synopsys -fexplicit -Whide -Wspecs dut2; write_cxxrtl blink.cpp' --

  1. Executing GHDL. /tools/Xilinx/Vivado/2019.2/data/vhdl/src/unisims/primitive/FIFO18E2.vhd:420:27:error: no declaration for "gsr" glblGSR <= TO_X01(GSR); ^ ERROR: vhdl import failed.

If I remember correctly, the GSR/GTS signals are only necessary for simulation and where generated like shown here.

Did you include GLBL_VHD.vhd?