systemc: remove if clause in Gem5ToTlmBridgeBase (#1059)

In the payload event queue in Gem5ToTlmBridgeBase, the phase is checked
twice for BEGIN_RESP. This commit removes the second if clause since it
is unnecessary.

Duplicate if clause in line 234 & line 256


dd2689905f/src/systemc/tlm_bridge/gem5_to_tlm.cc (L234-L267)

please correct me if I am missing something important
This commit is contained in:
Robert Hauser
2024-04-25 20:15:30 +02:00
committed by GitHub
parent c679c9c127
commit 1b323a9571

View File

@@ -253,15 +253,13 @@ Gem5ToTlmBridge<BITWIDTH>::pec(
if (need_retry) {
blockingResponse = &trans;
} else {
if (phase == tlm::BEGIN_RESP) {
// Send END_RESP and we're finished:
tlm::tlm_phase fw_phase = tlm::END_RESP;
sc_core::sc_time delay = sc_core::SC_ZERO_TIME;
socket->nb_transport_fw(trans, fw_phase, delay);
// Release the transaction with all the extensions.
packetMap.erase(&trans);
trans.release();
}
// Send END_RESP and we're finished:
tlm::tlm_phase fw_phase = tlm::END_RESP;
sc_core::sc_time delay = sc_core::SC_ZERO_TIME;
socket->nb_transport_fw(trans, fw_phase, delay);
// Release the transaction with all the extensions.
packetMap.erase(&trans);
trans.release();
}
}
}