diff --git a/DRAMSys/simulator/src/common/third_party/icewrapper b/DRAMSys/simulator/src/common/third_party/icewrapper index f118c42b..2179c985 160000 --- a/DRAMSys/simulator/src/common/third_party/icewrapper +++ b/DRAMSys/simulator/src/common/third_party/icewrapper @@ -1 +1 @@ -Subproject commit f118c42b5ab865708d9ab1bd1383ce6c99189a8e +Subproject commit 2179c985a0692e7ab5ec58c35eb7fa69f34c2252 diff --git a/DRAMSys/simulator/src/simulation/TemperatureController.cpp b/DRAMSys/simulator/src/simulation/TemperatureController.cpp index 2f67431a..a0fda47f 100644 --- a/DRAMSys/simulator/src/simulation/TemperatureController.cpp +++ b/DRAMSys/simulator/src/simulation/TemperatureController.cpp @@ -77,10 +77,16 @@ void TemperatureController::updateTemperatures() thermalSimulation->simulate(); thermalSimulation->getTemperature(temperaturesBuffer, TDICE_OUTPUT_INSTANT_SLOT, TDICE_OUTPUT_TYPE_TFLPEL, TDICE_OUTPUT_QUANTITY_AVERAGE); - if (genTempMap == true) - thermalSimulation->getTemperatureMap(temperatureMapFile); - if (genPowerMap == true) - thermalSimulation->getPowerMap(powerMapFile); + std::string mapfile; + sc_time ts = sc_time_stamp(); + if (genTempMap == true) { + mapfile = temperatureMapFile + "_" + std::to_string(ts.to_default_time_units()) + ".txt"; + thermalSimulation->getTemperatureMap(mapfile); + } + if (genPowerMap == true) { + mapfile = powerMapFile + "_" + std::to_string(ts.to_default_time_units()) + ".txt"; + thermalSimulation->getPowerMap(mapfile); + } #endif // Save values just obtained for posterior use temperatureValues = temperaturesBuffer; diff --git a/DRAMSys/simulator/src/simulation/TemperatureController.h b/DRAMSys/simulator/src/simulation/TemperatureController.h index 26ece72d..c0650f6f 100644 --- a/DRAMSys/simulator/src/simulation/TemperatureController.h +++ b/DRAMSys/simulator/src/simulation/TemperatureController.h @@ -91,12 +91,12 @@ public: t_unit = Configuration::getInstance().temperatureSim.DynTemperatureSimUnit; genTempMap = Configuration::getInstance().temperatureSim.GenerateTemperatureMap; - temperatureMapFile = "temperature_map.txt"; - std::remove(temperatureMapFile.c_str()); + temperatureMapFile = "temperature_map"; + std::system("rm temperature_map*"); genPowerMap = Configuration::getInstance().temperatureSim.GeneratePowerMap; - powerMapFile = "power_map.txt"; - std::remove(powerMapFile.c_str()); + powerMapFile = "power_map"; + std::system("rm power_map*"); SC_THREAD(temperatureThread); } else {