diff --git a/DRAMSys/simulator/resources/simulations/sim-batch.xml b/DRAMSys/simulator/resources/simulations/sim-batch.xml
index ab1ecb3c..8a9f9407 100644
--- a/DRAMSys/simulator/resources/simulations/sim-batch.xml
+++ b/DRAMSys/simulator/resources/simulations/sim-batch.xml
@@ -5,6 +5,7 @@
+
diff --git a/DRAMSys/simulator/src/controller/core/ControllerCore.cpp b/DRAMSys/simulator/src/controller/core/ControllerCore.cpp
index 10830362..32b47d86 100644
--- a/DRAMSys/simulator/src/controller/core/ControllerCore.cpp
+++ b/DRAMSys/simulator/src/controller/core/ControllerCore.cpp
@@ -123,16 +123,19 @@ ControllerCore::~ControllerCore()
void ControllerCore::triggerRefresh(tlm::tlm_generic_payload& payload)
{
- sc_time time = sc_time_stamp();
- Bank bank = DramExtension::getExtension(payload).getBank();
+ /* Refresh can be disabled for tests purpose */
+ if (config.ControllerCoreDisableRefresh == false) {
+ sc_time time = sc_time_stamp();
+ Bank bank = DramExtension::getExtension(payload).getBank();
- state.cleanUp(time);
+ state.cleanUp(time);
- if (!refreshManager->isInvalidated(payload, time) && !powerDownManager->isInSelfRefresh(bank))
- {
- printDebugMessage("Triggering refresh on bank " + to_string(bank.ID()));
- powerDownManager->wakeUpForRefresh(bank, time); //expects PDNA and PDNP to exit without delay
- refreshManager->scheduleRefresh(payload, time);
+ if (!refreshManager->isInvalidated(payload, time) && !powerDownManager->isInSelfRefresh(bank))
+ {
+ printDebugMessage("Triggering refresh on bank " + to_string(bank.ID()));
+ powerDownManager->wakeUpForRefresh(bank, time); //expects PDNA and PDNP to exit without delay
+ refreshManager->scheduleRefresh(payload, time);
+ }
}
}
diff --git a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp
index d3c35a58..4d5ccf36 100644
--- a/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp
+++ b/DRAMSys/simulator/src/controller/core/configuration/Configuration.cpp
@@ -121,6 +121,8 @@ void Configuration::setParameter(std::string name, std::string value)
NumberOfTracePlayers = string2int(value);
else if (name == "NumberOfMemChannels")
NumberOfMemChannels = string2int(value);
+ else if (name == "ControllerCoreDisableRefresh")
+ ControllerCoreDisableRefresh = string2bool(value);
// Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode
else if(name == "ErrorChipSeed")
ErrorChipSeed = string2int(value);
diff --git a/DRAMSys/simulator/src/controller/core/configuration/Configuration.h b/DRAMSys/simulator/src/controller/core/configuration/Configuration.h
index 9f882002..c88e08c2 100644
--- a/DRAMSys/simulator/src/controller/core/configuration/Configuration.h
+++ b/DRAMSys/simulator/src/controller/core/configuration/Configuration.h
@@ -77,6 +77,7 @@ struct Configuration
bool Debug = false;
unsigned int NumberOfTracePlayers = 1;
unsigned int NumberOfMemChannels = 1;
+ bool ControllerCoreDisableRefresh = false;
//MemSpec(from DRAM-Power XML)
MemSpec memSpec;
diff --git a/README.md b/README.md
index 45180796..2536877b 100644
--- a/README.md
+++ b/README.md
@@ -130,6 +130,7 @@ The XML code below shows a typic configuration:
+
@@ -226,6 +227,9 @@ Below are listed the configuration sections and configuration fields.
- Number of trace players
- *NumberOfMemChannels* (unsigned int)
- Number of memory channels
+ - *ControllerCoreDisableRefresh* (boolean)
+ - "1": disables refreshes
+ - "0": normal operation (refreshes enabled)
- **Memory specification**