Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
[email protected] webmail now available. Want one? Go here.
Cannot use outlook/hotmail/live here to register as they blocking our mail servers. #microsoftdeez
Obey the Epel!

Paste

Pasted as VHDL by registered user Socrates ( 13 years ago )
if(avs_read='1') then
   case avs_address is
    when "00000" =>
     avs_readdata <= "0000000000000000000000000000000" & rtp_enable;
    when "00001" =>
     avs_readdata <= "0000000000000000000000" & fifo_rdusedw;
    when "00010" =>
     avs_readdata <= std_logic_vector(rtp_timestamp);
    when "00011" =>
     avs_readdata <= "0000000000000000" & IP_checksum;
    when "00100" =>
     avs_readdata <= "0000000000000000" & std_logic_vector(IP_identification);
    when others =>
     avs_readdata <= (others => '1');
   end case;
  else
   avs_readdata <= (others => '0');
  end if;

-----------------------------------------------------------------------------------------------------------------------
-- C code:
    printf("RTP enabled: %d\n",IORD_32DIRECT(TS_IP_BASE,0));
    printf("FIFO used words: %d\n",IORD_32DIRECT(TS_IP_BASE,4));
    printf("90kHz timestamp value: %d\n",IORD_32DIRECT(TS_IP_BASE,8));
    printf("IP checksum: 0xx\n",IORD_32DIRECT(TS_IP_BASE,16));
    printf("IP identification: %d\n",IORD_32DIRECT(TS_IP_BASE,17));
-----------------------------------------------------------------------------------------------------------------------

 

Revise this Paste

Your Name: Code Language: