作业帮 > 综合 > 作业

利用状态机的VHDL描述方法设计一个序列检测器,要求连续输入3个或3个以上的1时输出为1,否则为0.谁会啊!

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/22 06:11:30
利用状态机的VHDL描述方法设计一个序列检测器,要求连续输入3个或3个以上的1时输出为1,否则为0.谁会啊!
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity xulie is
port(clk,reset:in std_logic;
input:in std_logic;
result:out std_logic);
end entity;
architecture art of xulie is
type states is (s0,s1,s2);
signal state:states;
begin
process(clk,reset,state,input)
varialbe cnt:integer;
begin
if reset='1' than
state