欢迎来到天天文库
浏览记录
ID:789928
大小:115.53 KB
页数:22页
时间:2017-09-05
《16点阵字模显示全部程序》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYCOUNT32ISPORT(CLK1:INSTD_LOGIC;QOUT1:OUTSTD_LOGIC_VECTOR(4DOWNTO0));ENDENTITYCOUNT32;ARCHITECTUREBEHVOFCOUNT32ISSIGNALCQI:STD_LOGIC_VECTOR(4DOWNTO0);BEGINPROCESS(CLK1)BEGINIF(CLK1'EVENTANDCLK1='1')THENCQI<=CQI
2、+1;ENDIF;QOUT1<=CQI;ENDPROCESS;ENDARCHITECTUREBEHV;LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYCOUNT16ISPORT(CLK:INSTD_LOGIC;QOUT:OUTSTD_LOGIC_VECTOR(3DOWNTO0));ENDENTITYCOUNT16;ARCHITECTUREBEHVOFCOUNT16ISSIGNALCQI:STD_LOGIC_VECTOR(3DOWNTO0);BEGINPROCES
3、S(CLK)BEGINIF(CLK'EVENTANDCLK='1')THENCQI<=CQI+1;ENDIF;QOUT<=CQI;ENDPROCESS;ENDARCHITECTUREBEHV;LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;USEIEEE.STD_LOGIC_UNSIGNED.ALL;ENTITYROWCONISPORT(DATAIN:INSTD_LOGIC_VECTOR(3DOWNTO0);ROW:OUTSTD_LOGIC_VECTOR(15DOWNTO0));ENDENTITYROWCON;ARCHITECTURE
4、BEHVOFROWCONISBEGINPROCESS(DATAIN)BEGINCASEDATAINISWHEN"0000"=>ROW<="1000000000000000";WHEN"0001"=>ROW<="0100000000000000";WHEN"0010"=>ROW<="0010000000000000";WHEN"0011"=>ROW<="0001000000000000";WHEN"0100"=>ROW<="0000100000000000";WHEN"0101"=>ROW<="0000010000000000";WHEN"0110"=>ROW<="
5、0000001000000000";WHEN"0111"=>ROW<="0000000100000000";WHEN"1000"=>ROW<="0000000010000000";WHEN"1001"=>ROW<="0000000001000000";WHEN"1010"=>ROW<="0000000000100000";WHEN"1011"=>ROW<="0000000000010000";WHEN"1100"=>ROW<="0000000000001000";WHEN"1101"=>ROW<="0000000000000100";WHEN"1110"=>ROW
6、<="0000000000000010";WHEN"1111"=>ROW<="0000000000000001";WHENOTHERS=>ROW<="0000000000000000";ENDCASE;ENDPROCESS;ENDARCHITECTUREBEHV;LIBRARYIEEE;USEIEEE.STD_LOGIC_1164.ALL;ENTITYXIANSHIISPORT(WEI:INSTD_LOGIC_VECTOR(3downto0);SHI:INSTD_LOGIC_VECTOR(4downto0);Q:OUTSTD_LOGIC_VECTOR(15down
7、to0));ENDXIANSHI;ARCHITECTUREBEHV2OFXIANSHIISBEGINPROCESS(SHI,WEI)VARIABLEb:STD_LOGIC_VECTOR(15downto0);BEGINCASESHIisWhen"00000"=>CASEWEIiswhen"0000"=>b:="0100000000000000";when"0001"=>b:="0011000000001000";when"0010"=>b:="0001011111111100";when"0011"=>b:="0000000001000000";when"0100
8、"=>b:
此文档下载收益归作者所有