From 21c243b9d317d4b0f35733e097e18be5837473a9 Mon Sep 17 00:00:00 2001 From: Lukas Steiner Date: Sun, 23 Jun 2019 21:20:21 +0200 Subject: [PATCH] Replaced "BaseDram::" with "this->" to access members of the base class. --- .../library/src/simulation/DramRecordable.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DRAMSys/library/src/simulation/DramRecordable.cpp b/DRAMSys/library/src/simulation/DramRecordable.cpp index e9adc271..56a3196a 100644 --- a/DRAMSys/library/src/simulation/DramRecordable.cpp +++ b/DRAMSys/library/src/simulation/DramRecordable.cpp @@ -84,7 +84,7 @@ tlm_sync_enum DramRecordable::nb_transport_fw(tlm_generic_payload &pay unsigned int col = DramExtension::getExtension(payload).getColumn().ID(); // TODO: printDebugMessage not inherited - BaseDram::printDebugMessage("Recording " + phaseNameToString(phase) + " thread " + + this->printDebugMessage("Recording " + phaseNameToString(phase) + " thread " + to_string(thr) + " channel " + to_string(ch) + " bank group " + to_string( bg) + " bank " + to_string(bank) + " row " + to_string(row) + " column " + to_string(col) + " at " + recTime.to_string()); @@ -108,20 +108,20 @@ void DramRecordable::powerWindow() clkCycles = sc_time_stamp().value() / Configuration::getInstance().memSpec->clk.value(); - BaseDram::DRAMPower->calcWindowEnergy(clkCycles); + this->DRAMPower->calcWindowEnergy(clkCycles); // During operation the energy should never be zero since the device is always consuming - assert(!isEqual(BaseDram::DRAMPower->getEnergy().window_energy, 0.0)); + assert(!isEqual(this->DRAMPower->getEnergy().window_energy, 0.0)); // Store the time (in seconds) and the current average power (in mW) into the database recordPower(); // Here considering that DRAMPower provides the energy in pJ and the power in mW - BaseDram::printDebugMessage(string("\tWindow Energy: \t") + to_string( - BaseDram::DRAMPower->getEnergy().window_energy * + this->printDebugMessage(string("\tWindow Energy: \t") + to_string( + this->DRAMPower->getEnergy().window_energy * Configuration::getInstance().NumberOfDevicesOnDIMM) + string("\t[pJ]")); - BaseDram::printDebugMessage(string("\tWindow Average Power: \t") + to_string( - BaseDram::DRAMPower->getPower().window_average_power * + this->printDebugMessage(string("\tWindow Average Power: \t") + to_string( + this->DRAMPower->getPower().window_average_power * Configuration::getInstance().NumberOfDevicesOnDIMM) + string("\t[mW]")); } while (true); @@ -131,7 +131,7 @@ template void DramRecordable::recordPower() { tlmRecorder->recordPower(sc_time_stamp().to_seconds(), - BaseDram::DRAMPower->getPower().window_average_power + this->DRAMPower->getPower().window_average_power * Configuration::getInstance().NumberOfDevicesOnDIMM); }