bankgroup is now recorded
This commit is contained in:
@@ -19,6 +19,7 @@ using namespace std;
|
||||
using namespace simulation;
|
||||
|
||||
string resources;
|
||||
bool silent = true;
|
||||
|
||||
string pathOfFile(string file)
|
||||
{
|
||||
@@ -32,13 +33,13 @@ void startTraceAnalyzer(string traceName)
|
||||
system(run_tpr.c_str());
|
||||
}
|
||||
|
||||
bool runSimulation(string resources, string traceName, DramSetup setup, vector<Device> devices)
|
||||
bool runSimulation(string traceName, DramSetup setup, vector<Device> devices)
|
||||
{
|
||||
int pid = fork();
|
||||
int status = 0;
|
||||
if (pid == 0)
|
||||
{
|
||||
Simulation simulation("sim", resources, traceName, setup, devices);
|
||||
Simulation simulation("sim", resources, traceName, setup, devices,silent);
|
||||
simulation.startSimulation();
|
||||
return true;
|
||||
}
|
||||
@@ -53,7 +54,7 @@ bool batchTraces(DramSetup setup, vector<pair<string, string>> tracePairs)
|
||||
{
|
||||
id++;
|
||||
string traceName = "traceBatch" + to_string(id) + ".tdb";
|
||||
if (runSimulation(resources, traceName, setup, { Device(pair.first), Device(pair.second) }))
|
||||
if (runSimulation(traceName, setup, { Device(pair.first), Device(pair.second) }))
|
||||
return true; //kill child
|
||||
}
|
||||
}
|
||||
@@ -65,7 +66,7 @@ bool batchSetups(pair<string, string> tracePair, vector<DramSetup> setups)
|
||||
{
|
||||
id++;
|
||||
string traceName = "setupBatch" + to_string(id) + ".tdb";
|
||||
if (runSimulation(resources, traceName, setup,
|
||||
if (runSimulation(traceName, setup,
|
||||
{ Device(tracePair.first), Device(tracePair.second) }))
|
||||
return true; //kill child
|
||||
}
|
||||
@@ -76,21 +77,37 @@ int sc_main(int argc, char **argv)
|
||||
|
||||
resources = pathOfFile(argv[0]) + string("/../resources/");
|
||||
|
||||
DramSetup setup;
|
||||
setup.memconfig = "memconfig.xml";
|
||||
setup.memspec = "MICRON_4Gb_DDR4-1866_8bit_A.xml";
|
||||
//setup.memspec = "MatzesWideIO.xml";
|
||||
|
||||
vector<pair<string, string>> tracePairs;
|
||||
tracePairs.push_back(pair<string, string>("chstone-mips_32.stl", "chstone-motion_32.stl"));
|
||||
|
||||
batchTraces(setup, tracePairs);
|
||||
// DramSetup setup;
|
||||
// setup.memconfig = "memconfig.xml";
|
||||
// //setup.memspec = "MICRON_4Gb_DDR4-1866_8bit_A.xml";
|
||||
// setup.memspec = "MatzesWideIO.xml";
|
||||
//
|
||||
// vector<pair<string, string>> tracePairs;
|
||||
// tracePairs.push_back(pair<string, string>("chstone-mips_32.stl", "chstone-motion_32.stl"));
|
||||
//
|
||||
// batchTraces(setup, tracePairs);
|
||||
|
||||
// DramSetup setup2;
|
||||
// setup2.memconfig = "memconfig.xml";
|
||||
// setup2.memspec = "MICRON_4Gb_DDR4-1866_8bit_A.xml";
|
||||
//batchSetups(tracePairs[0], { setup, setup2 });
|
||||
|
||||
Device d1("mediabench-c-ray-1.1_32.stl",4);
|
||||
Device d2("mediabench-fractal_32.stl",4);
|
||||
string dramSpec = "MatzesWideIO.xml";
|
||||
|
||||
if(runSimulation("fifo.tdb",DramSetup("fifo.xml",dramSpec),{d1,d2}))
|
||||
return 0;
|
||||
if(runSimulation("fr_fcfs.tdb",DramSetup("fr_fcfs.xml",dramSpec),{d1,d2}))
|
||||
return 0;
|
||||
if(runSimulation("fr_fcfs_unaware.tdb",DramSetup("fr_fcfs_unaware.xml",dramSpec),{d1,d2}))
|
||||
return 0;
|
||||
if(runSimulation("par_bs.tdb",DramSetup("par_bs.xml",dramSpec),{d1,d2}))
|
||||
return 0;
|
||||
if(runSimulation("par_bs_unaware.tdb",DramSetup("par_bs_unaware.xml",dramSpec),{d1,d2}))
|
||||
return 0;
|
||||
|
||||
startTraceAnalyzer("fifo.tdb fr_fcfs.tdb fr_fcfs_unaware.tdb par_bs.tdb par_bs_unaware.tdb");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user