New configuration option: DynamicTemperatureSimulation
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
<NumberOfTracePlayers value="4"/>
|
||||
<NumberOfMemChannels value="4"/>
|
||||
<ControllerCoreDisableRefresh value="0"/>
|
||||
<DynamicTemperatureSimulation value="0"/>
|
||||
</simconfig>
|
||||
|
||||
<memspecs>
|
||||
@@ -25,5 +26,13 @@
|
||||
<device clkMhz="200">chstone-adpcm_32.stl</device>
|
||||
</tracesetup>
|
||||
</tracesetups>
|
||||
|
||||
<!--
|
||||
<temperature>
|
||||
<StaticTempDefaultValue value="89" />
|
||||
<DynamicTemperatureSimulation value="0" />
|
||||
</temperature>
|
||||
-->
|
||||
|
||||
</simulation>
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@ void Configuration::setParameter(std::string name, std::string value)
|
||||
NumberOfMemChannels = string2int(value);
|
||||
else if (name == "ControllerCoreDisableRefresh")
|
||||
ControllerCoreDisableRefresh = string2bool(value);
|
||||
else if (name == "DynamicTemperatureSimulation")
|
||||
DynamicTemperatureSimulation = string2bool(value);
|
||||
// Specification for ErrorChipSeed, ErrorCSVFile path and ErrorStoreMode
|
||||
else if(name == "ErrorChipSeed")
|
||||
ErrorChipSeed = string2int(value);
|
||||
|
||||
@@ -78,6 +78,7 @@ struct Configuration
|
||||
unsigned int NumberOfTracePlayers = 1;
|
||||
unsigned int NumberOfMemChannels = 1;
|
||||
bool ControllerCoreDisableRefresh = false;
|
||||
bool DynamicTemperatureSimulation = false;
|
||||
|
||||
//MemSpec(from DRAM-Power XML)
|
||||
MemSpec memSpec;
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
errorModel::errorModel()
|
||||
{
|
||||
// Get Configuration parameters:
|
||||
dynamicTemepratureSimulation = Configuration::getInstance().DynamicTemperatureSimulation;
|
||||
busWidth = Configuration::getInstance().Buswidth;
|
||||
burstLenght = Configuration::getInstance().memSpec.BurstLength;
|
||||
numberOfColumns = Configuration::getInstance().memSpec.NumberOfColumns;
|
||||
@@ -49,6 +50,7 @@ errorModel::errorModel()
|
||||
numberOfRows = Configuration::getInstance().memSpec.NumberOfRows;
|
||||
numberOfBitErrorEvents = 0;
|
||||
|
||||
|
||||
// Initialize the lastRow Access array:
|
||||
lastRowAccess = new sc_time[numberOfRows];
|
||||
for(unsigned int i = 0; i < numberOfRows; i++)
|
||||
@@ -101,7 +103,10 @@ errorModel::errorModel()
|
||||
//weakCells[0].row = 0;
|
||||
//weakCells[0].dependent = true;
|
||||
|
||||
if (dynamicTemepratureSimulation == false) {
|
||||
setTemperature(89);
|
||||
}
|
||||
|
||||
markBitFlips();
|
||||
}
|
||||
|
||||
@@ -229,6 +234,7 @@ void errorModel::load(tlm::tlm_generic_payload &trans)
|
||||
|
||||
void errorModel::markBitFlips()
|
||||
{
|
||||
double temp = getTemperature();
|
||||
for(unsigned int row = 0; row < Configuration::getInstance().memSpec.NumberOfRows; row++)
|
||||
{
|
||||
// If the row has never been accessed ignore it and go to the next one
|
||||
@@ -238,7 +244,7 @@ void errorModel::markBitFlips()
|
||||
sc_time interval = sc_time_stamp() - lastRowAccess[row];
|
||||
|
||||
// Obtain the number of bit flips for the current temperature and the time interval:
|
||||
unsigned int n = getNumberOfFlips(temperature, interval);
|
||||
unsigned int n = getNumberOfFlips(temp, interval);
|
||||
|
||||
// Check if the current row is in the range of bit flips for this interval
|
||||
// and temperature, if yes mark it as flipped:
|
||||
@@ -494,6 +500,17 @@ void errorModel::setTemperature(double t)
|
||||
temperature = t;
|
||||
}
|
||||
|
||||
double errorModel::getTemperature()
|
||||
{
|
||||
if (dynamicTemepratureSimulation == true) {
|
||||
// TODO Get temperature from 3d-ice simulator or other temperature source
|
||||
// TODO Check all the criterion before requesting the temperature
|
||||
return temperature;
|
||||
}
|
||||
|
||||
return temperature;
|
||||
}
|
||||
|
||||
void errorModel::parseInputData()
|
||||
{
|
||||
std::string fileName = Configuration::getInstance().ErrorCSVFile;
|
||||
|
||||
@@ -52,6 +52,7 @@ class errorModel
|
||||
void refresh(unsigned int row);
|
||||
void activate(unsigned int row);
|
||||
void setTemperature(double t);
|
||||
double getTemperature(void);
|
||||
|
||||
private:
|
||||
// Configuration Parameters:
|
||||
@@ -60,6 +61,7 @@ class errorModel
|
||||
unsigned int numberOfColumns;
|
||||
unsigned int bytesPerColumn;
|
||||
unsigned int numberOfRows;
|
||||
bool dynamicTemepratureSimulation;
|
||||
|
||||
// Name:
|
||||
std::string name;
|
||||
|
||||
@@ -132,6 +132,7 @@ The XML code below shows a typic configuration:
|
||||
<NumberOfTracePlayers value="5"/>
|
||||
<NumberOfMemChannels value="1"/>
|
||||
<ControllerCoreDisableRefresh value="0"/>
|
||||
<DynamicTemperatureSimulation value="0"/>
|
||||
</simconfig>
|
||||
|
||||
<!-- Memory Specifications -->
|
||||
@@ -231,6 +232,9 @@ Below are listed the configuration sections and configuration fields.
|
||||
- *ControllerCoreDisableRefresh* (boolean)
|
||||
- "1": disables refreshes
|
||||
- "0": normal operation (refreshes enabled)
|
||||
- *DynamicTemperatureSimulation* (boolean)
|
||||
- "1": enables the dynamic temperature simulation feature
|
||||
- "0": static temperature during simulation
|
||||
|
||||
- **Memory specification**
|
||||
|
||||
|
||||
Reference in New Issue
Block a user