TM
HLS

Introduction

The NCO (TM) block is the time-multiplexed version of the Numerically Controlled Oscillator. It generates multiple independent waveforms in parallel, with each channel having its own frequency, phase, and duty cycle settings.

This block is designed for applications requiring multiple synchronized or independent oscillators, such as multi-channel signal generation, beamforming, or polyphonic synthesis.

Pin Description

PERIOD PERIOD_BITS × TM bit
Waveform periods for all channels (packed). Total width = PERIOD_BITS × TM_FACTOR. Channel 0 in LSBs, channel N-1 in MSBs.
Default: Must be connected
PHASE 16 × TM bit
Phase offsets for all channels (packed, 16 bits per channel). Total width = 16 × TM_FACTOR. Each channel’s phase: 0x0000=0°, 0x4000=90°, 0x8000=180°.
DUTY 16 × TM bit
Duty cycle for all channels (packed, 16 bits per channel). Total width = 16 × TM_FACTOR. Used for TRIANGLE and SQUARE waveforms.
SYMMETRY 16 × TM bit
Symmetry control for all channels (packed, 16 bits per channel). Reserved for future use.
CLK 1 bit
System clock input. All channels operate synchronously on this clock. Default: Board acquisition clock.
RESET 1 bit
Synchronous reset input. Resets all phase accumulators to zero. Default: Global reset.
OUT OUT_BITS × TM bit
Waveform outputs for all channels (packed). Total width = OUTPUT_BITS × TM_FACTOR. Channel 0 in LSBs, channel N-1 in MSBs.

Properties

OutputBits OutputBits
Number of bits per channel output. Range: 8 to 32, default 16.
TMFactor TMFactor
Number of time-multiplexed channels. Available values: 2, 4, 8, 16, 32, default 8.
AccumulatorBits AccumulatorBits
Number of bits of each phase accumulator. Higher values provide better frequency resolution. Available values: 32, 40, 48, 56, 64, default 48.
WaveformType WaveformType
Type of waveform to generate (same for all channels). Available values: SINE, COSINE, RAMP, TRIANGLE, SQUARE, SAWTOOTH, default SINE.
OutputSign OutputSign
Output signal format (same for all channels). Available values: UNSIGNED, SIGNED, default SIGNED.
PeriodFormat PeriodFormat
Format of the PERIOD input signal. Available values: UINT32, FIXED16.16, FIXED24.8, FIXED40.24, default UINT32.
LUTSize LUTSize
Sine/Cosine lookup table size (shared by all channels). Available values: 256 (1.41° res), 512 (0.70° res), 1024 (0.35° res), 2048 (0.18° res), 4096 (0.09° res), 8192 (0.04° res), default 1024 (0.35° res).

Usage

Time-Multiplexed Architecture

The NCO_TM processes all channels in parallel using fully unrolled loops. Each channel has:

  • Independent phase accumulator
  • Independent frequency (PERIOD) setting
  • Independent phase offset
  • Independent duty cycle control

All channels share the same waveform type, output resolution, and LUT.


Channel Configuration

The TM factor determines the number of parallel channels:

TM Factor Channels PERIOD Width PHASE Width OUT Width
2 2 64/128 bits 32 bits 2×OUT_BITS
4 4 128/256 bits 64 bits 4×OUT_BITS
8 8 256/512 bits 128 bits 8×OUT_BITS
16 16 512/1024 bits 256 bits 16×OUT_BITS
32 32 1024/2048 bits 512 bits 32×OUT_BITS

The total bus widths are multiplied by the TM factor.


Input Signal Packing

Input signals are packed with channel 0 in the least significant bits:

  PERIOD = [Ch_N-1] [Ch_N-2] ... [Ch_1] [Ch_0]
         MSB                          LSB
  

For example, with TM=4 and PERIOD_BITS=32:

  • Bits [31:0] = Channel 0 period
  • Bits [63:32] = Channel 1 period
  • Bits [95:64] = Channel 2 period
  • Bits [127:96] = Channel 3 period

Output Signal Packing

Output signals follow the same packing convention:

  OUT = [Ch_N-1] [Ch_N-2] ... [Ch_1] [Ch_0]
      MSB                          LSB
  

For example, with TM=4 and OUT_BITS=16:

  • Bits [15:0] = Channel 0 output
  • Bits [31:16] = Channel 1 output
  • Bits [47:32] = Channel 2 output
  • Bits [63:48] = Channel 3 output

Per-Channel Phase Accumulators

Each channel maintains its own phase accumulator that increments independently:

$$ \phi_i[n] = \phi_i[n-1] + \Delta\phi_i \mod 2^N $$

where $i$ is the channel index. This allows each channel to generate a completely independent frequency.


Frequency Control

Each channel’s output frequency is:

$$ f_{out,i} = \frac{f_{clk}}{\text{PERIOD}_i} $$

All channels operate on the same clock, but each has independent frequency control.


Waveform Types

All channels generate the same waveform type (configured at design time):

Waveform Description
SINE Sinusoidal wave using shared LUT
COSINE Cosine wave (sine with 90° phase shift)
RAMP Linear ramp from minimum to maximum
TRIANGLE Symmetric triangular wave
SQUARE Square wave with per-channel duty cycle
SAWTOOTH Inverted ramp from maximum to minimum

Per-Channel Parameters

Each channel can have independent:

  • PERIOD: Waveform frequency
  • PHASE: Phase offset
  • DUTY: Duty cycle (for TRIANGLE/SQUARE)

Timing

Parameter Value
Pipeline Latency 3 clock cycles
Throughput TM samples per clock cycle (II=1)

The output is updated on every clock cycle. All TM channels are processed in parallel, so the aggregate throughput is TM × f_clk samples per second.


Resource Usage

The TM version uses more resources than the single-channel NCO:

  • Phase accumulators: TM × accumulator_bits
  • LUT: Shared (1 copy)
  • DSP blocks: Proportional to TM factor

For minimal resource usage with many channels, consider using a lower TM factor with external time-multiplexing.


Synchronization

All channels are processed synchronously on the same clock edge. This ensures:

  • Zero phase drift between channels
  • Deterministic timing relationships
  • Suitable for coherent multi-channel applications

Resources & Timing

  • Latency: 3 clock cycles

  • Throughput: TM samples per clock cycle (II=1)

HLS-based implementation with fully unrolled parallel processing. Resource usage scales with TM factor.