diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:36 -0400 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-06-19 21:43:36 -0400 |
commit | 7dea79535c87b68b5fc6143190d09b8fc364f2aa (patch) | |
tree | 3f30f0716de709f86b9adaa746f0b3e312203cef /src/cpu/inorder/resource_pool.cc | |
parent | 061b369d288ba4e3fdb145c025fb4d80378cb851 (diff) | |
download | gem5-7dea79535c87b68b5fc6143190d09b8fc364f2aa.tar.xz |
inorder: implement trap handling
Diffstat (limited to 'src/cpu/inorder/resource_pool.cc')
-rw-r--r-- | src/cpu/inorder/resource_pool.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/cpu/inorder/resource_pool.cc b/src/cpu/inorder/resource_pool.cc index 1800aac37..d5b3a5115 100644 --- a/src/cpu/inorder/resource_pool.cc +++ b/src/cpu/inorder/resource_pool.cc @@ -234,6 +234,18 @@ ResourcePool::squash(DynInstPtr inst, int res_idx, InstSeqNum done_seq_num, tid); } +void +ResourcePool::trap(Fault fault, ThreadID tid, DynInstPtr inst) +{ + DPRINTF(Resource, "[tid:%i] Broadcasting Trap to all " + "resources.\n", tid); + + int num_resources = resources.size(); + + for (int idx = 0; idx < num_resources; idx++) + resources[idx]->trap(fault, tid, inst); +} + int ResourcePool::slotsAvail(int res_idx) { @@ -272,7 +284,7 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst, e_type, inst, inst->squashingStage, - inst->bdelaySeqNum, + inst->squashSeqNum, inst->readTid()); cpu->schedule(res_pool_event, when); } @@ -289,7 +301,7 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst, e_type, inst, inst->squashingStage, - inst->bdelaySeqNum, + inst->squashSeqNum, tid); cpu->schedule(res_pool_event, when); @@ -308,7 +320,7 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst, e_type, inst, inst->squashingStage, - inst->bdelaySeqNum, + inst->squashSeqNum, tid); cpu->schedule(res_pool_event, sked_tick); @@ -337,7 +349,7 @@ ResourcePool::scheduleEvent(InOrderCPU::CPUEventType e_type, DynInstPtr inst, new ResPoolEvent(this,e_type, inst, inst->squashingStage, - inst->bdelaySeqNum, + inst->squashSeqNum, inst->readTid()); cpu->schedule(res_pool_event, when); } |