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/ConfigurationLoader.cpp b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp index afa05291..f948c8db 100644 --- a/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp +++ b/DRAMSys/simulator/src/controller/core/configuration/ConfigurationLoader.cpp @@ -153,8 +153,14 @@ 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", "Does not yet support error model and power down modes activated at the same time"); } - loadConfig(config, mcconfig); + } void ConfigurationLoader::loadDDR3(Configuration& config, XMLElement* memspec) 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()) { 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 @@ - +