diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd index 6e0ee8b94577edbb3da9547c06b30c406aeafaac..47f0880a767599036a076150ab5e0a1f5c59db4c 100644 --- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd +++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_statistics_offload.vhd @@ -98,7 +98,7 @@ ARCHITECTURE str OF sdp_statistics_offload IS sel_a_b(g_statistics_type="XST", c_data_size, c_data_size * c_nof_data_per_step)); -- SST - CONSTANT c_nof_data : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol * c_sdp_S_sub_bf, + CONSTANT c_nof_data : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol_bf * c_sdp_S_sub_bf, sel_a_b(g_statistics_type="XST", c_sdp_S_pn * c_sdp_S_pn * c_nof_complex, c_sdp_N_sub)); -- SST CONSTANT c_ip_total_length : NATURAL := 60 + c_nof_data * c_longword_sz; @@ -119,7 +119,7 @@ ARCHITECTURE str OF sdp_statistics_offload IS sel_a_b(g_statistics_type="XST", c_sdp_S_pn, 1)); -- SST - CONSTANT c_nof_statistics_per_packet : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol * c_sdp_S_sub_bf, + CONSTANT c_nof_statistics_per_packet : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol_bf * c_sdp_S_sub_bf, sel_a_b(g_statistics_type="XST", (c_sdp_S_pn * c_sdp_S_pn * c_nof_complex), c_sdp_N_sub)); -- SST diff --git a/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd b/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd index 8b439d303ccfec7cc8b2f173d2f33721c83a18b9..bf575888fe226e2f4ae520e59f55310b12f99fc8 100644 --- a/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd +++ b/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_statistics_offload.vhd @@ -80,7 +80,7 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS sel_a_b(g_statistics_type="XST", c_data_size, c_data_size * c_nof_data_per_step)); -- SST - CONSTANT c_nof_data : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol * c_sdp_S_sub_bf, + CONSTANT c_nof_data : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol_bf * c_sdp_S_sub_bf, sel_a_b(g_statistics_type="XST", c_sdp_S_pn * c_sdp_S_pn * c_nof_complex, c_sdp_N_sub)); -- SST @@ -108,11 +108,15 @@ ARCHITECTURE tb OF tb_sdp_statistics_offload IS sel_a_b(g_statistics_type="XST", c_sdp_S_pn, 1)); -- SST - CONSTANT c_nof_statistics_per_packet : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol * c_sdp_S_sub_bf, + CONSTANT c_nof_statistics_per_packet : NATURAL := sel_a_b(g_statistics_type="BST", c_sdp_N_pol_bf * c_sdp_S_sub_bf, sel_a_b(g_statistics_type="XST", (c_sdp_S_pn * c_sdp_S_pn * c_nof_complex), c_sdp_N_sub)); -- SST CONSTANT c_beamlet_id : NATURAL := g_beamset_id * c_sdp_S_sub_bf; + + CONSTANT c_ip_total_length : NATURAL := 60 + c_nof_data * c_longword_sz; + + CONSTANT c_udp_total_length : NATURAL := 40 + c_nof_data * c_longword_sz; CONSTANT c_nof_valid_per_block : NATURAL := c_nof_data * c_data_size; CONSTANT c_nof_sync : NATURAL := 5; @@ -264,7 +268,7 @@ BEGIN REPORT "wrong ip_header_length" SEVERITY ERROR; ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "ip_services") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_services")) = TO_UVEC(0, 8) REPORT "wrong ip_services" SEVERITY ERROR; - ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "ip_total_length") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_total_length")) = TO_UVEC(4156, 16) + ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "ip_total_length") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_total_length")) = TO_UVEC(c_ip_total_length, 16) REPORT "wrong ip_total_length" SEVERITY ERROR; ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "ip_identification") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "ip_identification")) = TO_UVEC(0, 16) REPORT "wrong ip_identification" SEVERITY ERROR; @@ -280,7 +284,7 @@ BEGIN REPORT "wrong ip_dst_addr" SEVERITY ERROR; ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "udp_dst_port") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "udp_dst_port")) = TO_UVEC(5001, 16) REPORT "wrong udp_dst_port" SEVERITY ERROR; - ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "udp_total_length") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "udp_total_length")) = TO_UVEC(4136, 16) + ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "udp_total_length") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "udp_total_length")) = TO_UVEC(c_udp_total_length, 16) REPORT "wrong udp_total_length" SEVERITY ERROR; ASSERT rx_hdr_fields_raw(field_hi(c_sdp_stat_hdr_field_arr, "sdp_version_id") DOWNTO field_lo(c_sdp_stat_hdr_field_arr, "sdp_version_id")) = TO_UVEC(5, 8) REPORT "wrong sdp_version_id" SEVERITY ERROR;