diff --git a/applications/lofar2/libraries/sdp/src/python/sdp_hex.py b/applications/lofar2/libraries/sdp/src/python/sdp_hex.py
new file mode 100644
index 0000000000000000000000000000000000000000..1efa228e1a8f74ad63293b7c5ef1b7bd9fd63286
--- /dev/null
+++ b/applications/lofar2/libraries/sdp/src/python/sdp_hex.py
@@ -0,0 +1,52 @@
+#! /usr/bin/env python3
+###############################################################################
+#
+# Copyright 2022
+# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
+# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+###############################################################################
+# Author: Reinier vd Walle
+# Purpose: Generate the hex files for RAM initialization in SDP designs
+###############################################################################
+
+from intelhex import IntelHex
+import struct
+
+for i in range(0,6):
+    f = IntelHex()    
+    for j in range(0,2*488):
+        #f.puts(j*4, struct.pack(">I",j))
+        f.puts(j*2, struct.pack(">H",j))
+
+    f.write_hex_file("bf_unit_ss_wide_"+str(i)+".hex", byte_count = 2)
+
+for i in range(0,12):
+    f = IntelHex()    
+    for j in range(0,2*488):
+        f[4*j] = 0x00
+        f[4*j + 1] = 0x00
+        f[4*j + 2] = 0x40
+        f[4*j + 3] = 0x00
+    f.write_hex_file("bf_unit_weights_"+str(i)+".hex", byte_count = 4)
+
+for i in range(0,6):
+    f = IntelHex()    
+    for j in range(0,1024):
+        f[4*j] = 0x00
+        f[4*j + 1] = 0x00
+        f[4*j + 2] = 0x20
+        f[4*j + 3] = 0x00
+    f.write_hex_file("gains_1024_complex_16b13f_unit_"+str(i)+".hex", byte_count = 4)
diff --git a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_beamformer.vhd b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_beamformer.vhd
index 669db80faa9353c541db95f3353a7cd6aed30cc3..3053b5f21d4b25e3851a0c57cd02ddec09accbac 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_beamformer.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_beamformer.vhd
@@ -107,8 +107,9 @@ END node_sdp_beamformer;
 
 ARCHITECTURE str OF node_sdp_beamformer IS
   
+  -- Note that the sdp library contains src/python/sdp_hex.py to generate hex files.
   CONSTANT c_bf_select_file_prefix : STRING := "data/bf_unit_ss_wide";
-  CONSTANT c_bf_weights_file_name  : STRING := "data/bf_unit_weights";
+  CONSTANT c_bf_weights_file_name  : STRING := sel_a_b(g_sim, "data/bf_unit_weights", "UNUSED"); 
 
   CONSTANT c_nof_masters : POSITIVE := 2;
 
diff --git a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_filterbank.vhd b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_filterbank.vhd
index 149139e4ff79a3462f14bd6dca06c117677577dc..e5634c5516d0e5f5b3adfb766ed9ddb8b195118a 100644
--- a/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_filterbank.vhd
+++ b/applications/lofar2/libraries/sdp/src/vhdl/node_sdp_filterbank.vhd
@@ -97,7 +97,7 @@ END node_sdp_filterbank;
 ARCHITECTURE str OF node_sdp_filterbank IS
   
   CONSTANT c_coefs_file_prefix : STRING := "data/Coeffs16384Kaiser-quant_1wb";
-  CONSTANT c_gains_file_name : STRING := "data/gains_1024_complex_16b13f_unit";
+  CONSTANT c_gains_file_name : STRING := "data/gains_1024_complex_16b13f_unit"; -- Can be generated by src/python/sdp_hex.py
 
   CONSTANT c_subband_equalizer_latency : NATURAL := 4;