【正文】
then s1=10000000。 elsif s= 010001 then s1=01000010。 elsif s= 001111 then s1=00011000。 elsif s= 001101 then s1=01000000。 elsif s= 001011 then s1=00010000。 elsif s= 001001 then s1=00000100。 elsif s= 000111 then s1=00000001。 elsif s= 000101 then s1=00000100。 elsif s= 000011 then s1=00010000。 elsif s= 000001 then s1=01000000。 ledd=s(1)。 end if。 then if s=100010 then s=s+1。event and cp=39。 ledd=s(1)。139。 賦值給 8 個(gè)小燈 begin vga=0001。 signal s :std_logic_vector(5 downto 0)。 20MHZ clock signal end cdxs。 控制小燈亮暗 cp ,clr : in std_logic。 entity cdxs is port(led : out std_logic_vector(7 downto 0)。 use 。 5 四、 功能模塊 LED(狀態(tài)機(jī) )模塊 圖( 3) LED(狀態(tài)機(jī))模塊 LED 模塊由兩個(gè)主控進(jìn)程控制, 時(shí)序進(jìn)程和輔助進(jìn)程組成,各進(jìn)程分工明確。 LED 顯示: 彩 燈