diff options
author | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:28:30 -0500 |
---|---|---|
committer | Korey Sewell <ksewell@umich.edu> | 2011-02-18 14:28:30 -0500 |
commit | d64226750ef9b2ac85c116f90cdfdb2a755b32d4 (patch) | |
tree | f9e0e41a6008fdf3fa67a8f014dab9b54ffd37e5 /src/cpu/inorder/resources/use_def.hh | |
parent | c8837290251a300114975861575f59a58990b51a (diff) | |
download | gem5-d64226750ef9b2ac85c116f90cdfdb2a755b32d4.tar.xz |
inorder: remove request map, use request vector
take away all instances of reqMap in the code and make all references use the built-in
request vectors inside of each resource. The request map was dynamically allocating
a request per instruction. The request vector just allocates N number of requests
during instantiation and then the surrounding code is fixed up to reuse those N requests
***
setRequest() and clearRequest() are the new accessors needed to define a new
request in a resource
Diffstat (limited to 'src/cpu/inorder/resources/use_def.hh')
-rw-r--r-- | src/cpu/inorder/resources/use_def.hh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cpu/inorder/resources/use_def.hh b/src/cpu/inorder/resources/use_def.hh index 6db8ed987..21770cec6 100644 --- a/src/cpu/inorder/resources/use_def.hh +++ b/src/cpu/inorder/resources/use_def.hh @@ -98,14 +98,20 @@ class UseDefUnit : public Resource { typedef ThePipeline::DynInstPtr DynInstPtr; public: - UseDefRequest(UseDefUnit *res, DynInstPtr inst, int stage_num, - int res_idx, int slot_num, unsigned cmd, - int use_def_idx) - : ResourceRequest(res, inst, stage_num, res_idx, slot_num, cmd), - useDefIdx(use_def_idx) + UseDefRequest(UseDefUnit *res) + : ResourceRequest(res) { } int useDefIdx; + + void setRequest(DynInstPtr _inst, int stage_num, int res_idx, + int slot_num, unsigned _cmd, int idx) + { + useDefIdx = idx; + + ResourceRequest::setRequest(_inst, stage_num, res_idx, slot_num, + _cmd); + } }; protected: |