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

Way to set CFLAGS for testbench code only #805

Closed
veripoolbot opened this issue Jul 20, 2014 · 2 comments
Closed

Way to set CFLAGS for testbench code only #805

veripoolbot opened this issue Jul 20, 2014 · 2 comments
Labels
area: invoking/options Issue involves options passed to Verilator resolution: no fix needed Closed; no fix required (not a bug)

Comments

@veripoolbot
Copy link
Contributor


Author Name: Jonathon Donaldson
Original Redmine Issue: 805 from https://www.veripool.org
Original Date: 2014-07-20


Is there a way to set special CFLAGS for the testbench code only (e.g. sim_main.cpp)? I'd like to try out some experimental CFLAGS for my testbench code but I don't want those flags affecting the verilator generated code. Is this possible?

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-07-20T22:50:06Z


There isn't a command line way to do it, but you can just write your own makefile, including the verilator one. Then override the make rule for that file.

Roughly

include foo.mk
sim_main.o: sim_main.cpp

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2014-07-20T22:51:26Z


(Sorry hit ctl-return too early)

There isn't a command line way to do it, but you can just write your own makefile, including the verilator one. Then override the make rule for that file.

Roughly

include foo.mk
sim_main.o: sim_main.cpp
    $(CC) flags... -o sim_main.o -c sim_main.cpp

Also see test_regress/Makefile_obj in the tarball which does exactly this.

@veripoolbot veripoolbot added area: invoking/options Issue involves options passed to Verilator resolution: nofixneeded resolution: no fix needed Closed; no fix required (not a bug) and removed resolution: nofixneeded labels Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: invoking/options Issue involves options passed to Verilator resolution: no fix needed Closed; no fix required (not a bug)
Projects
None yet
Development

No branches or pull requests

1 participant