A CCSDS telemetry transmitter on the Kria KR260

From bitstream to signal analysis in Vivado, step by step

This post walks through bringing up, on an AMD Kria KR260 board, a space telemetry transmitter written in VHDL and compliant with the CCSDS recommendations. It does not show the source code: it describes the architecture, then every step and command needed to build the design, load it into the board and watch the transmit chain work, byte by byte and sample by sample, from Vivado.

Everything shown here was measured on the board, in the BPSK configuration without convolutional coding. Every capture was checked bit for bit against a software reference model.

1. What the design does

The transmitter receives Space Packets on an AXI-Stream interface and continuously produces the telemetry signal, ready to modulate. The whole chain sits in the programmable logic (PL):

  • TM Transfer Frames (CCSDS 132.0-B-3): header, frame counters, first header pointer (FHP), FECF check (CRC-16), idle frames when there is no data.
  • Synchronization and channel coding (CCSDS 131.0-B): interleaved Reed-Solomon (255,223), pseudo-randomizer, attached sync marker ASM 0x1ACFFC1D, K = 7 convolutional code with punctured rates, NRZ-M coding.
  • Baseband modulation: BPSK, QPSK, OQPSK or 16-QAM mapping, followed by a square-root raised-cosine (SRRC, α = 0.5) pulse-shaping filter. Outputs: 12-bit signed I/Q samples and a serial output (data, clock, sync).

The PS (the ARM cores running Linux) configures the core through registers and sends it packets through an AXI DMA, via a 256 KB BRAM buffer.

A dedicated debug build

For board bring-up, a second Vivado project adds debug cores without touching the reference design:

  • a VIO (Virtual I/O): it reads status and counters live, and drives an on-chip packet generator that provides continuous traffic without any software;
  • an ILA (Integrated Logic Analyzer) on the transmit chain: core input, symbols, I/Q samples, serial output;
  • a System ILA on the AXI buses: registers, DMA reads, AXI-Stream;
  • a JTAG-to-AXI master: Vivado reads and writes the registers, the BRAM and the DMA directly over the JTAG cable.

With these four cores, the whole design can be driven and observed from the Vivado Hardware Manager, without writing a single line of software for the processor.

Figure 1 : Architecture of the design on the Kria KR260 (in orange: the cores of the debug build).

2. What you need

Item

Details

Board

AMD Kria KR260 (K26 module, Zynq UltraScale+ XCK26), powered, Linux booted

PC link

micro-USB cable on the carrier board’s JTAG/UART port (JTAG and serial console)

Tools

Vivado 2026.1 (with the Hardware Manager and xsdb), Python 3.12

Simulation (optional)

GHDL 4.x (mcode backend), on Linux or WSL

Project

folder 01_KR260_CCSDS_TM_v3.0 (RTL, scripts, constraints) and 02_IHM_IP_VHDL (GUI and agents)

Below, <root> stands for the 01_KR260_CCSDS_TM_v3.0 folder. Vivado commands are typed in the Vivado Tcl console. Vivado accepts Windows paths written with /.

3. Step 1 : Check in simulation

Before touching the board, the simulation regression replays all configurations (modulations, codings, DMA modes) and compares the output with a software reference model. It includes a “debug build” case that checks bit for bit the traffic produced by the VIO generator.

Linux / WSL terminal

cd <root>
# 4 = number of simulations run in parallel
scripts/sim/run_regression.sh 4

Result : 18 configurations out of 18 compliant. The coding-rule check and the strict VHDL analysis also pass.

4. Step 2 : Create the Vivado debug project

The creation script builds the block design (PS, SmartConnect, DMA, BRAM), adds the sources and, with DEBUG=1, the VIO, ILA, System ILA and JTAG-to-AXI cores. The debug project is created in a separate folder, vivado_debug, so it never mixes with the reference project.

Vivado Tcl console

cd C:/Users/<you>/…/01_KR260_CCSDS_TM_v3.0
set argv DEBUG=1
source scripts/vivado/create_project.tcl

5. Step 3 : Build the bitstream

Vivado Tcl console

