EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc

EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc

ID:50322126

大小:1.22 MB

页数:82页

时间:2020-03-08

EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc_第1页
EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc_第2页
EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc_第3页
EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc_第4页
EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc_第5页
资源描述:

《EDA技术及应用教程 教学课件 作者 赵全利EDA 部分习题参考答案.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、部分习题参考答案3.6习题33.合法标识符:my_counter、Decoder_1、data__BUS、Sig_N非法标识符:2FFT、Sig_#N、Not-Ack、ALL_RST_、return、entity7.参考程序为:entityNOR2aisPort(A,B:instd_logic;C:outstd_logic);endNOR2a;15.Q=”00100100”4.4习题41.用PROCESS语句和CASE-WHEN语句,参考程序如下:libraryieee;useieee.std_logic_1164.

2、all;entitydecoder3_8isport(a,b,c,g1,g2a,g2b:instd_logic;y:outstd_logic_vector(7downto0));enddecoder3_8;architectureaofdecoder3_8issignaldz:std_logic_vector(2downto0);begindz<=c&b&a;process(dz,g1,g2a,g2b)beginif(g1='1'andg2a='0'andg2b='0')thencasedziswhen"000"=>

3、y<="11111110";when"001"=>y<="11111101";when"010"=>y<="11111011";when"011"=>y<="11110111";when"100"=>y<="11101111";when"101"=>y<="11011111";when"110"=>y<="10111111";when"111"=>y<="01111111";whenothers=>y<="XXXXXXXX";endcase;else127y<="11111111";endif;endprocess;

4、end;用WHEN-ELSE语句,参考程序如下:……architecturea1ofdecoder3_8issignaldz:std_logic_vector(2downto0);begindz<=c&b&a;withdzselectdout<="11111110"when"000","11111101"when"001","11111011"when"010","11110111"when"011","11101111"when"100","11011111"when"101","10111111"when"110

5、","01111111"when"111","XXXXXXXX"whenothers;enda1;2.参考程序如下:entityv74x148isport(s:instd_logic;i:instd_logic_vector(7downto0);y:outstd_logic_vector(2downto0);yex,ys:outstd_logic);endv74x148;architecturebehaveofv74x148isbeginprocess(s,i)variablej,k:integerrange7dow

6、nto0;variabledone:bit;begindone:=‘0’;ys<=’0’;ifs=‘1’thenyex<=’1’;ys<=‘1’;y<=“111”;elseforjin7downto0loopifdone=‘1’thennull;elsifi(j)=‘0’thendone:=’1’;yex<=’0’;ys<=’1’;k<=7-j;y<=conv_std_logic_vector(k,2downto0);endif;endloop;endif;endprocess;endbehave;1273.参考程序

7、如下:add4的vhdl代码:LIBRARYieee;USEieee.std_logic_1164.ALL;useieee.std_logic_arith.all;useieee.std_logic_unsigned.all;ENTITYadd4ISPORT(  a   :INstd_logic_vector(3DOWNTO0);  b   :INstd_logic_vector(3DOWNTO0);  cin:INstd_logic;  sum:OUTstd_logic_vector(3DOWNTO0);  g,p

8、:OUTstd_logic);ENDadd4;ARCHITECTUREbehaveOFadd4ISsignalc1,c2,c3,temp0,temp1,temp2,temp3,temp4,temp5:STD_LOGIC;BEGINsum(0)<=a(0)xorb(0)xorcin;sum(1)<=a(1)xorb(1)xorc1;sum(2)<

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。