· Updated · · VORTARIAN · 6 min read

The VORTARIAN I/Q Datagram Header

The 32-byte header of every I/Q datagram of the VORTARIAN 4R2T-10G: sequence number, 250 MHz timestamp, clock since SYSREF, flags and the sample layout behind it.

Diagram of the 32-byte VORTARIAN datagram header: magic, version, flags, stream id, format and decimation in the first 8 bytes, then sequence number, timestamp and clock since SYSREF, followed by sample groups Q1 I1 Q0 I0

Every I/Q datagram of the VORTARIAN 4R2T-10G starts with a 32-byte header. It tells the receiver which datagrams were lost, when the first sample of the datagram was taken, and how the samples behind it are packed. This article describes header version 1, field by field.

The datagram

FO1 sends RX A and RX B to UDP port 10700, FO2 sends RX C and RX D to port 10701. Each UDP datagram has 8224 bytes: the 32-byte header and 8192 bytes of samples, 1024 samples of both channels, which is 8.192 µs of signal at 125 MS/s. With the UDP, IPv4 and Ethernet headers a datagram takes 8290 bytes on the wire, so one link carries 122 070 datagrams per second, 8.10 Gb/s. The header is 0.4 % of that. The IPv4 packet has 8252 bytes and needs jumbo frames (MTU 9000) on the host.

All fields are big-endian. The header is four 64-bit words, so the samples start 64-bit aligned.

Header fields

Layout of the 32-byte VORTARIAN I/Q datagram header: magic, version, flags, stream id, format and decimation in the first 8 bytes, then sequence number, timestamp and clock since SYSREF, followed by the first sample group Q1 I1 Q0 I0

The header and the first sample group. The numbers on the left are byte offsets in the datagram, the numbers on top byte offsets in the row.

OffsetBytesFieldValue
02magic0x5654, “VT”
21version1
31flagsstatus bits: FIFO full, ADC overrange, SYSREF valid
41stream idnumber of the stream: 1 on FO1, 2 on FO2
51format0x0F: complex, 16-bit samples
62decimationsample rate = 250 MHz / decimation; 2 for 125 MS/s
88sequence number+1 for every datagram of the stream
168timestamp250 MHz board clock at the first sample of the datagram
248clock since SYSREF250 MHz ticks from the last SYSREF pulse to the first sample

Sequence number

The sequence number grows by one with every datagram of a stream; after debug on the first datagram has number 0. A jump means datagrams were lost between the board and the application: on the fibre, in the network card or in the PC. The receiver does not need to compare samples or times to find a loss.

Timestamp

The timestamp counts the 250 MHz system clock of the board, 4 ns per tick, at the first sample of the datagram. One counter serves both links, so datagrams of FO1 and FO2 with the same timestamp hold samples taken at the same instant. Consecutive datagrams of a stream differ by 1024 samples × 2 ticks = 2048 ticks, 8.192 µs. Timestamp divided by decimation is the index of the first sample. The counter restarts when the board is initialized.

We checked both properties on the board. In a simultaneous capture of both links, all 125 703 datagram pairs with the same sequence number had the same timestamp. In 30 minutes of streaming on both links, 219.7 million datagrams per link, every timestamp was 2048 ticks after the one before. In a few percent of the starts of the stream, the second link starts one sample later; its timestamps are then 2 ticks larger than those of the first link at the same sequence number, and a receiver uses this difference to align the links to the sample.

Clock since SYSREF

This counter runs on the same 250 MHz clock and starts again at every SYSREF pulse, the pulse that aligns the ADCs and, when several boards share it, the boards. It ties a sample to the last SYSREF edge. Without SYSREF pulses, timestamp minus clock since SYSREF stays constant; a change of this difference shows that a pulse came.

Flags

BitNameMeaning
7 to 6reserved0; a receiver ignores them
5SYSREF validthe clock since SYSREF field is valid: a SYSREF pulse has been received
4overrange RX Dan ADC sample of RX D clipped within this datagram (datagrams of FO2 only)
3overrange RX Can ADC sample of RX C clipped within this datagram (datagrams of FO2 only)
2overrange RX Ban ADC sample of RX B clipped within this datagram (datagrams of FO1 only)
1overrange RX Aan ADC sample of RX A clipped within this datagram (datagrams of FO1 only)
0FIFO fullthe FIFO of this stream overflowed in the board before this datagram

Bit 0, FIFO full, says that samples were lost in the board before this datagram. The sequence number does not show such a loss, the flag does. In our 30-minute run at full rate on both links the FIFO never overflowed. The overrange bits tell the receiver that the input level was too high somewhere in the datagram, without looking at the samples. In normal operation the flags byte is 0x20.

Format and decimation

The format byte describes the samples: bit 7 is 0 for complex and 1 for real samples, bits 6 and 5 give the bytes per component (0: 2 bytes, 1: 3 bytes, 2: 4 bytes) and bits 4 to 0 the number of significant bits minus one. The board sends 0x0F: complex, 16 bits in 2 bytes.

The decimation counts ticks of the 250 MHz system clock between two samples, not ADC samples. The ADCs sample at 500 MS/s and their digital down-converters decimate by 4, which gives 125 MS/s: 250 MHz / 2.

Samples

After the header come 1024 sample groups. A group is one sampling instant of both channels, four signed 16-bit numbers:

Q1 I1 Q0 I0   Q1 I1 Q0 I0   ...

Channel 0 (I0, Q0) is RX A on FO1 and RX C on FO2, channel 1 (I1, Q1) is RX B and RX D. Full scale is 32768. Read this way, a test tone 10 MHz above the NCO frequency appears at +10.00 MHz on all four channels.

Example

The header of the first datagram on FO1 after debug on:

56 54 01 20 01 0F 00 02   magic "VT", version 1, flags 0x20, stream 1, format 0x0F, decimation 2
00 00 00 00 00 00 00 00   sequence number 0
00 00 00 00 7F E9 67 3E   timestamp 2 146 002 750 ticks = 8.584 s
00 00 00 00 76 8E C9 4D   clock since SYSREF 1 989 069 133 ticks = 7.956 s

The next datagram on FO1 has sequence number 1, and both counters are 2048 larger: …6F 3E and …D1 4D.

What a receiver checks

  • Accept a datagram when it starts with 56 54 01. The samples start at byte 32.
  • Per stream, a jump of the sequence number means datagrams lost on the way to the application; the FIFO-full flag means samples lost in the board; a timestamp step other than 1024 × decimation means a discontinuity.
  • Pair the datagrams of the two links by sequence number. When the timestamps of a pair differ while both streams are continuous, the later link started that many samples later: skip those samples on the earlier link.

The vortarian MEX file for GNU Octave and MATLAB and the SoapySDR driver do this: they check the header and the sequence numbers of both links and align the links to the sample; the MEX file returns only contiguous blocks of all four channels, see Spectrogram of the VORTARIAN SDR in GNU Octave. To see the header of real datagrams, use the Wireshark dissector from Looking at the VORTARIAN I/Q Stream in Wireshark. For questions about the platform, contact us.

Written by

· Lead RF/FPGA engineer at JSE

Jiří has designed RF and signal-processing hardware and FPGA firmware since 2003, starting with receivers and signal-processing boards for radar systems. He holds a master's degree in radio engineering from the Czech Technical University in Prague.

LinkedInGitHubAbout JSE

Share:
Back to Blog