eda技术及应用课后习题答案 下载本文

eda技术及应用课后习题答案

【篇一:eda技术实用教程(第四版)》习题答案】

ss=txt>1 习 题

1-1 eda技术与asic设计和fpga开发有什么关系?fpga在asic设计中有什么用途?p3~4

1-2 与软件描述语言相比,vhdl有什么特点? p6

l-3 什么是综合?有哪些类型?综合在电子设计自动化中的地位是什么? p5

1-4 在eda技术中,自顶向下的设计方法的重要意义是什么? p7~10

1-5 ip在eda技术的应用和发展中的意义是什么? p22~14

1-6 叙述eda的fpga/cpld设计流程,以及涉及的eda工具及其在整个流程中的作用。 (p11~13) 2 习 题

2-1 olmc(输出逻辑宏单元)有何功能?说明gal是怎样实现可编程组合电路与时序电路的。 p34~36

2-2 什么是基于乘积项的可编程逻辑结构? p33~34,40 什么是基于查找表的可编程逻辑结构? p40~41

2-3 fpga系列器件中的lab有何作用? p43~45 2-5 解释编程与配置这两个概念。 p58

2-6 请参阅相关资料,并回答问题:按本章给出的归类方式,将基于乘积项的可编程逻辑结构的pld器件归类为cpld;将基于查找表的可编程逻辑结构的pld器什归类为fpga,那么,apex系列属于什么类型pld器件? max ii系列又属于什么类型的pld器件?为什么? p54~56 3 习 题

3-1 画出与以下实体描述对应的原理图符号元件: entity buf3s is --实体1:三态缓冲器 port(input:in std_logic; --输入端 enable:in std_logic; --使能端 output:out std_logic); --输出端 end buf3s ;

entity mux21 is --实体2: 2选1多路选择器 port(in0, in1,sel: in std_logic;

output:out std_logic);

3-2 图3-16所示的是4选1多路选择器,试分别用if_then语句和case语句的表达方式写出此电路的vhdl程序,选择控制信号s1和

s0的数据类型为std_logic_vector;当s1=’0’,s0=’0’;s1=’0’,s0=’1’;s1=’1’,s0=’0’和s1=’1’,s0=’1’时,分别执行y=a、y=b、y=c、y=d。 图3-16 4选1多路选择器

--解1:用if_then语句实现4选1多路选择器 library ieee;

use ieee.std_logic_1164.all; entity mux41 is

port (a,b,c,d: in std_logic; s0:in std_logic; s1:in std_logic; y: out std_logic); end entity mux41;

architecture if_mux41 of mux41 is

signal s0s1 : std_logic_vector(1 downto 0);--定义标准逻辑位矢量数据 begin

s0s1=s1s0; --s1相并s0,即s1与s0并置操作 process(s0s1,a,b,c,d) begin

if s0s1 = 00 then y = a;

elsif s0s1 = 01 then y = b; elsif s0s1 = 10 then y = c; else y = d; end if;

end process;

end architecture if_mux41;

--解2:用case语句实现4选1多路选择器 library ieee;

use ieee.std_logic_1164.all; entity mux41 is

port (a,b,c,d: in std_logic; s0:in std_logic; s1:in std_logic; y:out std_logic); end entity mux41;

architecture case_mux41 of mux41 is

signal s0s1 : std_logic_vector(1 downto 0);--定义标准逻辑位矢量数据类型 begin

s0s1=s1s0;--s1相并s0,即s1与s0并置操作 process(s0s1,a,b,c,d) begin

case s0s1 is --类似于真值表的case语句 when 00 = y = a; when 01 = y = b; when 10 = y = c; when 11 = y = d; when others =null ; end case;

end process;

end architecture case_mux41;

3-3 图3-17所示的是双2选1多路选择器构成的电路muxk,对于其中mux21a,当s=’0’和s=’1’时,分别有y=‘a’和y=’b’。试在一个结构体中用两个进程来表达此电路,每个进程中用case语句描述一个2选1多路选择器mux21a。

图3-17 含2选1多路选择器的模块

--解:用case语句实现图4-18所示的是双2选1多路选择器构成的电路

library ieee;

use ieee.std_logic_1164.all; entity mux31 is

port(a1,a2,a3,s0,s1: in std_logic; outy:out std_logic); end entity mux31;

architecture case_mux31 of mux31 is signal y : std_logic; begin

u1: process(s0,a1,a2,a3) begin

case s0 is --类似于真值表的case语句 when 0 = y = a2; when 1 = y = a3; when others =null ; end case;

end process;

u2: process(s1,a1,a2,a3,y) begin

case s1 is --类似于真值表的case语句 when 0 = outy = a1; when 1 = outy = y; when others =null ; end case;

end process;

end architecture case_mux31;

3-4 将例3-20程序的计数器改为十二进制计数器,程序用例3-21的方式表述,并且将复位rst改为同步清零控制,加载信号load改为异步控制方式。讨论例3-20与例3-21的异同点。 --解:十二进制计数器vhdl程序设计。 library ieee;

use ieee.std_logic_1164.all;

use ieee.std_logic_unsigned.all; entity cnt12 is port(c

lk,rst,en,load : in std_logic;

data:in std_logic_vector(3 downto 0); --4位预置数 dout : out std_logic_vector(3 downto 0);--计数值输出 cout : out std_logic); --计数进位输出 end cnt12;

architecture behav of cnt12 is

signal q : std_logic_vector(3 downto 0); begin

reg: process(clk,rst,en,load,q) begin

if load=0 then q=data;--允许加载

elsif clkevent and clk=1 then --检测时钟上升沿 if rst=0 then q=(others =0); --计数器异步复位 else

if en=1 then --检测是否允许计数或加载(同步使能) if load=0 then q=data;--允许加载 else

if q12 then q=q+1; --允许计数,检测是否小于9 else q=(others=0); --大于等于9时,计数值清零 end if;