Skip to content

Commit

Permalink
util/mario: Trace signals required for parsing in Snitch
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Jul 17, 2024
1 parent 396046b commit 68292f9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion util/mario/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
automatic integer tf; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE cnst [string]; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE meta [string]; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE backend [string]; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE busy [string]; <%text>\\</%text>
automatic `IDMA_TRACER_MAX_TYPE bus [string]; <%text>\\</%text>
automatic string trace; <%text>\\</%text>
Expand All @@ -29,7 +30,9 @@
$display("[iDMA Tracer] Logging %s to %s", `"__backend_inst`", __out_f); <%text>\\</%text>
forever begin <%text>\\</%text>
@(posedge __backend_inst``.clk_i); <%text>\\</%text>
if(__backend_inst``.rst_ni & |__backend_inst``.busy_o) begin <%text>\\</%text>
if(__backend_inst``.rst_ni & (|__backend_inst``.busy_o | <%text>\\</%text>
__backend_inst``.req_valid_i | <%text>\\</%text>
__backend_inst``.rsp_valid_o)) begin <%text>\\</%text>
/* Trace */ <%text>\\</%text>
trace = "{"; <%text>\\</%text>
/* Constants */ <%text>\\</%text>
Expand All @@ -55,6 +58,13 @@
meta = '{ <%text>\\</%text>
"time" : $time() <%text>\\</%text>
}; <%text>\\</%text>
backend = '{ <%text>\\</%text>
"req_valid" : __backend_inst``.req_valid_i, <%text>\\</%text>
"req_ready" : __backend_inst``.req_ready_o, <%text>\\</%text>
"rsp_valid" : __backend_inst``.rsp_valid_o, <%text>\\</%text>
"rsp_ready" : __backend_inst``.rsp_ready_i, <%text>\\</%text>
"req_length" : __backend_inst``.idma_req_i.length <%text>\\</%text>
}; <%text>\\</%text>
busy = '{ <%text>\\</%text>
"buffer" : __backend_inst``.busy_o.buffer_busy, <%text>\\</%text>
"r_dp" : __backend_inst``.busy_o.r_dp_busy, <%text>\\</%text>
Expand All @@ -71,6 +81,7 @@
/* Assembly */ <%text>\\</%text>
`IDMA_TRACER_STR_ASSEMBLY(cnst, first_iter); <%text>\\</%text>
`IDMA_TRACER_STR_ASSEMBLY(meta, 1); <%text>\\</%text>
`IDMA_TRACER_STR_ASSEMBLY(backend, 1); <%text>\\</%text>
`IDMA_TRACER_STR_ASSEMBLY(busy, 1); <%text>\\</%text>
`IDMA_TRACER_STR_ASSEMBLY(bus, 1); <%text>\\</%text>
`IDMA_TRACER_CLEAR_COND(first_iter); <%text>\\</%text>
Expand Down

0 comments on commit 68292f9

Please sign in to comment.