【文章內容簡介】
: integer range 0 to 78125000。signal c : integer range 0 to 250000000。signal z, con : integer range 0 to 63。signal f : std_logic_vector( 7 downto 0 )。signal amp, amp0, d : std_logic_vector(7 downto 0)。signal bcd0,bcd1,bcd2,bcd3 : integer range 0 to 9。signal bcd01,bcd11,bcd21,bcd31 : integer range 0 to 9。signal bcd00,bcd10,bcd20,bcd30 : integer range 0 to 9。signal y : integer range 0 to 9。signal addr, adrr : integer range 0 to 63。signal over : std_logic。beginqq=781250 when ss=1000 else 7812500 when ss=0100 else 78125000 when ss=0010 else 78125。qqq= 5000000 when ss=1000 else 50000000 when ss=0100 else 500000000 when ss=0010 else 500000。process(clk) variable count4 : integer range 0 to 6250000。variable count : integer range 0 to 78125000。variable count3 : integer range 0 to 250000000。variable count1 : integer range 0 to 12500000。variable count0 : integer range 0 to 3249999。variable ddd : std_logic_vector(9 downto 0)。variable dd0,dd1,dd2,dd3,dd4 : integer range 0 to 255。variable adr : integer range 0 to 63。begin if rising_edge(clk) then if posting=39。139。 then if count4=6249999 then count4:=0。 adr:=conv_integer(data3)*10+conv_integer(data2)。 if adr64 then if set=39。139。 then ram(adr)=conv_std_logic_vector((conv_integer(data1)*10+conv_integer(data0))*2,8)。 if adradrr then adrr=adr。 end if。 elsif clr=39。139。 then adrr=0。 for i in 0 to 63 loop ram(i)=(others=39。039。)。 end loop。 end if。 end if。 else count4:=count4+1。 end if。 else if set=39。139。 then tmp=conv_integer(data3)*1000+conv_integer(data2)*100+conv_integer(data1)*10+conv_integer(data0)。 coun=0。 b=0。 coun0=0。c=0。z=31。amp0=01111111。 amp=01111111。 addr=0。 else if tmp0 then if sw=39。039。 then if counqq then coun=coun+tmp。 b=b+1。 else if count=b then count:=0。 if f=63 then f=00000000。 if sss=00010 then con=0。 dd=00000000。 elsif sss=10000 then dd=d。 elsif sss=00100 then dd=f(5 downto 0)amp。00。 elsif sss=01000 then dd=(111111f(5 downto 0))amp。00。 elsif sss=00001 then if addradrr then dd=ram(addr)。 addr=addr+1。 elsif addr=adrr then dd=ram(adrr)。 addr=0。 end if。 else if sss(1)=39。139。 then if con=z then dd0:=conv_integer(amp0)。 con=con+1。 else con=con+1。 dd0:=0。 end if。 end if。 if sss(4)=39。139。 then dd1:=conv_integer(d)。 end if。 if sss(2)=39。139。 then dd2:=conv_integer(f(5 downto 0)amp。00)。 end if。 if sss(3)=39。139。 then if f31 then dd3:=conv_integer((111111f(5 downto 0))amp。00)。 else dd3:=conv_integer(f(5 downto 0)amp。00)。 end if。 end if。 if sss(0)=39。139。 then if addradrr then dd4:=conv_integer(ram(addr))。 addr=addr+1。 elsif addr=adrr then dd4:=conv_integer(ram(adrr))。 addr=0。 end if。 end if。 ddd:=conv_std_logic_vector((dd0+dd1+dd2+dd3+dd4),10)。 dd=ddd(9 downto 2)。 end if。 else f=f+1。 if sss=00010 then