diff --git a/applications/apertif/commissioning/set_bf_reorder.py b/applications/apertif/commissioning/set_bf_reorder.py new file mode 100644 index 0000000000000000000000000000000000000000..d4ca9b8f07d42808d5b1f47e5f11c405bebd06f5 --- /dev/null +++ b/applications/apertif/commissioning/set_bf_reorder.py @@ -0,0 +1,59 @@ +# Author: Daniel van der Schuur +# Purpose: Set pre-multiplier reorder stage in fn_beamformer + +############################################################################### +# beamformer input: +# . 16 streams carrying frames 4 Signal Paths * 24 SubBands each (96 words per stream) +# . Example for 1 timesample: +# . 0 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . . +# . . +# . 15 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +############################################################################### + +############################################################################### +# Reorder input = beamformer input copied 4 times +# . Remark: all signal paths still available, hence no reordering between streams +############################################################################### +# . 64 streams carrying frames 4 Signal Paths * 24 SubBands each (96 words per stream) +# . Example for 1 timesample: +# . 0 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 1 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 2 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 3 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . . +# . . +# . 60 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 61 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 62 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 63 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] + +############################################################################### +# Reorder output = 64 streams of 256 words (user selectable from 96 input words) +# . We want 2 blocks of 96 + +# . Example for 1 timesample [SP,SB]: +# . 0 - (0,0), (1,0), (0,1), (1,1), (0,1), (1,1), + + +# . 0 - SP[0]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 1 - SP[1]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 2 - SP[2]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . 3 - SP[3]SB[0..23], SP[1]SB[0..23], SP[2]SB[0..23], SP[3]SB[0..23] +# . . +# . . +# . 60 - SP[60]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 61 - SP[61]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 62 - SP[62]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] +# . 63 - SP[63]SB[0..23], SP[61]SB[0..23], SP[62]SB[0..23], SP[63]SB[0..23] + +############################################################################### + +sp_sb_256_words = [] +#for beam in range(4): # 4 beams (SP) per bf_unit +for sb in range(24): # 24 subbands per SP (beam) + for sp in range(2): # 2 interleaved SP (beams) per bf_unit + sp_sb = tuple([sp, sb]) + sp_sb_256_words.append(sp_sb) + +print sp_sb_256_words diff --git a/applications/apertif/commissioning/set_bf_weights.py b/applications/apertif/commissioning/set_bf_weights.py new file mode 100644 index 0000000000000000000000000000000000000000..41f9330333d0bc2136edc1bec672776b53ea9752 --- /dev/null +++ b/applications/apertif/commissioning/set_bf_weights.py @@ -0,0 +1,42 @@ + + +# Given the reorder block output, we want to use the weights to enable/disable +# the reorder output blocks in time. + + +# 0 - SP 0:3, SB 0:23 : output cycles 0:95 on bf_unit[0] +# 1 - 0 +# 2 - 0 +# 3 - 0 +# 4 - SP 4:7, SB 0:23 : output cycles 96:191 on bf_unit[0] +# 5 - 0 +# 6 - 0 +# 7 - 0 +# 8 - SP 8:11, SB 0:23 : output cycles 0:95 on bf_unit[1] +# 9 - 0 +# 10 - 0 +# 11 - 0 +# 12 - SP 12:15, SB 0:23 : output cycles 96:191 on bf_unit[1] +# 13 - 0 +# 14 - 0 +# 15 - 0 +# 16 - SP 16:19, SB 0:23 : output cycles 0:95 on bf_unit[2] +# 17 - 0 +# 18 - 0 +# 19 - 0 +# 20 - SP 20:23, SB 0:23 : output cycles 96:191 on bf_unit[2] +# 21 - 0 +# 22 - 0 +# 23 - 0 +# 24 - SP 24:27, SB 0:23 : output cycles 0:95 on bf_unit[3] +# 25 - 0 +# 26 - 0 +# 27 - 0 +# 28 - SP 28:31, SB 0:23 : output cycles 96:191 on bf_unit[3] +# 29 - 0 +# 30 - 0 +# 31 - 0 +# 32 - 0 +# . - 0 +# . - 0 +# 63 - 0