Skip to content

Commit 0a0c113

Browse files
committed
treewide: Enable tracing in Verilator
1 parent 4051310 commit 0a0c113

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/frontend/inst64/idma_inst64_top.sv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,9 +521,9 @@ module idma_inst64_top #(
521521
// We need to schedule the assignment into a safe region, otherwise
522522
// `hart_id_i` won't have a value assigned at the beginning of the first
523523
// delta cycle.
524-
/* verilator lint_off STMTDLY */
524+
`ifndef VERILATOR
525525
#0;
526-
/* verilator lint_on STMTDLY */
526+
`endif
527527
$sformat(trace_file, "dma_trace_%05x_%05x.log", hart_id_i, c);
528528
end
529529
// attach the tracer

util/mario/tracer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// The tracer for the ${identifier} iDMA
1616
`define IDMA_TRACER_${identifier_cap}(__backend_inst, __out_f) <%text>\\</%text>
1717
`ifndef SYNTHESIS <%text>\\</%text>
18-
`ifndef VERILATOR <%text>\\</%text>
1918
initial begin : inital_tracer_${identifier} <%text>\\</%text>
2019
automatic bit first_iter = 1; <%text>\\</%text>
2120
automatic integer tf; <%text>\\</%text>
@@ -25,7 +24,9 @@
2524
automatic `IDMA_TRACER_MAX_TYPE busy [string]; <%text>\\</%text>
2625
automatic `IDMA_TRACER_MAX_TYPE bus [string]; <%text>\\</%text>
2726
automatic string trace; <%text>\\</%text>
27+
`ifndef VERILATOR <%text>\\</%text>
2828
#0; <%text>\\</%text>
29+
`endif <%text>\\</%text>
2930
tf = $fopen(__out_f, "w"); <%text>\\</%text>
3031
$display("[iDMA Tracer] Logging %s to %s", `"__backend_inst`", __out_f); <%text>\\</%text>
3132
forever begin <%text>\\</%text>
@@ -90,7 +91,6 @@
9091
end <%text>\\</%text>
9192
end <%text>\\</%text>
9293
end <%text>\\</%text>
93-
`endif <%text>\\</%text>
9494
`endif
9595
'''
9696

0 commit comments

Comments
 (0)