From 5e18d160d16771252292ccebcb66ae4ba8cc9d64 Mon Sep 17 00:00:00 2001 From: Richard Qin Date: Wed, 18 Mar 2026 03:41:01 +0800 Subject: fixed vm_trace bug --- rv64cpu/tb/core/tb_core.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rv64cpu/tb/core/tb_core.cc b/rv64cpu/tb/core/tb_core.cc index 14a4c1e..1c5926c 100644 --- a/rv64cpu/tb/core/tb_core.cc +++ b/rv64cpu/tb/core/tb_core.cc @@ -28,7 +28,7 @@ #include #include "Vrichard_core.h" -#ifdef VM_TRACE +#if VM_TRACE #include #endif @@ -149,13 +149,13 @@ public: Vrichard_core* top; MemoryModel mem; uint64_t sim_time; -#ifdef VM_TRACE +#if VM_TRACE VerilatedVcdC* tfp; #endif CoreSim() : sim_time(0) { top = new Vrichard_core; -#ifdef VM_TRACE +#if VM_TRACE Verilated::traceEverOn(true); tfp = new VerilatedVcdC; top->trace(tfp, 99); @@ -164,7 +164,7 @@ public: } ~CoreSim() { -#ifdef VM_TRACE +#if VM_TRACE if (tfp) { tfp->close(); delete tfp; } #endif delete top; @@ -194,13 +194,13 @@ public: // Rising edge top->clk = 0; top->eval(); -#ifdef VM_TRACE +#if VM_TRACE tfp->dump(sim_time++); #endif top->clk = 1; top->eval(); -#ifdef VM_TRACE +#if VM_TRACE tfp->dump(sim_time++); #endif -- cgit v1.2.3