【文章內(nèi)容簡介】
sha=39。139。只有左右都是1,才是剎車信號 end case。 end process。左邊三個燈process(clk,en,sha,zuo,) variable tmp:std_logic_vector(2 downto 0)。 beginif sha=39。139。 then tmp:=111。若輸入剎車信號,三個燈全亮 elsif clk39。event and clk=39。139。 then if en=39。139。 then if tmp =000 then tmp:=111。 else tmp:=000。若輸入緊急(en)信號,燈雙閃 end if。elsif zuo=39。039。and you =39。039。 then tmp:=000。若左右輸入信號為0時,燈全不亮 elsif zuo=39。139。 then if tmp=000 then tmp:=001。若輸入左轉信號,三個燈順序點亮