Adapt more paths.
This commit is contained in:
@@ -32,10 +32,12 @@
|
||||
* Author: Lukas Steiner
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "CheckerDDR5.h"
|
||||
|
||||
#include "DRAMSys/common/DebugManager.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace sc_core;
|
||||
using namespace tlm;
|
||||
|
||||
|
||||
@@ -35,18 +35,13 @@
|
||||
|
||||
#include "DramDDR5.h"
|
||||
|
||||
#include <DRAMSys/configuration/Configuration.h>
|
||||
#include <DRAMSys/configuration/memspec/MemSpecDDR5.h>
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
DramDDR5::DramDDR5(const sc_module_name& name, const Configuration& config,
|
||||
TemperatureController& temperatureController)
|
||||
DramDDR5::DramDDR5(const sc_module_name& name, const Configuration& config)
|
||||
: Dram(name, config)
|
||||
{
|
||||
if (storeMode == Configuration::StoreMode::ErrorModel)
|
||||
SC_REPORT_FATAL("DramDDR5", "Error Model not supported for DDR5");
|
||||
|
||||
#ifdef DRAMPOWER
|
||||
if (powerAnalysis)
|
||||
SC_REPORT_FATAL("DramDDR5", "DRAMPower does not support DDR5");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -36,16 +36,14 @@
|
||||
#ifndef DRAMDDR5_H
|
||||
#define DRAMDDR5_H
|
||||
|
||||
#include <systemc>
|
||||
#include "DRAMSys/simulation/dram/Dram.h"
|
||||
|
||||
#include <DRAMSys/simulation/dram/Dram.h>
|
||||
#include <DRAMSys/simulation/TemperatureController.h>
|
||||
#include <systemc>
|
||||
|
||||
class DramDDR5 : public Dram
|
||||
{
|
||||
public:
|
||||
DramDDR5(const sc_core::sc_module_name& name, const Configuration& config,
|
||||
TemperatureController& temperatureController);
|
||||
DramDDR5(const sc_core::sc_module_name& name, const Configuration& config);
|
||||
SC_HAS_PROCESS(DramDDR5);
|
||||
};
|
||||
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
* Author: Lukas Steiner
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "CheckerHBM3.h"
|
||||
|
||||
#include "DRAMSys/common/DebugManager.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace sc_core;
|
||||
using namespace tlm;
|
||||
|
||||
|
||||
@@ -40,13 +40,11 @@
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
DramHBM3::DramHBM3(const sc_module_name& name, const Configuration& config,
|
||||
TemperatureController& temperatureController)
|
||||
DramHBM3::DramHBM3(const sc_module_name& name, const Configuration& config)
|
||||
: Dram(name, config)
|
||||
{
|
||||
if (storeMode == Configuration::StoreMode::ErrorModel)
|
||||
SC_REPORT_FATAL("DramHBM3", "Error Model not supported for HBM3");
|
||||
|
||||
#ifdef DRAMPOWER
|
||||
if (powerAnalysis)
|
||||
SC_REPORT_FATAL("DramHBM3", "DRAMPower does not support HBM3");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -36,17 +36,14 @@
|
||||
#ifndef DRAMHBM3_H
|
||||
#define DRAMHBM3_H
|
||||
|
||||
#include "DRAMSys/simulation/dram/Dram.h"
|
||||
|
||||
#include <systemc>
|
||||
|
||||
#include <DRAMSys/simulation/dram/Dram.h>
|
||||
#include <DRAMSys/simulation/TemperatureController.h>
|
||||
|
||||
class DramHBM3 : public Dram
|
||||
{
|
||||
public:
|
||||
DramHBM3(const sc_core::sc_module_name &name, const Configuration& config,
|
||||
TemperatureController& temperatureController);
|
||||
DramHBM3(const sc_core::sc_module_name &name, const Configuration& config);
|
||||
SC_HAS_PROCESS(DramHBM3);
|
||||
};
|
||||
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
* Author: Lukas Steiner
|
||||
*/
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "CheckerLPDDR5.h"
|
||||
|
||||
#include "DRAMSys/common/DebugManager.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
using namespace sc_core;
|
||||
using namespace tlm;
|
||||
|
||||
|
||||
@@ -41,13 +41,11 @@
|
||||
|
||||
using namespace sc_core;
|
||||
|
||||
DramLPDDR5::DramLPDDR5(const sc_module_name& name, const Configuration& config,
|
||||
TemperatureController& temperatureController)
|
||||
DramLPDDR5::DramLPDDR5(const sc_module_name& name, const Configuration& config)
|
||||
: Dram(name, config)
|
||||
{
|
||||
if (storeMode == Configuration::StoreMode::ErrorModel)
|
||||
SC_REPORT_FATAL("DramLPDDR5", "Error Model not supported for LPDDR5");
|
||||
|
||||
#ifdef DRAMPOWER
|
||||
if (powerAnalysis)
|
||||
SC_REPORT_FATAL("DramLPDDR5", "DRAMPower does not support LPDDR5");
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -36,16 +36,14 @@
|
||||
#ifndef DRAMLPDDR5_H
|
||||
#define DRAMLPDDR5_H
|
||||
|
||||
#include <systemc>
|
||||
#include "DRAMSys/simulation/dram/Dram.h"
|
||||
|
||||
#include <DRAMSys/simulation/dram/Dram.h>
|
||||
#include <DRAMSys/simulation/TemperatureController.h>
|
||||
#include <systemc>
|
||||
|
||||
class DramLPDDR5 : public Dram
|
||||
{
|
||||
public:
|
||||
DramLPDDR5(const sc_core::sc_module_name& name, const Configuration& config,
|
||||
TemperatureController& temperatureController);
|
||||
DramLPDDR5(const sc_core::sc_module_name& name, const Configuration& config);
|
||||
SC_HAS_PROCESS(DramLPDDR5);
|
||||
};
|
||||
|
||||
|
||||
@@ -39,9 +39,9 @@
|
||||
#ifndef MEMSPEC_H
|
||||
#define MEMSPEC_H
|
||||
|
||||
#include <DRAMSys/config/DRAMSysConfiguration.h>
|
||||
#include <DRAMSys/common/utils.h>
|
||||
#include <DRAMSys/controller/Command.h>
|
||||
#include "DRAMSys/config/DRAMSysConfiguration.h"
|
||||
#include "DRAMSys/common/utils.h"
|
||||
#include "DRAMSys/controller/Command.h"
|
||||
|
||||
#include <systemc>
|
||||
#include <tlm>
|
||||
|
||||
@@ -197,18 +197,15 @@ void DRAMSys::instantiateModules(const ::DRAMSys::Config::AddressMapping& addres
|
||||
drams.emplace_back(std::make_unique<DramSTTMRAM>(("dram" + std::to_string(i)).c_str(), config));
|
||||
#ifdef DDR5_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::DDR5)
|
||||
drams.emplace_back(std::make_unique<DramDDR5>(("dram" + std::to_string(i)).c_str(), config,
|
||||
*temperatureController));
|
||||
drams.emplace_back(std::make_unique<DramDDR5>(("dram" + std::to_string(i)).c_str(), config));
|
||||
#endif
|
||||
#ifdef LPDDR5_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::LPDDR5)
|
||||
drams.emplace_back(std::make_unique<DramLPDDR5>(("dram" + std::to_string(i)).c_str(), config,
|
||||
*temperatureController));
|
||||
drams.emplace_back(std::make_unique<DramLPDDR5>(("dram" + std::to_string(i)).c_str(), config));
|
||||
#endif
|
||||
#ifdef HBM3_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::HBM3)
|
||||
drams.emplace_back(std::make_unique<DramHBM3>(("dram" + std::to_string(i)).c_str(), config,
|
||||
*temperatureController));
|
||||
drams.emplace_back(std::make_unique<DramHBM3>(("dram" + std::to_string(i)).c_str(), config));
|
||||
#endif
|
||||
|
||||
if (config.checkTLM2Protocol)
|
||||
|
||||
@@ -174,17 +174,17 @@ void DRAMSysRecordable::instantiateModules(const std::string &traceName,
|
||||
#ifdef DDR5_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::DDR5)
|
||||
drams.emplace_back(std::make_unique<DramRecordable<DramDDR5>>(("dram" + std::to_string(i)).c_str(),
|
||||
config, *temperatureController, tlmRecorders[i]));
|
||||
config, tlmRecorders[i]));
|
||||
#endif
|
||||
#ifdef LPDDR5_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::LPDDR5)
|
||||
drams.emplace_back(std::make_unique<DramRecordable<DramLPDDR5>>(("dram" + std::to_string(i)).c_str(),
|
||||
config, *temperatureController, tlmRecorders[i]));
|
||||
config, tlmRecorders[i]));
|
||||
#endif
|
||||
#ifdef HBM3_SIM
|
||||
else if (memoryType == MemSpec::MemoryType::HBM3)
|
||||
drams.emplace_back(std::make_unique<DramRecordable<DramHBM3>>(("dram" + std::to_string(i)).c_str(),
|
||||
config, *temperatureController, tlmRecorders[i]));
|
||||
config, tlmRecorders[i]));
|
||||
#endif
|
||||
|
||||
if (config.checkTLM2Protocol)
|
||||
|
||||
@@ -76,18 +76,18 @@ int sc_main(int argc, char **argv)
|
||||
{
|
||||
// Get path of resources:
|
||||
resources = pathOfFile(argv[0])
|
||||
+ std::string("/../../DRAMSys/library/resources/");
|
||||
simulationJson = resources + "simulations/ddr5-example.json";
|
||||
+ std::string("/../../resources/");
|
||||
simulationJson = resources + "simulations/ddr4-example.json";
|
||||
}
|
||||
// Run with specific config but default resource folders:
|
||||
else if (argc == 2)
|
||||
{
|
||||
// Get path of resources:
|
||||
resources = pathOfFile(argv[0])
|
||||
+ std::string("/../../DRAMSys/library/resources/");
|
||||
+ std::string("/../../resources/");
|
||||
simulationJson = argv[1];
|
||||
}
|
||||
// Run with spefific config and specific resource folder:
|
||||
// Run with specific config and specific resource folder:
|
||||
else if (argc == 3)
|
||||
{
|
||||
simulationJson = argv[1];
|
||||
@@ -109,7 +109,7 @@ int sc_main(int argc, char **argv)
|
||||
dramSys = std::make_unique<DRAMSys::DRAMSys>("DRAMSys", configLib);
|
||||
|
||||
if (!configLib.traceSetup.has_value())
|
||||
SC_REPORT_FATAL("sc_main", "No tracesetup section provided.");
|
||||
SC_REPORT_FATAL("sc_main", "No trace setup section provided.");
|
||||
|
||||
// Instantiate STL Players:
|
||||
TraceSetup setup(dramSys->getConfig(), configLib.traceSetup.value(), resources, players);
|
||||
@@ -118,7 +118,7 @@ int sc_main(int argc, char **argv)
|
||||
for (auto& player : players)
|
||||
player->iSocket.bind(dramSys->tSocket);
|
||||
|
||||
// Store the starting of the simulation in wallclock time:
|
||||
// Store the starting of the simulation in wall-clock time:
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Start SystemC Simulation:
|
||||
|
||||
Reference in New Issue
Block a user