Skip to content

Conversation

fadialzammar
Copy link

If the installed version of Verilator was built in a different environment, the existing command will extract the wrong VERILATOR_ROOT path. For example, when using the oss-cad-suite-build, verilator -V returns the following:

Verilator 5.027 devel rev v5.026-136-g48c71ef76

Copyright 2003-2024 by Wilson Snyder.  Verilator is free software; you can
redistribute it and/or modify the Verilator internals under the terms of
either the GNU Lesser General Public License Version 3 or the Perl Artistic
License Version 2.0.

See https://verilator.org for documentation

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

Supported features (compiled-in or forced by environment):
    COROUTINES         = 1
    SYSTEMC            = 

The existing command returns /yosyshq/share/verilator, the path used when built by YosysHQ, rather than /opt/oss-cad-suite/share/verilator, the path Verilator was installed to on the current system. Using the --getenv flag instead correctly returns the second path.

@ZipCPU
Copy link
Owner

ZipCPU commented Nov 12, 2024

Sigh. I keep ending up going back and forth on this issue. One fix after another seems to break whatever it is I'm doing.

@ZipCPU
Copy link
Owner

ZipCPU commented Nov 12, 2024

... the ?= was supposed to solve this issue in the first place ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants