Xilinx
Block Preview

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

IN_I Input 16 bit BIT VECTOR
IN_Q Input 16 bit BIT VECTOR
IN_CH Input 8 bit BIT VECTOR
TDM channel index.
IN_LAST Input 1 bit BIT
Last channel of the frame.
VALID_IN Input 1 bit BIT
TDM sample valid.
RAW_I Input 16 bit BIT VECTOR
RAW_Q Input 16 bit BIT VECTOR
RAW_VALID Input 1 bit BIT
HIT_IN Input 256 bit BIT VECTOR
HIT_VALID Input 1 bit BIT
CLK Input 1 bit BIT
Default: Default Board Clock
RESET Input 1 bit BIT
Default: Default Board Reset
CHSEL_OUT Output 8 bit BIT VECTOR
OSC_CHSEL[7:0]: channel select for the Kria TDM Power Spectrum.
IN_I / IN_Q 16 bit
TDM channel sample (int16).
RAW_I / RAW_Q / RAW_VALID 16 bit
Raw DDC output, captured when OSC_CHSEL = 0xFF.
HIT_IN / HIT_VALID 256 bit
Channel Trigger hitmap (held as a level for trigger mode 1).
CLK / RESET 1 bit
CLK_ACQ, synchronous reset.

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 OSC).

Default: OSC

Samples (window depth) Samples

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

  1. write OSC_CHSEL (TDM channel, 0xFF = raw DDC I/Q), OSC_TRIGMODE, OSC_PRETRIG, OSC_DECIM;
  2. write OSC_CTRL = 1 (arm);
  3. 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).