From 93bcda3c72a051f333628e6ec45579af149b37e7 Mon Sep 17 00:00:00 2001 From: "Thanh C. Tran" Date: Tue, 22 Nov 2016 14:27:57 +0100 Subject: [PATCH] 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)