【正文】
ogic。功能:出租車計價器。use 。 等待時間 end taxi。 公里計數(shù)器signal m1:std_logic_vector(2 downto 0)。 then q_15=0。f=39。 end if。 if q_1=239 then q_1=0。139。 end if。 then w=0。k0=0000。 else m0=m0+1。 else w=w+1。 else k1=k1+1。039。cha2=c2。m1。c1=0000。 if c3=1001 then c3=0000。 end if。出租計價器程序仿真圖3。 程序仿真圖注:1. 仿真圖中秒跟分的關(guān)系為3進制,即w為2時就歸0; 2. 出租車總行駛5公里,等待累計時間為4分鐘。 end if。139。process(f,start)begin if start=39。km0=k0。en0=39。 if k1amp。 elsif fin=39。139。 此IF語句完成等待計時 if m0=1001 then m0=0000。039。event and f_1=39。 then f=f_16。f_1=39。 此IF語句得到頻率為16Hz的信號 else q_16=q_16+1。139。f_16=39。event and clk_240=39