Get power values from DRAMPower if powerAnalysis and dynamic temperature simulation are activated

This commit is contained in:
Éder F. Zulian
2015-10-20 08:59:13 +02:00
parent bbcd7096b4
commit 8e64eee64d
2 changed files with 3 additions and 1 deletions

View File

@@ -44,6 +44,7 @@
void errorModel::init()
{
powerAnalysis = Configuration::getInstance().PowerAnalysis;
dynTemperatureSim = Configuration::getInstance().DynamicTemperatureSimulation;
// Get Configuration parameters:
busWidth = Configuration::getInstance().Buswidth;
burstLenght = Configuration::getInstance().memSpec.BurstLength;
@@ -512,7 +513,7 @@ double errorModel::getTemperature()
double temperature = 89;
if (this->myChannel != -1) {
if (powerAnalysis == true) {
if (dynTemperatureSim == true && powerAnalysis == true) {
// TODO
// check if this is best way to request information to DRAMPower.
DRAMPower->updateCounters(true);

View File

@@ -60,6 +60,7 @@ class errorModel
void init(void);
bool powerAnalysis;
libDRAMPower *DRAMPower;
bool dynTemperatureSim;
// Configuration Parameters:
unsigned int busWidth;
unsigned int burstLenght;