Moore 1011 Overlapping Sequence
Moore 1011 Overlapping Sequence
Moore 1011 Overlapping Sequence
▼
Finite State Machine (FSM) Coding In VHDL
There is a special Coding style for State Machines in VHDL as well as in Verilog.
Let us consider below given state machine which is a “1011” overlapping sequence detector. Output
becomes ‘1’ when sequence is detected in state S4 else it remains ‘0’ for other states.
fsm_seq_detector
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--Overlapping type.
entity seq_det is
end seq_det;
begin
-- Synchronous Process
process(clk)
begin
end if;
end process;
-- Combinational Process
Process(Current_State, S_in)
begin
case Current_State is
when S0 =>
else
end if;
when S1 =>
else
end if;
when S2 =>
end if;
when S3 =>
else
end if;
when S4 =>
else
end if;
NULL;
end case;
end if;
end process;
VLSI Encyclopedia
Share
18 comments:
superb :)
thanks a lot.
Reply
Replies
totally right!
Reply
Love it.
Reply
Reply
Hi, Where is the "output state" logic defined to detect the sequence "1011"
Reply
Replies
Regards,
Reply
very good
Reply
Replies
Reply
Reply
thank you !
Reply
Here the second process will not be executed if the s_in in the first clock cycle is 0. The sate machine
will not move forward as processes react to only events and there will never be an event on
Current_State. Sorry if i am wrong.
Reply
Replies
You are correct, the sensitivity list should also contain input s_in.
Reply
Reply
If suppose we draw a mealy FSM for this detector, I guess we would be saving one extra state as
instead of going from S3 to S4 the FSM can go to the state S1, for detecting the overlapping sequence
1011, the last digit 1 can serve as the beginning of new sequence 1011, am I right?
Reply
Replies
Yes you are right... the melay implementation will save 1 state as the output of melay is function of
present state and value of inputs.
Reply
Reply
Replies
https://goo.gl/FGO8Ow
Thanks,
Reply
Add comment
Load more...
Home
Powered by Blogger.