Files
DRAMSys/dram/src/core/scheduling/checker/ReadChecker.cpp
2014-03-19 20:48:06 +01:00

33 lines
853 B
C++

/*
* ReadChecker.cpp
*
* Created on: Mar 13, 2014
* Author: jonny
*/
#include "ReadChecker.h"
#include "../../utils/Utils.h"
namespace core {
void ReadChecker::delayToSatisfyConstraints(ScheduledCommand& command) const
{
ScheduledCommand lastCommand = state.getLastCommand(command.getBank());
if(lastCommand.isValidCommand() && lastCommand.getEnd() > command.getStart())
{
command.delayStart(lastCommand.getEnd()-command.getStart());
}
}
sc_time ReadChecker::getExecutionTime(const tlm::tlm_generic_payload& payload,
Command command) const
{
assert(command == Read || command == ReadA);
//return config.Timings.tRL + config.Timings.clk*getBurstLengthInBytes(transaction, config.buswidth);
sc_time result = config.Timings.tRL + config.Timings.clk*payload.get_streaming_width();
return result;
}
} /* namespace controller */