RF Multichannel Delay Buffer
KriaTest multichannel delay buffer + event gate: delays every channel of a TDM stream by DELAY frames (ring in URAM or BRAM) and, driven by the Channel Trigger HITMAP, emits per-channel events with PRE-TRIGGER and POST-TRIGGER frames as 64-bit KriaTest DATA words.
Introduction
Port of KriaTest multichannel_delay (HLS, verbatim) + event_gate
(VHDL, verbatim copy kria_event_gate). The trigger runs on the UNDELAYED
stream, this block sees it delayed by DELAY frames, so a hit opens the gate
DELAY frames “in the past”: that is the pre-trigger. POST_LEN frames are
kept after the hit drops.
Output words (KriaTest AGENT/09 payload contract):
- wtype 0x1 sample: ch, frame_ctr[15:0], flags (b0 first, b1 last, b2 pretrig), I, Q
- wtype 0x2 hitmap segment (ceil(M/32) per frame, CTRL b2)
- wtype 0x3 timestamp marker (every 2^TimestampLog2 frames, CTRL b3)
EVT_FRAME_HIcarries frame_ctr[31:16] of the word (side band).
Pin Description
Properties
Name of the register endpoint. Registers are REG_
GATE).
Default: GATE
Channels handled (DLY_MAX_CHANNELS, power of 2) = HIT_IN width. Must be >= the channelizer M.
DLY_MAX_CHANNELS (8..256).
Default: 256
Options: 8 16 32 64 128 256
Ring depth per channel (DLY_DEPTH): maximum DELAY = Depth-1 frames = pre-trigger depth. RAM = Depth x MaxChannels x 32 bit.
DLY_DEPTH frames per channel (16..256).
Default: 256
Options: 16 32 64 128 256
Ring in URAM (DLY_USE_URAM=1, KriaTest default: 16 URAM on XCK26 for 256x256). Off = BRAM; required on devices without URAM.
DLY_USE_URAM (KriaTest default on; off for devices without URAM).
Default: True
Instantiate the KriaTest event_gate: EVT_DATA 64-bit words with per-channel pre/post-trigger gating. Off = delay line only (EVT_* outputs tied low).
Instantiate the event gate (EVT_* and HIT_* pins).Default: True
Add registers CH_MASK0..CH_MASK
Default: False
nsamp of each HLS call (auto-restart; one few-clock bubble per call, absorbed by the input FIFO). KriaTest used 0x40000000.
nsamp per HLS call.Default: 1073741824
Options: 65536 1048576 1073741824
A wtype 0x3 timestamp word every 2^n frames when CTRL b3 (ts_en) is set (KriaTest: 20).
Timestamp marker period (log2 frames).Default: 20
Options: 10 12 16 20 24
Usage
Registers (endpoint = EndpointName, KriaTest pages GATE + STREAM.CTRL)
| register | access | meaning |
|---|---|---|
CTRL |
W | b0 gate enable, b1 bypass, b2 hitmap_en, b3 ts_en, b4 clear (rising edge) |
DELAY |
W | frames of delay = pre-trigger depth (0..Depth-1, clamped); ONE register for ring and gate |
PRE_LEN |
W | frames flagged pretrig (capped at DELAY) |
POST_LEN |
W | frames kept open after the hit |
LOG2_M |
W | log2 of the channel count (hitmap burst size); 0 = log2(MaxChannels) |
CH_MASK0.. |
W | only with Use Channel Mask |
STATUS / DROP_COUNT / FRAME_COUNT / EVT_COUNT |
R | status, input drops, frames, events (gate openings) |
Back-pressure
While the gate emits hitmap/timestamp words it does not consume samples. KriaTest stalled its source; SciCompiler streams cannot be stalled, so a 64-deep input FIFO absorbs it and the excess is DROPPED and counted. With HITMAP_EN the input needs >= ceil(M/32) idle clocks per frame.
Resources & Timing
-
Latency: a few clocks + DELAY frames
-
Throughput: One sample per clock (minus gate stalls, see Back-pressure)
256 ch x 32 frames URAM: 2 URAM, ~0.4k LUT (2.28 ns est.); KriaTest 256 x 256: 16 URAM. Verified: C core bit-exact vs KriaTest, KriaTest’s own tb_event_gate on the copy, generated RTL vs golden in GHDL incl. live DELAY change, clear, timestamp and overflow counting (tb/kria_delaybuf).