EDA技术及应用试卷B含答案.doc

上传人:苏美尔 文档编号:8882395 上传时间:2021-01-23 格式:DOC 页数:6 大小:39.50KB
返回 下载 相关 举报
EDA技术及应用试卷B含答案.doc_第1页
第1页 / 共6页
EDA技术及应用试卷B含答案.doc_第2页
第2页 / 共6页
EDA技术及应用试卷B含答案.doc_第3页
第3页 / 共6页
EDA技术及应用试卷B含答案.doc_第4页
第4页 / 共6页
EDA技术及应用试卷B含答案.doc_第5页
第5页 / 共6页
点击查看更多>>
资源描述

《EDA技术及应用试卷B含答案.doc》由会员分享,可在线阅读,更多相关《EDA技术及应用试卷B含答案.doc(6页珍藏版)》请在三一文库上搜索。

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_lo

13、gic_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:std_logic_vector(4 downto 0); Begin Process Begin A1=0&a; A2=0&b; If c=1 then A3=a1+a2; Else A3=a1-a2; End if; S=a3(3 downto 0); Co=a3(4); End process;End a;六、简答题1、什么是并行语句?什么是顺序语句? 两者有何区别?2、信号和变量有何区别?

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 科普知识


经营许可证编号:宁ICP备18001539号-1