hdl / conda-eda

Conda recipes for FPGA EDA tools for simulation, synthesis, place and route and bitstream generation.
https://anaconda.org/LiteX-Hub
Apache License 2.0
95 stars 26 forks source link

uhdm-yosys is missing `memory_libmap` command #321

Open xobs opened 1 year ago

xobs commented 1 year ago

The UHDM version of Yosys is missing the memory_libmap command:

(base) user@Ondo:~$ yosys -q -p memory_libmap
(base) user@Ondo:~$ uhdm-yosys -q -p memory_libmap
ERROR: No such command: memory_libmap (type 'help' for a command overview)
(base) user@Ondo:~$

Unfortunately, because UHDM is bundled as its own version of Yosys, this makes it impossible to do memory inference while also using SystemVerilog.

xobs commented 1 year ago

Actually, it's possible to copy the plugin from uhdm-yosys to yosys, in which case it works.

What's the rationale of distributing a second copy of Yosys, as opposed to including the plugin with the standard Yosys distribution?

$ cp -a "$CONDA_PREFIX/share/uhdm-yosys/plugins" "$CONDA_PREFIX/share/yosys/"
mithro commented 1 year ago

I believe that Yosys previously needed patches to work with UHDM. I believe, that should no longer be the case?

FYI - @proppy / @kgugala / @mgielda

mithro commented 1 year ago

FYI - @hzeller / @PiotrZierhoffer

hzeller commented 1 year ago

Patches were needed for Yosys a while back but are not needed anymore for about 2 years or so. UHDM/Surelog/yosys-f4pga-plugins just compile against a plain Yosys. So if there is a uhdm-yosys compiled now, it is not needed anymore as separate binary.

For instance if you use NixOS or the nix package manager, the systemverilog plug-in is distributed and it works against the stock yosys, so all of these work:

nix-shell -p yosys-symbiflow.systemverilog yosys
yosys -q -p memory_libmap
yosys -q -p "plugin -i systemverilog"
xobs commented 1 year ago

Then I think the uhdm plugin for Yosys should be updated so that it installs the .so files into share/yosys/plugins, and remove the ned for it to bundle its own version of Yosys.

tgorochowik commented 1 year ago

Agreed, let's remove the obsolete yosys-uhdm build, everything should work with stock yosys and I don't think there are any users of the obsolete fork at this point