chipsalliance / synlig

SystemVerilog support for Yosys
Apache License 2.0
154 stars 20 forks source link

Module not found #2322

Open rodrigomelo9 opened 7 months ago

rodrigomelo9 commented 7 months ago

Using yosys and synlig compiled from sources, I'm trying to convert SV into V (without synthesis), as follows:

yosys -Q -p "
plugin -i systemverilog
read_systemverilog counter.sv
hierarchy -top counter
write_verilog -noattr counter.v
"

And it fails:

ERROR: Module `counter' not found!

-- Running command `
plugin -i systemverilog
read_systemverilog counter.sv
hierarchy -top counter
write_verilog -noattr counter.v
' --
    -noassert
        ignore assert() statements
    -debug
        alias for -dump_ast1 -dump_ast2 -dump_vlog1 -dump_vlog2

Some comments:

alaindargelas commented 7 months ago

Make sure you use the yosys built by Synlig, not any other Yosys you built yourself. The Yosys built by Synlig has the plugin installed. It looks like your plugin and Yosys are not compatible. Synlig has 100s of regressions passing on GitHub actions, none show the behavior you are seeing

rodrigomelo9 commented 7 months ago

I see... So, following "Installation" I can use the Yosys built by Debian, but with "Installation from source" I need a particular Yosys version... I will try.