timing.cc (5714:76abee886def) timing.cc (5726:17157c5f7e15)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 547 unchanged lines hidden (view full) ---

556 numCycles += tickToCycles(curTick - previousTick);
557 previousTick = curTick;
558}
559
560
561void
562TimingSimpleCPU::advanceInst(Fault fault)
563{
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 547 unchanged lines hidden (view full) ---

556 numCycles += tickToCycles(curTick - previousTick);
557 previousTick = curTick;
558}
559
560
561void
562TimingSimpleCPU::advanceInst(Fault fault)
563{
564 advancePC(fault);
564 if (fault != NoFault || !stayAtPC)
565 advancePC(fault);
565
566 if (_status == Running) {
567 // kick off fetch of next instruction... callback from icache
568 // response will cause that instruction to be executed,
569 // keeping the CPU running.
570 fetch();
571 }
572}

--- 21 unchanged lines hidden (view full) ---

594 delete pkt;
595 }
596
597 completeDrain();
598 return;
599 }
600
601 preExecute();
566
567 if (_status == Running) {
568 // kick off fetch of next instruction... callback from icache
569 // response will cause that instruction to be executed,
570 // keeping the CPU running.
571 fetch();
572 }
573}

--- 21 unchanged lines hidden (view full) ---

595 delete pkt;
596 }
597
598 completeDrain();
599 return;
600 }
601
602 preExecute();
602 if (curStaticInst->isMemRef() && !curStaticInst->isDataPrefetch()) {
603 if (curStaticInst &&
604 curStaticInst->isMemRef() && !curStaticInst->isDataPrefetch()) {
603 // load or store: just send to dcache
604 Fault fault = curStaticInst->initiateAcc(this, traceData);
605 if (_status != Running) {
606 // instruction will complete in dcache response callback
607 assert(_status == DcacheWaitResponse || _status == DcacheRetry);
608 assert(fault == NoFault);
609 } else {
610 if (fault == NoFault) {

--- 22 unchanged lines hidden (view full) ---

633
634 postExecute();
635 // @todo remove me after debugging with legion done
636 if (curStaticInst && (!curStaticInst->isMicroop() ||
637 curStaticInst->isFirstMicroop()))
638 instCnt++;
639 advanceInst(fault);
640 }
605 // load or store: just send to dcache
606 Fault fault = curStaticInst->initiateAcc(this, traceData);
607 if (_status != Running) {
608 // instruction will complete in dcache response callback
609 assert(_status == DcacheWaitResponse || _status == DcacheRetry);
610 assert(fault == NoFault);
611 } else {
612 if (fault == NoFault) {

--- 22 unchanged lines hidden (view full) ---

635
636 postExecute();
637 // @todo remove me after debugging with legion done
638 if (curStaticInst && (!curStaticInst->isMicroop() ||
639 curStaticInst->isFirstMicroop()))
640 instCnt++;
641 advanceInst(fault);
642 }
641 } else {
643 } else if (curStaticInst) {
642 // non-memory instruction: execute completely now
643 Fault fault = curStaticInst->execute(this, traceData);
644
645 // keep an instruction count
646 if (fault == NoFault)
647 countInst();
648 else if (traceData) {
649 // If there was a fault, we shouldn't trace this instruction.
650 delete traceData;
651 traceData = NULL;
652 }
653
654 postExecute();
655 // @todo remove me after debugging with legion done
656 if (curStaticInst && (!curStaticInst->isMicroop() ||
657 curStaticInst->isFirstMicroop()))
658 instCnt++;
659 advanceInst(fault);
644 // non-memory instruction: execute completely now
645 Fault fault = curStaticInst->execute(this, traceData);
646
647 // keep an instruction count
648 if (fault == NoFault)
649 countInst();
650 else if (traceData) {
651 // If there was a fault, we shouldn't trace this instruction.
652 delete traceData;
653 traceData = NULL;
654 }
655
656 postExecute();
657 // @todo remove me after debugging with legion done
658 if (curStaticInst && (!curStaticInst->isMicroop() ||
659 curStaticInst->isFirstMicroop()))
660 instCnt++;
661 advanceInst(fault);
662 } else {
663 advanceInst(NoFault);
660 }
661
662 if (pkt) {
663 delete pkt->req;
664 delete pkt;
665 }
666}
667

--- 199 unchanged lines hidden ---
664 }
665
666 if (pkt) {
667 delete pkt->req;
668 delete pkt;
669 }
670}
671

--- 199 unchanged lines hidden ---