diff --git a/util/mario/tracer.py b/util/mario/tracer.py index 4fb2e10..96e0ea5 100644 --- a/util/mario/tracer.py +++ b/util/mario/tracer.py @@ -21,6 +21,7 @@ automatic integer tf; <%text>\\ automatic `IDMA_TRACER_MAX_TYPE cnst [string]; <%text>\\ automatic `IDMA_TRACER_MAX_TYPE meta [string]; <%text>\\ + automatic `IDMA_TRACER_MAX_TYPE backend [string]; <%text>\\ automatic `IDMA_TRACER_MAX_TYPE busy [string]; <%text>\\ automatic `IDMA_TRACER_MAX_TYPE bus [string]; <%text>\\ automatic string trace; <%text>\\ @@ -29,7 +30,9 @@ $display("[iDMA Tracer] Logging %s to %s", `"__backend_inst`", __out_f); <%text>\\ forever begin <%text>\\ @(posedge __backend_inst``.clk_i); <%text>\\ - if(__backend_inst``.rst_ni & |__backend_inst``.busy_o) begin <%text>\\ + if(__backend_inst``.rst_ni & (|__backend_inst``.busy_o | <%text>\\ + __backend_inst``.req_valid_i | <%text>\\ + __backend_inst``.rsp_valid_o)) begin <%text>\\ /* Trace */ <%text>\\ trace = "{"; <%text>\\ /* Constants */ <%text>\\ @@ -55,6 +58,13 @@ meta = '{ <%text>\\ "time" : $time() <%text>\\ }; <%text>\\ + backend = '{ <%text>\\ + "req_valid" : __backend_inst``.req_valid_i, <%text>\\ + "req_ready" : __backend_inst``.req_ready_o, <%text>\\ + "rsp_valid" : __backend_inst``.rsp_valid_o, <%text>\\ + "rsp_ready" : __backend_inst``.rsp_ready_i, <%text>\\ + "req_length" : __backend_inst``.idma_req_i.length <%text>\\ + }; <%text>\\ busy = '{ <%text>\\ "buffer" : __backend_inst``.busy_o.buffer_busy, <%text>\\ "r_dp" : __backend_inst``.busy_o.r_dp_busy, <%text>\\ @@ -71,6 +81,7 @@ /* Assembly */ <%text>\\ `IDMA_TRACER_STR_ASSEMBLY(cnst, first_iter); <%text>\\ `IDMA_TRACER_STR_ASSEMBLY(meta, 1); <%text>\\ + `IDMA_TRACER_STR_ASSEMBLY(backend, 1); <%text>\\ `IDMA_TRACER_STR_ASSEMBLY(busy, 1); <%text>\\ `IDMA_TRACER_STR_ASSEMBLY(bus, 1); <%text>\\ `IDMA_TRACER_CLEAR_COND(first_iter); <%text>\\