Skip to content

Commit 9f72587

Browse files
committed
tools: change verilator tracing from vcd to fst
FST is a binary format and a lot faster. Additionally, oseda 2025.07 segfaults with vcd tracing only.
1 parent 64b2897 commit 9f72587

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

Makefile

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,21 @@ vsim-yosys: vsim/compile_netlist.tcl $(SW_HEX) yosys/out/croc_chip_yosys_debug.v
8888

8989

9090
# Verilator
91-
VERILATOR_ARGS = --binary -j 0 -Wno-fatal
92-
VERILATOR_ARGS += -Wno-style -Wno-WIDTHEXPAND
93-
VERILATOR_ARGS += --timing --autoflush --trace --trace-structs
91+
# Turn off style warnings and well-defined SystemVerilog warnings that should be part of -Wno-style
92+
VERILATOR_ARGS = -Wno-fatal -Wno-style \
93+
-Wno-BLKANDNBLK -Wno-WIDTHEXPAND -Wno-WIDTHTRUNC -Wno-WIDTHCONCAT -Wno-ASCRANGE
94+
95+
VERILATOR_ARGS += --binary -j 0
96+
VERILATOR_ARGS += --timing --autoflush --trace-fst --trace-threads 2 --trace-structs
9497
VERILATOR_ARGS += --unroll-count 1 --unroll-stmts 1
98+
VERILATOR_ARGS += --x-assign fast --x-initial fast
99+
VERILATOR_CFLAGS += -O3 -march=native -mtune=native
95100

96101
verilator/croc.f: Bender.lock Bender.yml
97102
$(BENDER) script verilator -t rtl -t verilator -DSYNTHESIS -DVERILATOR > $@
98103

99104
verilator/obj_dir/Vtb_croc_soc: verilator/croc.f $(SW_HEX)
100-
cd verilator; $(VERILATOR) $(VERILATOR_ARGS) -O3 -CFLAGS "-O1 -march=native" --top tb_croc_soc -f croc.f
105+
cd verilator; $(VERILATOR) $(VERILATOR_ARGS) -O3 --top tb_croc_soc -f croc.f
101106

102107
## Simulate RTL using Verilator
103108
verilator: verilator/obj_dir/Vtb_croc_soc

rtl/tb_croc_soc.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,9 +441,9 @@ module tb_croc_soc #(
441441

442442
initial begin
443443
$timeformat(-9, 0, "ns", 12); // 1: scale (ns=-9), 2: decimals, 3: suffix, 4: print-field width
444-
// configure VCD dump
444+
// configure FST (waveform) dump
445445
`ifdef TRACE_WAVE
446-
$dumpfile("croc.vcd");
446+
$dumpfile("croc.fst");
447447
$dumpvars(1,i_croc_soc);
448448
`endif
449449

0 commit comments

Comments
 (0)