fix: credits updated in wrong phase

This commit is contained in:
juanmanuel 2024-11-14 07:41:43 -05:00
parent 29775f9a5a
commit 152f2aa2d2

View file

@ -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() ){