组合逻辑电路设计设计05(第五章Bvhdl基本语素、语法、语句)试卷.ppt

组合逻辑电路设计设计05(第五章Bvhdl基本语素、语法、语句)试卷.ppt

  1. 1、本文档共135页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Mealy型-标准形式程序代码 entity Mealy_S is port(d,clk:in std_logic; y:out std_logic); end Mealy_S; architecture bh of Mealy_S is type StateTTT is (s0,s1,s2); signal current_state,exitation :StateTTT; begin p0:process(clk) begin if(clkevent and clk=1)then current_state=exitation; end if; end process p0; p1:process(current_state,d) begin case current_state is when s0= if(d=0)then exitation=s0; else exitation=s1; end if; when s1= if(d=0)then exitation=s0; else exitation=s2; end if; when s2= if(d=0)then exitation=s0; else exitation=s2; end if; when others= exitation=s0; end case; end process p1; p2:process(current_state,d) begin case current_state is when s2= if(d=0)then y=1; else y=0; end if; when others= y=0; end case; end process p2; --y=1 when current_state=s2 and d=0 else 0; end bh; 判断进程语句?组合 OR 时序 Process() Begin If(clk’event and clk=‘1’)then End if; End process; 内部是否有上升沿判断 序列信号:110 序列检测器 CLK Z x Rst 状态机自启动:RST复位控制 LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY sqs IS PORT( Rst,x,clk: in Std_logic; z: out Std_logic); END sqs; ARCHITECTURE a OF mealy IS TYPE STATE_TYPE IS (s0, s1, s2); SIGNAL state: STATE_TYPE; BEGIN PROCESS (rst,clk) BEGIN If (Rst=‘1’) then state=s0; elsif (clk‘EVENT AND clk = ’1‘) then CASE state IS WHEN s0 = IF din=‘1’ THEN state = s1; else state=s0; END IF; WHEN s1 = IF din=‘1 THEN state = s2; else state=s0; END IF; WHEN s2 = IF din=0 THEN state=s0; else state=s2; END IF; WHEN others = state=s0; END CASE; End if; END PROCESS; z=1 when (state=s2 and

您可能关注的文档

文档评论(0)

1112111 + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档