device and dram setup object

This commit is contained in:
Janik Schlemminger
2014-04-09 22:41:51 +02:00
parent d6825125e1
commit 78cc14dcd4
5 changed files with 79 additions and 52 deletions

View File

@@ -18,14 +18,30 @@
namespace simulation {
struct DramSetup
{
DramSetup():memconfig(""),memspec(""){}
DramSetup(std::string memconfig, std::string memspec) : memconfig(memconfig), memspec(memspec) {}
std::string memconfig;
std::string memspec;
};
struct Device
{
Device():trace(""), burstLength(0){}
Device(std::string trace, unsigned int burstLength = 0) : trace(trace), burstLength(burstLength)
{
}
std::string trace;
unsigned int burstLength;
};
class SimulationManager: public ISimulationManager, public sc_module
{
public:
SC_HAS_PROCESS(SimulationManager);
SimulationManager(sc_module_name name, std::string memconfig, std::string memspec,
std::string stl1, unsigned int burstlength1, std::string stl2,
unsigned int burstlenght2, std::string traceName, std::string pathToResources,
bool silent = false);
SimulationManager(sc_module_name name, string pathToResources, string traceName, DramSetup setup,
std::vector<Device> devices, bool silent = false);
~SimulationManager();
void startSimulation();
void tracePlayerFinishedCallback(string name) override;
@@ -38,6 +54,7 @@ private:
Dram<> *dram;
Arbiter<numberOfTracePlayers, 128> *arbiter;
Controller<> *controller;
TracePlayer<> *player1;
TracePlayer<> *player2;
};