RF Kria TDM Oscilloscope
Waveform monitor of the KriaTest firmware (mon_oscilloscope): captures one channel of the channelized TDM stream (or the raw DDC output) into a read-only memory window, with pre-trigger, decimation and three trigger modes.
Introduction
Port of KriaTest fw/rtl/regs/mon_oscilloscope.vhd (register page MON_OSC_*
and BRAM window 0x8000). The acquisition logic is the KriaTest code verbatim;
only the readout side is adapted to the sci-compiler bus (memory region of
the endpoint, one bus clock of read latency).
Wire IN_I / IN_Q / IN_CH / IN_LAST / VALID_IN to the Polyphase Channelizer outputs, RAW_I / RAW_Q / RAW_VALID to the Baseband DDC outputs, HIT_IN / HIT_VALID to the Channel Trigger hitmap, CHSEL_OUT to the Kria TDM Power Spectrum CHSEL input.
Pin Description
Properties
Name of the register endpoint. Registers are REG_
OSC).
Default: OSC
Acquisition depth = memory window size (power of 2). KriaTest: 16384 samples = 16 RAMB36.
Window depth, 1024..16384 (KriaTest 16384 = 16 RAMB36).Default: 16384
Options: 1024 2048 4096 8192 16384
Usage
Capture
- write OSC_CHSEL (TDM channel, 0xFF = raw DDC I/Q), OSC_TRIGMODE, OSC_PRETRIG, OSC_DECIM;
- write OSC_CTRL = 1 (arm);
- wait for OSC_STATUS.done = 1, read OSC_POSITION and the memory window. The window is circular: the first sample in time is at (OSC_POSITION - OSC_PRETRIG) mod Samples. Word = [15:0] I int16, [31:16] Q int16.
Trigger modes (OSC_TRIGMODE[1:0])
| mode | meaning |
|---|---|
| 0 | free run: fires as soon as the pre-trigger is filled |
| 1 | rising edge of the hitmap bit of channel OSC_TRIGMODE[15:8] (0xFF = OSC_CHSEL) |
| 2 | manual: fires at the arm (after the pre-trigger) |
Registers (endpoint = EndpointName, default OSC)
| register | access | meaning |
|---|---|---|
OSC_CTRL |
W | b0 arm, b1 clr_status: write-1-to-pulse (every write of 1 pulses) |
OSC_TRIGMODE |
W | [1:0] mode, [15:8] trigger channel |
OSC_PRETRIG |
W | pre-trigger samples (clamped to Samples-1) |
OSC_DECIM |
W | keep one sample every OSC_DECIM+1 |
OSC_CHSEL |
W | [7:0] channel, 0xFF = raw DDC |
OSC_STATUS |
R | b0 done, b1 waiting_trig, b2 busy |
OSC_POSITION |
R | window address of the trigger (valid with done = 1) |
Memory DATA: Samples words, read-only (writes ignored). |
Differences from KriaTest: the registers reset to 0 (KriaTest OSC_PRETRIG reset was 0x400); STATUS/POSITION are not 2-FF crossed (one clock domain on AMD_KRIA).
Resources & Timing
-
Latency: trigger to POSITION: a few clocks
-
Throughput: 1 sample per clock
Samples x 32 bit block RAM (16 RAMB36 at 16384). Verified in GHDL (tb/kria_monitors).