EDA技术及应用试卷B含答案_第1页
EDA技术及应用试卷B含答案_第2页
EDA技术及应用试卷B含答案_第3页
EDA技术及应用试卷B含答案_第4页
EDA技术及应用试卷B含答案_第5页
已阅读5页,还剩1页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、eda技术与应用 试卷一、填空题(共0分,每题2分)1、 eda技术的应用范畴包括计算机辅助设计cad、计算机辅助制造cam、 、 等。2、 实体定义中的端口模式用来说明端口上的数据流动方向,端口模式有以下几种in、out、 、 。3、 可编程逻辑器件按照结构复杂程度的不同,可将pld大致分为简单可编程逻辑器件、 、 。4、 信号的赋值采用符号 ,而变量的赋值符号为 。5、 进程语句本身是 ,但其内部的语句是由 构成的。二 、解释程序(第1题5分,第2题5分,第3题10分,共20分)1解释带有下划线的语句2说明该程序逻辑功能3改用with-select语句编写下列程序。library ieee

2、;use ieee.std_logic_1164.all;entity xuan2 isport (a :in std_logic_vector(3 downto 0); sel:in std_logic_vector(1 downto 0); d:out std_logic);end xuan2;architecture a of xuan2 isbeginprocess(sel)begincase sel is when 00 =dddd=a(3);end case;end process;end a; 三、判断下列程序是否有错误,如有则指出错误所在,并修改程序。(20分)程序一: ent

3、ity decoder3_8 is port(a:in bit_vector(2 downto 0); y:out bit_vector(7 downto 0); end decoder3_8; architecture beh of decoder3_8 is begin with a select y= “11111110” when “000”; “11111101” when “001” ; “11111011” when “010” ; “11110111” when “011” ; “11101111” when “100” ; “11011111” when “101” ; “1

4、0111111” when “110” ; “01111111” when “111”; end beh;程序二:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity behavioral is port(a: in bit; b: in bit; equal: out std_ulogic ); end behavioral; architecture eqcomp4 of behavioral is begin if a=b then equal =1; else equal =0;e

5、nd eqcomp4 ;四、分析下列程序功能,并将程序补充完整。(10分) library ieee;use ieee.std_logic_1164.all; entity multi3 is port(a,b:in std_logic_vector(2 downto 0); y:out std_logic_vector ); end multi3; architecture a of multi3 is signal temp1:std_logic_vector(2 downto 0); signal temp2:std_logic_vector(3 downto 0); begin tem

6、p1=a when b(0)=1 else “000”; temp2=(a&0) when b(1)=1 else “0000”; y=temp1+temp2+(0&temp3); 五、用vhdl编程设计一个4位二进制数的加/减法器,控制输入端为c,当c=1时,做加法运算;当c=0时,做减法运算。(20分)六、简答题(20分)1、什么是并行语句?什么是顺序语句? 两者有何区别?2、信号和变量有何区别? eda技术与应用 试卷b答案一填空题(共0分,每题2分)6、 eda技术的应用范畴包括计算机辅助设计cad、计算机辅助制造cam、计算机辅助测试cat、计算机辅助工程cae等。7、 实体定义中的

7、端口模式用来说明端口上的数据流动方向,端口模式有以下几种in、out、inout、buffer。8、 可编程逻辑器件按照结构复杂程度的不同,可将pld大致分为简单可编程逻辑器件、复杂可编程逻辑器件、现场可编程门阵列。9、 信号的赋值采用符号dddd=a(3);end case;end process;end a; 答案: 库定义,实体名, sel=”00”时,将d=a(0)四路数据选择输出library ieee;use ieee.std_logic_1164.all; entity xuan1 isport (a :in std_logic_vector(3 downto 0); sel:i

8、n std_logic_vector(1 downto 0); d:out std_logic);end xuan1;architecture a of xuan1 isbeginwith sel select d=a(0) when 00, a(1) when 01, a(2) when 10, a(3) when others;end a;三、(20分)判断下列程序是否有错误,如有则指出错误所在,并修改程序。程序一:library ieee;use ieee.std_logic_1164.all; entity decoder3_8 is port(a:in bit_vector(2 do

9、wnto 0); y:out bit_vector(7 downto 0); end decoder3_8; architecture beh of decoder3_8 is begin with a select y= “11111110” when “000”, “11111101” when “001”, “11111011” when “010”, “11110111” when “011”, “11101111” when “100”, “11011111” when “101”, “10111111” when “110”, “01111111” when “111”; end

10、beh;程序二:library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;entity behavioral is port(a: in bit; b: in bit; equal: out std_ulogic ); end behavioral; architecture eqcomp4 of behavioral is beginprocess( a,b)beginif a=b then equal =1;else equal =0;end if;end process;end eqcomp4 ;四、

11、分析下列程序功能,并将程序补充完整。 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity multi3 is port(a,b:in std_logic_vector(2 downto 0); y:out std_logic_vector(5 downto 0); end multi3; architecture a of multi3 is signal temp1:std_logic_vector(2 downto 0); signal temp2:std_logic_vect

12、or(3 downto 0); signal temp3:std_logic_vector(4 downto 0); begin temp1=a when b(0)=1 else “000”; temp2=(a&0) when b(1)=1 else “0000”; temp3=(a&“00”) when b(2)=1 else “00000”; y=temp1+temp2+(0&temp3);end a;功能:三位乘法器五、用vhdl编程设计一个4位二进制数的加/减法器,控制输入端为c,当c=1时,做加法运算;当c=0时,做减法运算。library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity subadd is port(c:in std_logic; a,b:in std_logic_vector(3 downto 0); s:out std_logic_vector(3 downto 0); co:out std_logic); end subadd; architecture a of subadd is signal a1,a2,a3:

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论