end if; when s2=>
if d='0' then state<=s3; else state<=s2; end if; when s3=>
if d='1' then state<=s4; else state<=s0; end if; when s4=>
if d='0' then state<=s5; else state<=s2; end if; when s5=>
if d='0' then state<=s6; else state<=s1; end if; when s6=>
if d='1' then state<=s0; else state<=s0; end if; end case; end if;
end process; --输出设置 process(state,d) begin
case state is when s6=>
if d='1' then z<='1'; --1101001检测成功 else z<='0'; end if;
when others=>z<='0'; end case; end process; end bhv; 2.仿真
3.逻辑图
6
stateclkdrstclkdresets6001zz~0 4. 序列检测器的Mealy机状态表: 现 态 (present_state) 次态 / 输出(next_state / cout) cin=0 cin=1 S1 / 0 S2 / 0 S3 / 0 S3 / 0 S1 / 0 S6 / 0 S2 / 0 S0 S0 / 0 S1 S0 / 0 S2 S0 / 0 S3 S4 / 0 S4 S5 / 0 S5 S0 / 0 S6 S0 / 1 7