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