Merge branch 'master' of https://git.rhrk.uni-kl.de/EIT-Wehn/dram.vp.system
This commit is contained in:
14
dram/resources/configs/memconfigs/grouper.xml
Normal file
14
dram/resources/configs/memconfigs/grouper.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<memspec>
|
||||
<memconfig>
|
||||
<parameter id="bankwiseLogic" type="bool" value="0" />
|
||||
<parameter id="openPagePolicy" type="bool" value="1" />
|
||||
<parameter id="adaptiveOpenPagePolicy" type="bool" value="0" />
|
||||
<parameter id="refreshAwareScheduling" type="bool" value="1" />
|
||||
<parameter id="maxNrOfTransactionsInDram" type="uint" value="50" />
|
||||
<parameter id="scheduler" type="string" value="Grouper" />
|
||||
<parameter id="capsize" type="uint" value="5" />
|
||||
<parameter id="powerDownMode" type="string" value="Staggered" />
|
||||
<parameter id="powerDownTimeout" type="uint" value="100" />
|
||||
<parameter id="databaseRecordingEnabled" type="bool" value="1" />
|
||||
</memconfig>
|
||||
</memspec>
|
||||
1
dram/src/common/third_party/DRAMPower
vendored
Submodule
1
dram/src/common/third_party/DRAMPower
vendored
Submodule
Submodule dram/src/common/third_party/DRAMPower added at 7723662db4
@@ -105,10 +105,10 @@ void Simulation::bindSockets()
|
||||
|
||||
void Simulation::calculateNumberOfTransaction(std::vector<Device> devices, string pathToResources)
|
||||
{
|
||||
totalTransactions = getNumberOfLines(pathToResources + string("traces/") + devices[0].trace);
|
||||
totalTransactions += getNumberOfLines(pathToResources + string("traces/") + devices[1].trace);
|
||||
totalTransactions += getNumberOfLines(pathToResources + string("traces/") + devices[2].trace);
|
||||
totalTransactions += getNumberOfLines(pathToResources + string("traces/") + devices[3].trace);
|
||||
totalTransactions = getNumberOfTransactions(pathToResources + string("traces/") + devices[0].trace);
|
||||
totalTransactions += getNumberOfTransactions(pathToResources + string("traces/") + devices[1].trace);
|
||||
totalTransactions += getNumberOfTransactions(pathToResources + string("traces/") + devices[2].trace);
|
||||
totalTransactions += getNumberOfTransactions(pathToResources + string("traces/") + devices[3].trace);
|
||||
remainingTransactions = totalTransactions;
|
||||
}
|
||||
|
||||
@@ -169,12 +169,18 @@ void Simulation::report(string message)
|
||||
cout << message << endl;
|
||||
}
|
||||
|
||||
unsigned int Simulation::getNumberOfLines(string uri)
|
||||
unsigned int Simulation::getNumberOfTransactions(string uri)
|
||||
{
|
||||
std::ifstream file(uri);
|
||||
// count the newlines
|
||||
file.unsetf(std::ios_base::skipws);
|
||||
unsigned lineCount = std::count(std::istream_iterator<char>(file), std::istream_iterator<char>(), '\n');
|
||||
unsigned int lineCount = 0;
|
||||
string line;
|
||||
|
||||
while (std::getline(file, line))
|
||||
{
|
||||
if(!line.empty())
|
||||
lineCount++;
|
||||
}
|
||||
|
||||
return lineCount;
|
||||
}
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
unsigned int totalTransactions;
|
||||
unsigned int remainingTransactions;
|
||||
clock_t simulationStartTime;
|
||||
unsigned int getNumberOfLines(string uri);
|
||||
unsigned int getNumberOfTransactions(string uri);
|
||||
|
||||
void report(std::string message);
|
||||
void setupDebugManager(const string& traceName);
|
||||
|
||||
@@ -85,17 +85,17 @@ void TracePlayer<BUSWIDTH>::start()
|
||||
template<unsigned int BUSWIDTH>
|
||||
void TracePlayer<BUSWIDTH>::generateNextPayload()
|
||||
{
|
||||
|
||||
if(file)
|
||||
{
|
||||
string line;
|
||||
if (std::getline(file, line))
|
||||
{
|
||||
if(line.empty())
|
||||
{
|
||||
generateNextPayload();
|
||||
return;
|
||||
}
|
||||
std::istringstream iss(line);
|
||||
string time, command, address;
|
||||
iss >> time >> command >> address;
|
||||
if (time.empty() || command.empty() || address.empty() )
|
||||
return;
|
||||
long parsedAdress = std::stoi(address.c_str(), 0, 16);
|
||||
|
||||
gp* payload = memoryManager.allocate();
|
||||
@@ -157,76 +157,9 @@ void TracePlayer<BUSWIDTH>::generateNextPayload()
|
||||
payloadEventQueue.notify(*payload, BEGIN_REQ, sendingTime - sc_time_stamp());
|
||||
}
|
||||
numberOfPendingTransactions++;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (file)
|
||||
// {
|
||||
// string time, command, address, data;
|
||||
// file >> time >> command >> address;
|
||||
|
||||
// //if there is a newline at the end of the .stl
|
||||
// if (time.empty() || command.empty() || address.empty() )
|
||||
// return;
|
||||
|
||||
// long parsedAdress = std::stoi(address.c_str(), 0, 16);
|
||||
|
||||
// gp* payload = memoryManager.allocate();
|
||||
// payload->set_address(parsedAdress);
|
||||
|
||||
// // Set data pointer
|
||||
// unsigned char * dataElement = new unsigned char[16]; // TODO: column / burst breite
|
||||
// payload->set_data_length(16); // TODO: column / burst breite
|
||||
// payload->set_data_ptr(dataElement);
|
||||
// for(int i = 0; i < 16; i++) // TODO: column / burst breite
|
||||
// dataElement[i] = 0;
|
||||
|
||||
// if (command == "read")
|
||||
// {
|
||||
// payload->set_command(TLM_READ_COMMAND);
|
||||
// }
|
||||
// else if (command == "write")
|
||||
// {
|
||||
// payload->set_command(TLM_WRITE_COMMAND);
|
||||
|
||||
// // Parse and set data
|
||||
//// file >> data;
|
||||
//// unsigned int counter = 0;
|
||||
//// for(int i = 0; i < 16*2-2; i=i+2) // TODO column / burst breite
|
||||
//// {
|
||||
//// std::string byteString = "0x";
|
||||
//// byteString.append(data.substr(i+2, 2));
|
||||
//// //cout << byteString << " " << std::stoi(byteString.c_str(), 0, 16) << endl;
|
||||
//// dataElement[counter++] = std::stoi(byteString.c_str(), 0, 16);
|
||||
//// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SC_REPORT_FATAL(0,
|
||||
// (string("Corrupted tracefile, command ") + command + string(" unknown")).c_str());
|
||||
// }
|
||||
|
||||
// payload->set_response_status(TLM_INCOMPLETE_RESPONSE);
|
||||
// payload->set_dmi_allowed(false);
|
||||
// payload->set_byte_enable_length(0);
|
||||
// payload->set_streaming_width(burstlenght);
|
||||
|
||||
// sc_time sendingTime = std::stoi(time.c_str())*clk;
|
||||
// GenerationExtension* genExtension = new GenerationExtension(sendingTime);
|
||||
// payload->set_auto_extension(genExtension);
|
||||
|
||||
// if (sendingTime <= sc_time_stamp())
|
||||
// {
|
||||
// payloadEventQueue.notify(*payload, BEGIN_REQ, SC_ZERO_TIME);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// payloadEventQueue.notify(*payload, BEGIN_REQ, sendingTime - sc_time_stamp());
|
||||
// }
|
||||
// numberOfPendingTransactions++;
|
||||
// }
|
||||
//}
|
||||
|
||||
template<unsigned int BUSWIDTH>
|
||||
tlm_sync_enum TracePlayer<BUSWIDTH>::nb_transport_bw(tlm_generic_payload &payload, tlm_phase &phase, sc_time &bwDelay)
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
cd dram/src/common/third_party/
|
||||
rm -rf DRAMPower
|
||||
git clone https://github.com/ravenrd/DRAMPower.git
|
||||
cd DRAMPower
|
||||
make parserlib
|
||||
|
||||
Reference in New Issue
Block a user