首页 使用D触发器设计一个11001序列检测器

使用D触发器设计一个11001序列检测器

举报
开通vip

使用D触发器设计一个11001序列检测器使用D触发器设计一个11001序列检测器讨论使用D触发器设计一个11001序列检测器,讨论序列可交迭(Overlap)检测和不可交迭检测在设计上的区别,讨论分别采用Mealy机设计和采用Moore机设计的区别,讨论未用状态的处理问题。【要求】给出电路原理图或HDL代码,要求进行仿真,并给出仿真结果。1.原件介绍D触发器(74LS74)、“与”门(74LS08)、“或”门(74LS32)、“非”门(74LS04),集成电路引脚2.设计思路根据要求,设计的序列检测器有一个外部输入x和一个外部输出Z。输入和输出的逻辑关系...

使用D触发器设计一个11001序列检测器
使用D触发器设计一个11001序列检测器讨论使用D触发器设计一个11001序列检测器,讨论序列可交迭(Overlap)检测和不可交迭检测在设计上的区别,讨论分别采用Mealy机设计和采用Moore机设计的区别,讨论未用状态的处理问题。【 要求 对教师党员的评价套管和固井爆破片与爆破装置仓库管理基本要求三甲医院都需要复审吗 】给出电路原理图或HDL代码,要求进行仿真,并给出仿真结果。1.原件介绍D触发器(74LS74)、“与”门(74LS08)、“或”门(74LS32)、“非”门(74LS04),集成电路引脚2.设计思路根据要求,设计的序列检测器有一个外部输入x和一个外部输出Z。输入和输出的逻辑关系为:当外部输入x第一个为"1",外部输出Z为"0";当外部输入x第二个为"1",外部输出Z为"0";当外部输入第三个x为"0",外部输出Z为"0",当外部输入第四个x为“0”,外部输出Z为0,当外部输入第五个x为“1”,外部输出Z为“1”。假定有一个外部输入x序列以及外部输出Z为:输入X011100101输出Y000000100要判别序列检测器是否连续接收了"11001",电路必须用不同的状态记载外部输入x的值。假设电路的初始状态为A,x 输入第一个"1",检测器状态由A装换到B,用状态B记载检测器接受了"11001"序列的第一个"1",这时外部输出Z=0;x输入第二个"1",检测器状态由B装换到C,用状态C记载检测器接了“11001”序列的第二个"1",外部输出Z=0;x输入第三个"0",检测器状态由C装换到D,外部输出Z=0;x输入第四个为“0”,检测器状态由D装换到E,外部输出Z=0;x输入第五个为“1”,检测器状态由E装换到F,外部输出Z=1。然后再根据外部输入及其他情况时的状态转移,写出相应的输出。以上 分析 定性数据统计分析pdf销售业绩分析模板建筑结构震害分析销售进度分析表京东商城竞争战略分析 了序列检测器工作,由此可画出原始状态图。根据原始状态图可列出原始状态 关于同志近三年现实表现材料材料类招标技术评分表图表与交易pdf视力表打印pdf用图表说话 pdf 。0\00\00\01\10\01\01\0FEDCAB0\00\01\01\0状态转换表现态X01AA\0B\0BA\0C\0CD\0B\0DE\0A\0EA\0F\1ZAQ2Q1Q0000001010011100000000100001Q2*AQ2Q1Q0000001011010110000010100000Q1*AQ2Q1Q0000001011010110000100101100Q0*AQ2Q1Q0000001011010110000100110010得到状态方程和输出方程Z=AQ2*=Q1*=Q0*=D2=Q2*D1=Q1*D0=Q0*3.未用状态关于未用状态涉及到了D触发器自启动的检验:前一状态为111时,Q3*=A’;Q2*=0;Q1*=A,下一状态为有效状态。前一状态为110时,Q3*=A;Q2*=1;Q1*=1,对A值分类讨论:A=0,下一状态为有效状态;A=1,下一状态为111,再下一个状态为有效状态。4.实际代码设计与仿真MOORE机有交迭的程序设计library end if;   when s1=> if din='1' then nst <=s2;else nst <= s0;end if;   when s2=> if din='0' then nst <=s3;else nst <= s0;end if;   when s3=> if din='0' then nst <=s4;else nst <= s0;end if;   when s4=> if din='1' then nst <=s5;else nst <= s0;end if;   when s5=> if din='1' then nst <=s2;else nst <= s0;end if;   when others => nst <=s0;end case;end process;reg:process (clk,rst)  begin--shixujincheng  if rst='1' then st <=s0;     elsif clk'event and clk='1'  then st <= nst; end if;  end process reg;sout <= '1' when st=s5 else '0';end behave;         仿真结果小的体现了交迭mealy有交迭的程序设计libraryieee;entityschk2isport(din,clk,rst:instd_logic;sout:outstd_logic);endschk2;architecturebehaveofschk2istypestatesis(s0,s1,s2,s3,s4,s5);signalst:states:=s0;beginprocess(clk,rst,st,din)beginifrst='1'thenst<=s0;elsifclk'eventandclk='1'thencasestiswhens0=>ifdin='1'thenst<=s1;elsest<=s0;endif;whens1=>ifdin='1'thenst<=s2;elsest<=s0;endif;whens2=>ifdin='0'thenst<=s3;elsest<=s0;endif;whens3=>ifdin='0'thenst<=s4;elsest<=s0;endif;whens4=>ifdin='1'thenst<=s5;elsest<=s0;endif;whens5=>ifdin='1'thenst<=s2;elsest<=s0;endif;whenothers=>st<=s0;endcase;if(st=s5)thensout<='1';elsesout<='0';endif;endif;endprocess;endbehave;实现检测11001的图体现交迭的图Mealy机无交叠的sif clk'event and clk='1' thencase st is     when s0=> if din='1' then st <=s1; else st <= s0;end if;   when s1=> if din='1' then st <=s2; else st <= s0;end if;   when s2=> if din='0' then st <=s3; else st <= s0;end if;   when s3=> if din='0' then st <=s4; else st <= s0;end if;   when s4=> if din='1' then st <=s5; else st <= s0;end if;   when s5=> if din='1' then st <=s0; else st <= s0;end if;   when others => st <=s0;end case;   if(st=s5) then sout<='1'; else sout <= '0';end if ; end if;end process;end behave;   体现没有交迭的Moore没有交迭的图end if;   when s1=> if din='1' then nst <=s2;else nst <= s0;end if;   when s2=> if din='0' then nst <=s3;else nst <= s0;end if;   when s3=> if din='0' then nst <=s4;else nst <= s0;end if;   when s4=> if din='1' then nst <=s5;else nst <= s0;end if;   when s5=> if din='1' then nst <=s0;else nst <= s0;end if;   when others => nst <=s0;end case;end process;reg:process (clk,rst)  begin--shixujincheng  if rst='1' then st <=s0;     elsif clk'event and clk='1'  then st <= nst; end if;  end process reg;sout <= '1' when st=s5 else '0';end behave;   5.关于二者设计上的不同Mealy状态机与Moore有限状态机不同,Mealy有限状态机的输出不但与当前状态有关,而且与输入信号的当前值有关,所以在st的赋值上二者会有不同,Moore赋给nst(下一状态的),mealy给st。而且相比于Moore机mealy有一个时钟的延时,不过这样可以起到滤波的作用。
本文档为【使用D触发器设计一个11001序列检测器】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
该文档来自用户分享,如有侵权行为请发邮件ishare@vip.sina.com联系网站客服,我们会及时删除。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
下载需要: ¥12.0 已有0 人下载
最新资料
资料动态
专题动态
个人认证用户
蓉蓉
暂无简介~
格式:doc
大小:247KB
软件:Word
页数:0
分类:
上传时间:2021-09-03
浏览量:20