Xilinx
HLS
Block Preview

Introduction

Port of the KriaTest poliphase_channelizer (Vitis HLS DATAFLOW, silicon proven on KR260): commutator + polyphase FIR with time-shared MACs, ping- pong reorder, radix-2 single-path delay-feedback FFT with runtime bypass of the leading stages, formatter with channel index. The core source is verbatim; this block adds the control plane KriaTest ran in software (clear/load sequencing, auto-restart, coefficient RAM) as a VHDL wrapper, and optionally KriaTest’s chan_glue (Q3.21 -> int16 scaling).

   IN_I/IN_Q --FIFO--> [ FIR polyphase -> reorder -> SDF FFT -> format ] --chan_glue--> OUT_I/OUT_Q
                        ^ coeffs (endpoint memory, MaxChannels*8 x 18)       OUT_CH / OUT_LAST
  

Pin Description

IN_I Input 16 bit BIT VECTOR
I input, Q1.15.
IN_Q Input 16 bit BIT VECTOR
Q input, Q1.15.
VALID_IN Input 1 bit BIT
Input sample valid (unconnected = ‘1’).
CLK Input 1 bit BIT
DSP clock (250 MHz).
Default: Default Board Clock
RESET Input 1 bit BIT
Synchronous reset; the block then clears and loads the (current) coefficients by itself.
Default: Default Board Reset
OUT_I Output 16 or 24 bit BIT VECTOR
Channel sample I: int16 (chan_glue) or Q3.21 (raw, 24 bit).
OUT_Q Output 16 or 24 bit BIT VECTOR
Channel sample Q.
OUT_CH Output 8 bit BIT VECTOR
Channel index (channel k centred at k*fs/M).
OUT_LAST Output 1 bit BIT
Last channel of the frame.
VALID_OUT Output 1 bit BIT
Output valid.
IN 16 bit
Real input (Input Type = Real), Q1.15.
Default: Must be connected

Properties

Property window

Endpoint Name EndpointName

Name of the register endpoint. Registers are REG___WR/_RD (KriaTest regmap page names: use DDC / CHAN / TRIG / GATE to get the exact KriaTest net names).

Register endpoint name (default CHAN).

Default: CHAN

Input Type InputType

Complex I/Q input (KriaTest default, REAL_INPUT=0) or real-only input (REAL_INPUT=1: half the FIR MACs).

Complex (default) or Real (REAL_INPUT=1, half the FIR MACs).

Default: Complex

Options: Complex Real

Max Channels (M) MaxChannels

Largest number of channels M (power of 2, 8..256). Sizes the hardware (MAX_CHANNELS / LOG2_MAX: SDF stages, history RAM, coefficient window = M*8 words). The runtime M is 2^LOG2_M (register), up to this value.

8..256, power of 2 (MAX_CHANNELS / LOG2_MAX): only the SDF stages that can be active are built.

Default: 256

Options: 8 16 32 64 128 256

Default Channels DefaultChannels

M used while register LOG2_M is 0 (i.e. right after reset, before software writes it). Clamped to Max Channels.

M while LOG2_M = 0.

Default: 256

Options: 8 16 32 64 128 256

Output Format OutputFormat

int16 (chan_glue): Q1.15 per channel, gain-compensated by 2^(LOG2_M-COEF_SHIFT), saturated, the format Channel Trigger / Multichannel Delay Buffer expect (KriaTest chain). Raw Q3.21: the 24-bit HLS output, gain 2^(COEF_SHIFT-LOG2_M).

int16 via chan_glue (the format Channel Trigger / Delay Buffer expect) or raw Q3.21.

Default: int16 (chan_glue)

Options: int16 (chan_glue) Raw Q3.21

Suppress Transient SuppressTransient

Drop the first M-1 outputs after every clear (they are spurious and form exactly the first partial frame). If off they are passed and STATUS b3 flags them.

Drop the first M-1 outputs after a clear.

Default: True

Frames per HLS call FramesPerCall

nframes of each HLS call (the core auto-restarts; one few-clock bubble per call is absorbed by the input FIFO). KriaTest used the maximum, 65535.

nframes per HLS call (1024 .. 65535).

Default: 65535

Options: 1024 4096 16384 65535

Usage

Registers (endpoint = EndpointName, KriaTest page CHAN)

register access meaning
CTRL W b1 clear, b2 load_coeffs (rising edge: abort + clear + reload, as KriaTest always paired them); b0 shadow
LOG2_M W 3 .. log2(MaxChannels); 0 = Default Channels property. A change clears + reloads AUTOMATICALLY
COEF_SHIFT W chan_glue shift = 6 - (LOG2_M - COEF_SHIFT); must be the prescaling of the loaded prototype
STATUS R b0 running, b1 clearing, b2 overflow (SAT_COUNT /= 0), b3 settling, b4 drop, [11:8] effective log2 M
SAT_COUNT R chan_glue saturated words
DROP_COUNT R input samples lost on a full input FIFO
memory COEFFS RW MaxChannels*8 words, coefficient in [17:0] (Q1.17), POLYPHASE order coeffs[p*8+t] = h[t*M+p], prototype pre-scaled by 2^COEF_SHIFT (KriaTest dsp.py coeff_words)

Procedure

  1. write the coefficient window, 2. write COEF_SHIFT, 3. write LOG2_M (auto clear) or pulse CTRL.b2, 4. wait STATUS.b0. The first M-1 outputs after a clear are spurious; with Suppress Transient they are dropped (they are exactly the first partial frame).

Notes

  • Vitis stall pipelines hold the last ~19 samples of a burst inside the core until more input arrives (continuous streams are unaffected).
  • One HLS call = FramesPerCall frames; the few-clock restart bubble is absorbed by a 64-deep input FIFO, overflow is counted in DROP_COUNT.

Resources & Timing

  • Latency: M-1 samples (SDF chain) + pipeline

  • Throughput: One sample per clock in, one channel sample per clock out

MaxChannels=256: 34 BRAM18 + 56 DSP + ~20.5k FF / 21.3k LUT (core, 3.14 ns est.) + 2 x 2048x18 coefficient RAMs in the wrapper. Verified: C core with the injected defines bit-exact vs KriaTest (MAX 256) and generated RTL vs golden in GHDL for M<=16/32/256 (tb/kria_channelizer).