2013-2014-1EDA技术期中考核试卷 下载本文

内容发布更新时间 : 2024/4/28 1:40:58星期一 下面是文章的全部内容请认真阅读。

淮 阴 工 学 院 课 程 考 试 试 卷

----------------------------装--------------------------订----------------------线----------------------------- 专业:电气 课程名称: EDA技术 学 分: 3.5 试卷编号( ) 课程编号: 1213050 考试方式: 考试时间: 120 分钟 拟卷人(签字): 拟卷日期: 2013.10.12 审核人 (签字): 得分统计表: 题号 得分 一 二 三 四 五 六 七 八 九 十 总 分 一 、填空题:(每空2分,共20分) 1.数字电子系统设计主要有三种流程,分别为:自底向上、( )和( )。 2. 一个完整的VHDL程序包含:库、( )、( )、( )和配置五个部分。 3.VHDL语言的数据对象主要有变量、( )、( )和文件四种类型。 4.数字电子系统设计主要有三种流程,分别为:自顶向下、( )和( )。 5.目前,常用的一种PLD器件CPLD是指( ) 三、简答题(每题6分,共18分) 1.EDA是代表的中文专业名词是什么?简述EDA技术四个基本要素。 2.请简述采用VHDL语言描述电路在FPGA/CPLD实现的一般流程。 3.定义一种名为AAA的数组数据类型,要求其下标范围为100~0;数组元素类型为整数。并定义分别定义一个变量V1和一个信号S1为此数据类型。 TYPE AAA IS ARRAY (100 downto 0) of integer; Varible V1 : AAA; Signal S1:AAA; V1(9):=123; S1(8)<=321; 班级 姓名 学号 二、单项选择题:将正确选项表格中相应位置。(每题2分,共10分) 题号 答案 1 2 3 4 5 1.VHDL语言中,下面哪条语句能检测时钟信号的下降沿 ( ) (A)if clk’event and clk=’1’ then (B)if clk’event and clk=’0’ then (C)if rising_edge(clk) then (D)都不对’ 2.进程中的信号赋值语句,其信号更新是 (A)立即完成 (B)按顺序完成 (C)在进程的最后完成 (D)都不对 3.下列VHDL语言中哪一个不是并行语句 1. 将以下程序转化成with-select语句; (A)COMPONENT语句 (B)PROCESS语句 (C)CASE语句 (D)BLOCK语句 Process(a,b,c,s) 4.在以下的4个选项中,选出合法的标识符 Begin (A)vv1* (B)data_8bus (C)‘AAaac (D)temp_ _ Case s is 5.结构体用于描述 When 1 to 9=>x<=a; (A)器件的外部特性 (B)器件的综合约束 When 10︱15=>x<=b; (C)器件的内部结构或功能 (D)器件的外部特性和内部结构或功能 When others=>x<=c; End case; End process; IF和WHEN_ELSE语句的转换 四、程序分析题(每题8分,共16分) 第 1 页 共 3 页

淮 阴 工 学 院 课 程 考 试 试 卷

----------------------------装--------------------------订----------------------线----------------------------- 班级 姓名 学号 2.阅读程序,回答问题。 1) 画出电路端口框图;2)简述电路功能,并指明rst信号是同步还是异步信号。 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity test1 is port(clk,rst:in std_logic; qout: out std_logic_vector(7 downto 0)); end; architecture bh of test1 is signal qh,ql:std_logic_vector(3 downto 0); begin process(clk,rst) begin if (rst='1') then ql<=\ elsif (clk'event and clk='1') then if (ql=9) then ql<=\ if (qh=5) then qh<=\ else qh<=qh+1; end if; else ql<=ql+1; end if; end if; end process; qout<=qh & ql; end; 2.设计一个占空比为50%的4分频器,引脚及波形如下图所示 输入信号: clkin(输入脉冲,工作在上升沿) rst(异步清‘0’信号,高电平有效) ena(同步使能端,高电平有效) 输出信号:clk1_4(频率为clkin的1/4) 请写完整的VHDL程序,加上必要的注释语句。 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity test1 is port(clkin ,rst, ena:in std_logic; clk1_4: out std_logic); end; 五、程序设计题(每题12分,共36分) 1.设计一个七人表决器,输入为a(6~0),高电平为同意;输出为y,高电平表示通过。 library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity test1 is port(a:in std_logic_vector(6 downto 0); y: out std_logic); end; architecture bh of test1 is 第 2 页 共 3 页 淮 阴 工 学 院 课 程 考 试 试 卷

3.已知一个计数显示电路(minutedpy)如虚线框内所示。电路由cnt60、leddisplay两个模块组成,两个模块的实体定义以给出,请用元件声明/例化的方法描述该电路。(注:cnt60和leddisplay两个模块的设计已给出,不需要自己设计,直接写顶层计数显示电路(minutedpy)的程序) entity cnt60 is port(clk,rst:in std_logic; qoutH: out std_logic_vector(7 downto 4); qoutL: out std_logic_vector(3 downto 0)); end; entity leddisplay is port(ck:in std_logic; datainh,datainl: in std_logic_vector(3 downto 0); sbit: out std_logic_vector(1 downto 0); seg: out std_logic_vector(6 downto 0)); end; INPUTclkFVCC leddisplay cnt60OUTPUTsbitT cksbit[1..0]INPUTOUTPUTclksecsegT clkqoutH[7..4]datainh[3..0]seg[6..0]VCCINPUTrstT rstqoutL[3..0]datainl[3..0]VCC inst1 inst library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity test1 is port(clkf,clksec,rstT:in std_logic; SBIT: out std_logic_vector(1 downto 0); SEGT :out std_logic_vector(6 downto 0)); end; architecture bh of test1 is COMPONT cnt60 is port(clk,rst:in std_logic; qoutH: out std_logic_vector(7 downto 4); qoutL: out std_logic_vector(3 downto 0)); ----------------------------装--------------------------订----------------------线----------------------------- 班级 姓名 学号 end; entity leddisplay is port(ck:in std_logic; datainh,datainl: in std_logic_vector(3 downto 0); sbit: out std_logic_vector(1 downto 0); seg: out std_logic_vector(6 downto 0)); end; BEGIN U1: cnt60 PORTMAP( ) 第 3 页 共 3 页