How can you delay your fsm to stay in one of the state for about lets say 5 clock cycle?
What you have is on the left, and what you want is on the right assuming you want a delay between State 2 and State 3. You simply can add a new state that handles the delay.


Some pseudo code for the delay state would be implemented like the following:

if(clk)
delay_counter &lt;= delay_counter + 1'b1;
if(delay_counter ==5)
begin
mode &lt;= state3
delay_counter &lt;= 0;
end


If clk happens every 50ns, you just created a 250ns delay. You're trapped in this state until you've met the delay, then you hop into the next state you want.

EDIT: Just reread your question and maybe I misunderstood but the concept is the same anyways. If you want State 3 to happen 5 times you would put a block in State 3 that points to State 4 based on a variable counting up to 5, and State 4 just sends you back to State 3 or State X based on that variable.