mirror of https://github.com/XS-MLVP/picker.git
Modify the selection logic for `CMD_VERILATOR_ROOT` in `verilator.cmake`. When using a Verilator distribution that is not installed from a package manager or compiled from source, such as the one provided by [oss-cad-suite](https://github.com/YosysHQ/oss-cad-suite-build), the output of `verilator -V` can be as follows: ```bash Summary of configuration: Compiled in defaults if not in environment: SYSTEMC = SYSTEMC_ARCH = SYSTEMC_INCLUDE = SYSTEMC_LIBDIR = VERILATOR_ROOT = /yosyshq/share/verilator SystemC system-wide = 0 Environment: MAKE = PERL = PYTHON3 = SYSTEMC = SYSTEMC_ARCH = SYSTEMC_INCLUDE = SYSTEMC_LIBDIR = VERILATOR_BIN = VERILATOR_ROOT = /opt/oss-cad-suite/share/verilator ``` This output provides two `VERILATOR_ROOT` paths. The one under the `Environment` section is the intended path for this setup. The previous selection logic would incorrectly choose the first `VERILATOR_ROOT` it found, which was the incorrect one from the `Compiled in defaults` section. This patch updates the logic to prioritize the `VERILATOR_ROOT` from the `Environment` section. It will only fall back to the `Compiled in defaults` path if the environment one is not available. |
||
|---|---|---|
| .. | ||
| cmake | ||
| CMakeLists.txt | ||
| Makefile | ||
| dut.cpp | ||
| dut.hpp | ||
| example.cpp | ||