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

[Feature Request] Support +define+foo=bar+fizz=buzz on command line #313

Open
infinitymdm opened this issue Apr 4, 2025 · 2 comments
Open

Comments

@infinitymdm
Copy link

The -Dfoo=bar syntax is great, and aligns well with tools like cmake, but doesn't match up with the industry standard +define+foo=bar syntax. +define also typically allows multiple defines in one long string.

@zachjs
Copy link
Owner

zachjs commented Apr 6, 2025

I'm a little hesitant to add another way to define macros. The current -D interface matches that of iverilog and the open source Yosys Verilog frontend; verilator supports both.

If there is interest, I would happily consider a pull request, though I think it may be a bit tricky to do with the command line parser that sv2v uses.

As a workaround, you could consider converting such strings before passing them to sv2v, e.g., sed -E 's/\+define//' | sed -E 's/\+/ -D/g'.

@infinitymdm
Copy link
Author

If I ever decide to dabble in haskell you can expect a PR. At present though, I'll certainly make use of that workaround. Thanks!

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

No branches or pull requests

2 participants