device and dram setup object
This commit is contained in:
@@ -17,9 +17,8 @@ using namespace std;
|
||||
|
||||
namespace simulation {
|
||||
|
||||
SimulationManager::SimulationManager(sc_module_name name, string memconfig, string memspec,
|
||||
string stl1, unsigned int burstlength1, string stl2, unsigned int burstlenght2,
|
||||
string traceName, string pathToResources, bool silent) :
|
||||
SimulationManager::SimulationManager(sc_module_name name, string pathToResources, string traceName, DramSetup setup,
|
||||
std::vector<Device> devices, bool silent) :
|
||||
traceName(traceName)
|
||||
|
||||
{
|
||||
@@ -28,16 +27,25 @@ SimulationManager::SimulationManager(sc_module_name name, string memconfig, stri
|
||||
xmlAddressDecoder::addressConfigURI = pathToResources + string("configs/addressConfig.xml");
|
||||
TlmRecorder::dbName = traceName;
|
||||
TlmRecorder::sqlScriptURI = pathToResources + string("scripts/createTraceDB.sql");
|
||||
Configuration::memconfigUri = pathToResources + string("configs/memconfigs/") + memconfig;
|
||||
Configuration::memspecUri = pathToResources + string("configs/memspecs/") + memspec;
|
||||
Configuration::memconfigUri = pathToResources + string("configs/memconfigs/") + setup.memconfig;
|
||||
Configuration::memspecUri = pathToResources + string("configs/memspecs/") + setup.memspec;
|
||||
|
||||
//setup dram
|
||||
dram = new Dram<>("dram");
|
||||
arbiter = new Arbiter<numberOfTracePlayers,128>("arbiter");
|
||||
arbiter = new Arbiter<numberOfTracePlayers, 128>("arbiter");
|
||||
controller = new Controller<>("controller");
|
||||
player1 = new TracePlayer<>("player1", pathToResources + string("traces/") + stl1, burstlength1,
|
||||
this);
|
||||
player2 = new TracePlayer<>("player2", pathToResources + string("traces/") + stl2, burstlenght2,
|
||||
this);
|
||||
|
||||
//setup devices
|
||||
for(auto& d : devices)
|
||||
{
|
||||
if(d.burstLength == 0)
|
||||
d.burstLength = 8;
|
||||
}
|
||||
|
||||
player1 = new TracePlayer<>("player1", pathToResources + string("traces/") + devices[0].trace,
|
||||
devices[0].burstLength, this);
|
||||
player2 = new TracePlayer<>("player2", pathToResources + string("traces/") + devices[1].trace,
|
||||
devices[1].burstLength, this);
|
||||
|
||||
player1->iSocket.bind(arbiter->tSockets[0]);
|
||||
player2->iSocket.bind(arbiter->tSockets[1]);
|
||||
@@ -67,7 +75,6 @@ SimulationManager::~SimulationManager()
|
||||
delete player2;
|
||||
}
|
||||
|
||||
|
||||
void SimulationManager::startSimulation()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user