From 81ab6c603ab63806807c0d452dd6d7ef0990c424 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Tue, 17 Oct 2023 16:14:16 +0200
Subject: [PATCH] Correct c_exp_ip_header_checksum for gn_index.

---
 .../tb_lofar2_unb2c_sdp_station_bf.vhd                        | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd
index 2c31ec4b0a..7ddfe79bc9 100644
--- a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd
+++ b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_bf/tb_lofar2_unb2c_sdp_station_bf.vhd
@@ -232,7 +232,9 @@ architecture tb of tb_lofar2_unb2c_sdp_station_bf is
   constant c_cep_ip_src_addr     : std_logic_vector(31 downto 0) := c_sdp_cep_ip_src_addr_31_16 & func_sdp_gn_index_to_ip_15_0(c_gn_index);
   constant c_cep_udp_src_port    : std_logic_vector(15 downto 0) := c_sdp_cep_udp_src_port_15_8 & c_id;
 
-  constant c_exp_ip_header_checksum : natural := 16#5BDE#;  -- value obtained from rx_sdp_cep_header.ip.header_checksum in wave window
+  -- value obtained from rx_sdp_cep_header.ip.header_checksum in wave window
+  --constant c_exp_ip_header_checksum : natural := 16#5BDE#;  -- for c_unb_nr = 0, c_node_nr = 0
+  constant c_exp_ip_header_checksum : natural := 16#5ADC#;  -- for c_unb_nr = 1, c_node_nr = 2
 
   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
-- 
GitLab