diff --git a/DRAMSys/simulator/TrafficGenerator.cpp b/DRAMSys/simulator/TrafficGenerator.cpp index 7706840c..33e90032 100644 --- a/DRAMSys/simulator/TrafficGenerator.cpp +++ b/DRAMSys/simulator/TrafficGenerator.cpp @@ -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(&conf.states.at(currentState))) + { + currentClksToIdle = idleState->idleClks; + transitionToNextState(); + } } void TrafficGenerator::payloadSent()