Skip to content
Snippets Groups Projects
Commit 1afb1ccd authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Add CEP nof longword constants for payload and packet.

parent 13bd3a4c
Branches
No related tags found
1 merge request!269Some clean up of sdp_station.vhd and fifo fill eop usage
......@@ -115,9 +115,11 @@ PACKAGE sdp_pkg is
CONSTANT c_sdp_N_clk_per_sync : NATURAL := c_sdp_f_adc_MHz*10**6; -- Default 200M clock cycles per second
CONSTANT c_sdp_N_clk_sync_timeout : NATURAL := c_sdp_f_adc_MHz*10**6 + c_sdp_f_adc_MHz*10**5; -- 10% margin.
CONSTANT c_sdp_N_sync_jesd : NATURAL := c_sdp_S_pn * c_sdp_N_sync_rcu / c_sdp_S_rcu; -- = 4, nof JESD IP sync outputs per PN
CONSTANT c_sdp_f_sub_Hz : REAL := REAL(c_sdp_f_adc_MHz * 10**6) / REAL(c_sdp_N_fft);
CONSTANT c_sdp_f_sub_Hz : REAL := REAL(c_sdp_f_adc_MHz * 10**6) / REAL(c_sdp_N_fft); -- = 195312.5
CONSTANT c_sdp_N_int : NATURAL := c_sdp_f_adc_MHz * 10**6; -- nof ADC sample periods per 1 s integration interval
CONSTANT c_sdp_N_int_sub : REAL := c_sdp_f_sub_Hz; -- nof subband sample periods per 1 s integration interval
CONSTANT c_sdp_N_int_sub_lo : NATURAL := NATURAL(FLOOR(c_sdp_N_int_sub)); -- = 195312
CONSTANT c_sdp_N_int_sub_hi : NATURAL := NATURAL(CEIL(c_sdp_N_int_sub)); -- = 195313
CONSTANT c_sdp_A_pn : NATURAL := c_sdp_S_pn / c_sdp_N_pol; -- = 6 dual pol antenna per PN, is 6 signal input pairs
CONSTANT c_sdp_P_pfb : NATURAL := c_sdp_S_pn / c_sdp_Q_fft; -- = 6 PFB units, for 6 signal input pairs
CONSTANT c_sdp_T_adc : TIME := (10**6 / c_sdp_f_adc_MHz) * 1 ps; -- = 5 ns @ 200MHz
......@@ -308,8 +310,9 @@ PACKAGE sdp_pkg is
END RECORD;
-----------------------------------------------------------------------------
-- Beamlet output via 10GbE to CEP (= central processor)
-- Beamlet output via 10GbE to CEP (= central processor, see ICD STAT-CEP)
-----------------------------------------------------------------------------
CONSTANT c_sdp_cep_version_id : NATURAL := 5;
CONSTANT c_sdp_marker_beamlets : NATURAL := 98; -- = x"62" = 'b'
CONSTANT c_sdp_cep_eth_dst_mac : STD_LOGIC_VECTOR(47 DOWNTO 0) := x"00074306C700"; -- 00074306C700 = DOP36-eth0
......@@ -321,13 +324,16 @@ PACKAGE sdp_pkg is
CONSTANT c_sdp_cep_udp_dst_port : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5000, 16); -- 0x1380 = 5000
CONSTANT c_sdp_cep_udp_src_port_15_8 : STD_LOGIC_VECTOR( 7 DOWNTO 0) := x"D0"; -- 15:8, 7:0 = gn_id (= ID[7:0] = backplane[5:0] & node[1:0])
CONSTANT c_sdp_cep_app_header_len : NATURAL := 32;
CONSTANT c_sdp_cep_app_header_len : NATURAL := 32; -- octets, see ICD STAT-CEP
CONSTANT c_sdp_cep_header_len : NATURAL := 14 + 20 + 8 + c_sdp_cep_app_header_len; -- = eth + ip + udp + app = 74 octets, see ICD STAT-CEP
CONSTANT c_sdp_cep_version_id : NATURAL := 5;
CONSTANT c_sdp_cep_nof_blocks_per_packet : NATURAL := 4;
CONSTANT c_sdp_cep_nof_blocks_per_packet : NATURAL := 4; -- number of time blocks of beamlets per output packet
CONSTANT c_sdp_cep_nof_beamlets_per_block : NATURAL := c_sdp_S_sub_bf; -- number of dual pol beamlets (c_sdp_N_pol_bf = 2)
CONSTANT c_sdp_cep_nof_beamlets_per_longword : NATURAL := 2; -- 2 dual pol, complex, 8bit beamlets fit in 1 64bit longword
CONSTANT c_sdp_cep_payload_nof_longwords : NATURAL := c_sdp_cep_nof_blocks_per_packet * c_sdp_cep_nof_beamlets_per_block / c_sdp_cep_nof_beamlets_per_longword; -- = 976
CONSTANT c_sdp_cep_packet_nof_longwords : NATURAL := ceil_div(c_sdp_cep_header_len, c_longword_sz) + c_sdp_cep_payload_nof_longwords; -- without tail CRC, the CRC is applied by 10GbE MAC
CONSTANT c_sdp_cep_nof_hdr_fields : NATURAL := 3+12+4+18+1; -- 592b; 9.25 64b words
CONSTANT c_sdp_cep_nof_hdr_fields : NATURAL := 3+12+4+18+1; -- c_sdp_cep_header_len / c_longword_sz = 74 / 8 = 9.25 64b words = 592b
CONSTANT c_sdp_cep_hdr_field_sel : STD_LOGIC_VECTOR(c_sdp_cep_nof_hdr_fields-1 DOWNTO 0) := "101"&"111111111001"&"0111"&"1100"&"00000010"&"000110"&"0"; -- 0=data path, 1=MM controlled TODO
--CONSTANT c_sdp_cep_hdr_field_sel : STD_LOGIC_VECTOR(c_sdp_cep_nof_hdr_fields-1 DOWNTO 0) := "100"&"000000010001"&"0100"&"0100"&"00000000"&"101000"&"0"; -- 0=data path, 1=MM controlled TODO
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment