Fix starvation of new arbiters.
This commit is contained in:
@@ -350,7 +350,18 @@ void ArbiterFifo::peqCallback(tlm_generic_payload &cbPayload, const tlm_phase &c
|
||||
tSocket[static_cast<int>(threadId)]->nb_transport_bw(tPayload, tPhase, tDelay);
|
||||
|
||||
unsigned int tChannelId = DramExtension::getExtension(tPayload).getChannel().ID();
|
||||
pendingRequests[tChannelId].push(&tPayload);
|
||||
|
||||
if (!channelIsBusy[tChannelId])
|
||||
{
|
||||
channelIsBusy[tChannelId] = true;
|
||||
|
||||
tPhase = BEGIN_REQ;
|
||||
tDelay = lastEndReq[tChannelId] == sc_time_stamp() ? tCK : SC_ZERO_TIME;
|
||||
|
||||
iSocket[static_cast<int>(tChannelId)]->nb_transport_fw(tPayload, tPhase, tDelay);
|
||||
}
|
||||
else
|
||||
pendingRequests[tChannelId].push(&tPayload);
|
||||
}
|
||||
|
||||
if (!pendingResponses[threadId].empty())
|
||||
@@ -468,7 +479,18 @@ void ArbiterReorder::peqCallback(tlm_generic_payload &cbPayload, const tlm_phase
|
||||
tSocket[static_cast<int>(threadId)]->nb_transport_bw(tPayload, tPhase, tDelay);
|
||||
|
||||
unsigned int tChannelId = DramExtension::getExtension(tPayload).getChannel().ID();
|
||||
pendingRequests[tChannelId].push(&tPayload);
|
||||
|
||||
if (!channelIsBusy[tChannelId])
|
||||
{
|
||||
channelIsBusy[tChannelId] = true;
|
||||
|
||||
tPhase = BEGIN_REQ;
|
||||
tDelay = lastEndReq[tChannelId] == sc_time_stamp() ? tCK : SC_ZERO_TIME;
|
||||
|
||||
iSocket[static_cast<int>(tChannelId)]->nb_transport_fw(tPayload, tPhase, tDelay);
|
||||
}
|
||||
else
|
||||
pendingRequests[tChannelId].push(&tPayload);
|
||||
}
|
||||
|
||||
tlm_generic_payload &tPayload = **pendingResponses[threadId].begin();
|
||||
|
||||
Reference in New Issue
Block a user