checker refactoring
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user