inorder: add valid bit for resource requests

this will allow us to reuse resource requests within a resource instead
of always dynamically allocating
This commit is contained in:
Korey Sewell 2011-02-18 14:28:22 -05:00
parent ff48afcf4f
commit c883729025
2 changed files with 4 additions and 2 deletions

View file

@ -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)
{

View file

@ -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;