Merge pull request #147 from trancong/errormodel_powerdown_issue88
Add compatible assertion between Store Mode and Power Down mode
This commit is contained in:
@@ -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; \
|
||||
\
|
||||
} \
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<MaxNrOfTransactions value="8" />
|
||||
<Scheduler value="FR_FCFS" />
|
||||
<Capsize value="5" />
|
||||
<PowerDownMode value="TimeoutPDN" />
|
||||
<PowerDownMode value="NoPowerDown" />
|
||||
<PowerDownTimeout value="100" />
|
||||
<!-- Error Model: -->
|
||||
<ErrorChipSeed value="42" />
|
||||
|
||||
Reference in New Issue
Block a user