微處理器 - Lattice LCMXO2-4000HC-4MG132C (STEP-MXO2 V2) - 解決ghdl.so: cannot open shared object file問題



參考資訊:
https://github.com/ghdl/ghdl-yosys-plugin

問題如下:

yosys -m ghdl -p "ghdl main.vhd -e main; synth_lattice -family xo2 -json main.json"

 /----------------------------------------------------------------------------\
 |  yosys -- Yosys Open SYnthesis Suite                                       |
 |  Copyright (C) 2012 - 2026  Claire Xenia Wolf <claire@yosyshq.com>         |
 |  Distributed under an ISC-like license, type "license" to see terms        |
 \----------------------------------------------------------------------------/
 Yosys 0.61+21 (git sha1 967b47d98, g++ 12.2.0-14+deb12u1 -fPIC -O3)
ERROR: Can't load module `./ghdl': /usr/local/bin/../share/yosys/plugins/ghdl.so: cannot open shared object file: No such file or directory
make: *** [Makefile:2: all] Error 1

解法如下:

$ cd
$ git clone https://github.com/ghdl/ghdl-yosys-plugin --recursive
$ cd ghdl-yosys-plugin/
$ make -j4
$ sudo make install