Skip to content

Commit 3d28a93

Browse files
committed
verilator: speedup compile and synthesis
1 parent 60904c3 commit 3d28a93

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,15 @@ vsim-yosys: vsim/compile_netlist.tcl $(SW_HEX) yosys/out/croc_chip_yosys_debug.v
8282

8383
# Verilator
8484
VERILATOR_ARGS = --binary -j 0 -Wno-fatal
85-
VERILATOR_ARGS += -Wno-style
85+
VERILATOR_ARGS += -Wno-style -Wno-WIDTHEXPAND
8686
VERILATOR_ARGS += --timing --autoflush --trace --trace-structs
87+
VERILATOR_ARGS += --unroll-count 1 --unroll-stmts 1
8788

8889
verilator/croc.f: Bender.lock Bender.yml
8990
$(BENDER) script verilator -t rtl -t verilator -DSYNTHESIS -DVERILATOR > $@
9091

9192
verilator/obj_dir/Vtb_croc_soc: verilator/croc.f $(SW_HEX)
92-
cd verilator; $(VERILATOR) $(VERILATOR_ARGS) -CFLAGS "-O0" --top tb_croc_soc -f croc.f
93+
cd verilator; $(VERILATOR) $(VERILATOR_ARGS) -O3 -CFLAGS "-O1 -march=native" --top tb_croc_soc -f croc.f
9394

9495
## Simulate RTL using Verilator
9596
verilator: verilator/obj_dir/Vtb_croc_soc

0 commit comments

Comments
 (0)