From 329d204a1d9a516de2558f298c6cce5abb60bba1 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Tue, 24 Jan 2023 13:18:03 +0100
Subject: [PATCH] Maximum WG ampl for 16b crosslets is 0.25.

---
 .../tb_lofar2_unb2c_sdp_station_xsub_one.vhd                    | 2 +-
 .../tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one.vhd b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one.vhd
index 77778e6256..44f347f06c 100644
--- a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one.vhd
+++ b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one.vhd
@@ -89,7 +89,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_xsub_one IS
 
   -- WG
   CONSTANT c_bsn_start_wg         : NATURAL := 2;  -- start WG at this BSN to instead of some BSN, to avoid mismatches in exact expected data values
-  CONSTANT c_sp_ampl              : REAL := 0.5;   -- WG normalized amplitude, 1.0 = FS (full scale), use <= 0.5 to avoid XST overflow
+  CONSTANT c_sp_ampl              : REAL := 0.25;  -- WG normalized amplitude, 1.0 = FS (full scale), use <= 0.25 to avoid XST overflow
   CONSTANT c_wg_ampl              : NATURAL := NATURAL(c_sp_ampl * REAL(c_sdp_FS_adc));  -- in number of lsb
   CONSTANT c_wg_freq_offset       : REAL := 0.0/11.0; -- in freq_unit
   CONSTANT c_subband_sp           : REAL := 102.0;  -- Select subband at index 102 = 102/1024 * 200MHz = 19.921875 MHz
diff --git a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd
index 7500ba0157..53fd18bb0a 100644
--- a/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd
+++ b/applications/lofar2/designs/lofar2_unb2c_sdp_station/revisions/lofar2_unb2c_sdp_station_xsub_one/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd
@@ -103,7 +103,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload IS
 
   -- WG
   CONSTANT c_bsn_start_wg         : NATURAL := 2;
-  CONSTANT c_sp_ampl              : REAL := 0.5;   -- WG normalized amplitude, 1.0 = FS (full scale), use <= 0.5 to avoid XST overflow
+  CONSTANT c_sp_ampl              : REAL := 0.25;   -- WG normalized amplitude, 1.0 = FS (full scale), use <= 0.25 to avoid XST overflow
   CONSTANT c_wg_ampl              : NATURAL := NATURAL(c_sp_ampl * REAL(c_sdp_FS_adc));  -- in number of lsb
   CONSTANT c_wg_subband           : NATURAL := 12;
 
-- 
GitLab