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

Correct c_exp_beamlet_index for header field.

parent 3484be78
No related branches found
No related tags found
1 merge request!357Move func_sdp_bdo_cep_hdr_field_sel_dest() from sdp_bdo_pkg to...
Pipeline #59244 passed
......@@ -140,6 +140,7 @@ architecture tb of tb_lofar2_unb2b_sdp_station_bf is
constant c_exp_ip_header_checksum : natural := 16#5BDE#; -- value obtained from rx_sdp_cep_header.ip.header_checksum in wave window
constant c_exp_beamlet_scale : natural := natural(g_beamlet_scale * real(c_sdp_unit_beamlet_scale)); -- c_sdp_unit_beamlet_scale = 2**15;
constant c_exp_beamlet_index : natural := 0; -- depends on beamset bset * c_sdp_S_sub_bf
constant c_exp_sdp_info : t_sdp_info := (
TO_UVEC(3, 6), -- antenna_field_index
......@@ -182,7 +183,7 @@ architecture tb of tb_lofar2_unb2b_sdp_station_bf is
-- BF
-- . select
constant c_exp_beamlet_index : natural := g_beamlet * c_sdp_N_pol_bf; -- in beamset 0
constant c_exp_g_beamlet_index : natural := g_beamlet * c_sdp_N_pol_bf; -- in beamset 0
-- . Beamlet weights for selected g_sp
constant c_bf_weight_re : integer := integer(g_bf_gain * real(c_sdp_unit_bf_weight) * COS(g_bf_phase * MATH_2_PI / 360.0));
constant c_bf_weight_im : integer := integer(g_bf_gain * real(c_sdp_unit_bf_weight) * SIN(g_bf_phase * MATH_2_PI / 360.0));
......@@ -1000,8 +1001,8 @@ begin
---------------------------------------------------------------------------
-- Verify beamlet output in 10GbE UDP offload
---------------------------------------------------------------------------
v_re := TO_SINT(rx_packet_list_re(c_exp_beamlet_index)); v_re_exp := c_exp_beamlet_output_re;
v_im := TO_SINT(rx_packet_list_im(c_exp_beamlet_index)); v_im_exp := c_exp_beamlet_output_im;
v_re := TO_SINT(rx_packet_list_re(c_exp_g_beamlet_index)); v_re_exp := c_exp_beamlet_output_re;
v_im := TO_SINT(rx_packet_list_im(c_exp_g_beamlet_index)); v_im_exp := c_exp_beamlet_output_im;
assert v_re > integer(v_re_exp) - c_beamlet_output_delta report "Wrong 10GbE output (re) " & integer'image(v_re) & " != " & real'image(v_re_exp) severity ERROR;
assert v_re < integer(v_re_exp) + c_beamlet_output_delta report "Wrong 10GbE output (re) " & integer'image(v_re) & " != " & real'image(v_re_exp) severity ERROR;
assert v_im > integer(v_im_exp) - c_beamlet_output_delta report "Wrong 10GbE output (im) " & integer'image(v_im) & " != " & real'image(v_im_exp) severity ERROR;
......
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