Remove powerAnalysis bool from Dram.h

This commit is contained in:
2025-05-06 10:25:19 +02:00
parent bc8274433a
commit d138f4b71e
2 changed files with 3 additions and 5 deletions

View File

@@ -56,7 +56,6 @@
#endif
#ifdef DRAMPOWER
#include "DRAMPower/data/energy.h"
#include "DRAMPower/command/Command.h"
#endif
@@ -77,7 +76,6 @@ Dram::Dram(const sc_module_name& name,
sc_module(name),
memSpec(memSpec),
storeMode(simConfig.storeMode),
powerAnalysis(simConfig.powerAnalysis),
channelSize(memSpec.getSimMemSizeInBytes() / memSpec.numberOfChannels),
useMalloc(simConfig.useMalloc),
tlmRecorder(tlmRecorder),
@@ -113,7 +111,7 @@ Dram::Dram(const sc_module_name& name,
tSocket.register_transport_dbg(this, &Dram::transport_dbg);
#ifdef DRAMPOWER
if (powerAnalysis)
if (simConfig.powerAnalysis)
{
DRAMPower = memSpec.toDramPowerObject();
if (DRAMPower && storeMode == Config::StoreModeType::NoStorage) {
@@ -141,6 +139,7 @@ void Dram::reportPower()
#ifdef DRAMPOWER
if (!DRAMPower)
return;
double energy = DRAMPower->getTotalEnergy(DRAMPower->getLastCommandTime());
double time = DRAMPower->getLastCommandTime() * memSpec.tCK.to_seconds();
@@ -167,7 +166,7 @@ tlm_sync_enum Dram::nb_transport_fw(tlm_generic_payload& trans, tlm_phase& phase
assert(phase >= BEGIN_RD && phase <= END_SREF);
#ifdef DRAMPOWER
if (powerAnalysis && DRAMPower)
if (DRAMPower)
{
std::size_t rank = static_cast<std::size_t>(ControllerExtension::getRank(trans)); // relaitve to the channel
std::size_t bank_group_abs = static_cast<std::size_t>(ControllerExtension::getBankGroup(trans)); // relative to the channel

View File

@@ -67,7 +67,6 @@ protected:
// Data Storage:
const Config::StoreModeType storeMode;
const bool powerAnalysis;
unsigned char* memory;
const uint64_t channelSize;
const bool useMalloc;