Files
DRAMSys/dram/src/core/scheduling/checker/ReadChecker.cpp
2014-03-16 17:07:35 -07:00

36 lines
864 B
C++

/*
* ReadChecker.cpp
*
* Created on: Mar 13, 2014
* Author: jonny
*/
#include "ReadChecker.h"
#include "../../utils/Utils.h"
namespace core {
void ReadChecker::check(ScheduledCommand& command) const
{
ScheduledCommand lastCommand = bus.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& transaction,
Command command) const
{
assert(command == Read || command == ReadA);
//return config.Timings.tRL + config.Timings.clk*getBurstLengthInBytes(transaction, config.buswidth);
return config.Timings.tRL + config.Timings.clk*2;
}
void ReadChecker::notifyAboutScheduledCommand(const ScheduledCommand& command)
{
}
} /* namespace controller */