数字设计基础双语课件(第11章).ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《数字设计基础双语课件(第11章).ppt》由用户(三亚风情)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 数字 设计 基础 双语 课件 11
- 资源描述:
-
1、 11.VHDL simulation 11.1 Simulation 11.2 VHDL simulation of dataflow code 11.3 Simulation of structural VHDL11.4 The uninitialized logic value 11.5 Delay modeling11.6 Test benches 1 11.1 SimulationVHDL descriptions must be simulated to confirm that they behave as required.Simulation allows us to app
2、ly inputs,and then trace how the rest of the circuit evolves with time as the influence of the new inputs propagates through towards the outputs.We can then compare the predicted outputs for our design to the desired outputs.If there are no differences then we can conclude that our design is correct
3、.2 11.2 VHDL simulation of dataflow code Event A change to a signal that is scheduled to take place at a certain time is called an event.The VHDL simulation proceeds by manipulating an event queue.Event queueA VHDL statement only executes when a value on the RHS changes.1.Some terms on simulation3 1
4、1.2 VHDL simulation of dataflow code The VHDL description of a full adder ARCHITECTURE number3 OF fulladd IS SIGNAL n1,n2,n3,n4:STD_LOGIC;BEGIN n1=x XOR y;-Statement 1 sum=cin XOR n1;-Statement 2 n2=x AND y;-Statement 3 n3=cin AND x;-Statement 4 n4=y AND cin;-Statement 5 cout=n2 OR n3 OR n4;-Stateme
5、nt 6END ARCHITECTURE number3;2.Example for simulation4 11.2 VHDL simulation of dataflow code Assumed that all signals are initially at zero.Time=0It has a list of the present value for each signal,any new value that has been scheduled to take place in future,and the time at which the signal must ass
6、ume this new value.3.Process for simulation5 11.2 VHDL simulation of dataflow code All statements 1-6 are scanned simultaneously.The event on x triggers the execution of the statements:n1=x XOR y;n2=x AND y;n3=cin AND x;Time=10If the new value is different from the old value,it is placed on the even
7、t queue.6 11.2 VHDL simulation of dataflow code VHDL simulation uses an infinitesimal time intervalto keep track of the delays that happen to signals as they are assigned.At time 10+,n1 takes its new value,which triggers:sum=cin XOR n1;Time=10+7 11.2 VHDL simulation of dataflow code At time 10+2,sum
8、 takes its new value.Time=10+2There are no statements with sum on the RHS,so no further statements are triggered.8 11.3 Simulation of structural VHDLThe VHDL code for the adder is LIBRARY ieee;USE ieee.std_logic_1164.ALL;ENTITY adder IS PORT(x,y:IN STD_LOGIC_VECTOR(3 DOWNTO 0);cin:IN STD_LOGIC;sum:O
9、UT STD_LOGIC_VECTOR(3 DOWNTO 0);cout:OUT STD_LOGIC);END ENTITY adder;ARCHITECTURE structural OF adder IS SIGNAL carry:STD_LOGIC_VECTOR(4 DOWNTO 0);BEGIN c0:entity work.fulladd(dataflow)PORT MAP(x(0),y(0),cin,sum(0),carry(1);9 11.3 Simulation of structural VHDL c1:entity work.fulladd(dataflow)PORT MA
10、P(x(1),y(1),carry(1),sum(1),carry(2);c2:entity work.fulladd(dataflow)PORT MAP(x(2),y(2),carry(2),sum(2),carry(3);c3:entity work.fulladd(dataflow)PORT MAP(x(3),y(3),carry(3),sum(3),cout);END ARCHITECTURE structural;ContinuedDuring simulation all statements are active at the same time,and will be trig
11、gered to execute and re-compute their output values if any of their input signals changes.10 11.4 The uninitialized logic value When a digital electronic device is switched on,all bits stored in flip-flops and memory will initially go to a random value which could be a 1 and could be a 0.This is the
展开阅读全文