summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/resource_pool.cc
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-05-12 15:01:13 -0400
committerKorey Sewell <ksewell@umich.edu>2009-05-12 15:01:13 -0400
commit1c8dfd92543aba5f49e464b17e7e8143fc01a58c (patch)
tree3c5b9059b07e8d0bccdf826249330bfcb8c5c1cc /src/cpu/inorder/resource_pool.cc
parent63db33c4b1cd7a071c2a2fe47bda21a73618d054 (diff)
downloadgem5-1c8dfd92543aba5f49e464b17e7e8143fc01a58c.tar.xz
inorder-alpha-port: initial inorder support of ALPHA
Edit AlphaISA to support the inorder model. Mostly alternate constructor functions and also a few skeleton multithreaded support functions * * * Remove namespace from header file. Causes compiler issues that are hard to find * * * Separate the TLB from the CPU and allow it to live in the TLBUnit resource. Give CPU accessor functions for access and also bind at construction time * * * Expose memory access size and flags through instruction object (temporarily memAccSize and memFlags to get TLB stuff working.)
Diffstat (limited to 'src/cpu/inorder/resource_pool.cc')
-rw-r--r--src/cpu/inorder/resource_pool.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/cpu/inorder/resource_pool.cc b/src/cpu/inorder/resource_pool.cc
index 94af68c7a..725f6cbb3 100644
--- a/src/cpu/inorder/resource_pool.cc
+++ b/src/cpu/inorder/resource_pool.cc
@@ -143,6 +143,21 @@ ResourcePool::getPortIdx(const std::string &port_name)
return 0;
}
+unsigned
+ResourcePool::getResIdx(const std::string &res_name)
+{
+ DPRINTF(Resource, "Finding Resource Idx for %s.\n", res_name);
+
+ int num_resources = resources.size();
+
+ for (int idx = 0; idx < num_resources; idx++) {
+ if (resources[idx]->name() == res_name)
+ return idx;
+ }
+
+ return 0;
+}
+
ResReqPtr
ResourcePool::request(int res_idx, DynInstPtr inst)
{