Minor change: ErrorStoreMode --> StoreMode

This commit is contained in:
Éder F. Zulian
2016-07-08 11:16:45 +02:00
parent 583aba998e
commit f3d28116b4
10 changed files with 111 additions and 101 deletions

View File

@@ -9,5 +9,6 @@
<!-- Error Modelling -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<StoreMode value="NoStorage" />
</memconfig>

View File

@@ -9,5 +9,7 @@
<!-- Error Modelling -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!-- Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel) -->
<StoreMode value="Store" />
</memconfig>

View File

@@ -9,7 +9,8 @@
<!-- Error Model: -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!-- Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel) -->
<StoreMode value="NoStorage" />
<!--
<Buswidth value="128" />
<ReadWriteGrouping value="false" />
@@ -19,3 +20,4 @@
<DatabaseRecording value="true" />
-->
</memconfig>

View File

@@ -167,13 +167,13 @@ void Configuration::setParameter(std::string name, std::string value)
SimulationProgressBar = string2bool(value);
else if(name == "NumberOfDevicesOnDIMM")
NumberOfDevicesOnDIMM = string2int(value);
// Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode
// Specification for ErrorChipSeed, ErrorCSVFile path and StoreMode
else if(name == "ErrorChipSeed")
ErrorChipSeed = string2int(value);
else if(name == "ErrorCSVFile")
ErrorCSVFile = value;
else if(name == "ErrorStoreMode")
ErrorStoreMode = StringToEnum(value);
else if(name == "StoreMode")
StoreMode = StringToEnum(value);
// Temperature Simulation related
else if (name == "TemperatureScale") {
if (value != "Celsius" && value != "Fahrenheit" && value != "Kelvin") {

View File

@@ -44,8 +44,8 @@
#include "thermalSimConfig.h"
#include "../../../common/Utils.h"
enum class ErrorStorageMode;
DEFINE_ENUM_CLASS_WITH_STRING_CONVERSIONS(ErrorStorageMode, (NoStorage)(Store)(ErrorModel))
enum class StorageMode;
DEFINE_ENUM_CLASS_WITH_STRING_CONVERSIONS(StorageMode, (NoStorage)(Store)(ErrorModel))
enum class EPowerDownMode{NoPowerDown, Staggered, TimeoutPDN, TimeoutSREF};
@@ -91,10 +91,10 @@ struct Configuration
void setParameter(std::string name, std::string value);
void setParameters(std::map<std::string, std::string> parameterMap);
//Configs for Seed, csv file and ErrorStorageMode
//Configs for Seed, csv file and StorageMode
unsigned int ErrorChipSeed;
std::string ErrorCSVFile ="not defined.";
ErrorStorageMode ErrorStoreMode;
StorageMode StoreMode;
// Temperature Simulation related
TemperatureSimConfig temperatureSim;

View File

@@ -86,7 +86,7 @@ struct Dram : sc_module
sc_time lastAccess;
// Error Model related:
ErrorStorageMode ErrorStoreMode = Configuration::getInstance().ErrorStoreMode;
StorageMode StoreMode = Configuration::getInstance().StoreMode;
std::vector<errorModel *> ememory;
// Data Storage:
@@ -198,10 +198,10 @@ struct Dram : sc_module
firstAccess = SC_ZERO_TIME;
lastAccess = SC_ZERO_TIME;
printDebugMessage(string("ErrorStorageMode: ") + EnumToString(ErrorStoreMode));
printDebugMessage(string("StorageMode: ") + EnumToString(StoreMode));
// For each bank in a channel a error Model is created:
if(ErrorStoreMode == ErrorStorageMode::ErrorModel)
if(StoreMode == StorageMode::ErrorModel)
{
for (unsigned i = 0; i < Configuration::getInstance().memSpec.NumberOfBanks; i++) {
errorModel *em;
@@ -368,7 +368,7 @@ struct Dram : sc_module
sendToController(payload, END_ACT, delay + getExecutionTime(Command::Activate, payload));
unsigned int row = DramExtension::getExtension(payload).getRow().ID();
if (ErrorStoreMode == ErrorStorageMode::ErrorModel)
if (StoreMode == StorageMode::ErrorModel)
{
ememory[bank]->activate(row);
}
@@ -382,11 +382,11 @@ struct Dram : sc_module
numberOfTransactionsServed++;
//save data:
if (ErrorStoreMode == ErrorStorageMode::NoStorage)
if (StoreMode == StorageMode::NoStorage)
{
// Don't store data
}
else if (ErrorStoreMode == ErrorStorageMode::Store) // Use Storage
else if (StoreMode == StorageMode::Store) // Use Storage
{
unsigned char *phyAddr = memory + payload.get_address();
memcpy(phyAddr, payload.get_data_ptr(), payload.get_data_length());
@@ -405,12 +405,12 @@ struct Dram : sc_module
if(powerAnalysis == true){DRAMPower->doCommand(MemCommand::RD, bank, cycle);}
// Load data:
if (ErrorStoreMode == ErrorStorageMode::Store) //use ErrorStorageMode
if (StoreMode == StorageMode::Store) //use StorageMode
{
unsigned char *phyAddr = memory + payload.get_address();
memcpy(payload.get_data_ptr(), phyAddr, payload.get_data_length());
}
else if(ErrorStoreMode == ErrorStorageMode::ErrorModel)// use ErrorStorageMode with errormodel
else if(StoreMode == StorageMode::ErrorModel)// use StorageMode with errormodel
{
ememory[bank]->load(payload);
}
@@ -423,11 +423,11 @@ struct Dram : sc_module
if(powerAnalysis == true){DRAMPower->doCommand(MemCommand::WRA, bank, cycle);}
//save data:
if (ErrorStoreMode == ErrorStorageMode::NoStorage)
if (StoreMode == StorageMode::NoStorage)
{
// Don't store data
}
else if (ErrorStoreMode == ErrorStorageMode::Store) // Use Storage
else if (StoreMode == StorageMode::Store) // Use Storage
{
unsigned char *phyAddr = memory + payload.get_address();
@@ -445,12 +445,12 @@ struct Dram : sc_module
if(powerAnalysis == true){DRAMPower->doCommand(MemCommand::RDA, bank, cycle);}
// Load data:
if (ErrorStoreMode == ErrorStorageMode::Store) //use ErrorStorageMode
if (StoreMode == StorageMode::Store) //use StorageMode
{
unsigned char *phyAddr = memory + payload.get_address();
memcpy(payload.get_data_ptr(), phyAddr, payload.get_data_length());
}
else if(ErrorStoreMode == ErrorStorageMode::ErrorModel)// use ErrorStorageMode with errormodel
else if(StoreMode == StorageMode::ErrorModel)// use StorageMode with errormodel
{
ememory[bank]->load(payload);
}
@@ -463,7 +463,7 @@ struct Dram : sc_module
sendToController(payload, END_REFA, delay + getExecutionTime(Command::AutoRefresh, payload));
unsigned int row = DramExtension::getExtension(payload).getRow().ID();
if (ErrorStoreMode == ErrorStorageMode::ErrorModel)
if (StoreMode == StorageMode::ErrorModel)
{
ememory[bank]->refresh(row);
}
@@ -541,7 +541,7 @@ struct Dram : sc_module
assert(trans.get_data_length() == bytesPerBurst);
// TODO: This part is not tested yet, neither with traceplayers neither with GEM5 coupling
if (ErrorStoreMode == ErrorStorageMode::NoStorage)
if (StoreMode == StorageMode::NoStorage)
{
SC_REPORT_FATAL("DRAM", "Debug Transport is used in combination with NoStorage");
}
@@ -557,10 +557,10 @@ struct Dram : sc_module
if ( cmd == tlm::TLM_READ_COMMAND )
{
if (ErrorStoreMode == ErrorStorageMode::Store) // Use Storage
if (StoreMode == StorageMode::Store) // Use Storage
{
unsigned char *phyAddr = memory + trans.get_address();
memcpy(trans.get_data_ptr(), phyAddr, trans.get_data_length());
memcpy(ptr, phyAddr, trans.get_data_length());
}
else
{
@@ -571,10 +571,10 @@ struct Dram : sc_module
else if ( cmd == tlm::TLM_WRITE_COMMAND )
{
if (ErrorStoreMode == ErrorStorageMode::Store) // Use Storage
if (StoreMode == StorageMode::Store) // Use Storage
{
unsigned char *phyAddr = memory + trans.get_address();
memcpy(phyAddr, trans.get_data_ptr(), trans.get_data_length());
memcpy(phyAddr, ptr, trans.get_data_length());
}
else
{

View File

@@ -51,7 +51,7 @@
#include "../simulation/TemperatureController.h"
#include "../controller/Controller.h"
#define USE_EXAMPLE_INITIATOR 0
#define USE_EXAMPLE_INITIATOR 1
using namespace std;
@@ -125,7 +125,7 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
// When data should be stored during the simulation the StlDataPlayer is needed.
// Else: no data should be stored, for instance to get a faster simulation
// or if you simply dont care about the data the normal StlPlayer is used.
if(Configuration::getInstance().ErrorStoreMode == ErrorStorageMode::NoStorage)
if(Configuration::getInstance().StoreMode == StorageMode::NoStorage)
{
StlPlayer *newPlayer = new StlPlayer(playerStr.c_str(), pathToResources + string("traces/") + devices[i].trace, devices[i].clkMhz, this);
player = newPlayer;

View File

@@ -9,7 +9,8 @@
<!-- Error Model: -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="ErrorModel" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!-- Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel) -->
<StoreMode value="ErrorModel" />
<!--
<Buswidth value="128" />
<ReadWriteGrouping value="false" />
@@ -19,3 +20,4 @@
<DatabaseRecording value="true" />
-->
</memconfig>

View File

@@ -9,5 +9,7 @@
<!-- Error Modelling -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!-- Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel) -->
<StoreMode value="NoStorage" />
</memconfig>

View File

@@ -377,7 +377,8 @@ Enable the error model in fr_fcfs.xml.
<!-- Error Model: -->
<ErrorChipSeed value="42" />
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="ErrorModel" /> <!--3 Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel)-->
<!-- Modes: NoStorage, Store (store data without errormodel), ErrorModel (store data with errormodel) -->
<StoreMode value="ErrorModel" />
</memconfig>
```
@@ -638,7 +639,7 @@ Below are listed the configuration sections and configuration fields.
<!-- Error Modelling -->
<ErrorChipSeed value="42"/>
<ErrorCSVFile value="../../DRAMSys/simulator/src/error/error.csv" />
<ErrorStoreMode value="NoStorage"/>
<StoreMode value="NoStorage"/>
</memconfig>
```
@@ -673,7 +674,7 @@ Below are listed the configuration sections and configuration fields.
- Seed to initialize the random error generator.
- *ErrorCSVFile* (string)
- CSV file with error injection information.
- *ErrorStoreMode* (enum ErrorStorageMode)
- *StoreMode* (enum StorageMode)
- "NoStorage": no storage
- "Store": store data without error model
- "ErrorModel": store data with error model [6]