Skip to content

Commit

Permalink
treewide: Enable tracing in Verilator
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Jul 23, 2024
1 parent 4051310 commit 0a0c113
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/frontend/inst64/idma_inst64_top.sv
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,9 @@ module idma_inst64_top #(
// We need to schedule the assignment into a safe region, otherwise
// `hart_id_i` won't have a value assigned at the beginning of the first
// delta cycle.
/* verilator lint_off STMTDLY */
`ifndef VERILATOR
#0;
/* verilator lint_on STMTDLY */
`endif
$sformat(trace_file, "dma_trace_%05x_%05x.log", hart_id_i, c);
end
// attach the tracer
Expand Down
4 changes: 2 additions & 2 deletions util/mario/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
// The tracer for the ${identifier} iDMA
`define IDMA_TRACER_${identifier_cap}(__backend_inst, __out_f) <%text>\\</%text>
`ifndef SYNTHESIS <%text>\\</%text>
`ifndef VERILATOR <%text>\\</%text>
initial begin : inital_tracer_${identifier} <%text>\\</%text>
automatic bit first_iter = 1; <%text>\\</%text>
automatic integer tf; <%text>\\</%text>
Expand All @@ -25,7 +24,9 @@
automatic `IDMA_TRACER_MAX_TYPE busy [string]; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE bus [string]; <%text>\\</%text>
automatic string trace; <%text>\\</%text>
`ifndef VERILATOR <%text>\\</%text>
#0; <%text>\\</%text>
`endif <%text>\\</%text>
tf = $fopen(__out_f, "w"); <%text>\\</%text>
$display("[iDMA Tracer] Logging %s to %s", `"__backend_inst`", __out_f); <%text>\\</%text>
forever begin <%text>\\</%text>
Expand Down Expand Up @@ -90,7 +91,6 @@
end <%text>\\</%text>
end <%text>\\</%text>
end <%text>\\</%text>
`endif <%text>\\</%text>
`endif
'''

Expand Down

0 comments on commit 0a0c113

Please sign in to comment.