36 lines
864 B
C++
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 */
|