diff options
author | Korey Sewell <ksewell@umich.edu> | 2010-01-31 18:30:35 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2010-01-31 18:30:35 -0500 |
commit | 6939482c49b489ad8811364ec52ad10ae421fb44 (patch) | |
tree | 6eb023749052c773df869d189965a3d8ee07070a /src/cpu/inorder/resource_pool.cc | |
parent | ea8909925fd0e7a33feabc9e17f83b85cd7c6039 (diff) | |
download | gem5-6939482c49b489ad8811364ec52ad10ae421fb44.tar.xz |
inorder: implement split loads
Diffstat (limited to 'src/cpu/inorder/resource_pool.cc')
-rw-r--r-- | src/cpu/inorder/resource_pool.cc | 19 |
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; } |