From acf06d995e71a8e3d83ba1d981e231a5dd6dc1be Mon Sep 17 00:00:00 2001 From: Matthias Jung Date: Fri, 18 Jul 2014 13:20:45 +0200 Subject: [PATCH] changed small things for DRAMPower --- dram/src/simulation/Dram.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/dram/src/simulation/Dram.h b/dram/src/simulation/Dram.h index 11ab4ebc..bf15a79d 100644 --- a/dram/src/simulation/Dram.h +++ b/dram/src/simulation/Dram.h @@ -44,7 +44,8 @@ struct Dram: sc_module { MemorySpecification memSpec(MemorySpecification::getMemSpecFromXML(Configuration::getInstance().memspecUri)); DRAMPower.getEnergy(memSpec); - std::cout << "Total Energy" << "\t" << DRAMPower.mpm.energy.total_energy << endl; + cout << "Total Energy" << "\t" << DRAMPower.mpm.energy.total_energy << endl; + cout << "Average Power" << "\t" << DRAMPower.mpm.power.average_power << endl; } virtual tlm::tlm_sync_enum nb_transport_fw(tlm::tlm_generic_payload& payload, tlm::tlm_phase& phase, sc_time& delay) @@ -99,11 +100,23 @@ struct Dram: sc_module //Powerdown phases have to be started and ended by the controller, because they do not have a fixed length else if (phase == BEGIN_PDNP) { - DRAMPower.doCommand(MemCommand::PDN_S_PRE, bank, cycle); + if(Configuration::getInstance().BankwiseLogic == false) + { + if(bank == 0) + { + DRAMPower.doCommand(MemCommand::PDN_S_PRE, bank, cycle); + } + } } else if (phase == END_PDNP) { - DRAMPower.doCommand(MemCommand::PUP_PRE, bank, cycle); + if(Configuration::getInstance().BankwiseLogic == false) + { + if(bank == 0) + { + DRAMPower.doCommand(MemCommand::PUP_PRE, bank, cycle); + } + } } else if (phase == BEGIN_PDNA) {