]> git.gag.com Git - debian/gnuradio/blob - usrp/doc/inband-signaling-usb
work-in-progress on specifying inband-signaling
[debian/gnuradio] / usrp / doc / inband-signaling-usb
1 This file specifies the format of USB packets used for in-band data
2 transmission and signaling on the USRP.  All packets are 512-byte long,
3 and are transfered using USB "bulk" transfers.
4
5 IN packets are sent towards the host.
6 OUT packets are sent away from the host.
7
8 The layout is 32-bits wide.  All data is transmitted in little-endian
9 format across the USB.
10
11
12    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
13    |O|U|D|S|E|    mbz    |  Chan   | mbz |  Tag  |   Payload Len   |
14    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
15    |                           Timestamp                           |
16    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
17    |                                                               |
18    +                                                               +
19    |                            Payload                            |
20    .                                                               .
21    .                                                               .
22    .                                                               .
23    |                                                               |
24    +             +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
25    |      ...    |                                                 .
26    +-+-+-+-+-+-+-+                                                 .
27    .                                                               .
28    .                            Padding                            .
29    .                                                               .
30    |                                                               |
31    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
32    
33
34   mbz   Must be Zero: these bits must be zero in both IN and OUT packets.
35
36   O     Overrun Flag: set in an IN packet if an overrun condition was
37         detected.  Must be zero in OUT packets.  Overrun occurs when
38         the FPGA has data to transmit to the host and there is no
39         buffer space available.  This generally indicates a problem on
40         the host.  Either it is not keeping up, or it has configured
41         the FPGA to transmit data at a higher rate than the transport
42         (USB) can support.
43
44   U     Underrun Flag: set in an IN packet if an underrun condition
45         was detected.  Must be zero in OUT packets.  Underrun occurs
46         when the FPGA runs out of samples, and it's not between
47         bursts.  See the "End of Burst flag" below.
48
49   D     Dropped Packet Flag: Set in an IN packet if the FPGA
50         discarded an OUT packet because its timestamp had already
51         passed.
52
53   S     Start of Burst Flag:  Set in an OUT packet if the data is the
54         first segment of what is logically a continuous burst of data.
55         Must be zero in IN packets.
56
57   E     End of Burst Flag:  Set in an OUT packet if the data is the
58         last segment of what is logically a continuous burst of data.
59         Must be zero in IN packets.  Underruns are not reported
60         when the FPGA runs out of samples between bursts.
61
62
63   Chan  5-bit logical channel number.  Channel number 0x1f is reserved
64         for control information.  See "Control Channel" below.  Other
65         channels are "data channels."  Each data channel is logically
66         independent of the others.  A data channel payload field
67         contains a sequence of homogeneous samples.  The format of the
68         samples is determined by the configuration associated with the
69         given channel.  It is often the case that the payload field
70         contains 32-bit complex samples, each containing 16-bit real
71         and imaginary components.
72
73   Tag   4-bit tag for matching IN packets with OUT packets.
74         [FIXME, write more...]
75
76   Payload Len: 9-bit field that specifies the length of the payload
77         field in bytes.  Must be in the range 0 to 504 inclusive.
78
79   Timestamp: 32-bit timestamp.  [FIXME, Write more]
80         On OUT packets, 0xffffffff means "Now".
81
82   Payload: Variable length field.  Length is specified by the
83         Payload Len field.
84
85   Padding: This field is 504 - Payload Len bytes long, and its content
86         is unspecified.  This field pads the packet out to a constant
87         512 bytes.
88