EDA技术及应用教程 教学课件 作者 赵全利EDA 实例源程序代码.doc

EDA技术及应用教程 教学课件 作者 赵全利EDA 实例源程序代码.doc

ID:50775120

大小:637.50 KB

页数:62页

时间: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、第4章用VHDL程序实现常用逻辑电路4.1组合逻辑电路设计4.1.1基本逻辑门libraryieee;useiee.std_logic_1164.all;entityjbmisport(a,b:inbit;f1,f2,f3,f4,f5,f:outbit);endjbm;architectureaofjbmisbeginf1<=aandb;--构成与门f2<=aorb;--构成或门f<=nota;--构成非门f3<=anandb;--构成与非门f4<=anorb;--构成异或门f5<=not(axorb);--构成异或非门即同门end;4

2、.1.2三态门libraryieee;useieee.std_logic_1164.all;entitytri_sisport(enable:instd_logic;datain:instd_logic_vector(7downto0);dataout:outstd_logic_vector(7downto0));endtri_s;architecturebhvoftri_sisbeginprocess(enable,datain)beginifenable='1'thendataout<=datain;elsedataout<="ZZ

3、ZZZZZZ";endif;endprocess;endbhv;4.1.33-8译码器libraryieee;useieee.std_logic_1164.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,g

4、1,g2a,g2b)beginif(g1='1'andg2a='0'andg2b='0')thencasedziswhen"000"=>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<

5、="XXXXXXXX";endcase;elsey<="11111111";endif;endprocess;4.1.4优先编码器libraryieee;useieee.std_logic_1164.allentitycoderisport(din:instd_logic_vector(0to7);output:outstd_logic_vector(0to2));endcoder;architecturebehaveofcoderissignalsint:std_logic_vevtor(4downto0);beginprocess(

6、din)beginif(din(7)='0')thenoutput<="000";elsif(din(6)='0')thenoutput<="100";elsif(din(5)='0')thenoutput<="010";elsif(din(4)='0')thenoutput<="110";elsif(din(3)='0')thenoutput<="001";elsif(din(2)='0')thenoutput<="101";elsif(din(1)='0')thenoutput<="011";elseoutput<="111";en

7、dif;endprocess;endbehav;4.1.57段码译码器libraryieee;useieee.std_logic_1164.allentitydecl7sisport(a:instd_logic_vector(3downto0);led7s:outstd_logic_vector(6downto0));enddecl7s;architecturebehaveofdecl7sisbeginprocess(a)begincaseaiswhen"0000"=>led7s<="0111111";when"0001"=>led7s

8、<="0000110";when"0010"=>led7s<="1011011";when"0011"=>led7s<="1001111";when"0100"=>led7s<="1100110";when

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

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

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