From b807254759e78050dafb9c01b7a83137ec5cd1d0 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Wed, 22 Sep 2021 12:57:27 +0200 Subject: [PATCH] Briey and Murax verilators now use FST instead of VCD --- src/test/cpp/briey/main.cpp | 1 - src/test/cpp/briey/makefile | 2 +- src/test/cpp/briey/makefile~ | 38 --------------------------------- src/test/cpp/common/framework.h | 7 +++--- src/test/cpp/murax/makefile | 2 +- 5 files changed, 6 insertions(+), 44 deletions(-) delete mode 100644 src/test/cpp/briey/makefile~ diff --git a/src/test/cpp/briey/main.cpp b/src/test/cpp/briey/main.cpp index 0ee7c45..d2b372c 100644 --- a/src/test/cpp/briey/main.cpp +++ b/src/test/cpp/briey/main.cpp @@ -6,7 +6,6 @@ #include "VBriey_RiscvCore.h" #endif #include "verilated.h" -#include "verilated_vcd_c.h" #include #include #include diff --git a/src/test/cpp/briey/makefile b/src/test/cpp/briey/makefile index 12d4c97..e0a024b 100644 --- a/src/test/cpp/briey/makefile +++ b/src/test/cpp/briey/makefile @@ -13,7 +13,7 @@ ADDCFLAGS += -LDFLAGS -lSDL2 ifeq ($(TRACE),yes) VERILATOR_ARGS += --trace - ADDCFLAGS += -CFLAGS -DTRACE + ADDCFLAGS += -CFLAGS -DTRACE --trace-fst endif ifeq ($(DEBUG),yes) ADDCFLAGS += -CFLAGS "-g3 -O0" diff --git a/src/test/cpp/briey/makefile~ b/src/test/cpp/briey/makefile~ deleted file mode 100644 index b8345fd..0000000 --- a/src/test/cpp/briey/makefile~ +++ /dev/null @@ -1,38 +0,0 @@ -DEBUG?=no -TRACE?=no -PRINT_PERF?=no -TRACE_START=0 -ADDCFLAGS += -CFLAGS -pthread - -ifeq ($(TRACE),yes) - VERILATOR_ARGS += --trace - ADDCFLAGS += -CFLAGS -DTRACE -endif -ifeq ($(DEBUG),yes) - ADDCFLAGS += -CFLAGS "-g3 -O0" -endif -ifneq ($(DEBUG),yes) - ADDCFLAGS += -CFLAGS "-O3" -endif -ifeq ($(PRINT_PERF),yes) - ADDCFLAGS += -CFLAGS -DPRINT_PERF -endif - -ADDCFLAGS += -CFLAGS -DTRACE_START=${TRACE_START} - - - -all: clean compile - -run: compile - ./obj_dir/VBriey - -verilate: - verilator -cc ../../../../Briey.v -CFLAGS -std=c++11 ${ADDCFLAGS} --gdbbt ${VERILATOR_ARGS} -Wno-WIDTH --x-assign unique --exe main.cpp - -compile: verilate - make -j -C obj_dir/ -f VBriey.mk VBriey - -clean: - rm -rf obj_dir - diff --git a/src/test/cpp/common/framework.h b/src/test/cpp/common/framework.h index 562d467..42c1f34 100644 --- a/src/test/cpp/common/framework.h +++ b/src/test/cpp/common/framework.h @@ -11,6 +11,7 @@ #include #include #include +#include "verilated_fst_c.h" using namespace std; @@ -140,7 +141,7 @@ public: string name; uint64_t time = 0; #ifdef TRACE - VerilatedVcdC* tfp; + VerilatedFstC* tfp; #endif ofstream logTraces; @@ -184,9 +185,9 @@ public: // init trace dump #ifdef TRACE Verilated::traceEverOn(true); - tfp = new VerilatedVcdC; + tfp = new VerilatedFstC; top->trace(tfp, 99); - tfp->open((string(name)+ ".vcd").c_str()); + tfp->open((string(name)+ ".fst").c_str()); #endif struct timespec start_time,tick_time; diff --git a/src/test/cpp/murax/makefile b/src/test/cpp/murax/makefile index 71a5cd6..7c946ae 100644 --- a/src/test/cpp/murax/makefile +++ b/src/test/cpp/murax/makefile @@ -7,7 +7,7 @@ ADDCFLAGS += -CFLAGS -pthread -LDFLAGS -pthread ifeq ($(TRACE),yes) VERILATOR_ARGS += --trace - ADDCFLAGS += -CFLAGS -DTRACE + ADDCFLAGS += -CFLAGS -DTRACE --trace-fst endif ifeq ($(DEBUG),yes) ADDCFLAGS += -CFLAGS "-g3 -O0"