summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource_pool.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2010-01-31 18:30:35 -0500
committerKorey Sewell <ksewell@umich.edu>2010-01-31 18:30:35 -0500
commit6939482c49b489ad8811364ec52ad10ae421fb44 (patch)
tree6eb023749052c773df869d189965a3d8ee07070a /src/cpu/inorder/resource_pool.cc
parentea8909925fd0e7a33feabc9e17f83b85cd7c6039 (diff)
downloadgem5-6939482c49b489ad8811364ec52ad10ae421fb44.tar.xz
inorder: implement split loads
Diffstat (limited to 'src/cpu/inorder/resource_pool.cc')
-rw-r--r--src/cpu/inorder/resource_pool.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/cpu/inorder/resource_pool.cc b/src/cpu/inorder/resource_pool.cc
index 1f15a2c96..74bf4f03b 100644
--- a/src/cpu/inorder/resource_pool.cc
+++ b/src/cpu/inorder/resource_pool.cc
@@ -181,6 +181,25 @@ ResourcePool::getResIdx(const std::string &res_name)
return idx;
}
+ panic("Can't find resource idx for: %s\n", res_name);
+ return 0;
+}
+
+unsigned
+ResourcePool::getResIdx(const ThePipeline::ResourceId &res_id)
+{
+ int num_resources = resources.size();
+
+ for (int idx = 0; idx < num_resources; idx++) {
+ if (resources[idx]->getId() == res_id)
+ return idx;
+ }
+
+ // todo: change return value to int and return a -1 here
+ // maybe even have enumerated type
+ // panic for now...
+ panic("Can't find resource idx for: %i\n", res_id);
+
return 0;
}