picker/template/lua
FrankOu2001 679a922b11 Fix(cmake): Correctly select VERILATOR_ROOT
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.
2025-08-04 10:56:59 +08:00
..
cmake Fix(cmake): Correctly select VERILATOR_ROOT 2025-08-04 10:56:59 +08:00
CMakeLists.txt multi-lang: add Lua support 2025-01-08 11:35:10 +08:00
Makefile multi-lang: add Lua support 2025-01-08 11:35:10 +08:00
dut.i multi-lang: add Lua support 2025-01-08 11:35:10 +08:00
dut.lua feat(swig): add GetInternalSignal/GetInternalSignalList for lua 2025-04-30 11:23:00 +08:00
example.lua multi-lang: add Lua support 2025-01-08 11:35:10 +08:00