Implement the transmit/generate side as streaming GNU Radio blocks, complementing the existing receive chain. Each block maps to a physical instrument on CuriousMarc's Keysight bench: pcm_frame_source - PCM bit stream generator (sync_block + FrameSourceEngine) nrz_encoder - bits to NRZ waveform (+1/-1) with upsampling bpsk_subcarrier_mod - NRZ x cos(1.024 MHz) BPSK modulator fm_voice_subcarrier_mod - 1.25 MHz FM test tone source pm_mod - phase modulator: exp(j * deviation * input) usb_signal_source - convenience wrapper wiring all blocks together Includes GRC YAML definitions for all blocks under [Apollo USB] category, 49 new tests (271 total, all passing), and a loopback test that validates the full TX->RX round trip including frame recovery with 30 dB AWGN.
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
id: apollo_pcm_frame_source
|
|
label: Apollo PCM Frame Source
|
|
category: '[Apollo USB]'
|
|
flags: [python]
|
|
|
|
parameters:
|
|
- id: bit_rate
|
|
label: Bit Rate (bps)
|
|
dtype: int
|
|
default: '51200'
|
|
options: ['51200', '1600']
|
|
option_labels: ['High (51.2 kbps)', 'Low (1.6 kbps)']
|
|
|
|
inputs:
|
|
- label: frame_data
|
|
domain: message
|
|
optional: true
|
|
|
|
outputs:
|
|
- label: out
|
|
domain: stream
|
|
dtype: byte
|
|
|
|
templates:
|
|
imports: from apollo.pcm_frame_source import pcm_frame_source
|
|
make: apollo.pcm_frame_source.pcm_frame_source(bit_rate=${bit_rate})
|
|
|
|
documentation: |-
|
|
Apollo PCM Frame Source
|
|
|
|
Generates a continuous stream of NRZ-encoded PCM telemetry frame bits
|
|
(byte values 0 or 1). Frame IDs cycle 1 through 50 automatically,
|
|
with the 15-bit sync core complemented on odd-numbered frames.
|
|
|
|
This is the transmit-side counterpart to the PCM Frame Sync block.
|
|
|
|
The sync word format is:
|
|
[5-bit A][15-bit core][6-bit B][6-bit frame ID]
|
|
|
|
An optional message input (frame_data) accepts u8vector payloads that
|
|
will be used as data words for the next generated frame. Without
|
|
injected data, frames carry zero-fill.
|
|
|
|
Parameters:
|
|
bit_rate: 51200 (128 words/frame, 50 fps) or 1600 (200 words/frame, 1 fps)
|
|
|
|
file_format: 1
|