Skip to content

Demo 5: mixed-precision SDR link demonstrator #128

Description

@Ravenwater

Port upstream's SDR link demonstrator to a Python demo, as
demos/05_sdr_link/.

Upstream source: applications/sdr_demo/sdr_demo.cpp (1591 lines, upstream
#104) and the six-page guide under docs-site/src/content/docs/sdr/
(upstream #105).

Why

demos/01_audio_dynamics through demos/04_sdr_ddc_cascade established the
pattern: a README that states the engineering question, a design.py that
produces coefficients, a simulate.py that measures, and an emitter that
writes something a downstream toolchain can consume. Demo 4 already covers the
receiver front end (digital down-conversion). This demo covers the other
half — modulation, shaping, synchronization, demodulation — and is where the
mixed-precision story actually pays off, because it can report EVM and BER
per arithmetic config rather than a filter response.

Scope

  • demos/05_sdr_link/README.md — the engineering question and the measured
    answer, in the voice of the existing four.
  • design.py — constellation + RRC pulse pair for a chosen modulation.
  • simulate.py — full link: map -> shape -> AWGN -> matched filter -> AGC ->
    timing recovery -> carrier recovery -> demap; report EVM, MER, BER against
    theoretical_ber_awgn.
  • A precision sweep across the dtype table using the analyze_blocks binding,
    reporting where each block breaks.
  • An emitter consistent with the other demos (emit_c_header.py or a coeff
    emitter), for the RRC taps.

Notes

  • Do not restate the old 0.6.0 Phase 2: expose CoeffScalar/T in window and FIR design bindings #85 premise. Upstream's own sweep measured the
    opposite of what the epic assumed — see the precision-analysis issue in this
    epic and upstream's sdr/precision.md. Report what this demo measures.
  • Tests go in tests/test_demos.py, which already has the
    function-scoped _demo_modules contextmanager that purges and restores
    module names — demos share design.py/simulate.py basenames and collided
    in sys.modules before that helper existed. Use it.
  • Keep the runtime sane. The full precision sweep at 2000 symbols across 18
    configs and 5 blocks is not a unit test; gate the expensive path behind a
    __main__ guard and test the cheap one.

Depends on

All binding issues in the epic. This is the last one.

Deliverables

  • demos/05_sdr_link/ with README, design, simulate, emitter.
  • Coverage in tests/test_demos.py using _demo_modules.
  • README module/demo table updated.

Part of the SDR binding epic #130.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions