Fix a bug when the first state is an idle state.
This commit is contained in:
@@ -295,6 +295,15 @@ void TrafficGenerator::prepareNextPayload()
|
||||
if (transactionsSentInCurrentState >= trafficState->numRequests)
|
||||
transitionToNextState();
|
||||
}
|
||||
|
||||
// In case we are in an idle state right at the beginning of the simulation,
|
||||
// set the clksToIdle and transition to the next state.
|
||||
if (auto idleState =
|
||||
std::get_if<DRAMSysConfiguration::TraceGeneratorIdleState>(&conf.states.at(currentState)))
|
||||
{
|
||||
currentClksToIdle = idleState->idleClks;
|
||||
transitionToNextState();
|
||||
}
|
||||
}
|
||||
|
||||
void TrafficGenerator::payloadSent()
|
||||
|
||||
Reference in New Issue
Block a user