Code refactoring.
This commit is contained in:
@@ -121,8 +121,7 @@ DRAMSys::DRAMSys(sc_module_name name,
|
||||
|
||||
DRAMSys::~DRAMSys()
|
||||
{
|
||||
if (ecc)
|
||||
delete ecc;
|
||||
delete ecc;
|
||||
|
||||
delete arbiter;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ public:
|
||||
std::string simulationToRun,
|
||||
std::string pathToResources);
|
||||
|
||||
virtual ~DRAMSys();
|
||||
~DRAMSys() override;
|
||||
|
||||
protected:
|
||||
DRAMSys(sc_module_name name,
|
||||
@@ -95,7 +95,7 @@ protected:
|
||||
void report(std::string message);
|
||||
|
||||
private:
|
||||
void logo();
|
||||
static void logo();
|
||||
|
||||
void instantiateModules(const std::string &pathToResources,
|
||||
const std::string &amconfig);
|
||||
|
||||
@@ -79,6 +79,7 @@ DRAMSysRecordable::DRAMSysRecordable(sc_module_name name,
|
||||
|
||||
DRAMSysRecordable::~DRAMSysRecordable()
|
||||
{
|
||||
// Report power before TLM recorders are deleted
|
||||
if (Configuration::getInstance().powerAnalysis)
|
||||
{
|
||||
for (auto dram : drams)
|
||||
@@ -99,9 +100,9 @@ void DRAMSysRecordable::setupTlmRecorders(const std::string &traceName)
|
||||
std::string recorderName = "tlmRecorder" + std::to_string(i);
|
||||
|
||||
TlmRecorder *tlmRecorder =
|
||||
new TlmRecorder(recorderName, dbName.c_str());
|
||||
tlmRecorder->recordMcConfig(Configuration::getInstance().mcconfigUri);
|
||||
tlmRecorder->recordMemspec(Configuration::getInstance().memspecUri);
|
||||
new TlmRecorder(recorderName, dbName);
|
||||
tlmRecorder->recordMcConfig(Configuration::mcconfigUri);
|
||||
tlmRecorder->recordMemspec(Configuration::memspecUri);
|
||||
|
||||
std::string traceNames = Configuration::getInstance().simulationName;
|
||||
tlmRecorder->recordTraceNames(traceNames);
|
||||
|
||||
@@ -46,7 +46,7 @@ public:
|
||||
std::string simulationToRun,
|
||||
std::string pathToResources);
|
||||
|
||||
virtual ~DRAMSysRecordable();
|
||||
~DRAMSysRecordable() override;
|
||||
|
||||
private:
|
||||
// Transaction Recorders (one per channel).
|
||||
|
||||
@@ -101,7 +101,7 @@ Dram::~Dram()
|
||||
{
|
||||
if (Configuration::getInstance().powerAnalysis)
|
||||
{
|
||||
reportPower();
|
||||
Dram::reportPower();
|
||||
delete DRAMPower;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ void DramRecordable<BaseDram>::reportPower()
|
||||
{
|
||||
BaseDram::reportPower();
|
||||
tlmRecorder->recordPower(sc_time_stamp().to_seconds(),
|
||||
this->DRAMPower->getPower().window_average_power
|
||||
* Configuration::getInstance().memSpec->numberOfDevicesOnDIMM);
|
||||
this->DRAMPower->getPower().window_average_power
|
||||
* Configuration::getInstance().memSpec->numberOfDevicesOnDIMM);
|
||||
}
|
||||
|
||||
template<class BaseDram>
|
||||
|
||||
Reference in New Issue
Block a user