Commit 4e704902 authored by Antoine Kaufmann's avatar Antoine Kaufmann
Browse files

corundum: enable tracing for debug

parent 23a41e98
......@@ -10,7 +10,7 @@ SRCS = corundum_verilator.cpp dma.cpp mem.cpp
all: corundum_verilator
obj_dir/Vinterface.cpp: rtl/interface.v
$(VERILATOR) $(VFLAGS) --cc -O3 \
$(VERILATOR) $(VFLAGS) --cc -O3 --trace \
-CFLAGS "-I$(PWD)/../nicsim_common/include -I$(PWD)/../proto -O3 -g -Wall" \
-y rtl \
-y lib/axi/rtl \
......
......@@ -19,6 +19,7 @@ struct DMAOp;
static volatile int exiting = 0;
static uint64_t main_time = 0;
static VerilatedVcdC* trace;
......@@ -660,6 +661,7 @@ class EthernetRx {
}
top.rx_axis_tlast = (packet_off == packet_len);
}
trace->dump(main_time);
} else {
// no data
top.rx_axis_tvalid = 0;
......@@ -728,7 +730,7 @@ static void msi_step(Vinterface &top)
int main(int argc, char *argv[])
{
Verilated::commandArgs(argc, argv);
//Verilated::traceEverOn(true);
Verilated::traceEverOn(true);
struct cosim_pcie_proto_dev_intro di;
memset(&di, 0, sizeof(di));
......@@ -753,6 +755,9 @@ int main(int argc, char *argv[])
Vinterface *top = new Vinterface;
trace = new VerilatedVcdC;
top->trace(trace, 99);
trace->open("debug.vcd");
MemWritePort p_mem_write_ctrl_dma(
top->ctrl_dma_ram_wr_cmd_sel,
......@@ -890,6 +895,7 @@ int main(int argc, char *argv[])
}
report_outputs(top);
trace->close();
top->final();
delete top;
return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment