Files
DRAMSys/dram/src/core/scheduling/checker/BusChecker.cpp
Janik Schlemminger 542b56c48e almost forgot...
2014-03-21 16:26:32 +01:00

30 lines
542 B
C++

/*
* BusChecker.cpp
*
* Created on: Mar 21, 2014
* Author: jonny
*/
#include "BusChecker.h"
namespace core {
void BusChecker::findSlotOnBus(ScheduledCommand& command)
{
sc_time newStart = command.getStart();
sc_assert(isClkAligned(newStart, config.Timings.clk));
std::set<sc_time>::iterator it = state.pendingBusCommands.begin();
while (it != state.pendingBusCommands.end() && *it <= newStart)
{
if (*it == newStart)
newStart += config.Timings.clk;
++it;
}
command.setStart(newStart);
}
} /* namespace core */