Xilinx
Block Preview

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

CE Input 1 bit BIT
Clock enable (unconnected = 1). Low freezes every channel.
Default: 1
CLK Input 1 bit BIT
Clock.
Default: Default Board Clock
RESET Input 1 bit BIT
Synchronous reset.
Default: Default Board Reset
OUT Output 16 bit BIT VECTOR
Saturated sum of all channels (+ noise), 16 bit x samples per clock.
VALID Output 1 bit BIT
High on every CE clock after the pipeline is primed.
CHn_EN / CHn_FREQ / CHn_AMP / CHn_MRATE / CHn_DEPTH
Present only when that parameter is set to P (port). Unconnected = the fixed value.
CHn_MOD_IN
External modulant (16-bit signed) or QAM symbol bits [5:0], when the source is External.
NOISE
Noise level when set to P; output sigma = 0.8165 * level LSB.
CHn_OUT
Optional per-channel output (same format as OUT).
CHn_TICK
Optional strobe: symbol / note start / modulant step of channel n.

Properties

Property window

Name EndpointName

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

Channels (JSON, use the designer) SigGenProject

Channel table produced by the Multichannel Signal Generator designer (double-click the block).

Hidden: the channel table produced by the designer (JSON).
KriaTest-compatible control registers KriaTestControl

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_EN b1 am_en (AM: 0 = envelope 1.0) / b2 burst_en, CH_BPER (burst period, clk cycles) and CH_BDUTY (duty Q0.16). Every channel EN must be a register. Off = original generator.

KriaTest-compatible control registers: CTRL, NOISE_SEED, CHn_EN am_en/burst_en bits, CHn_BPER, CHn_BDUTY (appended after the other registers).

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_EN b1 am_en (AM: 0 = envelope exactly 1.0) and b2 burst_en, CHn_BPER (burst period, clocks) and CHn_BDUTY (duty Q0.16): ON for (BPER*BDUTY)»16 of every BPER clocks. Every channel EN must be R.