scheduleTickEvent(0);
}
+InOrderCPU::~InOrderCPU()
+{
+ delete resPool;
+}
+
void
InOrderCPU::regStats()
public:
/** Constructs a CPU with the given parameters. */
InOrderCPU(Params *params);
-
+ /* Destructor */
+ ~InOrderCPU();
+
/** CPU ID */
int cpu_id;
Resource::~Resource()
{
delete [] resourceEvent;
+ delete deniedReq;
}
0, _cpu, params));
}
+ResourcePool::~ResourcePool()
+{
+ cout << "Deleting resources ..." << endl;
+
+ for (int i=0; i < resources.size(); i++) {
+ DPRINTF(Resource, "Deleting resource: %s.\n", resources[i]->name());
+
+ delete resources[i];
+ }
+}
+
+
void
ResourcePool::init()
{
public:
ResourcePool(InOrderCPU *_cpu, ThePipeline::Params *params);
- virtual ~ResourcePool() {}
+ ~ResourcePool();
std::string name();
public:
CacheUnit(std::string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu, ThePipeline::Params *params);
- virtual ~CacheUnit() {}
enum Command {
InitiateFetch,
public:
ExecutionUnit(std::string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu, ThePipeline::Params *params);
- virtual ~ExecutionUnit() {}
public:
virtual void regStats();
}
}
+FetchSeqUnit::~FetchSeqUnit()
+{
+ delete [] resourceEvent;
+}
+
void
FetchSeqUnit::init()
{
public:
FetchSeqUnit(std::string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu, ThePipeline::Params *params);
- virtual ~FetchSeqUnit() {}
-
+ virtual ~FetchSeqUnit();
+
virtual void init();
virtual void activateThread(ThreadID tid);
virtual void deactivateThread(ThreadID tid);
public:
MultDivUnit(std::string res_name, int res_id, int res_width,
int res_latency, InOrderCPU *_cpu, ThePipeline::Params *params);
- virtual ~MultDivUnit() {}
public:
/** Override default Resource getSlot(). Will only getSlot if