summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:37 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:37 -0400
commit479195d4cf5d52138a1dc3cf1e5ffe588c6e924f (patch)
tree4275cc240dc37de4bce3b66da93fc5ab7eababa1 /src
parent71018f5e8b59c359065580a41a96f1a78a88dea9 (diff)
downloadgem5-479195d4cf5d52138a1dc3cf1e5ffe588c6e924f.tar.xz
inorder: priority for grad/squash events
define separate priority resource pool squash and graduate events
Diffstat (limited to 'src')
-rw-r--r--src/cpu/inorder/resource_pool.cc25
-rw-r--r--src/cpu/inorder/resource_pool.hh7
2 files changed, 22 insertions, 10 deletions
diff --git a/src/cpu/inorder/resource_pool.cc b/src/cpu/inorder/resource_pool.cc
index 0713783b3..6640d6c0e 100644
--- a/src/cpu/inorder/resource_pool.cc
+++ b/src/cpu/inorder/resource_pool.cc
@@ -331,12 +331,15 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst,
{
DPRINTF(Resource, "Scheduling Inst-Graduated Resource Pool "
"Event for tick %i.\n", curTick() + delay);
+ ResPoolEventPri grad_pri = ResGrad_Pri;
ResPoolEvent *res_pool_event =
- new ResPoolEvent(this,e_type,
+ new ResPoolEvent(this,
+ e_type,
inst,
inst->squashingStage,
inst->seqNum,
- inst->readTid());
+ inst->readTid(),
+ grad_pri);
cpu->schedule(res_pool_event, when);
}
break;
@@ -345,12 +348,15 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst,
{
DPRINTF(Resource, "Scheduling Squash Resource Pool Event for "
"tick %i.\n", curTick() + delay);
+ ResPoolEventPri squash_pri = ResSquash_Pri;
ResPoolEvent *res_pool_event =
- new ResPoolEvent(this,e_type,
+ new ResPoolEvent(this,
+ e_type,
inst,
inst->squashingStage,
inst->squashSeqNum,
- inst->readTid());
+ inst->readTid(),
+ squash_pri);
cpu->schedule(res_pool_event, when);
}
break;
@@ -361,7 +367,8 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst,
"Pool Event for tick %i.\n",
curTick() + delay);
ResPoolEvent *res_pool_event =
- new ResPoolEvent(this,e_type,
+ new ResPoolEvent(this,
+ e_type,
inst,
inst->squashingStage,
inst->seqNum - 1,
@@ -375,7 +382,8 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst,
DPRINTF(Resource, "Scheduling UpdatePC Resource Pool Event "
"for tick %i.\n",
curTick() + delay);
- ResPoolEvent *res_pool_event = new ResPoolEvent(this,e_type,
+ ResPoolEvent *res_pool_event = new ResPoolEvent(this,
+ e_type,
inst,
inst->squashingStage,
inst->seqNum,
@@ -507,8 +515,9 @@ ResourcePool::ResPoolEvent::ResPoolEvent(ResourcePool *_resPool,
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
- ThreadID _tid)
- : Event(ResPool_Pri), resPool(_resPool),
+ ThreadID _tid,
+ ResPoolEventPri res_pri)
+ : Event(res_pri), resPool(_resPool),
eventType(e_type), inst(_inst), seqNum(seq_num),
stageNum(stage_num), tid(_tid)
{ }
diff --git a/src/cpu/inorder/resource_pool.hh b/src/cpu/inorder/resource_pool.hh
index 51eb41338..ba3d6fafb 100644
--- a/src/cpu/inorder/resource_pool.hh
+++ b/src/cpu/inorder/resource_pool.hh
@@ -68,7 +68,9 @@ class ResourcePool {
};
enum ResPoolEventPri {
- ResPool_Pri = InOrderCPU::InOrderCPU_Pri - 5
+ ResPool_Pri = InOrderCPU::InOrderCPU_Pri - 5,
+ ResGrad_Pri,
+ ResSquash_Pri
};
class ResPoolEvent : public Event
@@ -95,7 +97,8 @@ class ResourcePool {
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
- ThreadID _tid);
+ ThreadID _tid,
+ ResPoolEventPri res_pri = ResPool_Pri);
/** Set Type of Event To Be Scheduled */
void setEvent(InOrderCPU::CPUEventType e_type,