checker refactoring

This commit is contained in:
robert
2014-03-30 15:26:18 +02:00
parent 75a5dca81e
commit 9f97e77db4
18 changed files with 201 additions and 172 deletions

View File

@@ -45,7 +45,6 @@ void ControllerState::change(const ScheduledCommand& scheduledCommand)
{
bus.blockSlot(scheduledCommand.getStart());
lastCommandsOnBus[scheduledCommand.getCommand()][scheduledCommand.getBank()] = scheduledCommand;
lastCommandsOnBus[scheduledCommand.getCommand()][scheduledCommand.getBank()].invalidateTransaction();
switch (scheduledCommand.getCommand())
{
@@ -87,17 +86,8 @@ void ControllerState::cleanUp(sc_time time)
{
bus.cleanUpSlots(time);
activates.cleanUpSlots(time);
//remove_if(lastDataStrobeCommands.begin(),lastDataStrobeCommands.end(), [&](ScheduledCommand command){return command.getEnd() < time;});
vector<ScheduledCommand> tmp;
for(ScheduledCommand& command: lastDataStrobeCommands)
{
if(command.getEnd() >= time )
{
tmp.emplace_back(command);
}
}
lastDataStrobeCommands = tmp;
lastDataStrobeCommands.remove_if([&](ScheduledCommand command){return command.getEnd() < time;});
}
} /* namespace controller */