gr-rylr998/grc/rylr998_phy_encode.block.yml
Ryan Malloy c839d225a8 Initial release: complete LoRa TX/RX for RYLR998 modems
GNU Radio Out-of-Tree module providing:
- Complete TX chain: PHYEncode → FrameGen → CSSMod
- Complete RX chain: CSSDemod → FrameSync → PHYDecode
- NETWORKID extraction/encoding (0-255 range)
- All SF (7-12) and CR (4/5-4/8) combinations
- Loopback tested with 24/24 configurations passing

Key features:
- Fractional SFD (2.25 downchirp) handling
- Gray encode/decode with proper inverse operations
- gr-lora_sdr compatible decode modes
- GRC block definitions and example flowgraphs
- Comprehensive documentation

Discovered RYLR998 sync word mapping:
  sync_bin_1 = (NETWORKID >> 4) * 8
  sync_bin_2 = (NETWORKID & 0x0F) * 8
2026-02-05 13:38:07 -07:00

74 lines
1.6 KiB
YAML

id: rylr998_phy_encode
label: RYLR998 PHY Encoder
category: '[RYLR998]/PHY'
flags: [python, cpp]
documentation: |-
LoRa PHY layer encoder.
Complete transmit chain: CRC → Whiten → Hamming FEC → Interleave → Gray encode
Encodes payload bytes into CSS symbol bins.
TX chain order:
1. Payload bytes → nibbles (low nibble first)
2. Append CRC (if enabled)
3. Whiten payload nibbles
4. Build header (if explicit mode)
5. Hamming FEC encode
6. Interleave
7. Gray encode
8. Scale for reduced rate (header)
Input: Raw payload bytes
Output: Encoded symbol bins (ready for Frame Generator)
templates:
imports: from rylr998 import phy_encode
make: rylr998.phy_encode(sf=${sf}, cr=${cr}, has_crc=${has_crc}, ldro=${ldro}, implicit_header=${implicit_header})
parameters:
- id: sf
label: Spreading Factor
dtype: int
default: 9
options: [7, 8, 9, 10, 11, 12]
option_labels: ['SF7', 'SF8', 'SF9', 'SF10', 'SF11', 'SF12']
- id: cr
label: Coding Rate
dtype: int
default: 1
options: [1, 2, 3, 4]
option_labels: ['4/5', '4/6', '4/7', '4/8']
- id: has_crc
label: CRC Enabled
dtype: bool
default: 'True'
options: ['True', 'False']
- id: ldro
label: Low Data Rate Opt
dtype: bool
default: 'False'
options: ['True', 'False']
- id: implicit_header
label: Implicit Header
dtype: bool
default: 'False'
options: ['True', 'False']
inputs:
- label: payload
domain: message
dtype: byte
outputs:
- label: symbols
domain: message
dtype: int
file_format: 1