From fc19d7c3147d19c3d7857e201f81ffacba23ad14 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Mon, 27 Mar 2023 08:35:32 +0200
Subject: [PATCH] Update transient header.

---
 .../prestudy/station2_sdp_transient_buffer.txt  | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/applications/lofar2/doc/prestudy/station2_sdp_transient_buffer.txt b/applications/lofar2/doc/prestudy/station2_sdp_transient_buffer.txt
index 9a54def390..a04243e671 100644
--- a/applications/lofar2/doc/prestudy/station2_sdp_transient_buffer.txt
+++ b/applications/lofar2/doc/prestudy/station2_sdp_transient_buffer.txt
@@ -575,7 +575,7 @@ The CP FPGA_beamlet_output_nof_beamlets_RW is not supported in SDPTR and SDPFW y
         . N_remaining == 0, else something went wrong in SDPFW
         . N_dumped = N_read - N_dropped, else something went wrong in SDPFW
         . N_dropped == 0, else packets got lost due to DDR4 memory access errors
-        . N_lost == 0, else packets got lost on the ring
+        . N_lost == 0, else packets got lost on the ring --> check ring MP for details
         . N_read == FPGA_tbuf_dump_nof_packets_R * nof active ai, else something went wrong in SDPFW
         . N_output == N_read - N_dropped - N_lost, else something went wrong in SDPFW
 
@@ -607,23 +607,22 @@ The CP FPGA_beamlet_output_nof_beamlets_RW is not supported in SDPTR and SDPFW y
   . 8b version_id
   - 32b observation_id --> like for beamlets, may be useful for cosmic ray piggy back, not in LOFAR1
   . 16b station_info
-    - 4b antenna_field_index (e.g. HBA-0, HBA-1)
+    - 4b antenna_field_index (e.g. HBA-0, HBA-1, Nenufar)
     - 12b station_id
-  . 16b source_info (as in beamlet packet)
+  . 16b source_info
     - 1b antenna_band_index (LB, HB)
     - 2b nyquist_zone_index
     - 1b f_adc --> sample clock rate, period is 5 ns or 6.25 ns
-    - 3b reserved
     - 4b sample_width --> 14b, where 16b is represented by 0
-    - 5b gn_index --> purpose fault analysis
+    - 8b gn_index --> purpose fault analysis
   . 32b reserved
   .  8b antenna_input_index --> 0..95
-  . 16b nof_samples_per_packet --> (8kB - 16) / 14b = 4672 (= 1022 words of 64b) --> log2() = 13b
+  . 16b nof_samples_per_packet --> log2(2000) = 12b
   . 64b RSN = Sample Sequence Number --> is prefered over a BSN, because RSN can start at any sample, whereas a BSN has to fit start at 1970.
 
-??? 4b antenna_field_index in station_info
-??? 8b gn_index
-??? 2 Byte antenne_input_index
+??? 4b antenna_field_index in station_info --> L2SDP-917
+??? 8b gn_index --> Ja voor TBuf, L2SDP-930 voor beamlets
+??? 2 Byte of 12b antenne_input_index --> Nee houdt eerst 8b, L2SDP-931 voor SST, XST
 
 
 - headers: 14 + 20 + 8 + 24 = 66 bytes
-- 
GitLab