Skip to content

Commit

Permalink
Merge pull request #879 from anarkiwi/bf
Browse files Browse the repository at this point in the history
need to override fft_batch_size to 1, for software FFT always.
  • Loading branch information
anarkiwi authored Sep 22, 2023
2 parents 8574336 + 645de5f commit bc4cc2f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
33 changes: 20 additions & 13 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def __init__(
self.wavelearner = wavelearner
self.iqtlabs = iqtlabs
self.samp_rate = samp_rate
self.retune_pre_fft = blocks.stream_to_vector(
gr.sizeof_gr_complex, fft_batch_size * nfft
)
self.retune_pre_fft = None

##################################################
# Blocks
Expand Down Expand Up @@ -335,6 +333,20 @@ def get_fft_blocks(
tuning_ranges,
pretune,
):
fft_block = None
fft_roll = False
if self.wavelearner:
fft_block = self.wavelearner.fft(int(fft_batch_size * nfft), (nfft), True)
fft_roll = True
elif vkfft:
fft_block = self.iqtlabs.vkfft(int(fft_batch_size * nfft), nfft, True)
else:
fft_batch_size = 1

fft_blocks = []
if dc_block_len:
fft_blocks.append(grfilter.dc_blocker_cc(dc_block_len, dc_block_long))

if pretune:
self.retune_pre_fft = self.iqtlabs.retune_pre_fft(
nfft,
Expand All @@ -347,16 +359,11 @@ def get_fft_blocks(
skip_tune_step,
tuning_ranges,
)
fft_blocks = []
if dc_block_len:
fft_blocks.append(grfilter.dc_blocker_cc(dc_block_len, dc_block_long))
fft_block = None
fft_roll = False
if self.wavelearner:
fft_block = self.wavelearner.fft(int(fft_batch_size * nfft), (nfft), True)
fft_roll = True
elif vkfft:
fft_block = self.iqtlabs.vkfft(int(fft_batch_size * nfft), nfft, True)
else:
self.retune_pre_fft = blocks.stream_to_vector(
gr.sizeof_gr_complex, fft_batch_size * nfft
)

if fft_block:
fft_blocks.extend(
self.get_offload_fft_block(
Expand Down
2 changes: 1 addition & 1 deletion tests/test_grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def run_grscan_smoke(self, pretune, wavelearner, write_samples):
rotate_secs=900,
db_clamp_floor=-1e6,
pretune=pretune,
fft_batch_size=1,
fft_batch_size=256,
)
tb.start()
time.sleep(3)
Expand Down

0 comments on commit bc4cc2f

Please sign in to comment.