Replaced "BaseDram::" with "this->" to access members of the base class.

This commit is contained in:
Lukas Steiner
2019-06-23 21:20:21 +02:00
parent f8baef57c6
commit 21c243b9d3

View File

@@ -84,7 +84,7 @@ tlm_sync_enum DramRecordable<BaseDram>::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<BaseDram>::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<class BaseDram>
void DramRecordable<BaseDram>::recordPower()
{
tlmRecorder->recordPower(sc_time_stamp().to_seconds(),
BaseDram::DRAMPower->getPower().window_average_power
this->DRAMPower->getPower().window_average_power
* Configuration::getInstance().NumberOfDevicesOnDIMM);
}