1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*! \page page_rtp Radio Transport Protocols
\tableofcontents
Radio transport protocols are used to exchange samples (or other items) between host and devices.
If one were to sniff Ethernet traffic between a USRP and a PC, the packets would conform to a
radio transport protocol.
For USRP devices, two radio transport protocols are relevant: VRT (the VITA Radio Transport protocol)
and CHDR (compressed header, an Ettus-specific protocol).
Generation-3 devices and the B200 use CHDR, the rest use VRT.
\section rtp_vrt VRT
VRT is an open protocol defined by the VITA-49 standard. It was designed for interoperability,
and to allow different device types to work with different software stacks.
VRT is a very verbose standard, and only a subset is implemented in UHD/USRPs.
The full standard is available from the VITA website: http://www.vita.com .
\section rtp_chdr CHDR
For the third generation of Ettus devices, a new type transport protocol was designed.
It reduces the complexity of the original standard and uses a fixed-length 64-Bit header
for everything except the timestamp. Because it is "compressed" into a 64-bit heaer, it
was dubbed CHDR (pronounced like the cheese "cheddar").
By compressing all information into a 64-bit line, the header can efficiently be parsed
in newer FPGAs, where the common streaming protocol is 64-Bit AXI. The first line in a
packet already provides all necessary information to proceed.
Some CHDR-specific functions can be found in: uhd::transport::vrt::chdr.
The form of a CHDR packet is the following:
Address (Bytes) | Length (Bytes) | Payload
----------------|----------------|----------------------------
0 | 8 | Compressed Header (CHDR)
8 | 8 | Fractional Time (Optional!)
8/16 | - | Data
If there is no timestamp present, the data starts at address 8, otherwise, it starts at 16.
The 64 Bits in the compressed header have the following meaning:
Bits | Meaning
-------|--------------------------------------------------
63:62 | Packet Type
61 | Has fractional time stamp (1: Yes)
60 | End-of-burst or error flag
59:48 | 12-bit sequence number
47:32 | Total packet length in Bytes
31:0 | Stream ID (SID)
The packet type is determined mainly by the first two bits, although
the EOB or error flag are also taken into consideration:
Bit 63 | Bit 62 | Bit 60 | Packet Type
-------|--------|--------|--------------
0 | 0 | 0 | Data
0 | 0 | 1 | Data (End-of-burst)
0 | 1 | 0 | Flow Control
1 | 0 | 0 | Command Packet
1 | 1 | 0 | Command Response
1 | 1 | 1 | Command Response (Error)
\section vrt_tools Tools
For CHDR, we provide a Wireshark dissector under tools/chdr_dissector. It can be used
for Ethernet links as well as USB (e.g., for the B210).
\section vrt_code Code
Relevant code sections for the radio transport layer are:
* uhd::transport::vrt - Namespace for radio transport protocol related functions and definitions
* uhd::transport::vrt::chdr - Sub-namespace specifically for CHDR
* uhd::sid_t - Datatype to represent SIDs
*/
// vim:ft=doxygen:
|