Add module name to DB name to allow running multiple instances of DRAMSys.

This commit is contained in:
Lukas Steiner
2022-05-19 11:16:47 +02:00
parent 0a5daf52ed
commit e739dd2413
6 changed files with 7 additions and 7 deletions

View File

@@ -65,8 +65,10 @@ public:
private:
DebugManager();
DebugManager(const DebugManager &);
DebugManager & operator = (const DebugManager &);
public:
DebugManager(const DebugManager&) = delete;
DebugManager& operator=(const DebugManager&) = delete;
public:
void setup(bool _debugEnabled, bool _writeToConsole, bool _writeToFile);

View File

@@ -136,7 +136,7 @@ void DRAMSys::logo()
#undef BOLDTXT
}
void DRAMSys::setupDebugManager(NDEBUG_UNUSED(const std::string &traceName))
void DRAMSys::setupDebugManager(NDEBUG_UNUSED(const std::string &traceName)) const
{
#ifndef NDEBUG
auto& dbg = DebugManager::getInstance();

View File

@@ -105,7 +105,7 @@ private:
void instantiateModules(const DRAMSysConfiguration::AddressMapping &addressMapping);
void setupDebugManager(const std::string &traceName);
void setupDebugManager(const std::string &traceName) const;
};
#endif // DRAMSYS_H

View File

@@ -99,7 +99,7 @@ void DRAMSysRecordable::setupTlmRecorders(const std::string& traceName, const DR
tlmRecorders.reserve(config.memSpec->numberOfChannels);
for (std::size_t i = 0; i < config.memSpec->numberOfChannels; i++)
{
std::string dbName = traceName + std::string("_ch") + std::to_string(i) + ".tdb";
std::string dbName = std::string(name()) + "_" + traceName + "_ch" + std::to_string(i) + ".tdb";
std::string recorderName = "tlmRecorder" + std::to_string(i);
tlmRecorders.emplace_back(recorderName, config, dbName);

View File

@@ -57,7 +57,6 @@ private:
void setupTlmRecorders(const std::string &traceName, const DRAMSysConfiguration::Configuration &configLib);
void instantiateModules(const std::string &traceName, const DRAMSysConfiguration::Configuration &configLib);
};
#endif // DRAMSYSRECORDABLE_H

View File

@@ -51,7 +51,6 @@
#include "simulation/DRAMSys.h"
#include "TraceSetup.h"
#include "TrafficInitiator.h"
#include "LengthConverter.h"
#ifdef RECORDING
#include "simulation/DRAMSysRecordable.h"