Bugfix: invalid iterator in per-bank RM.
This commit is contained in:
@@ -69,7 +69,7 @@ RefreshManagerPer2Bank::RefreshManagerPer2Bank(const Configuration& config,
|
||||
|
||||
remainingBankMachines = allBankMachines;
|
||||
currentIterator = remainingBankMachines.begin();
|
||||
currentRefreshPayload = &refreshPayloads[currentIterator->front()];
|
||||
currentRefreshPayload = &refreshPayloads.at(currentIterator->front());
|
||||
}
|
||||
|
||||
CommandTuple::Type RefreshManagerPer2Bank::getNextCommand()
|
||||
@@ -131,13 +131,13 @@ sc_time RefreshManagerPer2Bank::start()
|
||||
else
|
||||
{
|
||||
nextCommand = Command::REFP2B;
|
||||
currentRefreshPayload = &refreshPayloads[currentIterator->front()];
|
||||
currentRefreshPayload = &refreshPayloads.at(currentIterator->front());
|
||||
for (auto* it : *currentIterator)
|
||||
{
|
||||
if (it->isActivated())
|
||||
{
|
||||
nextCommand = Command::PREPB;
|
||||
currentRefreshPayload = &refreshPayloads[it];
|
||||
currentRefreshPayload = &refreshPayloads.at(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -187,13 +187,13 @@ sc_time RefreshManagerPer2Bank::start()
|
||||
else
|
||||
{
|
||||
nextCommand = Command::REFP2B;
|
||||
currentRefreshPayload = &refreshPayloads[currentIterator->front()];
|
||||
currentRefreshPayload = &refreshPayloads.at(currentIterator->front());
|
||||
for (auto* it : *currentIterator)
|
||||
{
|
||||
if (it->isActivated())
|
||||
{
|
||||
nextCommand = Command::PREPB;
|
||||
currentRefreshPayload = &refreshPayloads[it];
|
||||
currentRefreshPayload = &refreshPayloads.at(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ RefreshManagerPerBank::RefreshManagerPerBank(const Configuration& config, std::v
|
||||
|
||||
CommandTuple::Type RefreshManagerPerBank::getNextCommand()
|
||||
{
|
||||
return {nextCommand, &refreshPayloads[*currentIterator], std::max(timeToSchedule, sc_time_stamp())};
|
||||
return {nextCommand, &refreshPayloads.at(*currentIterator), std::max(timeToSchedule, sc_time_stamp())};
|
||||
}
|
||||
|
||||
sc_time RefreshManagerPerBank::start()
|
||||
@@ -124,7 +124,7 @@ sc_time RefreshManagerPerBank::start()
|
||||
}
|
||||
}
|
||||
|
||||
timeToSchedule = checker.timeToSatisfyConstraints(nextCommand, refreshPayloads[*currentIterator]);
|
||||
timeToSchedule = checker.timeToSatisfyConstraints(nextCommand, refreshPayloads.at(*currentIterator));
|
||||
return timeToSchedule;
|
||||
}
|
||||
}
|
||||
@@ -155,7 +155,7 @@ sc_time RefreshManagerPerBank::start()
|
||||
else
|
||||
nextCommand = Command::REFPB;
|
||||
|
||||
timeToSchedule = checker.timeToSatisfyConstraints(nextCommand, refreshPayloads[*currentIterator]);
|
||||
timeToSchedule = checker.timeToSatisfyConstraints(nextCommand, refreshPayloads.at(*currentIterator));
|
||||
return timeToSchedule;
|
||||
}
|
||||
}
|
||||
@@ -173,6 +173,7 @@ void RefreshManagerPerBank::updateState(Command command)
|
||||
remainingBankMachines.erase(currentIterator);
|
||||
if (remainingBankMachines.empty())
|
||||
remainingBankMachines = allBankMachines;
|
||||
currentIterator = remainingBankMachines.begin();
|
||||
|
||||
if (state == State::Pulledin)
|
||||
flexibilityCounter--;
|
||||
|
||||
Reference in New Issue
Block a user