From eeeecf5af9e6bddfc35dd218994f4cb9dca8cfcd Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 19 Jan 2023 16:18:07 +0100
Subject: [PATCH] Try c_sdp_W_fft_stage_dat = 25b.

---
 .../lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd         | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
index 07d8faf127..f23ce1bf86 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/sdp_pkg.vhd
@@ -194,11 +194,18 @@ PACKAGE sdp_pkg is
   --   fft_out_gain_w + 6b = 26b.
   -- . The raw_dat_w for FFT output of real input is fft_stage_dat_w + 1,
   --   because the use_separate in the FFT feature does not divide by 2.
-  --   This implies that preferrably fft_stage_dat_w <= 26, to fit the 18x27
+  --   This implies that preferrably fft_stage_dat_w <= 26, to fit the 27b
   --   multiplier resources.
+  -- . Increasing fft_stage_dat_w from 24b to 26b does increase M20K usage:
+  --         24b           26b
+  --     FFT 6 x  27 M20K, 6 x  28 M20K, due to separate
+  --     BF  2 x 403 M20K, 2 x 397 M20K, due to reorder_col
+  --     where 6 = c_sdp_P_pfb and 2 = c_sdp_N_beamsets.
+  --   The total design increase is 18 m20K = 2.5 % and 4000 FF = 1.2 %. The
+  --   nof DSP remains 611.
   CONSTANT c_sdp_W_fil_backoff             : NATURAL := 1;
   CONSTANT c_sdp_W_fft_guard               : NATURAL := 1;
-  CONSTANT c_sdp_W_fft_stage_dat           : NATURAL := 24;  -- TODO try 26b, compare synthesis results
+  CONSTANT c_sdp_W_fft_stage_dat           : NATURAL := 25;  -- TODO try 26b, compare synthesis results
   CONSTANT c_sdp_W_fft_in_dat              : NATURAL := c_sdp_W_fft_stage_dat - c_sdp_W_fft_guard;
   CONSTANT c_sdp_W_fft_out_gain            : NATURAL := 2;
   CONSTANT c_sdp_W_stat_data               : NATURAL := c_sdp_W_subband * 2 + ceil_log2(c_sdp_N_int_sub_hi);  -- = 54
-- 
GitLab