lastRowAccess array added

This commit is contained in:
Matthias Jung
2015-07-30 10:01:15 +02:00
parent b70d600225
commit 4f652c29c3
2 changed files with 18 additions and 2 deletions

View File

@@ -42,6 +42,14 @@ errorModel::errorModel()
burstLenght = Configuration::getInstance().memSpec.BurstLength;
numberOfColumns = Configuration::getInstance().memSpec.NumberOfColumns;
bytesPerColumn = xmlAddressDecoder::getInstance().amount["bytes"];
numberOfRows = Configuration::getInstance().memSpec.NumberOfRows;
// Initialize the lastRow Access array:
lastRowAccess = new sc_time[numberOfRows];
for(unsigned int i = 0; i < numberOfRows; i++)
{
lastRowAccess[i] = SC_ZERO_TIME;
}
}
errorModel::~errorModel()
@@ -53,6 +61,9 @@ errorModel::~errorModel()
}
// Delete all elements from the dataMap:
dataMap.clear();
// Remove all data from the lastRowAccess
delete [] lastRowAccess;
}
void errorModel::store(tlm::tlm_generic_payload &trans)

View File

@@ -58,10 +58,14 @@ class errorModel
unsigned int burstLenght;
unsigned int numberOfColumns;
unsigned int bytesPerColumn;
unsigned int numberOfRows;
// Online Parameters:
double temperature;
// Input data structures:
// To use a map for storing the data a comparing function must be defined
struct DecodedAddressComparer
{
bool operator()( const DecodedAddress& first , const DecodedAddress& second) const
@@ -71,9 +75,10 @@ class errorModel
return addrFirst < addrSecond;
}
};
private:
std::map<DecodedAddress, unsigned char *, DecodedAddressComparer> dataMap;
// An array to save when the last ACT/REF to a row happened:
sc_time * lastRowAccess;
};
#endif // ERRORMODEL_H