Removed ScheduledCommand dependencies.

This commit is contained in:
Lukas Steiner (2)
2019-09-23 10:23:02 +02:00
parent 5fe5529c7c
commit 650e1d405b
5 changed files with 15 additions and 5 deletions

View File

@@ -41,7 +41,6 @@
#include "cmdmux/CmdMuxOldest.h"
#include "../common/dramExtensions.h"
#include "../common/protocol.h"
#include "core/scheduling/ScheduledCommand.h"
#include "checker/CheckerDDR3.h"
#include "checker/CheckerWideIO.h"
#include "refresh/RefreshManager.h"

View File

@@ -62,9 +62,7 @@ void ControllerRecordable::sendToDram(Command command, tlm_generic_payload *payl
{
if (commandIsIn(command, {Command::RD, Command::RDA, Command::WR, Command::WRA}))
{
sc_time execTime = Configuration::getInstance().memSpec->getExecutionTime(command);
ScheduledCommand scheduledCommand(command, sc_time_stamp(), execTime, *payload);
TimeInterval dataStrobe = scheduledCommand.getIntervalOnDataStrobe();
TimeInterval dataStrobe = Configuration::getInstance().memSpec->getIntervalOnDataStrobe(command);
tlmRecorder->updateDataStrobe(dataStrobe.start, dataStrobe.end, *payload);
}
Controller::sendToDram(command, payload);

View File

@@ -37,7 +37,6 @@
#include <systemc.h>
#include <vector>
#include "../core/scheduling/ScheduledCommand.h"
#include "../Command.h"
#include "../../common/dramExtensions.h"
#include "../../common/DebugManager.h"

View File

@@ -76,6 +76,17 @@ sc_time MemSpec::getMinExecutionTimeForPowerDownCmd(Command command) const
}
}
TimeInterval MemSpec::getIntervalOnDataStrobe(Command command) const
{
// TODO: implement this function for different memspecs, add AL for DDR3
if (command == Command::RD || command == Command::RDA)
return TimeInterval(sc_time_stamp() + tRL, sc_time_stamp() + tRL + getReadAccessTime());
else if (command == Command::WR || command == Command::WRA)
return TimeInterval(sc_time_stamp() + tWL, sc_time_stamp() + tWL + getWriteAccessTime());
else
SC_REPORT_FATAL("MemSpec", "Method was called with invalid argument");
}
// Returns the execution time for commands that have a fixed execution time
// TODO: override this method for different MemSpecs?
sc_time MemSpec::getExecutionTime(Command command) const

View File

@@ -42,6 +42,7 @@
#include <map>
#include "../../../common/dramExtensions.h"
#include "../../Command.h"
#include "../../../common/utils.h"
using namespace tlm;
@@ -58,6 +59,8 @@ struct MemSpec
virtual sc_time getExecutionTime(Command) const;
virtual TimeInterval getIntervalOnDataStrobe(Command) const;
std::string MemoryId = "not defined.";
std::string MemoryType = "not defined.";