EDA复习
- 格式:doc
- 大小:59.50 KB
- 文档页数:8
EDA复习 一 ·专业术语英文全称 1.EDA: electronic design automatic 2.CPLD: complex programmable logic device 3.FPGA: filed programmable gate array 4.ISP: in-system programmable 5.IP: intellectual property 6.VHDL: VHSIC hardware description language 7.SOC: System on a Chip 8.RTL: register transport level 9.ASIC: Application Specific Integrated Circuit 10.DSP: Digital Signal Processor
二·填空 1.CPLD与FPGA的三家厂商为Xilinx公司,Altera公司,Lattice公司 2.CPLD基于乘积项结构,FPGA基于查找表结构; 3.常见文件的后缀:.gdf .scf .vhd .tdf .pof .v 4.EDA的设计方法:自顶向下 5.VHDL结构体的三种描述方式:行为描述,数据流描述,结构描述 6.赋值符号:<=信号赋值不是立即发生,而是在进程结束时,即延迟 :=变量赋值是立即发生,不能加延时 三·简答题 1.如何打开IEEE的库,如何打开常见数据包,用VHDL语句描述。
LIBRARY IEEE;打开库,即LIBRARY 库名;
USE IEEE.STD_LOGIC_1164.all;即USE 库名. 程序包名. All;
2.VHDL结构体的三种描述方式的优缺点,适用范围。 描述方式 优点 缺点 适用场合 结构化描述:优:连接关系清晰,电路模块化清晰; 缺: 繁琐、复杂 适用场合:层次化设计 数据流描述:优:布尔函数定义明白 缺:逻辑方程难以获得 适用场合:小门数设计 行为描述: 优:逻辑关系描述清晰 缺:不一定能综合 适用场合:系统建模、复杂的电路
3.top down的设计方法,优势 首先从系统设计入手,在顶层进行功能方框图的划分和结构设计。在方框图一级进行仿真、纠错,并用硬件描述语言对高层次的系统行为进行描述,在系统一级进行验证。然后用综合优化工具 生成具体门电路的网表,其对应的物理实现级可以是印刷电路板或专用集成电路。 优势:由于设计的主要仿真和调试过程是在高层次上完成的,这不仅有利于早期发现结构设计上的错误,避免设计工作的浪费,而且也减少了逻辑功能仿真的工作量,提高了设计的一次成功率。
4.VHDL的7个逻辑运算符 AND与运算,OR或运算,NAND与非运算,NOR或非运算, XOR异或运算,XNOR异或非运算,NOT非运算
5.信号与变量作比较分析 信号:信号数据对象,代表电路内部线路,其在元件之间起互连作用, 没有方向性,可给它赋值,也可当作输入。 变量:变量是一个局部量,用于对中间数据的临时存储,并不一定代 表电路的某一硬件,没有物理意义。 对比:一、定义:Signal clk: std_logic; Variable data: std_logic_vector(7 downto 0); 二、赋值方式:clk <= ‘1’; (信号,非立即) data := “1010”; (变量,立即) 三、定义区域:信号:实体、结构体、程序包 变量:进程、子程序 四、适用范围:信号:实体、结构体、程序包 变量:定义了变量的进程、子程序的顺序语句 中。
6.比较bit型和标准逻辑类型
Bit型在std库的standard程序包中进行定义,取值:’0’,’1’ 表示低
电平,高电平。 标准逻辑类型在ieee库的std_logic_1164程序包中进行定义,该类型能比较全面地包括数字电路中信号的几种状态,比位bit信号对于数字逻辑电路的逻辑特性描述更完整、更真实。所以在VHDL的程序里,对于逻辑信号的定义,通常都是采用这个标准逻辑信号形式,不再使用BIT。
7.对可编程逻辑器件进行分类 1. 按可编程的部位分类: PROM可编程只读存储器包括EPROM、EEROM。 PLA可编程逻辑阵列 PAL可编程阵列逻辑 GAL通用阵列逻辑 2、按集成度(PLD)分类 可编程逻辑器件分为简单PLD(PROM,PLA,PAL,GAL)和复杂PLD(CPLD与FPGA)
8. VHDL的端口模式 IN : 输入,信号只能自端口到实体 OUT : 输出,信号只能自实体到端口 INOUT : 双向,信号既可输入又可输出 BUFFER: 缓冲,信号自实体输出,又有内部反馈
四·改错题 1.顺序语句直接放在结构体中,注意process..begin..........end process 对应出现。 2.信号与变量的位置:变量只能在进程和子程序中用而信号在实体、结构体、程序包使用。 3.注意结束的标号; 五·程序设计 1.简单与门与或门设计 或门:library ieee; use ieee.std_logic_1164.all; entity or22 is port( A,B:in std_logic; C:out std_logic ); end or22; architecture arch of or22 is begin C<=A or B; end arch;
与门:library ieee; use ieee.std_logic_1164.all; entity and21 is port( A,B:in std_logic; C:out std_logic ); end and21; architecture arch of and21 is begin C<=A and B; end arch;
2.同步清零 library ieee; use ieee.std_logic_1164.all; entity Dreg is port( clk,D,Clr:in std_logic; Q:out std_logic ); end Dreg; architecture arch of Dreg is begin process(clk,D,Clr) begin if(clk'event and clk='1') then //时钟信号 if(clr='0')then Q<='0'; else Q<=D; end if; end if; end process; end arch;
异步复位/置位:(上升沿) library ieee; use ieee.std_logic_1164.all; entity Exap is port( clk,reset,preset:in std_logic; a,b :in std_logic; Y1:out std_logic ); end Exap; architecture behav of Exap is Signal Y :std_logic; //信号变量 begin process(clk,reset,preset) begin If reset='1' then //复位 Y<=0; elsif preset='1'then Y<='1'; //置位 elsif rising_edge(clk) then Y= a AND b; end if; end process; Y1=Y; end behav;
3.组合逻辑电路设计 半加器: LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY f_adder is PORT( A,B:IN STD_LOGIC; C,S:OUT STD_LOGIC ); END ENTITY f_adder; ARCHITECTURE fh1 OF f_adder IS begin S<=(A or B)AND(A NAND B ); C<=NOT(A nand B); end ARCHITECTURE fh1
4.四种语句实现三位指令译码器 1.if语句 library ieee; use ieee.std_logic_1164.all; entity Mux4_11 is port ( A:in std_logic_vector(2 downto 0); Y:out std_logic; ); end Mux4_11; architecture arch of Mux4_11 is begin process (A) begin if (A="000") then Y <= 0; elsif (A="001") then Y <= 1; elsif (A="010") then Y <= 2; elsif (A="011") then Y <= 3; elsif (A="100") then Y <= 4; elsif (A="101") then Y <= 5; elsif (A="110") then Y <= 6; elsif (A="111") then Y <= 7; else NULL; end if; end process; end arch;
2.case语句 library ieee; use ieee.std_logic_1164.all; entity Mux4_12 is port (A:in std_logic_vector(2 downto 0); Y:out std_logic; ); end Mux4_12; architecture arch of Mux4_12 is begin