Skip to content
Snippets Groups Projects
Commit bf122662 authored by Reinier van der Walle's avatar Reinier van der Walle
Browse files

Merge branch 'L2SDP-937' into 'master'

Resolve L2SDP-937

Closes L2SDP-937

See merge request desp/hdl!321
parents 61c0a510 5b2ad100
No related branches found
No related tags found
1 merge request!321Resolve L2SDP-937
Pipeline #47120 passed
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
-- index signals to have a more compact view of the relevant indices. -- index signals to have a more compact view of the relevant indices.
-- . If c_subband_phase = 0.0 then beamlet_arr2_re entries are 0. -- . If c_subband_phase = 0.0 then beamlet_arr2_re entries are 0.
-- . manually add top level generics/constants to wave window. -- . manually add top level generics/constants to wave window.
-- Takes about 1h.
-- --
-- Remark: TB is based on tb_lofar2_unb2c_sdp_station_bf. -- Remark: TB is based on tb_lofar2_unb2c_sdp_station_bf.
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
...@@ -443,37 +444,37 @@ BEGIN ...@@ -443,37 +444,37 @@ BEGIN
-- . First word contains 1 header part of two bytes and 3 beamlets [0:2]. -- . First word contains 1 header part of two bytes and 3 beamlets [0:2].
-- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol -- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol
-- and complex beamlets per packet, so 2 dual pol beamlets/64b data word. -- and complex beamlets per packet, so 2 dual pol beamlets/64b data word.
-- . Beamlets array is stored big endian in the data, so X index 0 first in -- . Beamlets array is stored big endian in the data, so X.real index 0 first
-- MSByte of tr_10GbE_src_out.data. -- in MSByte of tr_10GbE_src_out.data.
rx_beamlet_blk <= blk; rx_beamlet_blk <= blk;
rx_beamlet_cnt <= 0; rx_beamlet_cnt <= 0;
rx_beamlet_valid <= '1'; rx_beamlet_valid <= '1';
rx_beamlet_sop <= '1'; rx_beamlet_sop <= '1';
beamlet_arr2_im(v_beamlet_index_offset + 0) <= tr_10GbE_src_out.data(47 DOWNTO 40); beamlet_arr2_re(v_beamlet_index_offset + 0) <= tr_10GbE_src_out.data(47 DOWNTO 40);
beamlet_arr2_re(v_beamlet_index_offset + 0) <= tr_10GbE_src_out.data(39 DOWNTO 32); beamlet_arr2_im(v_beamlet_index_offset + 0) <= tr_10GbE_src_out.data(39 DOWNTO 32);
beamlet_arr2_im(v_beamlet_index_offset + 1) <= tr_10GbE_src_out.data(31 DOWNTO 24); beamlet_arr2_re(v_beamlet_index_offset + 1) <= tr_10GbE_src_out.data(31 DOWNTO 24);
beamlet_arr2_re(v_beamlet_index_offset + 1) <= tr_10GbE_src_out.data(23 DOWNTO 16); beamlet_arr2_im(v_beamlet_index_offset + 1) <= tr_10GbE_src_out.data(23 DOWNTO 16);
beamlet_arr2_im(v_beamlet_index_offset + 2) <= tr_10GbE_src_out.data(15 DOWNTO 8); beamlet_arr2_re(v_beamlet_index_offset + 2) <= tr_10GbE_src_out.data(15 DOWNTO 8);
beamlet_arr2_re(v_beamlet_index_offset + 2) <= tr_10GbE_src_out.data(7 DOWNTO 0); beamlet_arr2_im(v_beamlet_index_offset + 2) <= tr_10GbE_src_out.data(7 DOWNTO 0);
proc_common_wait_until_clk_and_high(ext_clk, tr_10GbE_src_out.valid); proc_common_wait_until_clk_and_high(ext_clk, tr_10GbE_src_out.valid);
rx_beamlet_cnt <= rx_beamlet_cnt + 1; rx_beamlet_cnt <= rx_beamlet_cnt + 1;
rx_beamlet_sop <= '0'; rx_beamlet_sop <= '0';
-- . get beamlets during block, there are 4 complex beamlets per 64b word -- . get beamlets during block, there are 4 complex beamlets per 64b word
FOR I IN 1 TO (c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block/4)-1 LOOP FOR I IN 1 TO (c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block/4)-1 LOOP
beamlet_arr2_im(v_beamlet_index_offset + I*4 -1) <= tr_10GbE_src_out.data(63 DOWNTO 56); beamlet_arr2_re(v_beamlet_index_offset + I*4 -1) <= tr_10GbE_src_out.data(63 DOWNTO 56);
beamlet_arr2_re(v_beamlet_index_offset + I*4 -1) <= tr_10GbE_src_out.data(55 DOWNTO 48); beamlet_arr2_im(v_beamlet_index_offset + I*4 -1) <= tr_10GbE_src_out.data(55 DOWNTO 48);
beamlet_arr2_im(v_beamlet_index_offset + I*4 +0) <= tr_10GbE_src_out.data(47 DOWNTO 40); beamlet_arr2_re(v_beamlet_index_offset + I*4 +0) <= tr_10GbE_src_out.data(47 DOWNTO 40);
beamlet_arr2_re(v_beamlet_index_offset + I*4 +0) <= tr_10GbE_src_out.data(39 DOWNTO 32); beamlet_arr2_im(v_beamlet_index_offset + I*4 +0) <= tr_10GbE_src_out.data(39 DOWNTO 32);
beamlet_arr2_im(v_beamlet_index_offset + I*4 +1) <= tr_10GbE_src_out.data(31 DOWNTO 24); beamlet_arr2_re(v_beamlet_index_offset + I*4 +1) <= tr_10GbE_src_out.data(31 DOWNTO 24);
beamlet_arr2_re(v_beamlet_index_offset + I*4 +1) <= tr_10GbE_src_out.data(23 DOWNTO 16); beamlet_arr2_im(v_beamlet_index_offset + I*4 +1) <= tr_10GbE_src_out.data(23 DOWNTO 16);
beamlet_arr2_im(v_beamlet_index_offset + I*4 +2) <= tr_10GbE_src_out.data(15 DOWNTO 8); beamlet_arr2_re(v_beamlet_index_offset + I*4 +2) <= tr_10GbE_src_out.data(15 DOWNTO 8);
beamlet_arr2_re(v_beamlet_index_offset + I*4 +2) <= tr_10GbE_src_out.data(7 DOWNTO 0); beamlet_arr2_im(v_beamlet_index_offset + I*4 +2) <= tr_10GbE_src_out.data(7 DOWNTO 0);
proc_common_wait_until_clk_and_high(ext_clk, tr_10GbE_src_out.valid); proc_common_wait_until_clk_and_high(ext_clk, tr_10GbE_src_out.valid);
rx_beamlet_cnt <= rx_beamlet_cnt + 1; rx_beamlet_cnt <= rx_beamlet_cnt + 1;
END LOOP; END LOOP;
-- . get last beamlet of block -- . get last beamlet of block
beamlet_arr2_im(v_beamlet_index_offset + c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1) <= tr_10GbE_src_out.data(63 DOWNTO 56); beamlet_arr2_re(v_beamlet_index_offset + c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1) <= tr_10GbE_src_out.data(63 DOWNTO 56);
beamlet_arr2_re(v_beamlet_index_offset + c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1) <= tr_10GbE_src_out.data(55 DOWNTO 48); beamlet_arr2_im(v_beamlet_index_offset + c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1) <= tr_10GbE_src_out.data(55 DOWNTO 48);
-- Loop for next block in packet -- Loop for next block in packet
END LOOP; END LOOP;
-- Make rx_beamlet_valid low for next header or after loop during verify. -- Make rx_beamlet_valid low for next header or after loop during verify.
......
...@@ -1129,8 +1129,8 @@ BEGIN ...@@ -1129,8 +1129,8 @@ BEGIN
-- c_sdp_N_beamsets = 16 / 4 * 2 = 4 * 2 = 8 packets per sync interval -- c_sdp_N_beamsets = 16 / 4 * 2 = 4 * 2 = 8 packets per sync interval
-- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol -- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol
-- and complex beamlets per packet, so 2 dual pol beamlets/64b data word. -- and complex beamlets per packet, so 2 dual pol beamlets/64b data word.
-- . Beamlets array is stored big endian in the data, so X index 0 first in -- . Beamlets array is stored big endian in the data, so X.real index 0 first
-- MSByte of test_offload_sosi.data. -- in MSByte of test_offload_sosi.data.
p_rx_cep_beamlets : PROCESS p_rx_cep_beamlets : PROCESS
BEGIN BEGIN
rx_beamlet_cnt <= 0; rx_beamlet_cnt <= 0;
...@@ -1142,24 +1142,24 @@ BEGIN ...@@ -1142,24 +1142,24 @@ BEGIN
proc_common_wait_until_high(ext_clk, test_offload_sosi.valid); proc_common_wait_until_high(ext_clk, test_offload_sosi.valid);
rx_beamlet_valid <= '1'; rx_beamlet_valid <= '1';
-- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window -- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window
rx_beamlet_arr_re(0) <= test_offload_sosi.data(55 DOWNTO 48); -- X rx_beamlet_arr_re(0) <= test_offload_sosi.data(63 DOWNTO 56); -- X
rx_beamlet_arr_im(0) <= test_offload_sosi.data(63 DOWNTO 56); rx_beamlet_arr_im(0) <= test_offload_sosi.data(55 DOWNTO 48);
rx_beamlet_arr_re(1) <= test_offload_sosi.data(39 DOWNTO 32); -- Y rx_beamlet_arr_re(1) <= test_offload_sosi.data(47 DOWNTO 40); -- Y
rx_beamlet_arr_im(1) <= test_offload_sosi.data(47 DOWNTO 40); rx_beamlet_arr_im(1) <= test_offload_sosi.data(39 DOWNTO 32);
rx_beamlet_arr_re(2) <= test_offload_sosi.data(23 DOWNTO 16); -- X rx_beamlet_arr_re(2) <= test_offload_sosi.data(31 DOWNTO 24); -- X
rx_beamlet_arr_im(2) <= test_offload_sosi.data(31 DOWNTO 24); rx_beamlet_arr_im(2) <= test_offload_sosi.data(23 DOWNTO 16);
rx_beamlet_arr_re(3) <= test_offload_sosi.data( 7 DOWNTO 0); -- Y rx_beamlet_arr_re(3) <= test_offload_sosi.data(15 DOWNTO 8); -- Y
rx_beamlet_arr_im(3) <= test_offload_sosi.data(15 DOWNTO 8); rx_beamlet_arr_im(3) <= test_offload_sosi.data( 7 DOWNTO 0);
IF I < c_sdp_cep_nof_beamlets_per_block/2 THEN IF I < c_sdp_cep_nof_beamlets_per_block/2 THEN
-- Only capture the first beamlets block of each packet in rx_beamlet_list -- Only capture the first beamlets block of each packet in rx_beamlet_list
rx_beamlet_list_re(I*4 + 0) <= test_offload_sosi.data(55 DOWNTO 48); -- X rx_beamlet_list_re(I*4 + 0) <= test_offload_sosi.data(63 DOWNTO 56); -- X
rx_beamlet_list_im(I*4 + 0) <= test_offload_sosi.data(63 DOWNTO 56); rx_beamlet_list_im(I*4 + 0) <= test_offload_sosi.data(55 DOWNTO 48);
rx_beamlet_list_re(I*4 + 1) <= test_offload_sosi.data(39 DOWNTO 32); -- Y rx_beamlet_list_re(I*4 + 1) <= test_offload_sosi.data(47 DOWNTO 40); -- Y
rx_beamlet_list_im(I*4 + 1) <= test_offload_sosi.data(47 DOWNTO 40); rx_beamlet_list_im(I*4 + 1) <= test_offload_sosi.data(39 DOWNTO 32);
rx_beamlet_list_re(I*4 + 2) <= test_offload_sosi.data(23 DOWNTO 16); -- X rx_beamlet_list_re(I*4 + 2) <= test_offload_sosi.data(31 DOWNTO 24); -- X
rx_beamlet_list_im(I*4 + 2) <= test_offload_sosi.data(31 DOWNTO 24); rx_beamlet_list_im(I*4 + 2) <= test_offload_sosi.data(23 DOWNTO 16);
rx_beamlet_list_re(I*4 + 3) <= test_offload_sosi.data( 7 DOWNTO 0); -- Y rx_beamlet_list_re(I*4 + 3) <= test_offload_sosi.data(15 DOWNTO 8); -- Y
rx_beamlet_list_im(I*4 + 3) <= test_offload_sosi.data(15 DOWNTO 8); rx_beamlet_list_im(I*4 + 3) <= test_offload_sosi.data( 7 DOWNTO 0);
END IF; END IF;
proc_common_wait_until_high(ext_clk, test_offload_sosi.valid); proc_common_wait_until_high(ext_clk, test_offload_sosi.valid);
-- Use at least one WAIT instead of proc_common_wait_some_cycles() to -- Use at least one WAIT instead of proc_common_wait_some_cycles() to
......
...@@ -1404,8 +1404,8 @@ BEGIN ...@@ -1404,8 +1404,8 @@ BEGIN
-- c_sdp_N_beamsets = 16 / 4 * 2 = 4 * 2 = 8 packets per sync interval -- c_sdp_N_beamsets = 16 / 4 * 2 = 4 * 2 = 8 packets per sync interval
-- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol -- . expect c_sdp_cep_nof_beamlets_per_block = c_sdp_S_sub_bf = 488 dual pol
-- and complex beamlets per packet, so 2 dual pol beamlets/64b data word. -- and complex beamlets per packet, so 2 dual pol beamlets/64b data word.
-- . Beamlets array is stored big endian in the data, so X index 0 first in -- . Beamlets array is stored big endian in the data, so X.real index 0 first
-- MSByte of rx_beamlet_sosi.data. -- in MSByte of rx_beamlet_sosi.data.
p_rx_cep_beamlets : PROCESS p_rx_cep_beamlets : PROCESS
BEGIN BEGIN
rx_beamlet_cnt <= 0; rx_beamlet_cnt <= 0;
...@@ -1417,24 +1417,24 @@ BEGIN ...@@ -1417,24 +1417,24 @@ BEGIN
proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.valid); proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.valid);
rx_beamlet_valid <= '1'; rx_beamlet_valid <= '1';
-- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window -- Capture rx beamlets per longword in rx_beamlet_arr, for time series view in Wave window
rx_beamlet_arr_im(0) <= rx_beamlet_sosi.data(63 DOWNTO 56); -- X rx_beamlet_arr_re(0) <= rx_beamlet_sosi.data(63 DOWNTO 56); -- X
rx_beamlet_arr_re(0) <= rx_beamlet_sosi.data(55 DOWNTO 48); rx_beamlet_arr_im(0) <= rx_beamlet_sosi.data(55 DOWNTO 48);
rx_beamlet_arr_im(1) <= rx_beamlet_sosi.data(47 DOWNTO 40); -- Y rx_beamlet_arr_re(1) <= rx_beamlet_sosi.data(47 DOWNTO 40); -- Y
rx_beamlet_arr_re(1) <= rx_beamlet_sosi.data(39 DOWNTO 32); rx_beamlet_arr_im(1) <= rx_beamlet_sosi.data(39 DOWNTO 32);
rx_beamlet_arr_im(2) <= rx_beamlet_sosi.data(31 DOWNTO 24); -- X rx_beamlet_arr_re(2) <= rx_beamlet_sosi.data(31 DOWNTO 24); -- X
rx_beamlet_arr_re(2) <= rx_beamlet_sosi.data(23 DOWNTO 16); rx_beamlet_arr_im(2) <= rx_beamlet_sosi.data(23 DOWNTO 16);
rx_beamlet_arr_im(3) <= rx_beamlet_sosi.data(15 DOWNTO 8); -- Y rx_beamlet_arr_re(3) <= rx_beamlet_sosi.data(15 DOWNTO 8); -- Y
rx_beamlet_arr_re(3) <= rx_beamlet_sosi.data( 7 DOWNTO 0); rx_beamlet_arr_im(3) <= rx_beamlet_sosi.data( 7 DOWNTO 0);
IF I < c_sdp_cep_nof_beamlets_per_block / c_nof_beamlets_per_data THEN IF I < c_sdp_cep_nof_beamlets_per_block / c_nof_beamlets_per_data THEN
-- Only capture the first beamlets block of each packet in rx_beamlet_list -- Only capture the first beamlets block of each packet in rx_beamlet_list
rx_beamlet_list_im(I*4 + 0) <= rx_beamlet_sosi.data(63 DOWNTO 56); -- X rx_beamlet_list_re(I*4 + 0) <= rx_beamlet_sosi.data(63 DOWNTO 56); -- X
rx_beamlet_list_re(I*4 + 0) <= rx_beamlet_sosi.data(55 DOWNTO 48); rx_beamlet_list_im(I*4 + 0) <= rx_beamlet_sosi.data(55 DOWNTO 48);
rx_beamlet_list_im(I*4 + 1) <= rx_beamlet_sosi.data(47 DOWNTO 40); -- Y rx_beamlet_list_re(I*4 + 1) <= rx_beamlet_sosi.data(47 DOWNTO 40); -- Y
rx_beamlet_list_re(I*4 + 1) <= rx_beamlet_sosi.data(39 DOWNTO 32); rx_beamlet_list_im(I*4 + 1) <= rx_beamlet_sosi.data(39 DOWNTO 32);
rx_beamlet_list_im(I*4 + 2) <= rx_beamlet_sosi.data(31 DOWNTO 24); -- X rx_beamlet_list_re(I*4 + 2) <= rx_beamlet_sosi.data(31 DOWNTO 24); -- X
rx_beamlet_list_re(I*4 + 2) <= rx_beamlet_sosi.data(23 DOWNTO 16); rx_beamlet_list_im(I*4 + 2) <= rx_beamlet_sosi.data(23 DOWNTO 16);
rx_beamlet_list_im(I*4 + 3) <= rx_beamlet_sosi.data(15 DOWNTO 8); -- Y rx_beamlet_list_re(I*4 + 3) <= rx_beamlet_sosi.data(15 DOWNTO 8); -- Y
rx_beamlet_list_re(I*4 + 3) <= rx_beamlet_sosi.data( 7 DOWNTO 0); rx_beamlet_list_im(I*4 + 3) <= rx_beamlet_sosi.data( 7 DOWNTO 0);
END IF; END IF;
proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.valid); proc_common_wait_until_high(ext_clk, rx_beamlet_sosi.valid);
-- Use at least one WAIT instead of proc_common_wait_some_cycles() to -- Use at least one WAIT instead of proc_common_wait_some_cycles() to
......
...@@ -108,11 +108,12 @@ BEGIN ...@@ -108,11 +108,12 @@ BEGIN
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- Input rewiring: concatenate input complex fields to data field -- Input rewiring: concatenate input complex fields to data field
-- . dp_repack_data works with data fields only -- . dp_repack_data works with data fields only
-- . send beamlet data big endian with X.re part first, then X.im, Y.re, Y.im
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
p_snk_in_arr : PROCESS(in_sosi) p_snk_in_arr : PROCESS(in_sosi)
BEGIN BEGIN
snk_in_concat <= in_sosi; snk_in_concat <= in_sosi;
snk_in_concat.data(c_data_w-1 DOWNTO 0) <= in_sosi.im(c_sdp_W_beamlet-1 DOWNTO 0) & in_sosi.re(c_sdp_W_beamlet-1 DOWNTO 0); snk_in_concat.data(c_data_w-1 DOWNTO 0) <= in_sosi.re(c_sdp_W_beamlet-1 DOWNTO 0) & in_sosi.im(c_sdp_W_beamlet-1 DOWNTO 0);
END PROCESS; END PROCESS;
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
......
...@@ -399,7 +399,7 @@ PACKAGE sdp_pkg is ...@@ -399,7 +399,7 @@ PACKAGE sdp_pkg is
CONSTANT c_sdp_cep_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"C0A8"; -- 31:16, 15:8 = backplane, 7:0 = node + 1 = 192.168.xx.yy CONSTANT c_sdp_cep_ip_src_addr_31_16 : STD_LOGIC_VECTOR(15 DOWNTO 0) := x"C0A8"; -- 31:16, 15:8 = backplane, 7:0 = node + 1 = 192.168.xx.yy
CONSTANT c_sdp_cep_ip_total_length : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7868, 16); -- see ICD STAT-CEP CONSTANT c_sdp_cep_ip_total_length : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7868, 16); -- see ICD STAT-CEP
CONSTANT c_sdp_cep_udp_total_length : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7848, 16); -- see ICD STAT-CEP CONSTANT c_sdp_cep_udp_total_length : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(7848, 16); -- see ICD STAT-CEP
CONSTANT c_sdp_cep_udp_dst_port : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5000, 16); -- 0x1380 = 5000 CONSTANT c_sdp_cep_udp_dst_port : STD_LOGIC_VECTOR(15 DOWNTO 0) := TO_UVEC(5000, 16); -- 0x1388 = 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_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; -- octets, see ICD STAT-CEP CONSTANT c_sdp_cep_app_header_len : NATURAL := 32; -- octets, see ICD STAT-CEP
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment