From 3f2a15bb0f1f41d9e971f1ce856238a765b308f5 Mon Sep 17 00:00:00 2001
From: Eric Kooistra <kooistra@astron.nl>
Date: Thu, 28 Sep 2023 17:18:51 +0200
Subject: [PATCH] Correct address_offset for N_destinations_max = 32.

---
 .../lofar2/libraries/sdp/sdp.peripheral.yaml         | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/applications/lofar2/libraries/sdp/sdp.peripheral.yaml b/applications/lofar2/libraries/sdp/sdp.peripheral.yaml
index 42da4ecb68..3aebc0f873 100644
--- a/applications/lofar2/libraries/sdp/sdp.peripheral.yaml
+++ b/applications/lofar2/libraries/sdp/sdp.peripheral.yaml
@@ -209,12 +209,12 @@ peripherals:
            via nof_blocks_per_packet."
         fields:
           - - { field_name: eth_destination_mac,    number_of_fields: N_destinations_max, mm_width: 32, user_width: 48, radix: uint64, access_mode: RW, address_offset: 0x0 }
-          - - { field_name: ip_destination_address, number_of_fields: N_destinations_max, mm_width: 32,                                access_mode: RW, address_offset: 0x80 }
-          - - { field_name: udp_destination_port,   number_of_fields: N_destinations_max, mm_width: 16,                                access_mode: RW, address_offset: 0xC0 }
-          - - { field_name: nof_destinations,      mm_width: 8, access_mode: RW, address_offset: 0x100 }
-          - - { field_name: nof_destinations_act,  mm_width: 8, access_mode: RO, address_offset: 0x104 }
-          - - { field_name: nof_destinations_max,  mm_width: 8, access_mode: RO, address_offset: 0x108 }
-          - - { field_name: nof_blocks_per_packet, mm_width: 8, access_mode: RO, address_offset: 0x10C }
+          - - { field_name: ip_destination_address, number_of_fields: N_destinations_max, mm_width: 32,                                access_mode: RW, address_offset: 0x100 }
+          - - { field_name: udp_destination_port,   number_of_fields: N_destinations_max, mm_width: 16,                                access_mode: RW, address_offset: 0x180 }
+          - - { field_name: nof_destinations,      mm_width: 8, access_mode: RW, address_offset: 0x200 }  # = 512 = 128 * 4
+          - - { field_name: nof_destinations_act,  mm_width: 8, access_mode: RO, address_offset: 0x204 }  # = 516 = 129 * 4
+          - - { field_name: nof_destinations_max,  mm_width: 8, access_mode: RO, address_offset: 0x208 }  # = 520 = 130 * 4
+          - - { field_name: nof_blocks_per_packet, mm_width: 8, access_mode: RO, address_offset: 0x20C }  # = 524 = 131 * 4
 
 
   - peripheral_name: sdp_beamformer_output_hdr_dat  #  pi_dp_offload_tx_hdr_dat_lofar2_beamformer_output.py
-- 
GitLab