From 152f2aa2d24aad562ff64ef583a0f84d2ddd94e4 Mon Sep 17 00:00:00 2001 From: juanmanuel Date: Thu, 14 Nov 2024 07:41:43 -0500 Subject: [PATCH] fix: credits updated in wrong phase --- src/networkInterface/NetworkInterfaceTlm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/networkInterface/NetworkInterfaceTlm.cpp b/src/networkInterface/NetworkInterfaceTlm.cpp index 96d3a04..d418cdb 100755 --- a/src/networkInterface/NetworkInterfaceTlm.cpp +++ b/src/networkInterface/NetworkInterfaceTlm.cpp @@ -328,6 +328,7 @@ void NetworkInterfaceTlm::init_peq_cb(tlm_gp& trans, const tlm::tlm_phase& phase if (phase == tlm::BEGIN_RESP) { check_transaction(trans); + update_credits(trans, 1); // Send final phase transition to target tlm::tlm_phase fw_phase = tlm::END_RESP; sc_time delay = sc_time(RESP_END_DELAY, UNITS_DELAY); @@ -447,7 +448,6 @@ void NetworkInterfaceTlm::target_peq_cb(tlm_gp& trans, const tlm::tlm_phase& pha "Illegal transaction phase END_RESP received by target"); } trans.release(); - update_credits(trans, 1); // Target itself is now clear to issue the next BEGIN_RESP resp_in_progress = false; if ( !nxt_resp_pend.empty() ){