Port *peer;
Port *icachePort = fetch.getIcachePort();
if (icachePort->getPeer() == NULL) {
- peer = oldCPU->getPort("icachePort")->getPeer();
+ peer = oldCPU->getPort("icache_port")->getPeer();
icachePort->setPeer(peer);
} else {
peer = icachePort->getPeer();
Port *dcachePort = iew.getDcachePort();
if (dcachePort->getPeer() == NULL) {
- Port *peer = oldCPU->getPort("dcachePort")->getPeer();
+ peer = oldCPU->getPort("dcache_port")->getPeer();
dcachePort->setPeer(peer);
} else {
peer = dcachePort->getPeer();
}
}
+ if (_status != Running) {
+ _status = Idle;
+ }
+
Port *peer;
if (icachePort.getPeer() == NULL) {
- peer = oldCPU->getPort("icachePort")->getPeer();
+ peer = oldCPU->getPort("icache_port")->getPeer();
icachePort.setPeer(peer);
} else {
peer = icachePort.getPeer();
peer->setPeer(&icachePort);
if (dcachePort.getPeer() == NULL) {
- peer = oldCPU->getPort("dcachePort")->getPeer();
+ peer = oldCPU->getPort("dcache_port")->getPeer();
dcachePort.setPeer(peer);
} else {
peer = dcachePort.getPeer();
numCycles += curTick - previousTick;
previousTick = curTick;
- if (getState() == SimObject::Draining) {
- completeDrain();
-
- delete pkt->req;
- delete pkt;
-
- return;
- }
-
Fault fault = curStaticInst->completeAcc(pkt, this, traceData);
delete pkt->req;
delete pkt;
postExecute();
+
+ if (getState() == SimObject::Draining) {
+ advancePC(fault);
+ completeDrain();
+
+ return;
+ }
+
advanceInst(fault);
}