Commit Graph

12 Commits

Author SHA1 Message Date
J. Wang 4b5842336d
Add support for macOS (#64)
Add support for macOS:

* bugfix(exprtk): Upgrade verison of exprtk to fix compile error in clang.

* refact: Remove `bits/stdc++.h` and move `src/codegen/cpp.cpp::replace_all` to `include/picker.hpp::str_replace_all`

* feat: Use `dlopen` for non-linux platform.

* fix: Add missing headers

* fix(nproc): Fix bug of missing `nproc` in MacOS

* refactor(python): Adapt python template to macOS

* refactor(mem_direct): Adapt mem_direct template to macOS

* refactor(lib_suffix): Add shared library suffix in code generator

* refactor(dut_base.cpp): Use code generator to set library suffix

* add(cpp): Add cpp support for macOS

* add(java): Add java support for macOS

* refactor(nproc): Set $NPROC to support macOS

* fix(parser/sv): Add missing header file `unordered_set`

* fix(python_macos): fix the wrong suffix of module-type library

* refactor(codegen/lib): generator template use absolute path

* fix(mem_direct): fix link error in macOS

* feat: Use LLVM Clang to compile instead of AppleClang

* feat(golang): Add golang support for macOS

* fix(rpath): fix CMAKE_BUILD_RPATH for macOS

* feat(lua): Add lua support for macOS

* fix(scala): Fix wrong use of static method in scala

* feat(scala): Add scala support for macOS

* refactor(cmake): Upgrade cmake version to 3.15

* feat(doc): Add doc about installing picker on macOS
2025-11-03 10:38:10 +08:00
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
yaozhicheng 7df84adb88 fix(java/scala): fix pakage name 2025-04-30 11:23:00 +08:00
yaozhicheng 1d09427913 fix(interlsignal/XCFG): Adapt to VPI and Mem direct internal signals 2025-04-30 11:23:00 +08:00
yaozhicheng 7a2dc6a7f2 fix(swig): pack *_offset.yaml into jar file 2025-04-30 11:23:00 +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
yaozhicheng 55241b5a83 add scala suppor & test Adder pass 2024-07-17 10:34:01 +08:00
yaozhicheng ce5a54b037 simple_step.java -> example.java 2024-06-25 19:45:35 +08:00
yaozhicheng 3f2697749d add java support 2024-06-25 13:54:54 +08:00