【文章內(nèi)容簡(jiǎn)介】
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。when1010= case hs iswhen0000=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。when1011= case hs is when0000=qo=0000000000000000。when0001=qo=1111110001100000。when0010=qo=1111110000110000。when0011=qo=1100111111111111。when0100=qo=1101111111111111。when0101=qo=1111001100000011。when0110=qo=1101101100000110。when0111=qo=1100110011111000。when1000=qo=1100011011111000。when1001=qo=1101110000000000。when1010=qo=1100001111111110。when1011=qo=1100001111111110。when1100=qo=1100000011011000。when1101=qo=1100000110011000。when1110=qo=1100001100011011。when1111=qo=1100011000011111。when others=null。end case。when1100= case hs iswhen0000=qo=0000000000000000。when0001=qo=0000000000110000。when0010=qo=0000000001100000。when0011=qo=1111111001111111。when0100=qo=1000011011000011。when0101=qo=1100011110110110。when0110=qo=0110110000110000。when0111=qo=0011110000110000。when1000=qo=0001110000110000。when1001=qo=0001111000111000。when1010=qo=0011001100111000。when1011=qo=0011000001101100。when1100=qo=0110000011000110。when1101=qo=1100001110000011。when1110=qo=0001111000000000。when1111=qo=0000000000000000。when others=null。end case。when1101= case hs is when0000=qo=0000000000000000。when0001=qo=0110000111000000。when0010=qo=0011001100111111。when0011=qo=0000011000110011。when0100=qo=1111011000110011。when0101=qo=1111011000110011。when0110=qo=0011011000110011。when0111=qo=0011011011110011。when1000=qo=0011011110110111。when1001=qo=0011000000110000。when1010=qo=0011000000110000。when1011=qo=0011000000110000。when1100=qo=0011110000000000。when1101=qo=0110111111111111。when1110=qo=1100111111111111。when1111=qo=0000000000000000。when others=null。end case。when1110= case hs iswhen0000=qo=0000011001100000。when0001=qo=0000110011111111。when0010=qo=0001100111111111。when0011=qo=0011101100110011。when0100=qo=0111100000110000。when0101=qo=1101100110110110。when0110=qo=0001100110110011。when0111=qo=0001101100110000。when1000=qo=0001100110110000。when1001=qo=0001100011110000。when1010=qo=0000000000000000。when1011=qo=0110110110011011。when1100=qo=0110110011011011。when1101=qo=1100011111111000。when1110=qo=1100011111111000。when1111=qo=0000000000000000。when others=null。end case。when others=null。end case。end process。end 。亮燈顯示控制模塊仿真圖三、暗燈顯示 暗燈控制模塊設(shè)計(jì)為使?jié)h字不斷地循環(huán)顯示,并且使每個(gè)字之間有停頓,就需要在中間加一定的延時(shí)和循環(huán)環(huán)節(jié)。當(dāng)計(jì)數(shù)滿4個(gè)脈沖時(shí)t自動(dòng)清零,每個(gè)漢字顯示4個(gè)脈沖的時(shí)間;一共有15個(gè)漢字,當(dāng)tmp=1110時(shí),tmp自動(dòng)清零,進(jìn)入下一個(gè)循環(huán),不停的循環(huán)顯示每個(gè)漢字。圖 時(shí)序控制模塊其實(shí)現(xiàn)程序?yàn)椋簂ibrary ieee。use 。use 。entity LICHAO01 is port(clk:in std_logic。 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。 end if 。 q=tmp。 end process。end 。 時(shí)序控制模塊仿真圖 掃描控制模塊設(shè)計(jì)此模塊用來實(shí)現(xiàn)列掃描控制,每掃描完16列,tmp自動(dòng)清零,這樣就提供了一個(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 tmp:=0000。 elsetmp:=tmp+1。 end if。end if。so=tmp1。end process。end 。此模塊用來實(shí)現(xiàn)顯示出相應(yīng)的漢字。gs控制漢字的個(gè)數(shù),hs控制掃描的行數(shù)。使對(duì)應(yīng)列選擇信號(hào)輸出每一列對(duì)應(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 iswhen0000=qo=not0000000000000000。when0001=qo= not 0110000011111100。when0010=qo= not 0011000011111100。when0011=qo= not 0001100000110000。when010