diff --git a/src/libdramsys/DRAMSys/simulation/Dram.cpp b/src/libdramsys/DRAMSys/simulation/Dram.cpp index c110ad02..7b4cdeaa 100644 --- a/src/libdramsys/DRAMSys/simulation/Dram.cpp +++ b/src/libdramsys/DRAMSys/simulation/Dram.cpp @@ -316,6 +316,7 @@ void Dram::powerWindow() currentEnergy = this->DRAMPower->getTotalEnergy(clkCycles); windowEnergy = currentEnergy - previousEnergy; + previousEnergy = currentEnergy; // During operation the energy should never be zero since the device is always consuming assert(!(windowEnergy < 1e-15));