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

优惠套餐
 

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

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

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

版权提示 | 免责声明

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

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

1、 10.Behavioral and Structural Descriptions 10.1 An example 10.2 The dataflow description10.3 Structural VHDL10.4 Processes10.5 Sequential and concurrent VHDL1 10.1 An example Example:a Four-bit adder sum=x+y;Describe a 4-bit adder in VHDL 1111110011101010100110110010100110000000Carry outSumCarry iny

2、x2 10.1 An example Circuit diagram 3 10.2 The dataflow descriptiona behavioral description of the full adder LIBRARY ieee;USE ieee.std_logic_1164.ALL;ENTITY fulladd IS PORT(x,y,cin:IN STD_LOGIC;sum,cout:OUT STD_LOGIC);END ENTITY fulladd;ARCHITECTURE simple OF fulladd ISBEGIN sum=cin XOR x XOR y;cout

3、=(x AND y)OR(cin AND x)OR(y AND cin);END ARCHITECTURE simple;4 10.2 The dataflow description1.Local signals Full adder circuit with the internal nodes n1,n2,n3,n4 are the internal nodes of the circuit 5 10.2 The dataflow descriptionARCHITECTURE number3 OF fulladd IS SIGNAL n1,n2,n3,n4:STD_LOGIC;BEGI

4、N n1=x XOR y;sum=cin XOR n1;n2=x AND y;n3=cin AND x;n4=y AND cin;cout=n2 OR n3 OR n4;END ARCHITECTURE number3;the VHDL description is changed toLocal signals n1,n2,n3 and n4 as part of the description 6 10.2 The dataflow description2.Concurrent processing ARCHITECTURE number3 OF fulladd IS SIGNAL n1

5、,n2,n3,n4:STD_LOGIC;BEGIN n1=x XOR y;sum=cin XOR n1;n2=x AND y;n3=cin AND x;n4=y AND cin;cout=n2 OR n3 OR n4;END ARCHITECTURE number3;Lets Consider the two descriptions(1)7 10.2 The dataflow descriptionARCHITECTURE number4 OF fulladd IS SIGNAL n1,n2,n3,n4:STD_LOGIC;BEGIN sum=cin XOR n1;cout=n2 OR n3

6、 OR n4;n1=x XOR y;n2=x AND y;n3=cin AND x;n4=y AND cin;END ARCHITECTURE number4;(2)8 10.2 The dataflow descriptionAlthough they are written in a different order,they do exactly the same thing.Unlike programming languages,VHDL normally monitors all statements at the same time,and executes a statement

7、 when one of its right hand side(RHS)values changes.This is called concurrent execution.Concurrent execution9 10.2 The dataflow description3.Dataflow VHDL In the jargon of VHDL,the style of coding that the outputs and inputs are related through Boolean or arithmetic operators and all statements oper

8、ate concurrently,is called dataflow.10 10.3 Structural VHDL1.The work library When designs are compiled they are placed into a library ready to be used by other designs.By default,the current working library is called work.When compiled,it is added to the work library.ARCHITECTURE simple OF fulladd

9、ISBEGIN sum=cin XOR x XOR y;cout x(0),y=y(0),cin=cin,sum=sum(0),cout=carry(1);This is called named association.With named association,the order doesnt matter.18 10.4 Processes 1.Sensitivity listsARCHITECTURE simple OF fulladd IS -1BEGIN -2 cout=(x AND y)OR(cin AND x)OR(y AND cin);-3 sum=cin XOR x XO

10、R y;-4END ARCHITECTURE simple;-5Statement 3 will run whenever a right hand side value changes.So it runs when x,y or cin changes.In the jargon of VHDL,statement 3 is sensitive to signals x,y,cin.Its sensitivity list is x,y,cin.A change in a signal is called an event on that signal.So statement 3 run

11、s whenever there is an event on a signal on its sensitivity list.19 10.4 Processes Statements 3 and 4 are concurrent,i.e.they are both active at the same time,and are triggered by an event on a signal on their sensitivity lists.2.The structure of a process PROCESS(sensitivity list)BEGIN Statement 1;

12、Statement 2;Statement 3;END PROCESS;20 10.4 Processes(1)The process waits until it is triggered by an event on one of the signals in its sensitivity list.(2)When it is triggered it executes each of the statements in its body sequentially.(3)During execution of the process,all signal values are froze

13、n and are not updated or changed in any way during the execution of the process(4)The LHS signals all receive their new value after the process has suspended its execution.21 10.4 Processes VHDL description in processes ARCHITECTURE all_in_one OF fulladd IS BEGIN PROCESS(x,y,cin)BEGIN cout=(x AND y)

14、OR(cin AND x)OR(y AND cin);sum=cin XOR x XOR y;END PROCESS;END ARCHITECTURE all_in_one;22 10.4 Processes 3.The WAIT statement Instead of using a sensitivity list,we can the timing of execution of a process by using a WAIT statement.ARCHITECTURE using_wait OF fulladd IS BEGIN PROCESS BEGIN WAIT ON x,

15、y,cin;cout=(x AND y)OR(cin AND x)OR(y AND cin);sum=cin XOR x XOR y;END PROCESS;END ARCHITECTURE using_wait;23 10.5 Sequential and concurrent VHDL1.Sequential and concurrent conditionals(1)Sequential IF blockIF condition_1 THEN sequence of statements;ELSIF condition_2 THEN sequence of statements;ELSE

16、 sequence of statements;END IF;24 10.5 Sequential and concurrent VHDL(2)Concurrent WHEN statement a=value1 WHEN condition1 ELSE value2 WHEN conditon2 ELSE value3;25 10.5 Sequential and concurrent VHDL2.Sequential and concurrent selectionENTITY declaration a 4-input multiplexer LIBRARY ieee;USE ieee.

17、std_logic_1164.all;ENTITY mux4to1 IS PORT(address:IN STD_LOGIC_VECTOR(1 DOWNTO 0);data:IN STD_LOGIC_VECTOR(3 DOWNTO 0);y:out STD_LOGIC);END mux4to1;26 10.5 Sequential and concurrent VHDLThe operation of selecting one of the data lines to the output y depending on the value of address is accomplished

18、 in concurrent VHDL using a SELECT statement:ARCHITECTURE concurrent OF mux4to1 ISBEGINWITH address SELECT y=data(3)WHEN 11,data(2)WHEN 10,data(1)WHEN 01,data(0)WHEN OTHERS;END ARCHITECTURE concurrent;The OTHERS choice catches all other values for address that do not match any of the values explicitly listed.27

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

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


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