diff options
author | Igor Freire <igor@blockstream.com> | 2020-01-06 16:00:48 -0300 |
---|---|---|
committer | mormj <34754695+mormj@users.noreply.github.com> | 2021-04-17 19:58:05 -0400 |
commit | 9e24ad6d94e75827f2ea1fe0e7371dc16dc39db6 (patch) | |
tree | 30488f0a7c3a665579107d5cd6eb8da797d5cac5 /gr-blocks/grc | |
parent | ea9a86153ba48697ff3cf81e7d002433af93c9ac (diff) |
blocks: Add msg port to set rotator's phase inc
Receivers commonly estimate the frequency offset on a block that is
downstream relative to the frequency correction NCO. In such
architectures, typically the frequency offset estimator feeds the
estimation back to the NCO. Until now, this was not possible if using
the rotator block as the NCO.
This patch adds a message port to the rotator block such that the
referred feedback architecture becomes feasible. A downstream block can
estimate the frequency offset and send a message to the rotator block to
update its rotating frequency (i.e., its phase increment).
The requesting block can schedule the phase increment update to a
specific absolute sample index. This feature is useful for receivers
that rely on a frame structure and pilot-aided frequency offset
estimation. If the true frequency offset is allowed to change at any
random instant throughout the frame, the frame-averaged frequency offset
estimation can become less reliable. Instead, it is often better to
update the frequency correction right at the start of a new frame. With
that, the true frequency offset is preserved in the course of a frame
and only changes around the boundary between consecutive frames.
For flexibility when using this feature, it is the responsibility of the
downstream block to schedule the phase increment update properly. For
example, if there is a decimator in between the rotator block and the
frequency offset estimator, the latter will need to take the sample rate
conversion into account when defining the absolute sample offset when
the update should be applied.
Besides, the rotator block can now place a tag on the sample where it
updates the phase increment. This allows a downstream block to better
calibrate and validate the scheduling of phase increment updates.
Signed-off-by: Igor Freire <igor@blockstream.com>
Diffstat (limited to 'gr-blocks/grc')
-rw-r--r-- | gr-blocks/grc/blocks_rotator_cc.block.yml | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/gr-blocks/grc/blocks_rotator_cc.block.yml b/gr-blocks/grc/blocks_rotator_cc.block.yml index 19143f98bb..6cd0e1321d 100644 --- a/gr-blocks/grc/blocks_rotator_cc.block.yml +++ b/gr-blocks/grc/blocks_rotator_cc.block.yml @@ -7,10 +7,20 @@ parameters: label: Phase Increment dtype: real default: '0.0' +- id: tag_inc_update + label: Tag Increment Updates + dtype: enum + default: 'False' + options: ['True', 'False'] + option_labels: ['Yes', 'No'] + hide: part inputs: - domain: stream dtype: complex +- domain: message + id: cmd + optional: true outputs: - domain: stream @@ -18,14 +28,14 @@ outputs: templates: imports: from gnuradio import blocks - make: blocks.rotator_cc(${phase_inc}) + make: blocks.rotator_cc(${phase_inc}, ${tag_inc_update}) callbacks: - set_phase_inc(${phase_inc}) cpp_templates: includes: ['#include <gnuradio/blocks/rotator_cc.h>'] declarations: 'blocks::rotator_cc::sptr ${id};' - make: 'this->${id} = blocks::rotator_cc::make(${phase_inc});' + make: 'this->${id} = blocks::rotator_cc::make(${phase_inc}, ${tag_inc_update});' callbacks: - set_phase_inc(${phase_inc}) |