projects
/
gem5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Yet another merge with the main repository.
[gem5.git]
/
src
/
cpu
/
inorder
/
resource_pool.hh
diff --git
a/src/cpu/inorder/resource_pool.hh
b/src/cpu/inorder/resource_pool.hh
index e8061d3ffa163bd36290980048bea4d2c1803b6e..e892d750af7c1b74d77e7c18f088772c0dbe9d6b 100644
(file)
--- a/
src/cpu/inorder/resource_pool.hh
+++ b/
src/cpu/inorder/resource_pool.hh
@@
-32,17
+32,17
@@
#ifndef __CPU_INORDER_RESOURCE_POOL_HH__
#define __CPU_INORDER_RESOURCE_POOL_HH__
#ifndef __CPU_INORDER_RESOURCE_POOL_HH__
#define __CPU_INORDER_RESOURCE_POOL_HH__
-#include <vector>
#include <list>
#include <string>
#include <list>
#include <string>
+#include <vector>
-#include "cpu/in
st_seq
.hh"
+#include "cpu/in
order/cpu
.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
#include "cpu/inorder/inorder_dyn_inst.hh"
-#include "cpu/inorder/resource.hh"
-#include "cpu/inorder/pipeline_traits.hh"
#include "cpu/inorder/params.hh"
#include "cpu/inorder/params.hh"
+#include "cpu/inorder/pipeline_traits.hh"
+#include "cpu/inorder/resource.hh"
+#include "cpu/inst_seq.hh"
#include "params/InOrderCPU.hh"
#include "params/InOrderCPU.hh"
-#include "cpu/inorder/cpu.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
#include "sim/eventq.hh"
#include "sim/sim_object.hh"
@@
-67,6
+67,12
@@
class ResourcePool {
Default
};
Default
};
+ enum ResPoolEventPri {
+ ResPool_Pri = InOrderCPU::InOrderCPU_Pri - 5,
+ ResGrad_Pri,
+ ResSquash_Pri
+ };
+
class ResPoolEvent : public Event
{
protected:
class ResPoolEvent : public Event
{
protected:
@@
-91,7
+97,8
@@
class ResourcePool {
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
DynInstPtr _inst,
int stage_num,
InstSeqNum seq_num,
- ThreadID _tid);
+ ThreadID _tid,
+ ResPoolEventPri res_pri = ResPool_Pri);
/** Set Type of Event To Be Scheduled */
void setEvent(InOrderCPU::CPUEventType e_type,
/** Set Type of Event To Be Scheduled */
void setEvent(InOrderCPU::CPUEventType e_type,
@@
-122,7
+129,7
@@
class ResourcePool {
public:
ResourcePool(InOrderCPU *_cpu, ThePipeline::Params *params);
public:
ResourcePool(InOrderCPU *_cpu, ThePipeline::Params *params);
- ~ResourcePool();
+ virtual ~ResourcePool();
std::string name();
std::string name();
@@
-130,6
+137,8
@@
class ResourcePool {
void init();
void init();
+ void print();
+
/** Register Statistics in All Resources */
void regStats();
/** Register Statistics in All Resources */
void regStats();
@@
-166,13
+175,13
@@
class ResourcePool {
InstSeqNum done_seq_num, ThreadID tid);
/** Activate Thread in all resources */
InstSeqNum done_seq_num, ThreadID tid);
/** Activate Thread in all resources */
- void activate
All
(ThreadID tid);
+ void activate
Thread
(ThreadID tid);
/** De-Activate Thread in all resources */
/** De-Activate Thread in all resources */
- void deactivate
All
(ThreadID tid);
+ void deactivate
Thread
(ThreadID tid);
- /**
De-Activate
Thread in all resources */
- void suspend
All
(ThreadID tid);
+ /**
Suspend
Thread in all resources */
+ void suspend
Thread
(ThreadID tid);
/** Broadcast Context Switch Update to all resources */
void updateAfterContextSwitch(DynInstPtr inst, ThreadID tid);
/** Broadcast Context Switch Update to all resources */
void updateAfterContextSwitch(DynInstPtr inst, ThreadID tid);
@@
-180,6
+189,9
@@
class ResourcePool {
/** Broadcast graduation to all resources */
void instGraduated(InstSeqNum seq_num, ThreadID tid);
/** Broadcast graduation to all resources */
void instGraduated(InstSeqNum seq_num, ThreadID tid);
+ /** Broadcast trap to all resources */
+ void trap(Fault fault, ThreadID tid, DynInstPtr inst);
+
/** The number of instructions available that a resource can
* can still process.
*/
/** The number of instructions available that a resource can
* can still process.
*/
@@
-206,8
+218,11
@@
class ResourcePool {
private:
std::vector<Resource *> resources;
private:
std::vector<Resource *> resources;
+ /** Resources that interface with memory objects */
std::vector<int> memObjects;
std::vector<int> memObjects;
+ /** Resources that need to be updated on an inst. graduation */
+ std::vector<int> gradObjects;
};
#endif //__CPU_INORDER_RESOURCE_HH__
};
#endif //__CPU_INORDER_RESOURCE_HH__