From 57f14bdc367cfb2426f64a882ea8f054ea8ec152 Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Wed, 26 Jan 2022 16:12:52 +0100 Subject: [PATCH] Treat beamlet_index modulo c_sdp_S_sub_bf, so per beamset. --- applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd b/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd index ff1823f32a..d905af1d81 100644 --- a/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd +++ b/applications/lofar2/libraries/sdp/tb/vhdl/tb_sdp_pkg.vhd @@ -117,6 +117,7 @@ PACKAGE BODY tb_sdp_pkg IS FUNCTION func_sdp_verify_cep_header(in_hdr, exp_hdr : t_sdp_cep_header) RETURN BOOLEAN IS + VARIABLE v_beamlet_index : NATURAL; BEGIN -- eth header ASSERT in_hdr.eth.dst_mac = exp_hdr.eth.dst_mac REPORT "Wrong beamlet eth.dst_mac" SEVERITY ERROR; @@ -160,7 +161,9 @@ PACKAGE BODY tb_sdp_pkg IS ASSERT in_hdr.app.sdp_reserved = exp_hdr.app.sdp_reserved REPORT "Wrong beamlet app.sdp_reserved" SEVERITY ERROR; ASSERT in_hdr.app.sdp_beamlet_scale = exp_hdr.app.sdp_beamlet_scale REPORT "Wrong beamlet app.sdp_beamlet_scale" SEVERITY ERROR; - ASSERT in_hdr.app.sdp_beamlet_index = exp_hdr.app.sdp_beamlet_index REPORT "Wrong beamlet app.sdp_beamlet_index" SEVERITY ERROR; + -- Treat beamlet_index modulo c_sdp_S_sub_bf, because the beamlet packets from different beamsets may arrive in arbitrary order + v_beamlet_index := TO_UINT(in_hdr.app.sdp_beamlet_index) MOD c_sdp_S_sub_bf; + ASSERT v_beamlet_index = TO_UINT(exp_hdr.app.sdp_beamlet_index) REPORT "Wrong beamlet app.sdp_beamlet_index" SEVERITY ERROR; ASSERT in_hdr.app.sdp_nof_blocks_per_packet = exp_hdr.app.sdp_nof_blocks_per_packet REPORT "Wrong beamlet app.sdp_nof_blocks_per_packet" SEVERITY ERROR; ASSERT in_hdr.app.sdp_nof_beamlets_per_block = exp_hdr.app.sdp_nof_beamlets_per_block REPORT "Wrong beamlet app.sdp_nof_beamlets_per_block" SEVERITY ERROR; ASSERT in_hdr.app.sdp_block_period = exp_hdr.app.sdp_block_period REPORT "Wrong beamlet app.sdp_block_period" SEVERITY ERROR; -- GitLab