From 12f7da0e8012367744883346cf4d1fdf1bea2735 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Tue, 6 Sep 2022 09:01:33 +0200
Subject: [PATCH] Use bf_bs_sosi and xst_bs_sosi as signal names.

---
 .../libraries/sdp/src/vhdl/node_sdp_correlator.vhd   |  4 ++--
 .../lofar2/libraries/sdp/src/vhdl/sdp_station.vhd    | 12 ++++++++----
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd
index 56b2b2c35b..f62137fba3 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_correlator.vhd
@@ -55,7 +55,7 @@ ENTITY node_sdp_correlator IS
     xst_udp_siso  : IN  t_dp_siso;
     from_ri_sosi  : IN  t_dp_sosi := c_dp_sosi_rst;
     to_ri_sosi    : OUT t_dp_sosi;
-    bs_sosi       : OUT t_dp_sosi;
+    xst_bs_sosi   : OUT t_dp_sosi;
     mm_rst        : IN  STD_LOGIC;
     mm_clk        : IN  STD_LOGIC;
 
@@ -196,7 +196,7 @@ BEGIN
  
   -- Use xsel_sosi as local bsn and sync reference since the sync
   -- is generated by the bsn_sync_scheduler in sdp_crosslets_subband_select.
-  bs_sosi <= xsel_sosi;
+  xst_bs_sosi <= xsel_sosi;
 
   ---------------------------------------------------------------
   -- Repack 32b to 64b 
diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd
index 2fcefc6a40..168e95ffae 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_station.vhd
@@ -517,7 +517,9 @@ ARCHITECTURE str OF sdp_station IS
   SIGNAL fsub_sosi_arr                     : t_dp_sosi_arr(c_sdp_P_pfb-1 DOWNTO 0);  -- weighted subbands
   SIGNAL fsub_oversampled_sosi_arr         : t_dp_sosi_arr(c_sdp_R_os * c_sdp_P_pfb-1 DOWNTO 0); 
   SIGNAL fsub_sosi_2arr                    : t_dp_sosi_2arr_pfb(c_sdp_N_beamsets-1 DOWNTO 0);
-  SIGNAL bs_sosi                           : t_dp_sosi;        
+
+  SIGNAL xst_bs_sosi                       : t_dp_sosi;  -- block sync reference for Xsub ring latency monitor
+  SIGNAL bf_bs_sosi                        : t_dp_sosi;  -- block sync reference for BF ring latency monitor
  
   SIGNAL xst_from_ri_sosi                  : t_dp_sosi := c_dp_sosi_rst;        
   SIGNAL xst_to_ri_sosi                    : t_dp_sosi := c_dp_sosi_rst;     
@@ -820,7 +822,7 @@ BEGIN
       from_ri_sosi                             => xst_from_ri_sosi, 
       to_ri_sosi                               => xst_to_ri_sosi,     
 
-      bs_sosi                                  => bs_sosi,
+      xst_bs_sosi                              => xst_bs_sosi,
                                                        
       mm_rst                                   => mm_rst, 
       mm_clk                                   => mm_clk, 
@@ -1192,7 +1194,7 @@ BEGIN
         lane_rx_board_sosi => lane_rx_board_sosi_arr(0),
         lane_tx_cable_sosi => lane_tx_cable_sosi_arr(0),
         lane_tx_board_sosi => lane_tx_board_sosi_arr(0),
-        bs_sosi            => bs_sosi, 
+        bs_sosi            => xst_bs_sosi,
         
         reg_ring_lane_info_copi                => reg_ring_lane_info_xst_copi,
         reg_ring_lane_info_cipo                => reg_ring_lane_info_xst_cipo,
@@ -1213,6 +1215,8 @@ BEGIN
     END GENERATE;
 
     gen_bf_ring : IF g_use_bf GENERATE
+      bf_bs_sosi <= fsub_sosi_arr(0);
+
       gen_beamset_ring : FOR beamset_id IN 0 TO c_sdp_N_beamsets-1 GENERATE
         u_ring_lane_bf : ENTITY ring_lib.ring_lane
         GENERIC MAP (
@@ -1241,7 +1245,7 @@ BEGIN
           lane_rx_board_sosi => lane_rx_board_sosi_arr(1 + beamset_id),
           lane_tx_cable_sosi => lane_tx_cable_sosi_arr(1 + beamset_id),
           lane_tx_board_sosi => lane_tx_board_sosi_arr(1 + beamset_id),
-          bs_sosi            => fsub_sosi_arr(0), -- used for bsn and sync
+          bs_sosi            => bf_bs_sosi,  -- used for bsn and sync
           
           reg_ring_lane_info_copi                => reg_ring_lane_info_bf_copi_arr(beamset_id),
           reg_ring_lane_info_cipo                => reg_ring_lane_info_bf_cipo_arr(beamset_id),
-- 
GitLab