Skip to content
Snippets Groups Projects
Commit 24107044 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Merge branch 'L2SDP-715' into 'master'

L2SDP-715

Closes L2SDP-715

See merge request desp/hdl!240
parents 0f931c82 714ff2be
No related branches found
No related tags found
1 merge request!240L2SDP-715
Pipeline #28700 passed
#! /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)
......@@ -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;
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment