Draw the diagram of the FSM that can detect the sequence 1(01)*1, where * represents zero or more times. For example, the sequence can be 11, 1011, or 101011, etc.
The following diagram shows a Moore-machine based solution.
Draw the diagram of the FSM that can detect the sequence 1(01)*1, where * represents zero or more times. For example, the sequence can be 11, 1011, or 101011, etc.
The following diagram shows a Moore-machine based solution.
Looks like it can be done in 4 states.
Can you recheck my solution ?
S0 = (in ==1’b1) ? S1:S0
S1 = (in ==1’b1) ? S3:S2
S2 = (in ==1’b1) ? S1:S0
S3 = (in ==1’b1) ? S3:S2
output = (state == S3)