收藏 分享(赏)

汉字点阵显示VHDL源程序.doc

上传人:11xg27ws 文档编号:12267390 上传时间:2021-12-07 格式:DOC 页数:5 大小:36.50KB
下载 相关 举报
汉字点阵显示VHDL源程序.doc_第1页
第1页 / 共5页
汉字点阵显示VHDL源程序.doc_第2页
第2页 / 共5页
汉字点阵显示VHDL源程序.doc_第3页
第3页 / 共5页
汉字点阵显示VHDL源程序.doc_第4页
第4页 / 共5页
汉字点阵显示VHDL源程序.doc_第5页
第5页 / 共5页
亲,该文档总共5页,全部预览完了,如果喜欢就下载吧!
资源描述

1、汉字点阵显示 VHDL 源程序library ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity hzxs isport(clk1,clk2:in std_logic;rd:out std_logic;we: out std_logic;ledw:out std_logic_vector(2 downto 0);d:out std_logic_vector(0 downto 7);end hzxs;architecture hav of hzxs

2、 issignal count:std_logic_vector(0 to 2);signal a: std_logic_vector(3 downto 0);begin process(clk2)beginif clk2event and clk2=1 thencountdddddddddddddddddananananan=0;bn=0;cn=0;dn=0;end case;elsif clr=0 thenan=0;bn=0;cn=0;dn=0;end if;end process;end hav;2)计分器 JFQlibrary ieee;use ieee.std_logic_1164.

3、all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity jfq isport(en1:in std_logic;clk3:in std_logic;bs:out std_logic_vector(3 downto 0);ss:out std_logic_vector(3 downto 0); gs:out std_logic_vector(3 downto 0);add:in std_logic;dec:in std_logic);end jfq;architecture hav of jfq isbegi

4、nprocess(clk3,en1,add,dec)variable ssw:std_logic_vector(3 downto 0);variable bsw:std_logic_vector(3 downto 0);beginbsw:=“0001“;if clk3=1 and clk3event thenif en1=1 thenif add=1 thenif ssw=“1001“ thenbsw:=bsw+1;ssw:=“0000“;elsessw:=ssw+1;end if;elsif dec=1 thenif ssw=“1111“ thenbsw:=bsw-1;ssw:=“1001“

5、;elsessw:=ssw-1;end if;end if;end if;end if;ss=ssw;bs=bsw;gs=“0000“;end process;end hav;3) 选择器 XZQlibrary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity xzq isport( a1,b1:in std_logic;abw:in std_logic_vector(0 to 3);asw:in std_logic_vector(0 to 3

6、); agw:in std_logic_vector(0 to 3);bbw:in std_logic_vector(0 to 3);bsw:in std_logic_vector(0 to 3); bgw:in std_logic_vector(0 to 3);obw:out std_logic_vector(0 to 3);osw:out std_logic_vector(0 to 3); ogw:out std_logic_vector(0 to 3);end xzq;architecture hav of xzq isbeginprocess(a1,b1)beginif a1=1 an

7、d b1=0 thenobw=abw;osw=asw;ogw=agw;elsif a1=0 and b1=1 thenobw=bbw;osw=bsw;ogw=bgw;end if;end process;end hav;4)译码器 YMQlibrary ieee;use ieee.std_logic_1164.all;use ieee.std_logic_unsigned.all;use ieee.std_logic_arith.all;entity ymq isport( clk2:in std_logic;bw:in std_logic_vector(3 downto 0);sw:in s

8、td_logic_vector(3 downto 0); gw:in std_logic_vector(3 downto 0);y:out std_logic_vector(7 downto 0);ledw:out std_logic_vector(2 downto 0);end ymq;architecture hav of ymq issignal knum:std_logic_vector(3 downto 0);signal count:std_logic_vector(2 downto 0);beginprocess(clk2)beginif clk2event and clk2=1

9、 thenif count2 thencount=count+1;elsecount=“000“;end if;end if;end process;ledw=count;knum=gw when count=0 elsesw when count=1 elsebw when count=2 ;y=“00111111“ when knum=“0000“ else“00000110“ when knum=“0001“ else“01011011“ when knum=“0010“ else“01001111“ when knum=“0011“ else“01100110“ when knum=“0100“ else“01101101“ when knum=“0101“ else“01111101“ when knum=“0110“ else“00000111“ when knum=“0111“ else“01111111“ when knum=“1000“ else“01101111“ when knum=“1001“ else“00000000“ ;end hav;

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报