From 93bcda3c72a051f333628e6ec45579af149b37e7 Mon Sep 17 00:00:00 2001 From: "Thanh C. Tran" Date: Tue, 22 Nov 2016 14:27:57 +0100 Subject: [PATCH 1/4] Add compatible assertion between Store Mode and Power Down mode --- .../core/configuration/ConfigurationLoader.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp index afa05291..c7653d30 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp +++ b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp @@ -153,8 +153,15 @@ void ConfigurationLoader::loadMCConfig(Configuration& config, XMLElement* mcconf config.mcconfigUri = src; loadXML(src, doc); loadMCConfig(config, doc.FirstChildElement("mcconfig")); + } else + loadConfig(config, mcconfig); + + // check compatible between Store Mode and PowerDown Mode + if (config.StoreMode == StorageMode::ErrorModel && config.PowerDownMode != EPowerDownMode::NoPowerDown) { + SC_REPORT_FATAL("ConfigurationLoader", "Error model does not work when power down modes are activated"); + throw; } - loadConfig(config, mcconfig); + } void ConfigurationLoader::loadDDR3(Configuration& config, XMLElement* memspec) From 43ac482677aab696bdf196c2ff696c82f1ce5e84 Mon Sep 17 00:00:00 2001 From: "Thanh C. Tran" Date: Tue, 22 Nov 2016 15:07:47 +0100 Subject: [PATCH 2/4] Modified report message --- .../src/controller/core/configuration/ConfigurationLoader.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp index c7653d30..f948c8db 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp +++ b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp @@ -158,8 +158,7 @@ void ConfigurationLoader::loadMCConfig(Configuration& config, XMLElement* mcconf // check compatible between Store Mode and PowerDown Mode if (config.StoreMode == StorageMode::ErrorModel && config.PowerDownMode != EPowerDownMode::NoPowerDown) { - SC_REPORT_FATAL("ConfigurationLoader", "Error model does not work when power down modes are activated"); - throw; + SC_REPORT_FATAL("ConfigurationLoader", "Does not yet support error model and power down modes activated at the same time"); } } From fefc2a6646dfb0ef0ef2fb12dd47bd10a56afe2d Mon Sep 17 00:00:00 2001 From: "Thanh C. Tran" Date: Tue, 22 Nov 2016 15:36:50 +0100 Subject: [PATCH 3/4] =?UTF-8?q?Remove=20unneccesary=20=E2=80=9Cthrow?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DRAMSys/simulator/src/common/Utils.h | 2 +- .../src/controller/core/configuration/Configuration.cpp | 5 ----- .../src/controller/core/configuration/thermalSimConfig.h | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/DRAMSys/simulator/src/common/Utils.h b/DRAMSys/simulator/src/common/Utils.h index 8bd41d90..1de06366 100644 --- a/DRAMSys/simulator/src/common/Utils.h +++ b/DRAMSys/simulator/src/common/Utils.h @@ -154,7 +154,7 @@ void setUpDummy(tlm::tlm_generic_payload& payload, Bank& bank); ("Invalid string \"" + s + "\" for conversion into enum \"" \ + BOOST_PP_STRINGIZE(enumName) + "\"").c_str() \ ); \ - throw; \ + \ } \ } diff --git a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp index ada5409b..594a746b 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp +++ b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp @@ -142,7 +142,6 @@ void Configuration::setParameter(std::string name, std::string value) else if(name == "WindowSize") if(string2int(value) < 1) { SC_REPORT_FATAL("Configuration", ("Invalid value for parameter " + name + ". This parameter must be at least one.").c_str()); - throw; } else WindowSize = string2int(value); @@ -159,7 +158,6 @@ void Configuration::setParameter(std::string name, std::string value) + ". Value is out of range. The maximum value according to " + "the address mapping configuration file is " + std::to_string(maxNumberofMemChannels) + ".").c_str()); - throw; } } else if (name == "ControllerCoreDisableRefresh") @@ -171,7 +169,6 @@ void Configuration::setParameter(std::string name, std::string value) else if(name == "NumberOfDevicesOnDIMM") if (string2int(value) < 1) { SC_REPORT_FATAL("Configuration", ("Invalid value for parameter " + name + ". This parameter must be at least one.").c_str()); - throw; } else NumberOfDevicesOnDIMM = string2int(value); else if(name == "CheckTLM2Protocol") @@ -187,7 +184,6 @@ void Configuration::setParameter(std::string name, std::string value) else if (name == "TemperatureScale") { if (value != "Celsius" && value != "Fahrenheit" && value != "Kelvin") { SC_REPORT_FATAL("Configuration", ("Invalid value for parameter " + name + ".").c_str()); - throw; } temperatureSim.TemperatureScale = value; } @@ -216,7 +212,6 @@ void Configuration::setParameter(std::string name, std::string value) else { SC_REPORT_FATAL("Configuration", ("Parameter " + name + " not defined in Configuration").c_str()); - throw; } } diff --git a/DRAMSys/simulator/src/controller/core/configuration/thermalSimConfig.h b/DRAMSys/simulator/src/controller/core/configuration/thermalSimConfig.h index baa7a3fd..d5d5a25f 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/thermalSimConfig.h +++ b/DRAMSys/simulator/src/controller/core/configuration/thermalSimConfig.h @@ -82,7 +82,6 @@ struct TemperatureSimConfig { std::string errormsg = "Invalid Power Info File " + powerInfoFile; printDebugMessage(errormsg); SC_REPORT_FATAL("Temperature Sim Config", errormsg.c_str()); - throw; } for (tinyxml2::XMLElement *e = powInfoElem->FirstChildElement(); e != NULL; e = e->NextSiblingElement()) { From 32cb8b409b8953a6e3455f571ea84ef58def5d01 Mon Sep 17 00:00:00 2001 From: "Thanh C. Tran" Date: Tue, 22 Nov 2016 22:18:03 +0100 Subject: [PATCH 4/4] Disable PowerDown Mode when testing Error Model --- DRAMSys/tests/error/fr_fcfs.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DRAMSys/tests/error/fr_fcfs.xml b/DRAMSys/tests/error/fr_fcfs.xml index 03cdf411..b7b89273 100644 --- a/DRAMSys/tests/error/fr_fcfs.xml +++ b/DRAMSys/tests/error/fr_fcfs.xml @@ -4,7 +4,7 @@ - +