From a85be69042cf340b7527fade6aeef208a70b0c05 Mon Sep 17 00:00:00 2001
From: Erik Kooistra <kooistra@astron.nl>
Date: Fri, 20 Jul 2018 10:34:51 +0000
Subject: [PATCH] Correlator image 18593 with FIR pre-filter logic, but using
 cmd 36 bypass to effectively disable it.

---
 .../apertif/commissioning/central_commands.sh | 26 +++++++++++++++----
 1 file changed, 21 insertions(+), 5 deletions(-)

diff --git a/applications/apertif/commissioning/central_commands.sh b/applications/apertif/commissioning/central_commands.sh
index e990543935..fbdfc11053 100755
--- a/applications/apertif/commissioning/central_commands.sh
+++ b/applications/apertif/commissioning/central_commands.sh
@@ -45,9 +45,11 @@ echo central_commands.sh: Polarisation : $POL
 
 # Select correct firmware image for this application
 if [ "$APP" == "apertif-ag" ]; then
-    IMAGE=/home/kooistra/images/apertif_unb1_correlator_full-r18172.rbf # SR2.5
+    #IMAGE=/home/kooistra/images/apertif_unb1_correlator_full-r18172.rbf # SR2.5
+    IMAGE=/home/kooistra/images/apertif_unb1_correlator_full-r18593.rbf # D.Schuur 6-7-2018
 elif [ "$APP" == "apertif-dev" ]; then
-    IMAGE=/home/schuur/apertif_unb1_correlator_full-r18593.rbf # Image of July 4th, 2018. Reason: r18172 did not seem to include post-filterbank quantization.
+    #IMAGE=/home/kooistra/images/apertif_unb1_correlator_full-r18172.rbf # SR2.5
+    IMAGE=/home/kooistra/images/apertif_unb1_correlator_full-r18593.rbf # D.Schuur 6-7-2018
 elif [ "$APP" == "arts_sc1" ]; then
 #    IMAGE=/home/arts/arts_unb1_sc1-r16748.rbf
     IMAGE=/home/schuur/arts_unb1_sc1-r18242.rbf #Corrected BSN monitor register name to fix false error message of central_status.py
@@ -58,8 +60,9 @@ elif [ "$APP" == "arts_sc4" ]; then
     #IMAGE=/home/hargreaves/arts_unb1_sc4-r17918.rbf # Testimage for 10GbE - checksum errors
     #IMAGE=/home/hargreaves/arts_unb1_sc4-r17936.rbf # New testimage for 10GbE
     #IMAGE=/home/hargreaves/arts_unb1_sc4-r18051_2tabs_meetstiming.rbf # 2 tabs version
-    IMAGE=/home/hargreaves/arts_unb1_sc4-r18397_12timesIABa.rbf # 12 iabs version
+    #IMAGE=/home/hargreaves/arts_unb1_sc4-r18397_12timesIABa.rbf # 12 iabs version
     #IMAGE=/home/hargreaves/arts_unb1_sc4-r18397_TAB.rbf # 12 tabs version
+    IMAGE=/home/hargreaves/arts_unb1_sc4-r18476_TAB.rbf # 12 tabs version, fixed signal level
 
 fi
 
@@ -139,7 +142,7 @@ ARTSCLUSTER_40G_ETH_DST_PORT=(5000 5001 5002 5003 5004 \
                               5020 5021 5022 5023 5024 \
                               5025 5026 5027 5028 5029 \
                               5030 5031 5032 5033 5034 \
-                              3035 5036 5037 5038 5039)
+                              5035 5036 5037 5038 5039)
 
 
 ###############################################################################
@@ -224,6 +227,19 @@ if [ "$FLASH" == "TRUE" ]; then
     python $UPE/peripherals/util_system_info.py --unb $UNBS --fn 0:3 --bn 0:3 -n 2
 fi
 
+###############################################################################
+# Write Apertif Correlator channel filterbank FIR coefficients
+#
+# Default the firmware of r18593 contains the FIR pre-filter with Apertif coefficients
+# Use cmd 36 with filename = bypass to have transparent pre-filter, which is equivalent
+# to having no FIR pre-filter logic.
+# Earlier images do not contain the FIR pre-filter logic, so then cmd 36 must be commented.
+#
+###############################################################################
+#python $UPE/peripherals/pi_apertif_system.py --unb 2 --fn 0:3 --bn 0:3 --cmd 36 -v 4 --filename ../matlab/data/run_pfir_coeff_m_flat_hp_fircls1_8taps_64points_9b.dat  # Apertif coeffs
+python $UPE/peripherals/pi_apertif_system.py --unb $UNBS --fn 0:3 --bn 0:3 --cmd 36 -v 4 --filename bypass    # bypass coeffs
+
+
 ###############################################################################
 # Vitesse XAUI<->XFI transceiver settings
 ###############################################################################
@@ -482,7 +498,7 @@ elif [ $APP == "arts_sc4" ]; then
     python $UPE/peripherals/util_dp_xonoff.py --unb $UNBS --fn 0:3 --bn 0:3 -r 0 -n 2 -s TAB_I
 
     # Enable TAB Stokes IQUV output on all FPGAs on all UniBoards (bands)
-    python $UPE/peripherals/util_dp_xonoff.py --unb $UNBS --fn 0:3 --bn 0:3 -r 0 -n 2 -s TAB_IQUV
+    #python $UPE/peripherals/util_dp_xonoff.py --unb $UNBS --fn 0:3 --bn 0:3 -r 0 -n 2 -s TAB_IQUV
 
 fi
 
-- 
GitLab