summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:42 -0400
committerKorey Sewell <ksewell@umich.edu>2011-06-19 21:43:42 -0400
commit078f914e69d6a08b0ff881b0909535307464553f (patch)
tree50e116b7b7d8a8136a080fe3ea53f6190b71243e /src/cpu/inorder/resource.cc
parent3cb23bd3a21a50577aaaa12db41d2203f4a9d6eb (diff)
downloadgem5-078f914e69d6a08b0ff881b0909535307464553f.tar.xz
inorder: SE mode TLB faults
handle them like we do in FS mode, by blocking the TLB until the fault is handled by the fault->invoke()
Diffstat (limited to 'src/cpu/inorder/resource.cc')
-rw-r--r--src/cpu/inorder/resource.cc17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc
index dfca83a8f..d2327795e 100644
--- a/src/cpu/inorder/resource.cc
+++ b/src/cpu/inorder/resource.cc
@@ -46,7 +46,8 @@ using namespace std;
Resource::Resource(string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu)
: resName(res_name), id(res_id),
- width(res_width), latency(res_latency), cpu(_cpu)
+ width(res_width), latency(res_latency), cpu(_cpu),
+ resourceEvent(NULL)
{
reqs.resize(width);
@@ -75,15 +76,13 @@ Resource::init()
// If the resource has a zero-cycle (no latency)
// function, then no reason to have events
// that will process them for the right tick
- if (latency > 0) {
- resourceEvent = new ResourceEvent[width];
- } else {
- resourceEvent = NULL;
- }
+ if (latency > 0)
+ resourceEvent = new ResourceEvent[width];
+
+
+ for (int i = 0; i < width; i++)
+ reqs[i] = new ResourceRequest(this);
- for (int i = 0; i < width; i++) {
- reqs[i] = new ResourceRequest(this);
- }
initSlots();
}