summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/pipeline_traits.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-06-25 17:42:34 -0400
committerKorey Sewell <ksewell@umich.edu>2010-06-25 17:42:34 -0400
commit6bfd766f2c6c93cca3f79482bfddf7e6cdeb455e (patch)
tree615205f85b0bc87a4e6cf4ca57472a976a27c985 /src/cpu/inorder/pipeline_traits.cc
parent6697d416930a0464bea6ca211a1fdfa8a1e01135 (diff)
downloadgem5-6bfd766f2c6c93cca3f79482bfddf7e6cdeb455e.tar.xz
inorder: resource scheduling backend
replace priority queue with vector of lists(1 list per stage) and place inside a class so that we have more control of when an instruction uses a particular schedule entry ... also, this is the 1st step toward making the InOrderCPU fully parameterizable. See the wiki for details on this process
Diffstat (limited to 'src/cpu/inorder/pipeline_traits.cc')
-rw-r--r--src/cpu/inorder/pipeline_traits.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/cpu/inorder/pipeline_traits.cc b/src/cpu/inorder/pipeline_traits.cc
index 397170163..fe400471a 100644
--- a/src/cpu/inorder/pipeline_traits.cc
+++ b/src/cpu/inorder/pipeline_traits.cc
@@ -77,6 +77,8 @@ void createFrontEndSchedule(DynInstPtr &inst)
D->needs(Decode, DecodeUnit::DecodeInst);
D->needs(BPred, BranchPredictor::PredictBranch);
D->needs(FetchSeq, FetchSeqUnit::UpdateTargetPC);
+
+ inst->resSched.init();
}
bool createBackEndSchedule(DynInstPtr &inst)
@@ -152,4 +154,18 @@ InstStage::InstStage(DynInstPtr inst, int stage_num)
instSched = &inst->resSched;
}
+void
+InstStage::needs(int unit, int request) {
+ instSched->push( new ScheduleEntry(
+ stageNum, nextTaskPriority++, unit, request
+ ));
+}
+
+void
+InstStage::needs(int unit, int request, int param) {
+ instSched->push( new ScheduleEntry(
+ stageNum, nextTaskPriority++, unit, request, param
+ ));
+}
+
};