diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Makefile | 15 |
2 files changed, 16 insertions, 0 deletions
@@ -6,3 +6,4 @@ *.dep *.vvp *.lxt2 +verilator.*/ @@ -53,6 +53,9 @@ clean: simu: $(PROGRAM).lxt2 gtkwave $< +simu2: verilator.$(PROGRAM)/dump.vvp + gtkwave $< + lint: $(PROGRAM).v verilator --lint-only -Wall -Wno-PROCASSINIT $(PROGRAM).v @@ -96,6 +99,18 @@ lint: $(PROGRAM).v %.vvp: %.v %.tb.v iverilog -DDUMP_FILE_NAME='"$*.lxt2"' -g2012 -o $*.vvp $*.v $*.tb.v +# verilog unfortunately exits on any warning +# also on warnings "boohoo, you specified timings in some modules and not in others" +# since this is fucking annoying, I choose to ignore the exit code. +verilator.%: %.v %.tb.v + verilator -DDUMP_FILE_NAME='"dump.vvp"' --trace --timing --main --exe --Mdir verilator.$(PROGRAM) $(PROGRAM).tb.v || true + +# need to specify RM for some reason +# verilators makefiles doesn't specify the variable +verilator.%/dump.vvp: verilator.% + $(MAKE) -C verilator.$(*) -f V$(*).mk RM=rm + cd verilator.$(*) && ./V$(*) + ## inter-file dependencies -include $(DEPS) -include $($(wildcard *.fs:.fs=.dep) |
