【正文】
q:out std_logic_vector(3 downto 0))。end LICHAO01。architecture one of LICHAO01 is beginprocess(clk)variable t:integer。variable tmp:std_logic_vector(3 downto 0)。begin if clk39。event and clk=39。139。then if t4 then t:=t+1。 else t:=0。 if tmp=1110then tmp:=0000。 else tmp:=tmp+1。 end if。 end if。6 end if 。 q=tmp。 end process。end 。 時(shí)序控制模塊仿真圖 掃描控制模塊設(shè)計(jì)此模塊用來實(shí)現(xiàn)列掃描控制,每掃描完 16 列,tmp 自動清零,這樣就提供了一個(gè)列循環(huán)掃描的功能,這樣就可以循環(huán)的顯示各個(gè)漢字了。圖 掃描控制模塊其實(shí)現(xiàn)程序?yàn)椋簂ibrary ieee。use 。use 。entity LICHAO02 is port (clk:in std_logic。 so:out std_logic_vector(3 downto 0))。 end LICHAO02。architecture one of LICHAO02 is beginprocess(clk)variable tmp:std_logic_vector(3 downto 0)。beginif clk39。event and clk=39。139。then if tmp=1111then 7tmp:=0000。 elsetmp:=tmp+1。 end if。end if。so=tmp1。end process。end 。圖 掃描控制模塊仿真圖 顯示控制模塊設(shè)計(jì)此模塊用來實(shí)現(xiàn)顯示出相應(yīng)的漢字。gs 控制漢字的個(gè)數(shù), hs 控制掃描的行數(shù)。使對應(yīng)列選擇信號輸出每一列對應(yīng)的數(shù)據(jù),點(diǎn)量相應(yīng)的燈。圖 顯示控制模塊其實(shí)現(xiàn)程序?yàn)椋簂ibrary ieee。use 。entity LICHAO03 is port(hs:in std_logic_vector(3 downto 0)。 gs:in std_logic_vector(3 downto 0)。 qo: out std_logic_vector(15 downto 0))。 end LICHAO03。architecture one of LICHAO03 is begin process(hs,gs)begincase gs iswhen0000=case hs is8when0000=qo=0000000000000000。when0001=qo=0110000011111100。when0010=qo=0011000011111100。when0011=qo=0001100000110000。when0100=qo=0000110000110000。when0101=qo=0110000000110000。when0110=qo=0011000000110000。when0111=qo=0001100000110000。when1000=qo=0000110000110000。when1001=qo=0000000000110000。when1010=qo=0000011000110000。when1011=qo=0000110000110000。when1100=qo=0001100000110000。when1101=qo=0011000111111110。when1110=qo=0110000111111110。when1111=qo=0000000000000000。when others=null。end case。when0001= case hs iswhen0000=qo=0000000000000000。when0001=qo=0011111111111100。when0010=qo=0011111111111100。when0011=qo=0000001101100000。when0100=qo=0000001101100000。when0101=qo=0000001101100000。when0110=qo=0111111111111110。when0111=qo=0111111111111110。when1000=qo=0110001101100110。when1001=qo=0110001101100110。when1010=qo=0110011001111110。when1011=qo=0110110000000110。when1100=qo=0111100000000110。when1101=qo=0111111111111110。when1110=qo=0111111111111110。when1111=qo=0000000000000000。when others=null。end case。when0010= case hs is when0000=qo=0000000000000000。when0001=qo=0000000111111110。when0010=qo=1111110111111110。when0011=qo=1111110110110110。9when0100=qo=0011000111111110。when0101=qo=0011000111111110。when0110=qo=0000000110110110。when0111=qo=1111110111111110。when1000=qo=1111110111111110。when1001=qo=0011000000110000。when1010=qo=0011000111111110。when1011=qo=0011000111111110。when1100=qo=0011000000110000。when1101=qo=1111110000110000。when1110=qo=1111111111111111。when1111=qo=0000001111111111。when others=null。end case。when0011= case hs iswhen0000=qo=0000000000000000。when0001=qo=0011111111111100。when0010=qo=0011111111111100。when0011=qo=0000000110000000。when0100=qo=0000000110000000。when0101=qo=0000000110000000。when0110=qo=0000000110000000。when0111=qo=0000000110000000。when1000=qo=0000000110000000。when1001=qo=0000000110000000。when1010=qo=0000000110000000。when1011=qo=0000000110000000。when1100=qo=0000000110000000。when1101=qo=0111111111111110。when1110=qo=0111111111111110。when1111=qo=0000000000000000。when others=null。end case。when0100= case hs iswhen0000=qo=0000000000000000。when0001=qo=0000000110000000。when0010=qo=0000000110000000。when0011=qo=0000000110000000。when0100=qo=0111111111111110。when0101=qo=0111111111111110。when0110=qo=0000000110000000。when0111=qo=0000000110000000。10when1000=qo=0000001111000000。when1001=qo=0000011001100000。when1010=qo=0000110000110000。when1011=qo=0001100000011000。when1100=qo=0011000000001100。when1101=qo=0110000000000110。when1110=qo=1100000000000011。when1111=qo=0000000000000000。when others=null。end case。when0101= case hs is when0000=qo=0000000000000000。when0001=qo=0110011000000110。when0010=qo=0011001100001100。when0011=qo=1111111111111111。when0100=qo=1111111111111111。when0101=qo=1100000000000011。when0110=qo=1101111111110110。when0111=qo=0001111111110000。when1000=qo=0000000001100000。when1001=qo=0000000011000000。when1010=qo=0111111111111110。when1011=qo=0111111111111110。when1100=qo=0000000110000000。when1101=qo=0000000110000000。when1110=qo=0000011110000000。when1111=qo=0000011110000000。when others=null。end case。when0110=case hs iswhen0000=qo=0000000000000000。when0001=qo=0000001100000000。when0010=qo=0000000110000000。when0011=qo=0001111111111110。when0100=qo=0001111111111110。when0101=qo=0001100000000000。when0110=qo=0001100000000000。when0111=qo=0001100011000011。when1000=qo=0001101101100011。when1001=qo=0001101101100110。when1010=qo=0011000110110110。when1011=qo=0011000110001100。11when1100=qo=0110000000000000。when1101=qo=0110111111111111。when1110=qo=1100111111111111。when1111=qo=0000000000000000。when others=null。end case。when0111= case hs iswhen0000=qo=0000000000000000。when0001=qo=0001111111111111。when0010=qo=0001111111111111。when0011=