From 2a2db8cef76ac564cccf1c9ccfdbc6e747a35cf5 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 4 Aug 2022 18:04:30 +0200
Subject: [PATCH] Corrected tb result.

---
 .../tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload.vhd    | 6 ++++--
 1 file changed, 4 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_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 863ff56e47..5726cae4b7 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
@@ -41,6 +41,8 @@
 --     sim:/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload/u_lofar_unb2c_sdp_station_xsub_one/u_sdp_station/pfb_sosi_arr \
 --     sim:/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload/u_lofar_unb2c_sdp_station_xsub_one/u_sdp_station/fsub_sosi_arr \
 --     sim:/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload/u_lofar_unb2c_sdp_station_xsub_one/u_sdp_station/bs_sosi
+--   > add wave -position insertpoint  \
+--     sim:/tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload/c_exp_subband_xst
 --   > run -a  
 --   Takes about 10 m
 --
@@ -88,7 +90,7 @@ ARCHITECTURE tb OF tb_lofar2_unb2c_sdp_station_xsub_one_xst_offload IS
   CONSTANT c_subband_step        : NATURAL := 3;  -- e.g. 0 or c_nof_crosslets
   CONSTANT c_nof_sync            : NATURAL := 3;
 
-  CONSTANT c_max_ratio           : REAL := 0.0001;  -- ratio that actual value may differ from expected value
+  CONSTANT c_max_ratio           : REAL := 0.001;  -- ratio that actual value may differ from expected value
 
   -- WG
   CONSTANT c_bsn_start_wg         : NATURAL := 2;
@@ -393,7 +395,7 @@ BEGIN
       END IF;
 
       -- Count the complex statistics
-      IF rx_sdp_stat_im_val <= '1' THEN
+      IF rx_sdp_stat_im_val = '1' THEN
         rx_sdp_stat_index <= rx_sdp_stat_index + 1;
       END IF;
 
-- 
GitLab