




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
系别 班次 学号 姓名 .密封线以内答题无效电子科技大学二零零四至二零零五学年第一学期(A)一、 填空题:(20分,每小题2分)1) 用VHDL语言进行设计过程中一般要进行仿真以判断设计是否正确,在综合前进行的仿真称为 功能仿真 ,综合后进行的仿真称为 时序仿真 。2) CPLD和FPGA内部结构差别很大,一般CPLD是一种以 乘积项 方式构成逻辑行为的器件,而一般FPGA则是以 查找表 方式构成逻辑行为的器件。3) Altera公司的FLEX 10K系列器件的内部结构主要包括: 逻辑阵列块(LAB) 、 嵌入式阵列块() 、 I/O单元 和 快速通道互连 。4) VHDL语言中端口buffer和inout的主要区别是 buffer不能接收外部的输入信号,inout可实现双向数据传送 。5) 数字频率计功能是测量被测信号的频率,测量频率的基本原理是: 1秒时间内 代测信号的脉冲个数 。6) 在VHDL语法规则中变量只能在 进程 和 子程序 中使用。7) EDA软件中的综合器的基本功能是: 将描述针对给定的硬件结构进行编译、优化、转换和综合最终获得门级电路或更底层的电路描述文件 。8) 一般常用的VHDL描述风格有三种,它们分别是: 行为描述 、 寄存器级描述(或数据流描述) 和 结构描述 。9) 元件例化语句中的端口映射方式有_位置关联_、_名字关联_。10) CPLD的全称是 Complex Programmable Logic Devices(或复杂可编程逻辑器件) 、FPGA的全称是 Field Programmable Gate Array(或现场可编程门阵列) 。二、 单项选择题(14分,每小题2分)1) Altera公司的FLEX 10K系列器件采用的编程元件是 D 。A、 熔丝型开关 B、 EPROM的编程元件 C、 EEPROM的编程元件 D、基于SRAM的编程元件2) 若a=1,b=2,下面程序执行后,a和b的值分别为 B 。architecture rtl of entityName issignal a, b: integer;beginprocess (a, b) variable c: integer;begina =b ;c := a ;b = c ;end process;end rtl ;A、1,2 B、 2,1 C、 1,1 D、 2, 2 3) 若S1为”1010”, S2为”0101”,下面程序执行后,outValue输出结果为: A 。library ieee;use ieee.std_logic_1164.all;entity ex2_3 is port(S1: in std_logic_vector(3 downto 0); S2: in std_logic_vector(0 to 3); outValue: out std_logic_vector(3 downto 0);End ex2_3;architecture rtl of ex2_3 isbegin outValue(3 downto 0) = (S1(2 downto 0) and not S2(1 to 3) & (S1(3) xor S2(0) ;end rtl;A、 “0101” B、 “0100” C、“0001” D、“0000” 4) 下面哪个说法是错误的: B 。A、 进程语句与进程语句之间是并行执行的,进程语句内部是顺序执行的B、进程语句是可以嵌套使用的C、块语句与块语句之间是并行执行的,块语句内部也是并行执行的D、块语句是可以嵌套使用的5) 在使用MAX+PLUSII开发环境对电路进行系统设计时,若将程序下载到器件EP10K10LC84-4,则需要下载的文件后缀名为 C 。A、*.gdf B、*.pof C、*.sof D、*.scf6) 若A为“1010”,则下面的程序执行后Y和Z的输出值分别为 B 。 Library ieee; Use ieee.std_logic.1164.all; Entity p_check is Port(a: in std_logic_vector(3 downto 0); Y, Z: out std_logic); End p_check; Architecture arch of p_check is Signal tmp1: std_logic ; begin P1: Process(a) Variable tmp2: std_logic ; begin tmp2 := 0; For N in 0 to 3 loop tmp2 := tmp2 xor a(N) ; End loop; Y=tmp2 ; End P1; P2: process(a) begin tmp1 = 0; For N in 0 to 3 loop tmp1 = tmp1 xor a(N) ; End loop; Zoutpoutpoutpoutp=“1000” ; end case; end process;end rtl ;1) library ieee; use ieee.std_logic_1164.all ; use ieee.std_logic_unsigned.all; entity ex2 isport (clk: in std_logic;Cnt: buffer std_logic_vector(3 downto 0); End ex2; Architecture arch of ex2 is Begin Process(clk) BeginWait until clkevent and clk = 1 ; 去掉process后的clk,wait语句中进程后不 Cnt = Cnt + 1 ; 能有敏感信号 End process; End arch ;2) library ieee; use ieee.std_logic_1164.all; entity ex3 isport ( A,B,C: in std_logic; sel: in std_logic_vector(1 downto 0); Z: out std_logic); End ex3; Architecture arch of ex3 is Begin Process(A,B,C) BeginZ = A when sel = “00” else 并行条件赋值语句不能放在进程中,去掉 B when sel = “01” else 进程 C; End process; End arch;3) library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity test is port(clk: in std_logic;count: out std_logic_vector(3 downto 0);end test;architecture rtl of test is count端口类型应为buffer 或inoutbegin process(clk) begin if clkevent and clk=1 then count=count+1; end if;end process;end rtl; 4) library ieee; use ieee.std_logic_1164.all; entity ex5 isport(Din: in std_logic_vector(7 downto 0); en: in std_logic; Dout: out std_logic_vector(7 downto 0); End ex5; Architecture arch of ex5 is Begin Process Begin If (En = 1) then 需加敏感信号列表 Dout = Din ; process(en, Din) Else Dout = “ZZZZZZZZ” ; End if ; End process; End arch ; 四、补充语句,完成下面所要求的描述。(20分,每小题5分)1) 四选一选择器:输入输出信号如右图所示,A和B为选择信号,inp3.0为4个信号输入端,输出信号为Y。library ieee;use ieee.std_logic_1164.all ;entity MUX41 isport( A, B : in std_logic ; inp: in std_logic_vector(3 downto 0); 1分Y: out std_logic);End MUX41 ;Architecture art of MUX41 isSignal sel : std_logic_vector(1 downto 0);Begin Sel = A & B ; 1分 process (inp , sel ) begin if (sel = “00” ) then Y= inp(0) ; 1分 elsif (sel =”01”) then Y = inp(1); 1分 elsif (sel = “10”) then Y= inp(2); 1分 Else Y = inp(3) ; End if ;End process ;End art ;2) 带异步清零的8位计数器,输入输出如右图所示,aclr为异步清零信号, Clk为时钟,Counter7.0为计数器输出信号。 Library ieee; Use ieee.std_logic_1164.all; Use ieee.std_logic_unsigned.all; 1分 entity Count8 isport(aclr, reset: in std_logic; Clk: in std_logic; Counter: out std_logic_vector(7 downto 0); End Count8 ; Architecture arch of Count8 is Signal cntTmp: std_logic_vector(7 downto 0); 1分 begin process(aclr, Clk) begin if (aclr = 0) cmtTmp = “”; 1分 elsif (clkevent and clk = 1) then CntTmp = cntTmp + 1 ; 1分 End if ;End if ; End process ; Counter Qout Qout Qout = “” ;-只要有others即对 1分 End case ;End process;End arch ;4) 七段LED译码显示电路,只须显示09,Din3.0为输入,Dout6.0为输出。数码管为共阴极,数码管对应关系如下图所示,a对应译码显示输出的低位,g对应高位,其它按顺序对应。Library ieee;Use ieee.std_logic_1164.all;Entity decoder is Port(Din: in std_logic_vector(3 downto 0); Dout: out std_logic_vector(6 downto 0);End decoder ;Architecture arch of decoder isBeginDout = “” when Din = “0000” else “” when Din = “0001” else 1分 “” when Din = “0010” else “” when Din = “0011” else 1分 “” when Din = “0100” else “” when Din = “0101” else 1分 “” when Din = “0110” else “” when Din = “0111” else 1分 “” when Din = “1000” else “” when Din = “1001” else 1分 “” ; End arch ;五、用VHDL设计电路:(26分) 1. 用VHDL(必须使用元件例化方式)描述如下的方框图,十进制计数器也要编写。(14分) -十进制计数器library ieee;use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; 2分entity CNT10 isport(Clk: in std_logic; En: in std_logic; Carry: out std_logic ; CntOut: out std_logic_vector(3 downto 0);End CNT10; 1分Architecture arch of CNT10 isSignal CntOutTmp: std_logic_vector(3 downto 0);BeginProcess(clk)Begin If (Clkevent and Clk = 1 ) then If (En = 1) then If (CntOutTmp = “1001”) then CntOutTmp = “0000” ; Carry = 1 ; else CntOutTmp = CntOutTmp+ 1 ; Carry = 0 ; End if ;End if ; End if ;End process ;CntOut = CntOutTmp ;End arch ; 3分-主程序library ieee;use ieee.std_logic_1164.all; 1分entity top is port (Clk, en: in std_logic; carry : out std_logic; Dout: out std_logic_vector(7 downto 0);End top; 1分Architecture arch of top isComponent CNT10 Port(clk: in std_logic; En : in std_logic; Carry : out std_logic; CntOut : out sdd_logic_vector(3 downto 0);End Component ; 2分Signal carryTmp: std_logic;BeginU1: CNT10 port map(Clk, En, carryTmp, Dout(3 downto 0); 2分U2:CNT10 port map(carryTmp, En, carry, Dout(7 downto 4); 2分End arch ; 2. 用VHDL设计一个模为90,具有异步复位、同步置数功能的8421BCD码计数器。输入输 出接口如图所示,nReset为异步复位信号,Load为用于同步置数的控制信号,Clk为时钟信号,LoadData7.0为计数器初始计数数据,Carry为进位输出产生的信号,CL和CH分别为计数器数据输出的低四位和高四位。(12分)library ieee;use ieee.std_logic_1164.all;use ieee.std_lo
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026届宁夏银川市一中高三化学第一学期期末教学质量检测试题含解析
- 加强跨部门协作提高校园整体运行效率与管理水平
- 一年级语文期末教学工作总结-小学工作总结
- 羽毛球培训基本知识课件
- 群集智能算法课件
- 打造卓越学习氛围
- 马家窑课件中的猫咪
- 网络配镜专业知识培训内容课件
- 疫情防控期间企业数字转型稳岗措施
- 第5单元 习作:围绕中心意思写 教学设计2024-2025学年六年级语文上册同步教学
- 4.《花之歌》教学设计-2024-2025学年统编版语文六年级上册
- 2025国投生物制造创新研究院有限公司招聘(31人)考试备考试题及答案解析
- 新学期,新征程+课件-2025-2026学年高二上学期开学第一课主题班会
- 2025新版企业员工劳动合同范本
- 保密观试题含答案2025年
- 医院信息化建设中长期规划(十五五规划2025年)
- 国家中医药管理局《中医药事业发展“十五五”规划》全文
- 公开课第一课素描基础入门课件
- 数据结构ppt课件完整版
- GB∕T 36527-2018 洁净室及相关受控环境 节能指南
- 应用语言学(全套课件197P)
评论
0/150
提交评论