Commit Graph

35 Commits

Author SHA1 Message Date
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
Makiras ba5127bd4b
add new feat: appimage (#43)
* [fix] performance analysis and internal signal config

* add dockerfile and ci builder

* [feat] add appimage building process, basic cpp support

* [fix] appimage multi-language support, appimage mode detection

* [feat] integrate verible-verilog-syntax in appiamge, fix dynamic lib search priority

* try ci appimages

* [fix] cmake CMP0171 for codegen keyword

* [fix] cmake CMP0171 for codegen keyword

* [fix] cmake CMP0171 for codegen keyword

* [fix] cmake CMP0171 for codegen keyword

* [fix] cmake CMP0171 for codegen keyword

* [fix] arm64 autobuild

* [fix] arm64 autobuild

* [fix] tag right release

* [fix] format and typos

* [fix] typo explaination should be corrected to 'explanation'

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-08 16:04:14 +08:00
Makiras 5abf516100
[fix] quick fix for GetInternalSignal raw ptr to shared_ptr (#40) 2025-06-09 10:00:10 +08:00
yaozhicheng ee41d8bf4b new feat(cpp): add GetInternalSignalList/GetInternalSignal for cpp && test pass 2025-04-30 11:23:00 +08:00
yaozhicheng bbca48b8ae feat: export new API GetXClock/GetXPort/OpenWaveform/CloseWaveform 2025-04-30 11:23:00 +08:00
Makiras fcf7db4e9b add example: vpi interal support for cpp 2025-01-08 11:35:10 +08:00
yaozhicheng 966cdd2e90 fix purge: rm UT_{{tname}} 2024-11-19 11:19:46 +08:00
yaozhicheng 21f8adfe42 add: support cascaded_signals for cpp 2024-08-27 19:15:53 +08:00
yaozhicheng 7358d986b7 refine: default purge DUT 2024-08-27 16:34:48 +08:00
yaozhicheng ed1bd11e4a add option --cp_lib 2024-07-29 05:46:49 +00:00
yaozhicheng ad39455c1e fix: fix cmake for vcs 2024-07-29 04:07:40 +00:00
Makiras 538409a8b3 update cmake config for multi verilator version and support higher verilator version
picker will find VERILATOR_ROOT by using Verilator 5.026 2024-06-15 rev v5.026

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     = /opt/verilator5/share/verilator
    SystemC system-wide = 0

Environment:
    MAKE               =
    PERL               =
    SYSTEMC            =
    SYSTEMC_ARCH       =
    SYSTEMC_INCLUDE    =
    SYSTEMC_LIBDIR     =
    VERILATOR_BIN      =
    VERILATOR_ROOT     = /opt/verilator5/share/verilator

Supported features (compiled-in or forced by environment):
    COROUTINES         = 1
    SYSTEMC            =  command
2024-07-25 17:01:37 +08:00
Makiras 2d8e640ef8 update Caches and RnadomGenerator VCS example 2024-07-17 10:34:01 +08:00
Makiras b905acf43e fix VCS for cpp 2024-07-17 10:34:01 +08:00
yaozhicheng 772cd9efe8 uniform mk 2024-07-17 10:34:01 +08:00
yaozhicheng 805753f834 uniform dut.xclock, dut.xport 2024-07-17 10:34:01 +08:00
yaozhicheng c716808fd2 clean up workspace 2024-07-17 10:34:01 +08:00
yaozhicheng 3f857c4dbb refine user APIs 2024-07-17 10:34:01 +08:00
Makiras 7cdd8d576c refacted DutUnifiedBase without inhert and change dlmopen abstract level
due to dlmopen DPI library is simulator-related, we choose to dlmopen whole libUT.so without simulator-related code
2024-07-17 10:34:01 +08:00
Makiras a1192bd277 add multi-instance support with dlmopen for VERILATOR 2024-07-17 10:34:01 +08:00
yaozhicheng f83be8ae7f mute output 2024-06-25 19:48:07 +08:00
Makiras e4d55c8db3 fix bugs: coverage needs verbose mode, example finalize 2024-04-25 16:18:01 +08:00
Makiras af57c824e1 fix rpath using relative path need $ORIGIN 2024-04-25 16:18:01 +08:00
Makiras 18822e1301 add non-root include/lib search 2024-01-25 02:45:42 +00:00
Makiras 7c275b40ce add quick start example 2023-12-29 10:05:07 +00:00
Makiras 336e9d9d6c add verilator coverage collection 2023-12-27 06:46:18 +00:00
Makiras 8705b0bf10 workaround optimize python lib install, add XDATA c-function-pointer support for python swig 2023-12-14 08:20:31 +00:00
Makiras 2ec8fffd7f fix verilator waveformat bugs, optimize cpp example mode, update xcomm 2023-12-13 03:08:02 +00:00
Makiras 3561f26d5f optimize cmake project generate 2023-12-12 03:39:41 +00:00
Makiras 4ff2e087f8 finetune VCS support 2023-12-11 09:37:28 +00:00
Makiras 06751a12f8 optimize mcv output content
add verbose mode and example project mode
todo: add python support ,finetune vcs support
2023-12-11 08:36:32 +00:00
Makiras e8374d56c7 Refactor the overall code logic.
Generate encapsulated C++ classes based on dpi and codegen.
2023-10-27 09:32:38 +00:00
yaozhicheng 30a8559c58 add cpp example 2023-08-16 09:51:18 +08:00
yaozhicheng dd755fdfe6 update 2023-08-14 21:00:52 +08:00
yaozhicheng 04f98203e7 update 2023-08-12 18:50:28 +08:00