source scripts/vivado/build.tcl
kr260_build DEBUG=1 JOBS=8

The build runs synthesis, placement, routing, bitstream and report generation, then acceptance checks (timing, DRC, clock-domain crossings). Allow about 30 to 40 minutes, most of it for IP synthesis. The results land in output/debug/:

File

Purpose

kr260_ccsds_debug.bit

bitstream to load over JTAG

kr260_ccsds_debug.ltx

probe description (ILA, VIO) for the Hardware Manager

kr260_ccsds_debug.bit.bin, .xsa, .hwh

loading under Linux and hardware export

reports/

timing, utilization, DRC, CDC, power

build_info.txt

summary and verdict of the build

6. Step 4 : Load the design into the Kria over JTAG

The board is connected over USB and Linux is running. The debug script opens the Hardware Manager, programs the FPGA with the bitstream and attaches the probe file:

Vivado Tcl console

source scripts/vivado/hw_debug.tcl
hwd_open

The Hardware Manager then shows the xck26 FPGA with its debug cores: two ILAs (hw_ila_1 on the transmit chain, hw_ila_2 on the buses), one VIO (hw_vio_1) and the AXI master (hw_axi_1).

The trap: Linux had switched off the PL clock

On the first attempt, the FPGA was programmed correctly, but no debug core showed up. The cause: the debug cores run on the design’s system clock, which is derived from the pl_clk0 clock supplied by the PS. When no overlay requests it, Linux switches this clock off. The PL0 clock control register confirmed it: set to 100 MHz, but disabled.

The fix is to re-enable the clock over JTAG with xsdb, changing only its enable bit (the divider stays as set by the boot firmware). hwd_open now does this automatically; by hand:

Vivado Tcl console

puts [exec $::env(XILINX_VIVADO)/bin/xsdb.bat scripts/vivado/pl_clk.tcl on]
refresh_hw_device [current_hw_device]

7. Step 5 : Check the identification

First check: read the identification registers through the JTAG-to-AXI master, then write and read back a test register.

Vivado Tcl console

hwd_id

Register

Value read

Meaning

SYS_ID

0xCC5D0260

KR260 CCSDS design identifier

SYS_VERSION

0x00210300

core 2.1, design 3.0

CORE_INFO

0x210F10DF

223-byte frame, RS I = 1, FECF, convolutional code, α = 0.5

CLK_SYS_KHZ

250000

system clock measured inside the FPGA: 250 MHz

SCRATCH

0xA5A55A5A

written then read back unchanged

8. Step 6 : Configure the transmitter and start the traffic

Configure the core in BPSK (randomizer on, AXI-Stream input, transmission running), then start the packet generator through the VIO: 64-byte packets, APID 100, 256 cycles between packets.

Vivado Tcl console

hwd_cfg BPSK
hwd_gen 1 64 256
hwd_vio

Other settings follow the same pattern: hwd_cfg <BPSK|QPSK|OQPSK|16QAM> <conv 0|1> <rate 0..4> <nrzm 0|1>. hwd_gen 0 stops the generator, hwd_off stops transmission.

In the VIO dashboard (the hw_vios tab of the Hardware Manager, refreshed every 500 ms), the design comes to life: the measured clock frequency, the generator settings, and the counters of transmitted frames, generated packets and packets accepted by the core, all ticking up.

Figure 2 : VIO dashboard: status, counters and generator controls. Packets accepted by the core equal packets generated plus the 8 packets of the DMA test (step 8).

9. Step 7 : Observe the transmit chain with the ILA

Three commands arm the ILA, wait for the trigger, upload the capture, display it in a waveform window and save it as CSV in output/debug/ila/ for offline analysis.

Packets at the core input

Vivado Tcl console

hwd_ila_stream

Trigger on the end of a packet (TLAST). The ILA samples at 250 MHz: every byte can be seen entering the core.

Figure 3 : Start of a Space Packet: header 00 64 C8 B5 00 39 (APID 100, sequence count 2229, length field 57 for 64 bytes), then the data counter.

The TM serial output, bit by bit

Vivado Tcl console

hwd_ila_tx

