Functional Description
Data Buffer — A data buffer is a single data structure that contains payload information for transmission
to or reception from a port. A data buffer is a byte aligned contiguous block of memory used to store
packet payload data. A data buffer may hold any portion of a packet and may be linked together (via
descriptors) with other buffers to form packets. Data buffers may be allocated anywhere within the 32-bit
memory space. The Buffer Length field of the packet descriptor indicates the number of valid data bytes in
the buffer. There may be from 1 to 4M-1 valid data bytes in each buffer.
Host Buffer Descriptor (Buffer Descriptor) — A buffer descriptor is a single data structure that contains
information about one or more data buffers. This type of descriptor is required when more than one
descriptor is needed to define an entire packet, i.e., it either defines the middle of a packet or end of a
packet.
Start of Packet (SOP) — Packet along side Buffer Descriptors are used to hold information about
Packets. When multiple Descriptors are used to hold a single packet information or a single Descriptor is
used to hold a single packet information, the first descriptor is referred to as a Packet Descriptor which is
also Start-of-Packet Descriptor.
Host Packet Descriptor (Packet Descriptor) — A packet descriptor is another name for the first buffer
descriptor within a packet. Some fields within a data buffer descriptor are only valid when it is a packet
descriptor including the tags, packet length, packet type, and flags. This type of descriptor is always used
to define a packet since it provides packet level information that is useful to both the ports and the Host in
order to properly process the packet. It is the only descriptor used when single descriptor solely defines a
packet. When multiple descriptors are needed to define a packet, the packet descriptor is the first
descriptor used to define a packet.
Free Descriptor/Buffer Queue — A free descriptor/buffer queue is a hardware managed list of available
descriptors with pre-linked empty buffers that are to be used by the receive ports for host type descriptors.
Free Descriptor/Buffer Queues are implemented by the Queue Manager.
Teardown Descriptor — Teardown Descriptor is a special structure which is not used to describe either a
packet or a buffer but is instead used to describe the completion of a channel halt and teardown event.
Channel teardown is an important function because it ensures that when a connection is no longer needed
that the hardware can be reliably halted and any remaining packets which had not yet been transmitted
can be reclaimed by the Host without the possibility of losing buffer or descriptor references (which results
in a memory leak).
Packet Queue — A packet queue is hardware managed list of valid (i.e. populated) packet descriptors
that is used for forwarding a packet from one entity to another for any number of purposes.
NOTE: All descriptors (regardless of type) must be allocated at addresses that are naturally aligned to the
smallest power of 2 that is equal to or greater than the descriptor size.
16.3.9.2 Data Structures
Two data structures are mainly used to identify data buffers used by packet and buffer descriptors. A third
Descriptor, Teardown Descriptor, exists. The purpose of this Descriptor is a channel halt and teardown
event. Each of these Descriptor layouts as well as bit fields are shown below.
16.3.9.2.1 Host Packet Descriptor/ Packet Descriptor (SOP Descriptor)
Descriptors are designed to be used when USB like application requires support for true, unlimited
fragment count scatter/gather type operations. The Packet Descriptor is the first descriptor on multiple
descriptors setup or the only descriptor in a single descriptors setup. The Packet Descriptor contains the
following information:
•
Indicator which identifies the descriptor as a packet descriptor (always 10h
•
Source and destination tags (reserved)
•
Packet type
•
Packet length
•
Protocol specific region size
•
Protocol specific control/statusbits
•
Pointer to the first valid byte in the SOP data buffer
1735
SPRUH73H – October 2011 – Revised April 2013
Universal Serial Bus (USB)
Copyright © 2011–2013, Texas Instruments Incorporated