【正文】
architecture a of ck issignal ter:std_logic_vector(7 downto 0)。begin process(clk) begin if clk39。event and clk=39。139。then ter=ter+1。 end if。 end process。 cp=ter(3)。end a。 (2)時鐘脈沖的生成符號CK的功能就是起激勵信號的作用,它給左右兩燈的控制模塊一序列脈沖。(3)時鐘脈沖的功能仿真圖 (1)多路選擇器的VHDL語言 library ieee。use 。entity ctrl is port(left,right:in std_logic。 lfen,rten,lr:out std_logic)。end ctrl。architecture a of ctrl isbegin process(left,right) variable tmp:std_logic_vector(1 downto 0)。 begin tmp:=leftamp。right。 case tmp is when00=lfen=39。039。 rten=39。039。 lr=39。039。 when01=lfen=39。039。 rten=39。139。 lr=39。039。 when10=lfen=39。139。 rten=39。039。 lr=39。039。 when others=lfen=39。139。 rten=39。139。 lr=39。139。 end case。 end process。end a。(2)多路選擇器的生成符號 CTRL的