From b2b32bd38797fd8b89ba69534505528a955d1669 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 28 Sep 2023 17:19:29 +0200
Subject: [PATCH] Add c_sdp_nof_beamlets_per_block_w.

---
 applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd | 1 +
 1 file changed, 1 insertion(+)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
index a3a41fdb21..6f3894ec9f 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
@@ -140,6 +140,7 @@ package sdp_pkg is
   constant c_sdp_nof_words_per_beamlet     : natural := 1;  -- 1 dual pol, complex, 8bit beamlet (Xre, Xim, Yre, Yim) per 32b word
   constant c_sdp_nof_beamlets_per_longword : natural := 2;  -- 2 dual pol, complex, 8bit beamlets fit in 1 64bit longword
   constant c_sdp_nof_beamlets_per_block    : natural := c_sdp_S_sub_bf;  -- number of dual pol beamlets per block
+  constant c_sdp_nof_beamlets_per_block_w  : natural := ceil_log2(c_sdp_nof_beamlets_per_block + 1);
 
   -- . unit weights
   constant c_sdp_unit_sub_weight      : natural := 2**c_sdp_W_sub_weight_fraction;  -- 2**13, so range +-4.0 for 16 bit signed weight
-- 
GitLab