From c8837290251a300114975861575f59a58990b51a Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Fri, 18 Feb 2011 14:28:22 -0500 Subject: inorder: add valid bit for resource requests this will allow us to reuse resource requests within a resource instead of always dynamically allocating --- src/cpu/inorder/resource.cc | 2 +- src/cpu/inorder/resource.hh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/cpu/inorder/resource.cc b/src/cpu/inorder/resource.cc index 568e2759d..e6a0db021 100644 --- a/src/cpu/inorder/resource.cc +++ b/src/cpu/inorder/resource.cc @@ -407,7 +407,7 @@ int ResourceRequest::maxReqCount = 0; ResourceRequest::ResourceRequest(Resource *_res, DynInstPtr _inst, int stage_num, int res_idx, int slot_num, unsigned _cmd) - : res(_res), inst(_inst), cmd(_cmd), stageNum(stage_num), + : res(_res), inst(_inst), cmd(_cmd), valid(false), stageNum(stage_num), resIdx(res_idx), slotNum(slot_num), completed(false), squashed(false), processing(false), memStall(false) { diff --git a/src/cpu/inorder/resource.hh b/src/cpu/inorder/resource.hh index 7f6cb6642..c02fe4014 100644 --- a/src/cpu/inorder/resource.hh +++ b/src/cpu/inorder/resource.hh @@ -299,6 +299,8 @@ class ResourceRequest static int maxReqCount; + friend class Resource; + public: ResourceRequest(Resource *_res, DynInstPtr _inst, int stage_num, int res_idx, int slot_num, unsigned _cmd); @@ -321,7 +323,6 @@ class ResourceRequest ///////////////////////////////////////////// /** Get Resource Index */ int getResIdx() { return resIdx; } - /** Get Slot Number */ int getSlot() { return slotNum; } @@ -378,6 +379,7 @@ class ResourceRequest protected: /** Resource Identification */ + bool valid; ThreadID tid; int stageNum; int resIdx; -- cgit v1.2.3