One frame (CADU) lasts 2,072 bits, far longer than the ILA window at 250 MHz. The trick is storage qualification: the ILA stores a sample only on the rising edge of the serial clock, so its 8,192 samples cover almost 4 complete frames. The trigger is the start-of-frame sync pulse.

Figure 4 : Start of a CADU: the Tx_Sync pulse, then the first 32 bits of Tx_Data, the ASM 0x1ACFFC1D.

The modulator I/Q samples

Vivado Tcl console

hwd_ila_iq

Here, the ILA keeps only the instants when the modulator outputs a sample. With the analog display style (right-click the signal, Waveform Style, Analog), the shape of the SRRC filter appears directly.

Figure 5 : I channel (in-phase, 12-bit signed) in BPSK, shaped by the SRRC filter. The Q channel stays at zero, as expected in BPSK.

10. Step 8 : Watch the buses during a DMA transfer

Last link in the chain: the real data path from memory. The script writes 8 packets into the BRAM through the JTAG-to-AXI master, programs the DMA to send them to the core, and the System ILA records the buses during the first transfer.

Vivado Tcl console

hwd_ila_bus
hwd_dma 8 64
hwd_ila_bus_done

The System ILA decodes the interfaces: the DMA read address and read data channels, then the AXI-Stream transfers to the core.

Figure 6 : System ILA: the DMA reads the packet from BRAM (one 16-word burst, OKAY responses) and sends it to the core (64 bytes, TLAST on the last one).

11. Step 9 : Check the captures offline

A screenshot convinces; an automatic check proves. A Python script reads back the CSV files saved by the ILA and checks them with the same reference models as the simulation:

Terminal (in <root>)

python3 scripts/vivado/ila_check.py output/debug/ila

Capture

Check

Result

Core input

APID, length, sequence and data counters

3 packets, 0 errors

Serial output

full decoding: ASM, derandomization, Reed-Solomon, FECF, headers, packets

3 CADUs of 2,072 bits, RS and FECF OK, 9 packets, 0 errors

I/Q

comparison with the SRRC filter model

8,070 / 8,070 identical samples, Q = 0

AXI buses

DMA read and stream to the core

OKAY responses, packet identical to the source

12. Next: the Linux path and the GUI

JTAG debugging validates the hardware. Normal use goes through Linux: the design is loaded as a Kria application (device-tree overlay), a Python agent runs on the board, and a GUI on the PC drives the tests remotely. This GUI groups the tests of several IPs in independent tabs (SpaceWire, CCSDS, SpaceFibre): one bitstream and one agent per IP.

Kria terminal

# on the Kria: install the application (reference build)
D=/lib/firmware/xilinx/kr260_ccsds
dtc -@ -O dtb -o kr260_ccsds.dtbo kr260_ccsds.dtsi
sudo mkdir -p $D
sudo cp kr260_ccsds.bit.bin kr260_ccsds.dtbo shell.json $D/
sudo xmutil unloadapp
sudo xmutil loadapp kr260_ccsds
 
# read the registers, then start the server for the GUI (port 5552)
sudo python3 ccsds_agent.py --status
sudo python3 ccsds_agent.py --server

PC terminal (02_IHM_IP_VHDL folder)

python ihm_ip_vhdl.py --host <Kria IP address> --tab ccsds
# without a board, with a software model of the transmitter:
python ihm_ip_vhdl.py --sim --tab ccsds

Figure 7 : CCSDS TM tab of the GUI (here with the simulator): identification, status of the core, the capture and the DMA, then configuration, decoded traffic, constellation, bit-exact check, registers and test campaigns. The GUI labels are in French.

13. Key takeaways

  • A separate debug build (VIO, ILA, System ILA, JTAG-to-AXI) lets you bring up the hardware without embedded software, and without polluting the reference design.
  • ILA storage qualification is the key to observing slow signals (serial bits, samples) with a fast clock: one capture covers several complete frames.
  • On a Kria, a PL loaded over JTAG under Linux can end up without a clock: check pl_clk0 when the debug cores do not show up.
  • Checking captures offline with the simulation models turns a visual impression into bit-exact proof.