void ThermTrace::loadValues(ChipEnergyBundle *energyBundle, std::vector <float> *temperatures ){ I(energyBundle->cntrs.size()!=0); for(size_t i = 0;i<mapping.size();i++) { float lkg = 0.0; float slkg = 0.0; for(size_t k = 0;k<mapping[i].map.size();k++) { int32_t flp_id = mapping[i].map[k]; slkg = scaleLeakage((*temperatures)[flp_id],energyBundle->cntrs[i].getLkg(), energyBundle->cntrs[i].getDevType()); energyBundle->cntrs[i].setScaledLkg(slkg); lkg += slkg; } (*scaledLkgCntrValues_)[i] = lkg; (*energyCntrValues_)[0][i] = (lkg + (*energyBundle).cntrs[i].getDyn()); } dumpLeakage(); energyCntrSample_ = 0; return; }
void PowerModel::initPowerModel(const char *section) { MSG("Initialize McPAT/CACTI"); //mcpatWrapper->plug(section, activity, energyCntrNames, leakageCntrValues, deviceTypes, energyCntrAreas, energyCntrTDPs, sysConn, coreConn, &coreEIdx, &ncores, &nL2, &nL3, coreIndex, gpuIndex, true); mcpatWrapper->plug(section, activity, energyBundle, &coreEIdx, &ncores, &nL2, &nL3, coreIndex, gpuIndex, false); I(ncores == (uint32_t)SescConf->getRecordSize("","cpusimu")); clockPrev.resize(ncores); clockInterval.resize(ncores); temperatures->resize(energyBundle->cntrs.size(), INITIAL_TEMP); powerGlue.dumpFlpDescr(coreEIdx); initPowerGStats(); dumppwth = 0; dumppwth = SescConf->getBool(section, "dumpPower", 0); dumppwthSplit = dumppwth; dumpLeakage(); dumpDeviceTypes(); getPowerDumpFile(); }