Skip to content

Commit

Permalink
Auto-detect trace, remove debugging leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
Arusekk committed Jan 10, 2025
1 parent 1bbff85 commit b334c2d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 30 deletions.
8 changes: 7 additions & 1 deletion renode/sim_coreblocks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

Coreblocks::Coreblocks()
: top()
, trace(new VerilatedVcdC)
{
static uint8_t halted = 0;

Expand Down Expand Up @@ -33,10 +32,13 @@ Coreblocks::Coreblocks()

//debug.debug_req_i = &top.debug_req_i;

#if VM_TRACE
Verilated::traceEverOn(true);
trace = new VerilatedVcdC;
top.trace(trace, 99); // Trace 99 levels of hierarchy (or see below)
// tfp->dumpvars(1, "t"); // trace 1 level under "t"
trace->open("/tmp/simx.vcd"); // beware: Renode manipulates CWD
#endif
reset();
}

Expand Down Expand Up @@ -84,9 +86,13 @@ void Coreblocks::evaluateModel()
{
static int i = 0;
// std::cerr << *this << "addr: " << top.wb_instr___05Fadr << "\ninterrupts: " << top.interrupts << '\n';
#if VM_TRACE
trace->dump(i++);
#endif
top.eval();
#if VM_TRACE
trace->dump(i++);
#endif
}

void Coreblocks::onGPIO(int number, bool value)
Expand Down
28 changes: 0 additions & 28 deletions renode/verilated_coreblocks.repl

This file was deleted.

1 change: 0 additions & 1 deletion renode/verilated_coreblocks.resc
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,4 @@ macro reset
"""

runMacro $reset
logLevel -1

0 comments on commit b334c2d

Please sign in to comment.