From 6920d17504033b1024ec4837203f4b6fae06cd5f Mon Sep 17 00:00:00 2001
From: Reinier van der Walle <walle@astron.nl>
Date: Wed, 16 Mar 2022 16:40:12 +0100
Subject: [PATCH] processed review comments

---
 .../libraries/sdp/src/vhdl/sdp_beamformer_remote.vhd      | 4 ++--
 libraries/base/dp/src/vhdl/dp_block_from_mm.vhd           | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_remote.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_remote.vhd
index afb76347f9..d5094cfe9d 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_remote.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_beamformer_remote.vhd
@@ -214,8 +214,8 @@ BEGIN
   -- repacking bf_sum re/im to data field and combine with pipelined_beamlets_sosi.
   p_wire_bf_sum_sosi : PROCESS(pipelined_beamlets_sosi, i_bf_sum_sosi)
   BEGIN
-    bf_sum_data_sosi <= pipelined_beamlets_sosi;
-    bf_sum_sosi <= pipelined_beamlets_sosi;
+    bf_sum_data_sosi <= pipelined_beamlets_sosi; -- To preserve sosi control signals as dp_complex_add removes them. 
+    bf_sum_sosi <= pipelined_beamlets_sosi;      -- To preserve sosi control signals as dp_complex_add removes them.
     bf_sum_data_sosi.data(c_sdp_W_beamlet_sum -1 DOWNTO 0)                   <= i_bf_sum_sosi.re(c_sdp_W_beamlet_sum-1 DOWNTO 0);
     bf_sum_data_sosi.data(           c_data_w -1 DOWNTO c_sdp_W_beamlet_sum) <= i_bf_sum_sosi.im(c_sdp_W_beamlet_sum-1 DOWNTO 0);
     bf_sum_sosi.re(c_sdp_W_beamlet_sum-1 DOWNTO 0) <= i_bf_sum_sosi.re(c_sdp_W_beamlet_sum-1 DOWNTO 0);
diff --git a/libraries/base/dp/src/vhdl/dp_block_from_mm.vhd b/libraries/base/dp/src/vhdl/dp_block_from_mm.vhd
index 55f24261f2..a1a573f13a 100644
--- a/libraries/base/dp/src/vhdl/dp_block_from_mm.vhd
+++ b/libraries/base/dp/src/vhdl/dp_block_from_mm.vhd
@@ -54,6 +54,12 @@
 --   to preserve the order of the user parts (e.g. real and imag, X and Y
 --   polarization) in a data block.
 --
+-- . sync_in is an optional sync pulse to generate a sync signal at out_sosi.
+--   sync_in is not equal to start_pulse as start pulse indicates the start
+--   of a packet and not the start of a sync period.
+-- . For generating a bsn at out_sosi, the bsn_at_sync should contain the 
+--   desired bsn at sync_in pulse. The bsn is increased in this component at
+--   every start_pulse.
 -- --------------------------------------------------------------------------
 
 LIBRARY IEEE,common_lib;
@@ -214,7 +220,7 @@ BEGIN
             v.sync := '1';
             v.sync_in_detected := '0';
           ELSE
-            v.bsn := STD_LOGIC_VECTOR(UNSIGNED(r.bsn) + c_unsigned_1);
+            v.bsn := INCR_UVEC(r.bsn, 1);
           END IF;
         END IF;
 
-- 
GitLab