Xilinx
Block Preview

Introduction

Every source is one 32-bit phase accumulator advanced by RATE per clock; its wrap is the TICK.

Source OUT RATE means
Sine / Triangle / Saw / Square LFO waveform (Q1.15) frequency = RATE/2^32 * clock
PRBS-n +/-full scale on the newest bit, BITS = 6 newest bits bit (or 1..6-bit symbol) rate
Counter centred staircase of a 1..16-bit counter step rate
Melody cos of the current note, 0 on rests (Q = sin) tempo: one tick = 1/16 note

The melody is stored as note/duration pairs (10 bits per note) in a generic - no BRAM; pitches are computed at elaboration from the clock frequency (A4 = 440 Hz). Library: C major scale, Ode to Joy, Fur Elise, Frere Jacques, Twinkle Twinkle; custom tunes as text E5/1 D#5/1 R/2 ....

Pin Description

CE Input 1 bit BIT
Clock enable (unconnected = 1).
Default: 1
CLK Input 1 bit BIT
Clock.
Default: Default Board Clock
RESET Input 1 bit BIT
Synchronous reset (melodies restart from the first note).
Default: Default Board Reset
S0_OUT Output 16 bit BIT VECTOR
S0_TICK Output 1 bit BIT
S0_GATE Output 1 bit BIT
S1_OUT Output 16 bit BIT VECTOR
Sn_RATE / Sn_AMP
Present only when set to P (port); unconnected = the fixed value.
Sn_OUT
Source n, 16-bit signed.
Sn_Q
Optional quadrature (sine and melody only).
Sn_TICK
Optional strobe: accumulator wrap / note start.
Sn_GATE
Optional: note on (melody), high half (square), 1 otherwise.
Sn_BITS
Optional 6-bit PRBS state / counter value.

Properties

Property window

Name EndpointName

Endpoint name of the run-time registers (INFO + every RATE / AMP set to ‘register’ in the designer).

Endpoint name of the INFO register and of every RATE / GAIN set to R.

Default: ModSrc_0

Sources (JSON, use the designer) ModSrcProject

Source table produced by the designer (double-click the block).

Hidden: the source table produced by the designer (JSON).

Usage notes

  • GAIN is Q1.15 unsigned with 0x8000 = 1.0; the output saturates at +/-32767.
  • TICK, GATE (note on / square high) and BITS are delayed by the gain register so they stay aligned with OUT.
  • Register parameters read 0 after reset: a register RATE stops the source until software writes it.
  • Register INFO (read only) = 0x4D53_NN00 (NN sources).