id: rylr998_frame_gen label: RYLR998 Frame Generator category: '[RYLR998]/Framing' flags: [python, cpp] documentation: |- LoRa frame generator block. Generates complete LoRa frames from encoded symbol bins: [Preamble] + [Sync Word] + [SFD] + [Data Symbols] The sync word encodes the NETWORKID (0-255) as two upchirps: - First chirp: high nibble × (N/16) - Second chirp: low nibble × (N/16) This is the RYLR998 NETWORKID → sync word mapping: NETWORKID=18 (0x12) → sync bins [32, 64] NETWORKID=52 (0x34) → sync bins [96, 128] (LoRaWAN public) Input: Encoded data symbol bins (from PHY encoder) Output: Complete IQ frame samples templates: imports: from rylr998 import frame_gen make: rylr998.frame_gen(sf=${sf}, sample_rate=${sample_rate}, preamble_len=${preamble_len}, networkid=${networkid}) 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: sample_rate label: Sample Rate (Hz) dtype: real default: 125e3 - id: preamble_len label: Preamble Length dtype: int default: 8 - id: networkid label: NETWORKID dtype: int default: 18 inputs: - label: in domain: message dtype: int outputs: - label: out domain: stream dtype: complex file_format: 1