yosys-f4pga-plugins icon indicating copy to clipboard operation
yosys-f4pga-plugins copied to clipboard

[systemverilog plugin] Added commands to match read_verilog (systemverilog_defaults,systemverilog_defines)

Open tinylabs opened this issue 2 years ago • 1 comments

Added commands to match stock verilog frontend in yosys. These will make it easier to utilize higher level tools such as edalize.

tinylabs avatar Aug 15 '22 22:08 tinylabs

Thanks for working on this! Would you please add a simple test for those commands as well?

rkapuscik avatar Aug 26 '22 08:08 rkapuscik

@tgorochowik @rkapuscik can you merge this in? This is preventing Black-Parrot debugging. Please forget the unit tests, this is simple code. Now this PR is conflicting because it aged.

alaindargelas avatar Dec 07 '22 21:12 alaindargelas

@alaindargelas just FYI: black-parrot can be debugged without it.

Instead of adding default arguments using systemverilog_defaults -add:

systemverilog_defaults -add -sverilog
systemverilog_defaults -add -Iblack-parrot/external/basejump_stl/bsg_cache
systemverilog_defaults -add -Iblack-parrot/external/basejump_stl/bsg_dataflow
systemverilog_defaults -add (...)

read_systemverilog -defer   black-parrot/external/basejump_stl/bsg_misc/bsg_defines.v
read_systemverilog -defer   black-parrot/external/basejump_stl/bsg_cache/bsg_cache_pkg.v
read_systemverilog -defer   black-parrot/external/basejump_stl/bsg_noc/bsg_noc_pkg.v
(...)

Put all those arguments in every read_systemverilog:

read_systemverilog -defer  -sverilog -Iblack-parrot/external/basejump_stl/bsg_cache -Iblack-parrot/external/basejump_stl/bsg_dataflow (...)  black-parrot/external/basejump_stl/bsg_misc/bsg_defines.v
read_systemverilog -defer  -sverilog -Iblack-parrot/external/basejump_stl/bsg_cache -Iblack-parrot/external/basejump_stl/bsg_dataflow (...)  black-parrot/external/basejump_stl/bsg_cache/bsg_cache_pkg.v
read_systemverilog -defer  -sverilog -Iblack-parrot/external/basejump_stl/bsg_cache -Iblack-parrot/external/basejump_stl/bsg_dataflow (...)  black-parrot/external/basejump_stl/bsg_noc/bsg_noc_pkg.v
(...)

mglb avatar Dec 08 '22 11:12 mglb

Since this was created from another fork, I created https://github.com/chipsalliance/yosys-f4pga-plugins/pull/417 with a cleaned up and rebased version.

rkapuscik avatar Dec 08 '22 14:12 rkapuscik