Small changes and fixes
Bringing some changes from packet_buffering branch to the master branch.
This commit is contained in:
@@ -130,7 +130,7 @@ private:
|
||||
sc_time simulationTimeCoveredByRecording;
|
||||
|
||||
std::vector<tlm::tlm_phase> transactionTerminatingPhases;
|
||||
sqlite3 *db;
|
||||
sqlite3 *db = NULL;
|
||||
sqlite3_stmt *insertTransactionStatement, *insertRangeStatement, *updateRangeStatement,
|
||||
*insertPhaseStatement, *updatePhaseStatement, *insertGeneralInfoStatement, *insertDebugMessageStatement, *updateDataStrobeStatement;
|
||||
std::string insertTransactionString, insertRangeString, updateRangeString, insertPhaseString, updatePhaseString, insertGeneralInfoString,
|
||||
|
||||
@@ -66,7 +66,7 @@ private:
|
||||
std::map<Bank, tlm::tlm_generic_payload> powerDownPayloads;
|
||||
void sendPowerDownPayloads(ScheduledCommand& cmd);
|
||||
|
||||
PowerDownState powerDownState;
|
||||
PowerDownState powerDownState = PowerDownState::Awake;
|
||||
void setPowerDownState(PowerDownState state);
|
||||
bool isInPowerDown();
|
||||
};
|
||||
|
||||
@@ -90,7 +90,15 @@ flip_memory::flip_memory()
|
||||
|
||||
flip_memory::~flip_memory()
|
||||
{
|
||||
cout << endl << endl << endl << "Bit-Fehler: " << BIT_ERR << endl << endl << endl;
|
||||
cout << endl << endl << endl << "Bit-Fehler: " << BIT_ERR << endl << endl << endl;
|
||||
unsigned int maxWeakCells = errormap->getMaxWeakCells();
|
||||
for (unsigned int i = 0; i < maxWeakCells; i++) {
|
||||
delete[] weakCells[i];
|
||||
}
|
||||
|
||||
delete[] weakCells;
|
||||
delete errormap;
|
||||
|
||||
}
|
||||
|
||||
DecodedAddress flip_memory::getUnifiedNode(unsigned int addr)
|
||||
@@ -113,7 +121,7 @@ void flip_memory::initWeakCells()
|
||||
{
|
||||
unsigned int row, col, bit;
|
||||
|
||||
weakCells[i] = new unsigned int[4];
|
||||
weakCells[i] = new unsigned int[5];
|
||||
|
||||
row = (unsigned int) (rand() % ROWS_PER_BANK);
|
||||
col = (unsigned int) (rand() % COLS_PER_ROW);
|
||||
@@ -241,7 +249,6 @@ void flip_memory::load(tlm::tlm_generic_payload &trans)
|
||||
DecodedAddress no;
|
||||
no = getUnifiedNode(t_addr);
|
||||
|
||||
|
||||
if (mem.count(t_addr) > 0)
|
||||
{
|
||||
for (unsigned int i = 0; i < t_len; i += BYTES_PER_COL)
|
||||
|
||||
@@ -47,7 +47,7 @@ nest_map::nest_map(string fn)
|
||||
|
||||
nest_map::~nest_map(void)
|
||||
{
|
||||
delete tr;
|
||||
delete[] tr;
|
||||
}
|
||||
|
||||
// Read data from CSV file with filename "fn" and store it inside the errormap instance
|
||||
|
||||
@@ -188,8 +188,8 @@ struct Dram : sc_module
|
||||
cout << "BIT_ERRORS Bank: " <<b <<"="<< fmemory[b].BIT_ERR << endl;
|
||||
}
|
||||
}
|
||||
// TODO Aufrauemen!
|
||||
//delete fmemory; // TODO Testen!
|
||||
delete[] fmemory;
|
||||
delete DRAMPower;
|
||||
//std::cout << "Simulated Memory Size: " << memory.size() << endl; // TODO Aufrauemen
|
||||
}
|
||||
|
||||
|
||||
@@ -61,12 +61,13 @@ int sc_main(int argc, char **argv)
|
||||
sc_set_time_resolution(1, SC_PS);
|
||||
resources = pathOfFile(argv[0]) + string("/../../DRAMSys/dramSys/resources/");
|
||||
|
||||
cout<<resources<<endl;
|
||||
cout << "Resources directory is " << resources << endl;
|
||||
string simulationToRun;
|
||||
if(argc > 1)
|
||||
simulationToRun = argv[1];
|
||||
else
|
||||
simulationToRun = resources + "simulations/sim-batch.xml";
|
||||
cout << "Simulation file is " << simulationToRun << endl;
|
||||
|
||||
SimulationManager manager(resources);
|
||||
manager.loadSimulationsFromXML(simulationToRun);
|
||||
|
||||
Reference in New Issue
Block a user