Multichannel Signal Generator
N-channel modulated test-signal generator: per channel a 32-bit carrier NCO, a Q1.15 amplitude, an enable and a modulation chosen among CW, AM, FM, PM, USB, LSB, QAM-4/16/64 and pulsed, driven by a low-memory internal modulant (sine/triangle/saw/square LFO, PRBS, counter, recognisable melodies) or by an external sample stream. Every parameter of every channel is individually a fixed value, a symbol pin or a run-time register. Optional noise, 1..8 samples per clock (SSR). Port of the KriaTest live-demo generator.
Introduction
Each channel is a DDS (32-bit phase accumulator, 4096-point quarter-wave sine) followed by a modulator; the channels are summed with symmetric saturation to a 16-bit output that can carry 1, 2, 4 or 8 consecutive samples per clock (lane 0 = oldest sample, bits 15:0).
| Modulation | What it does | DEPTH means |
|---|---|---|
| CW | carrier only | - |
| AM | env = (1 + d*m)/(1 + d) | d, Q0.16 (0.5 = 0x8000) |
| FM | inc = FREQ + DEPTH*m | peak deviation, phase-increment units |
| PM | phase += DEPTH*m | peak deviation in turns, 0x4000 = 90 deg |
| USB / LSB | sin(carrier +/- modulant) | - (exact for Sine / Melody modulants) |
| QAM4/16/64 | Gray-coded symbols from the modulant BITS, one per tick | - |
| PULSED | carrier gated on for DEPTH of every MOD_RATE period | duty, Q0.16 |
Modulant sources (per channel): Sine / Triangle / Saw / Square LFO at
MOD_RATE, PRBS-7/9/15/23/31 and a counter stepping at MOD_RATE, a MELODY
(note/duration ROM held in a generic: Ode to Joy, Fur Elise, Frere Jacques,
C major scale, Twinkle Twinkle or your own) whose tempo is MOD_RATE, or
EXTERNAL samples on CHn_MOD_IN (for QAM: symbol bits MOD_IN[5:0]).
Fixed / port / register. In the designer every parameter of every channel (EN, carrier FREQ, AMP, MOD_RATE, DEPTH, noise level) has an F / P / R switch:
- F - the value is a literal in the generated HDL;
- P - a pin appears on the symbol; left unconnected it takes the fixed value;
- R - a 32-bit run-time register
REG_<Name>_CHn_<PARAM>(reads 0 after reset until software writes it). Only what is set to P or R creates pins / registers.
Pin Description
Properties
Endpoint name of the run-time registers (INFO + every parameter set to ‘register’ in the designer).
Endpoint name of the INFO register and of every parameter set to R.Default: SigGen_0
Channel table produced by the Multichannel Signal Generator designer (double-click the block).
Hidden: the channel table produced by the designer (JSON).Adds the KriaTest siggen control plane: CTRL (b0 enable: 0 freezes the generator and drops VALID; b1 clear: level, resets accumulators/noise/pipeline), NOISE_SEED (0 = designer seed), CH
Default: False
Usage notes
- Double-click opens the designer (channel table, units in Hz / FS / degrees / BPM, live preview and spectrum, pin & register summary).
- Raw formats: FREQ = f / fs * 2^32 with fs = clock * samples-per-clock; MOD_RATE = f / clock * 2^32 (it runs at the clock rate); AMP Q1.15.
- CE freezes the whole generator (phase continuous); VALID marks the clocks that carry new samples once the pipeline is primed.
- The KriaTest tone generator corresponds to 8 AM channels at SSR 4 with every parameter as a register (tb/multichannel-siggen/gen_kria.json).
- Register
INFO(read only) = 0x5347_NNSS (NN channels, SS samples per clock). - KriaTestControl (property, default off) adds the KriaTest siggen
control plane:
CTRL(b0 enable - 0 freezes the generator and drops VALID; b1 clear - level, resets accumulators, burst counters, noise and pipeline),NOISE_SEED(loaded at reset/clear; 0 = designer seed),CHn_ENb1 am_en (AM: 0 = envelope exactly 1.0) and b2 burst_en,CHn_BPER(burst period, clocks) andCHn_BDUTY(duty Q0.16): ON for (BPER*BDUTY)»16 of every BPER clocks. Every channel EN must be R.