ControllingStateMachine: process(CLOCK)
begin
if rising_edge(CLOCK) then
--sets the round value to 11 so it will reset the counter.
if RESET = '1' then
RoundNum <= x"a" & "01";
else
--if it is round eleven then reset the round counter.
if RoundNum = (x"a" & "01") then
if LOAD = '1' then
RoundNum <= "000000";
end if;
--if the round number is not equal 11 then increment the counter
elsif RoundNum /= (x"a" & "01") then
RoundNum <= RoundNum + '1';
end if;
end if;
end if;
end process;
--Good shows when the 10th round has been iterated by the value 1 else it shows a 0.
GOOD <= '1' when RoundNum = x"a" & "00" else '0';
--Complete shows the value 1 after the 10th round is complete
Complete <= '1' when RoundNum = x"a" & "01" else '0';