Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Verilator target build to static library #5060

Closed
MrAMS opened this issue May 5, 2024 · 4 comments
Closed

Support Verilator target build to static library #5060

MrAMS opened this issue May 5, 2024 · 4 comments

Comments

@MrAMS
Copy link
Contributor

MrAMS commented May 5, 2024

Is your feature request related to a problem? Please describe.

Firstly, thank you for your brilliant work, xmake is very elegant
I need build Verilator target into a static library, but xmake only have rule verilator.binary.

Describe the solution you'd like

This feature can be implemented with CMake easily.

add_library(core STATIC ./dpic.cpp ./core_nagi.hpp)
verilate(core
  INCLUDE_DIRS "./"
  VERILATOR_ARGS -MMD -cc -O3 --x-assign fast --x-initial fast --noassert -y ${CORE_SRC_DIR} --trace-fst
  SOURCES ${CORE_SRC_DIR}/Core.sv
)

maybe we can have another rule like verilator.lib?

Describe alternatives you've considered

No response

Additional context

No response

@MrAMS
Copy link
Contributor Author

MrAMS commented May 5, 2024

Maybe this code verilator-config.cmake.in is useful

@waruqi
Copy link
Member

waruqi commented May 5, 2024

try this patch #5062

xmake update -s github:xmake-io/xmake#verilator

@MrAMS
Copy link
Contributor Author

MrAMS commented May 5, 2024

Incredible speed 👍 testing

@MrAMS
Copy link
Contributor Author

MrAMS commented May 5, 2024

It seems that work very well so far. Thank you very much for your work.

@MrAMS MrAMS closed this as completed May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants