STL data player added

This commit is contained in:
Matthias Jung
2015-08-05 09:40:48 +02:00
parent 5ba493cb70
commit af8624c9e9
2 changed files with 13 additions and 3 deletions

View File

@@ -47,7 +47,7 @@
#include "../controller/core/ControllerCore.h"
#include "../controller/core/configuration/ConfigurationLoader.h"
#include "../common/Utils.h"
#include "../error/flip_memory.h"
#include "../simulation/StlDataPlayer.h"
using namespace std;
@@ -107,7 +107,18 @@ void Simulation::instantiateModules(const string &traceName, const string &pathT
{
for (size_t i = 0; i < Configuration::getInstance().NumberOfTracePlayers; i++) {
std::string playerStr = "player" + std::to_string(i);
TracePlayer<> *player = new StlPlayer<>(playerStr.c_str(), pathToResources + string("traces/") + devices[i].trace, devices[i].clkMhz, this);
TracePlayer<> *player;
// When data should be stored during the simulation the StlDataPlayer is needed.
// Else: no data should be stored, for instance to get a faster simulation
// or if you simply dont care about the data the normal StlPlayer is used.
if(Configuration::getInstance().ErrorStoreMode == ErrorStorageMode::NoStorage)
{
player = new StlPlayer<>(playerStr.c_str(), pathToResources + string("traces/") + devices[i].trace, devices[i].clkMhz, this);
}
else
{
player = new StlDataPlayer<>(playerStr.c_str(), pathToResources + string("traces/") + devices[i].trace, devices[i].clkMhz, this);
}
players.push_back(player);
}

View File

@@ -50,7 +50,6 @@
#include "StlPlayer.h"
#include "../controller/Controller.h"
#include "../common/third_party/tinyxml2/tinyxml2.h"
#include "../error/flip_memory.h"
struct DramSetup
{