summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/pipeline_stage.hh
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-01-31 18:25:48 -0500
committerKorey Sewell <ksewell@umich.edu>2010-01-31 18:25:48 -0500
commite8312ab6f700b31dfa357607ab51c9c05014572d (patch)
treecabc2520a8cd933d63983f596b77f33bbfd807c8 /src/cpu/inorder/pipeline_stage.hh
parenta892af7b261e1c48b06ccbded5551e958c778414 (diff)
downloadgem5-e8312ab6f700b31dfa357607ab51c9c05014572d.tar.xz
inorder: switch out buffer
add buffer for instructions to switch out to in a pipeline stage can't squash the instruction and remove the pipeline so we kind of need to 'suspend' an instruction at the stage while the memory stall resolves for the switch on cache miss model
Diffstat (limited to 'src/cpu/inorder/pipeline_stage.hh')
-rw-r--r--src/cpu/inorder/pipeline_stage.hh19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/cpu/inorder/pipeline_stage.hh b/src/cpu/inorder/pipeline_stage.hh
index 86ee98132..42a632560 100644
--- a/src/cpu/inorder/pipeline_stage.hh
+++ b/src/cpu/inorder/pipeline_stage.hh
@@ -240,6 +240,8 @@ class PipelineStage
*/
virtual void squashDueToBranch(DynInstPtr &inst, ThreadID tid);
+ virtual void squashDueToMemStall(DynInstPtr &inst, ThreadID tid);
+
/** Squash instructions from stage buffer */
virtual void squashPrevStageInsts(InstSeqNum squash_seq_num, ThreadID tid);
@@ -259,19 +261,28 @@ class PipelineStage
/** List of active thread ids */
std::list<ThreadID> *activeThreads;
+ /** Buffer of instructions switched out to mem-stall.
+ * Only used when using SwitchOnCacheMiss threading model
+ * Used as 1-to-1 mapping between ThreadID and Entry.
+ */
+ std::vector<DynInstPtr> switchedOutBuffer;
+ std::vector<bool> switchedOutValid;
+
/** Queue of all instructions coming from previous stage on this cycle. */
std::queue<DynInstPtr> insts[ThePipeline::MaxThreads];
- /** Queue of instructions that are finished processing and ready to go next stage.
- * This is used to prevent from processing an instrution more than once on any
- * stage. NOTE: It is up to the PROGRAMMER must manage this as a queue
+ /** Queue of instructions that are finished processing and ready to go
+ * next stage. This is used to prevent from processing an instrution more
+ * than once on any stage. NOTE: It is up to the PROGRAMMER must manage
+ * this as a queue
*/
std::list<DynInstPtr> instsToNextStage;
/** Skid buffer between previous stage and this one. */
std::queue<DynInstPtr> skidBuffer[ThePipeline::MaxThreads];
- /** Instruction used to signify that there is no *real* instruction in buffer slot */
+ /** Instruction used to signify that there is no *real* instruction in
+ * buffer slot */
DynInstPtr dummyBufferInst;
/** SeqNum of Squashing Branch Delay Instruction (used for MIPS) */