TimingSimpleCPU: split data sender state fix
In sendSplitData, keep a pointer to the senderState that may be updated after the call to handle*Packet. This way, if the receiver updates the packet senderState, it can still be accessed in sendSplitData.
This commit is contained in:
parent
2da54d1285
commit
52b6119228
1 changed files with 8 additions and 8 deletions
|
@ -325,26 +325,26 @@ TimingSimpleCPU::sendSplitData(RequestPtr req1, RequestPtr req2,
|
|||
pkt1->makeResponse();
|
||||
completeDataAccess(pkt1);
|
||||
} else if (read) {
|
||||
if (handleReadPacket(pkt1)) {
|
||||
SplitFragmentSenderState * send_state =
|
||||
dynamic_cast<SplitFragmentSenderState *>(pkt1->senderState);
|
||||
if (handleReadPacket(pkt1)) {
|
||||
send_state->clearFromParent();
|
||||
if (handleReadPacket(pkt2)) {
|
||||
send_state = dynamic_cast<SplitFragmentSenderState *>(
|
||||
pkt1->senderState);
|
||||
pkt2->senderState);
|
||||
if (handleReadPacket(pkt2)) {
|
||||
send_state->clearFromParent();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
dcache_pkt = pkt1;
|
||||
if (handleWritePacket()) {
|
||||
SplitFragmentSenderState * send_state =
|
||||
dynamic_cast<SplitFragmentSenderState *>(pkt1->senderState);
|
||||
if (handleWritePacket()) {
|
||||
send_state->clearFromParent();
|
||||
dcache_pkt = pkt2;
|
||||
if (handleWritePacket()) {
|
||||
send_state = dynamic_cast<SplitFragmentSenderState *>(
|
||||
pkt1->senderState);
|
||||
pkt2->senderState);
|
||||
if (handleWritePacket()) {
|
||||
send_state->clearFromParent();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue