Briey and Murax verilators now use FST instead of VCD

This commit is contained in:
Dolu1990 2021-09-22 12:57:27 +02:00
parent 65cda95176
commit b807254759
5 changed files with 6 additions and 44 deletions

View File

@ -6,7 +6,6 @@
#include "VBriey_RiscvCore.h"
#endif
#include "verilated.h"
#include "verilated_vcd_c.h"
#include <stdio.h>
#include <iostream>
#include <stdlib.h>

View File

@ -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"

View File

@ -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

View File

@ -11,6 +11,7 @@
#include <iomanip>
#include <time.h>
#include <unistd.h>
#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;

View File

@ -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"