This commit is contained in:
Janik Schlemminger
2014-04-09 16:53:42 +02:00
parent 486a8dd78b
commit 0b08a1a54c
8 changed files with 52 additions and 19 deletions

View File

@@ -7,6 +7,7 @@
#include "ControllerState.h"
#include <algorithm>
#include "utils/Utils.h"
namespace core {
@@ -86,7 +87,7 @@ void ControllerState::change(const ScheduledCommand& scheduledCommand)
void ControllerState::cleanUp(sc_time time)
{
bus.cleanUpSlots(time);
lastDataStrobeCommands.remove_if([&](ScheduledCommand command){return command.getEnd() < time - config->Timings.tDataStrobeHistory();});
lastDataStrobeCommands.remove_if([&](ScheduledCommand command){return command.getEnd() < time && getDistance(command.getEnd(), time) > config->Timings.tDataStrobeHistory();});
lastActivates.erase(lastActivates.begin(), lastActivates.lower_bound(time - config->Timings.tActHistory()));
}