process(freq, state, clk) begin if reset ='1' then state <=normal; elsif reset='0' then case (state) is --normal state-- when normal => --no delays applied here if (freq < 600) and (freq > 0)then state <= hot; elsif (freq > 800) then state <= cool; elsif (freq = 0) then state<=normal; else state<=normal; end if; --hot state-- when hot => if (freq < 500) then state<=stop; elsif(freq >600) then state<=normal; elsif (freq >=500) and (freq <=600) then state <= hot; end if;