Re: When is it to generate transparent latch or usual combinationallogic?
Here ya go...
State2 : process(CLK)
begin
if rising_edge(CLK) then
if SINI = '1' then
State2 <= Idle_S;
else
case State2 is
when Idle_S =>
if A1 = '1' then
State2 <= X_S;
end if;
when X_S =>
if A2 = '1' then
State2 <= Idle_S;
end if;
end case;
end if; -- sini
end if; -- clk
end process;
Unless you know that SINI is initially asserted (to initialize the
state machine), you will need a reset for the state machine too.
Andy
|