ImageVerifierCode 换一换
格式:PPT , 页数:15 ,大小:292KB ,
文档编号:3523772      下载积分:18 文币
快捷下载
登录下载
邮箱/手机:
温馨提示:
系统将以此处填写的邮箱或者手机号生成账号和密码,方便再次下载。 如填写123,账号和密码都是123。
支付方式: 支付宝    微信支付   
验证码:   换一换

优惠套餐
 

温馨提示:若手机下载失败,请复制以下地址【https://www.163wenku.com/d-3523772.html】到电脑浏览器->登陆(账号密码均为手机号或邮箱;不要扫码登陆)->重新下载(不再收费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  
下载须知

1: 试题类文档的标题没说有答案,则无答案;主观题也可能无答案。PPT的音视频可能无法播放。 请谨慎下单,一旦售出,概不退换。
2: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
3: 本文为用户(三亚风情)主动上传,所有收益归该用户。163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

1,本文(数字设计基础双语课件(第12章).ppt)为本站会员(三亚风情)主动上传,163文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。
2,用户下载本文档,所消耗的文币(积分)将全额增加到上传者的账号。
3, 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(发送邮件至3464097650@qq.com或直接QQ联系客服),我们立即给予删除!

数字设计基础双语课件(第12章).ppt

1、 12.Describe sequential systems in VHDL 12.1 Defining clocks,flip-flops and registers 12.2 Register Transfer Level (RTL)Coding12.3 Sequential logic 1 12.1 Defining clocks,flip-flops®isters 1.Defining a clock signal PROCESSBEGIN clock=0;WAIT FOR 10 NS;clock=1WAIT FOR 10 NS;END PROCESS;There are ma

2、ny ways to define a clock.For example:Simulation waveform 2 12.1 Defining clocks,flip-flops®isters 2.The D-type flip-flopLIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;ENTITY dff IS PORT(d,clock:IN STD_LOGIC;Q:OUT STD_LOGIC);END ENTITY dff;ARCHITECTURE correct OF dff ISBEGIN PROCESS(clock)BEGIN IF(risi

3、ng_edge(clock)THEN q=d;END IF;END PROCESS;END ARCHITECTURE correct;3 12.1 Defining clocks,flip-flops®isters 3.The D-type flip-flop with reset If the Reset is synchronous,then it is ignored until the rising edge of the clock.When the rising edge comes,if Reset=1 then q goes to 0.If Reset=0,then th

4、e flip-flop exhibits normal behavior,i.e.q=d.(1)If the Reset is synchronous4 12.1 Defining clocks,flip-flops®isters LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;-D-type flip-flopENTITY dff IS PORT(d :IN STD_LOGIC;-Data input clock:IN STD_LOGIC;-Clock input reset:IN STD_LOGIC;-Reset input Q :OUT STD_L

5、OGIC);-OutputEND ENTITY dff;ENTITY definition 5 12.1 Defining clocks,flip-flops®isters ARCHITECTURE synch_reset OF dff ISBEGIN PROCESS(clock)BEGIN IF(rising_edge(clock)THEN IF(reset=1)THEN q=0;ELSE q=d;END IF;END IF;END PROCESS;END ARCHITECTURE synch_reset;Architecture declaration6 12.1 Defining

6、clocks,flip-flops®isters If the Reset is asynchronous,then it takes immediate effect,no matter what the clock is doing.This means that the flip-flop is always sensitive to its Reset input.(2)If the Reset is asynchronous7 12.1 Defining clocks,flip-flops®isters ARCHITECTURE asynch_reset OF dff I

7、SBEGIN PROCESS(clock,reset)BEGIN IF(reset=1)THEN q=0;ELSIF(rising_edge(clock)THEN q=d;END IF;END PROCESS;END ARCHITECTURE asynch_reset;Architecture declaration should be:8 12.2 Register Transfer Level Coding1.VHDL description of a registered adderARCHITECTURE behavioral OF adder ISBEGIN sum=a+b;END

8、ARCHITECTURE behavioral;Behavioral description9 12.2 Register Transfer Level CodingAn obvious way to describe the adder with registered output is to instantiate 4 flip-flops at the output:ARCHITECTURE registered OF adder ISBEGIN sum sum(0),clock=clock,q=reg_sum(0);g2:ENTITY work.dff(correct)PORT MAP

9、(d=sum(1),clock=clock,q=reg_sum(1);g3:ENTITY work.dff(correct)PORT MAP(d=sum(2),clock=clock,q=reg_sum(2);g4:ENTITY work.dff(correct)PORT MAP(d=sum(3),clock=clock,q=reg_sum(3);END ARCHITECTURE registered;10 12.2 Register Transfer Level Coding2.Register Transfer Level VHDLIf we want a reset signal,tha

10、t can asynchronously reset the adder output to zero,the code should be:ARCHITECTURE rtl2 OF adder IS BEGIN PROCESS(clock,reset)BEGIN IF(reset=1)THEN reg_sum 0);ELSIF(rising_edge(clock)THEN reg_sum=a+b;end if;END PROCESS;END ARCHITECTURE rtl2;11 12.2 Register Transfer Level CodingThis style of coding

11、 is called register transfer level coding.We are using assignments to signals,but wrapping them up in processes triggered by the clock(and reset signal)in order to make it clear on what clock cycle the outputs should assume their values.12 12.2 Register Transfer Level Coding3.VHDL variables A VHDL v

12、ariable can only exist inside a process,and will assume its new value immediately whenever an assignment occurs.Like c and f in the following circuit.13 12.2 Register Transfer Level CodingARCHITECTURE fig12-10 OF adder ISBEGIN PROCESS(clock)VARIABLE e,f:SIGNED(31 DOWNTO 0);BEGIN IF(rising_edge(clock

13、)THEN c:=a+b;f:=d+e;sum=c+f;END IF;END PROCESS;END ARCHITECTURE fig12-10;Code listing using variables 14 12.3 Sequential logic 000001010011100101110111A Binary up-counterState diagram LIBRARY IEEE;USE IEEE.STD_LOGIC_1164.ALL;USE IEEE.STD_LOGIC_ARITH.ALL;ENTITY counter IS PORT(clock:IN STD_LOGIC;count:OUT UNSIGNED(2 DOWNTO 0);END ENTITY counter;VHDL code 15

侵权处理QQ:3464097650--上传资料QQ:3464097650

【声明】本站为“文档C2C交易模式”,即用户上传的文档直接卖给(下载)用户,本站只是网络空间服务平台,本站所有原创文档下载所得归上传人所有,如您发现上传作品侵犯了您的版权,请立刻联系我们并提供证据,我们将在3个工作日内予以改正。


163文库-Www.163Wenku.Com |网站地图|