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

Add more rx header fields, to check whether rx_beamlet_index_offset is correct.

parent b9e01b2d
No related branches found
No related tags found
1 merge request!311Correct beamlet output indexing in tr_10GbE_src_out.data. Verify exact beamlet...
Pipeline #44824 passed
......@@ -177,12 +177,20 @@ ARCHITECTURE tb OF tb_disturb2_unb2b_sdp_station_full_wg IS
SIGNAL rd_beamlet_scale : STD_LOGIC_VECTOR(15 DOWNTO 0);
-- 10GbE
-- . header fields
SIGNAL rx_beamlet_scale : STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL rx_beamlet_index_offset : NATURAL := 0;
SIGNAL rx_blocks_per_packet : STD_LOGIC_VECTOR(7 DOWNTO 0);
SIGNAL rx_beamlets_per_block : STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL rx_block_period : STD_LOGIC_VECTOR(15 DOWNTO 0);
SIGNAL rx_bsn : STD_LOGIC_VECTOR(63 DOWNTO 0);
-- . payload indices and data arrays
SIGNAL rx_beamlet_blk : NATURAL := 0;
SIGNAL rx_beamlet_cnt : NATURAL := 0;
SIGNAL rx_beamlet_valid : STD_LOGIC := '0';
SIGNAL rx_beamlet_sop : STD_LOGIC := '0';
SIGNAL beamlet_arr2_re : t_slv_8_arr(c_sdp_R_os * c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1 DOWNTO 0);
SIGNAL beamlet_arr2_im : t_slv_8_arr(c_sdp_R_os * c_sdp_N_pol_bf * c_sdp_cep_nof_beamlets_per_block-1 DOWNTO 0);
......@@ -411,18 +419,26 @@ BEGIN
-- Read 3 packets to make sure we get 1 from each beamset. It can happen that two packets
-- (but not three) from the same beamset are received back to back.
FOR packet IN 0 TO 24 LOOP
FOR packet IN 0 TO 10 LOOP
-- Get beamlet_index from packet header
proc_common_wait_until_high(ext_clk, tr_10GbE_src_out.sop);
FOR I IN 0 TO 8 LOOP -- Packet header is 9.25 words wide, which can be discarded
IF I = 7 THEN
rx_beamlet_scale <= tr_10GbE_src_out.data(55 DOWNTO 40);
v_beamlet_index_offset := c_sdp_N_pol_bf * TO_UINT(tr_10GbE_src_out.data(39 DOWNTO 24)); -- Read beamlet index
rx_beamlet_index_offset <= v_beamlet_index_offset;
rx_blocks_per_packet <= tr_10GbE_src_out.data(23 DOWNTO 16);
rx_beamlets_per_block <=tr_10GbE_src_out.data(15 DOWNTO 0);
END IF;
IF I = 8 THEN
rx_block_period <= tr_10GbE_src_out.data(63 DOWNTO 48);
rx_bsn(63 DOWNTO 16) <= tr_10GbE_src_out.data(47 DOWNTO 0);
END IF;
proc_common_wait_until_high(ext_clk, tr_10GbE_src_out.valid);
proc_common_wait_some_cycles(ext_clk, 1);
END LOOP;
rx_bsn(15 DOWNTO 0) <= tr_10GbE_src_out.data(63 DOWNTO 48);
-- Get all c_sdp_cep_nof_blocks_per_packet = 4 blocks from the packet
FOR blk IN 0 TO c_sdp_cep_nof_blocks_per_packet-1 LOOP
-- . First word contains 1 header part of two bytes and 3 beamlets [0:2].
......
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