RF Channel Trigger
KriaTest per-channel power trigger on a channel-serialised (TDM) stream: |y|^2 = I^2 + Q^2 (Q2.30 for int16 samples) against programmable ON/OFF thresholds with N_ON / N_OFF frame persistence; outputs the power stream, the per-channel state and a per-frame HITMAP, with optional channel masks.
Introduction
Port of the KriaTest channel_trigger HLS block (verbatim source,
ap_ctrl_hs + AXI-Stream), with its software control plane implemented in a
VHDL wrapper. It works on the TDM output of the Polyphase Channelizer (one
channel per clock), so it is TM by nature.
Per channel: OFF -> p >= TH_UP counts up (else down, saturating 0..N_ON), reaching N_ON switches ON; ON -> p <= TH_DOWN counts up (0..N_OFF), reaching N_OFF switches OFF.
Pin Description
Properties
Name of the register endpoint. Registers are REG_
TRIG).
Default: TRIG
Channels handled = HITMAP width (TRG_MAX_CHANNELS, power of 2). Must be >= the channelizer M.
TRG_MAX_CHANNELS (8..256): HITMAP width.
Default: 256
Options: 8 16 32 64 128 256
Width of IN_I / IN_Q (TRG_IQ_W). 16 = the int16 channelizer output (power Q2.30, thresholds 32 bit).
TRG_IQ_W (8..16).
Default: 16
Options: 8 10 12 14 16
Width of OUT_PWR (TRG_POW_W). If narrower than 2*IqWidth the MSBs of I^2+Q^2 are output.
TRG_POW_W (16, 24, 32).
Default: 32
Options: 16 24 32
Bits of the N_ON / N_OFF persistence counters (TRG_CNT_W): N_ON/N_OFF up to 2^w-1 frames.
TRG_CNT_W (4, 6, 8).
Default: 8
Options: 4 6 8
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 (auto-restart).Default: 1073741824
Options: 65536 1048576 1073741824
Usage
Registers (endpoint = EndpointName, KriaTest page TRIG)
| register | access | meaning |
|---|---|---|
CTRL |
W | b0 clear (rising edge: abort + clear call) |
TH_UP / TH_DOWN |
W | power thresholds (low 2*IqWidth bits) - LIVE |
N_ON / N_OFF |
W | persistence in frames (low CounterWidth bits) - LIVE |
CH_MASK0.. |
W | only with Use Channel Mask: bit n = channel n enabled (masks HITMAP and OUT_TRIG) |
STATUS |
R | b0 running, b1 clearing, b4 drop |
DROP_COUNT |
R | input samples lost on a full input FIFO |
Vitis wires the threshold scalars straight into the loop, so new values act on the next sample (verified in the generated RTL).
Resources & Timing
-
Latency: a few clocks (HLS pipeline) + 1 output register
-
Throughput: One sample per clock
MaxChannels=256: 1 BRAM18, 2 DSP, ~1.4k FF (2.87 ns est.). Verified bit-exact vs the KriaTest C core and in GHDL on the generated RTL (tb/kria_trigger: 3 configurations, live threshold change, clear, HLS restart at 100 % duty).