书签 分享 收藏 举报 版权申诉 / 27
上传文档赚钱

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

  • 上传人(卖家):三亚风情
  • 文档编号:3523765
  • 上传时间:2022-09-11
  • 格式:PPT
  • 页数:27
  • 大小:461KB
  • 【下载声明】
    1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
    2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
    3. 本页资料《数字设计基础双语课件(第10章).ppt》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
    4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
    5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    数字 设计 基础 双语 课件 10
    资源描述:

    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

    展开阅读全文
    提示  163文库所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
    关于本文
    本文标题:数字设计基础双语课件(第10章).ppt
    链接地址:https://www.163wenku.com/p-3523765.html

    Copyright@ 2017-2037 Www.163WenKu.Com  网站版权所有  |  资源地图   
    IPC备案号:蜀ICP备2021032737号  | 川公网安备 51099002000191号


    侵权投诉QQ:3464097650  资料上传QQ:3464097650
       


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

    163文库