Fix a bug when the first state is an idle state.

This commit is contained in:
2022-02-28 11:43:34 +01:00
parent 70f987f9e9
commit 0c47ea1a34

View File

@@ -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()