Fix StlPlayer to store real data
This commit is contained in:
@@ -43,7 +43,8 @@
|
||||
|
||||
Simulator::Simulator(DRAMSys::Config::Configuration configuration,
|
||||
std::filesystem::path resourceDirectory) :
|
||||
memoryManager(configuration.simconfig.StoreMode == DRAMSys::Config::StoreModeType::Store),
|
||||
storageEnabled(configuration.simconfig.StoreMode == DRAMSys::Config::StoreModeType::Store),
|
||||
memoryManager(storageEnabled),
|
||||
configuration(std::move(configuration)),
|
||||
resourceDirectory(std::move(resourceDirectory))
|
||||
{
|
||||
@@ -122,8 +123,11 @@ Simulator::instantiateInitiator(const DRAMSys::Config::Initiator& initiator)
|
||||
SC_REPORT_FATAL("Simulator", report.c_str());
|
||||
}
|
||||
|
||||
StlPlayer player(
|
||||
tracePath.c_str(), config.clkMhz, defaultDataLength, *traceType, false);
|
||||
StlPlayer player(tracePath.c_str(),
|
||||
config.clkMhz,
|
||||
defaultDataLength,
|
||||
*traceType,
|
||||
storageEnabled);
|
||||
|
||||
return std::make_unique<SimpleInitiator<StlPlayer>>(config.name.c_str(),
|
||||
memoryManager,
|
||||
|
||||
@@ -54,6 +54,7 @@ public:
|
||||
private:
|
||||
std::unique_ptr<Initiator> instantiateInitiator(const DRAMSys::Config::Initiator& initiator);
|
||||
|
||||
const bool storageEnabled;
|
||||
MemoryManager memoryManager;
|
||||
|
||||
DRAMSys::Config::Configuration configuration;
|
||||
|
||||
@@ -199,7 +199,8 @@ void StlPlayer::parseTraceFile()
|
||||
iss >> element;
|
||||
|
||||
// Check if data length in the trace file is correct.
|
||||
// We need two characters to represent 1 byte in hexadecimal. Offset for 0x prefix.
|
||||
// We need two characters to represent 1 byte in hexadecimal. Offset for 0x
|
||||
// prefix.
|
||||
if (element.length() != (content.length * 2 + 2))
|
||||
SC_REPORT_FATAL(
|
||||
"StlPlayer",
|
||||
|
||||
@@ -78,6 +78,8 @@ void RequestIssuer::sendNextRequest()
|
||||
payload.set_command(request.command == Request::Command::Read ? tlm::TLM_READ_COMMAND
|
||||
: tlm::TLM_WRITE_COMMAND);
|
||||
|
||||
std::copy(request.data.cbegin(), request.data.cend(), payload.get_data_ptr());
|
||||
|
||||
tlm::tlm_phase phase = tlm::BEGIN_REQ;
|
||||
sc_core::sc_time delay = request.delay;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user