数字电子技术基础_第10章.ppt

  1. 1、有哪些信誉好的足球投注网站(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
architecture behave of tri_gate is begin process(E,D) begin if(E=1) then Y=D; else Y=Z; end if; end process; end behave; 图10.6.9 三态门的逻辑符号 图10.6.10 三态门电路的仿真波形 10.6.2 时序电路的描述   1.时钟和复位信号的描述   1)时钟信号的描述   时序电路总是在时钟的有效边沿或有效电平到达时才改变其状态,因此时钟信号有边沿触发和电平触发两种形式。   (1)边沿触发时钟的描述如下:       process(clk)       begin         if(clk′event and  clk=′1′)then          语句;         endif;       end process;   以上(clk′eventand clk=′1′)为时钟边沿表达式,clk′event表示clk信号发生变化,变化后的结果clk=′1′表示时钟上升沿有效。   也可以用waituntil语句来描述时钟上升沿:      process      begin       wait untilclk′event and clk=′1′;         语句;     end process;   以上“waituntilclk′eventand clk=′1′”表示时钟上升沿有效。当使用waituntil语句后,process语句不用列出敏感量。   (2)电平触发时钟的描述如下:     if clk=′1′then       语句;     end if;    或     if clk=′0′then       语句;     end if;   以上使用if语句对clk的电平进行判断。clk=′1′表示时钟高电平有效;clk=′0′表示时钟低电平有效。 图10.5.2 Mealy型状态机的状态图 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all;  entity mealy is port ( x,clock : in bit; z : out bit );  end mealy;  architecture behavior of mealy is  type state_type is ( s0,s1,s2,s3); --用枚举类型进行状态定义  signal current_state, next_state : state_type; begin --同步单元 synch : process begin wait until clock’event and clock = ‘1’; current_state = next_state; end process; --组合逻辑 combin: process(current_state, x) begin next_state = current _state; --默认状态分配 case current_state is when s0 = if x = ‘0’ then z = ‘0’; next_state = s0; else z = ‘1’; next_state = s2; end if; when s1 = if x = ‘0’ then z = ‘0’; next_state = S0; else z = ‘0’; next_state = s2; end if; when s2 = if x = ‘0’ then z = ‘1’; next_state = s2; else z = ‘0’;

文档评论(0)

一天一点 + 关注
实名认证
内容提供者

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

1亿VIP精品文档

相关文档