diff --git a/DRAMSys/dramSys/src/error/errormodel.cpp b/DRAMSys/dramSys/src/error/errormodel.cpp index 2ef13c6e..30c93ea5 100644 --- a/DRAMSys/dramSys/src/error/errormodel.cpp +++ b/DRAMSys/dramSys/src/error/errormodel.cpp @@ -115,7 +115,7 @@ void errorModel::load(tlm::tlm_generic_payload &trans) SC_REPORT_FATAL("errormodel","Reading from an empty memory location"); } - // Copy the data from the transaction to the data pointer + // Copy the dataMap to the transaction data pointer memcpy(trans.get_data_ptr()+i, dataMap[key], bytesPerColumn); // The next burst element is handled, therfore the column address must be increased @@ -128,7 +128,7 @@ void errorModel::load(tlm::tlm_generic_payload &trans) void errorModel::refresh(unsigned int row) { - // A refresh is internally composed of PRE and ACT that are executed + // A refresh is internally composed of ACT and PRE that are executed // on all banks, therefore we call the activate method: activate(row); } @@ -137,3 +137,8 @@ void errorModel::activate(unsigned int row) { // TODO } + +void errorModel::setTemperature(double t) +{ + temperature = t; +} diff --git a/DRAMSys/dramSys/src/error/errormodel.h b/DRAMSys/dramSys/src/error/errormodel.h index 7d9c4aa6..56b029ba 100644 --- a/DRAMSys/dramSys/src/error/errormodel.h +++ b/DRAMSys/dramSys/src/error/errormodel.h @@ -50,13 +50,18 @@ class errorModel void load(tlm::tlm_generic_payload &trans); void refresh(unsigned int row); void activate(unsigned int row); + void setTemperature(double t); + private: // Configuration Parameters: unsigned int busWidth; unsigned int burstLenght; unsigned int numberOfColumns; unsigned int bytesPerColumn; + // Online Parameters: + double temperature; + struct DecodedAddressComparer { bool operator()( const DecodedAddress& first , const DecodedAddress& second) const