Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to override fft_batch_size to 1, for software FFT always. #879

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
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 @@
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)

Check warning on line 342 in gamutrf/grscan.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/grscan.py#L342

Added line #L342 was not covered by tests
else:
fft_batch_size = 1

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

Check warning on line 348 in gamutrf/grscan.py

View check run for this annotation

Codecov / codecov/patch

gamutrf/grscan.py#L348

Added line #L348 was not covered by tests

if pretune:
self.retune_pre_fft = self.iqtlabs.retune_pre_fft(
nfft,
Expand All @@ -347,16 +359,11 @@
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
Loading