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

32 lines
747 B
C++

/*
* PrechargeChecker.cpp
*
* Created on: Mar 13, 2014
* Author: jonny
*/
#include "PrechargeChecker.h"
namespace core {
void PrechargeChecker::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 PrechargeChecker::getExecutionTime(const tlm::tlm_generic_payload& transaction,
Command command) const
{
assert(command == Precharge || command == PrechargeAll);
return config.Timings.tRP;
}
void PrechargeChecker::notifyAboutScheduledCommand(const ScheduledCommand& command)
{
}
} /* namespace controller */