Small Changes
This commit is contained in:
@@ -211,6 +211,8 @@ struct Dram : sc_module
|
||||
// The energy is given in [pJ] and divided by [s] resulting in [pW] then converted to [mW]
|
||||
double averagePower = (totalEnergy / sc_time_stamp().to_seconds()) / 1e9;
|
||||
|
||||
tlmRecorder->recordPower(sc_time_stamp().to_seconds(), DRAMPower->getPower().average_power);
|
||||
|
||||
// Print the final total energy and the average power for the simulation
|
||||
cout << name() << string("\tTotal Energy: \t") + to_string(totalEnergy) + string("\t[pJ]") << endl;
|
||||
cout << name() << string("\tAverage Power: \t") + to_string(averagePower) + string("\t[mW]") << endl;
|
||||
@@ -243,12 +245,13 @@ struct Dram : sc_module
|
||||
{
|
||||
double currentAveragePower = 0;
|
||||
double currentTotalEnergy = 0;
|
||||
unsigned long long clk_cycles = 0;
|
||||
|
||||
do {
|
||||
// At the very beginning (zero clock cycles) the energy is 0, so we wait first
|
||||
wait(powerWindowSize);
|
||||
|
||||
unsigned long long clk_cycles = sc_time_stamp().value() / Configuration::getInstance().memSpec.clk.value();
|
||||
clk_cycles = sc_time_stamp().value() / Configuration::getInstance().memSpec.clk.value();
|
||||
|
||||
DRAMPower->doCommand(MemCommand::NOP, 0, clk_cycles);
|
||||
DRAMPower->updateCounters(false);
|
||||
|
||||
Reference in New Issue
Block a user