User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 397
UG585 (v1.11) September 27, 2016
Chapter 15: USB Host, Device, and OTG Controller
Device Mode
As requested by the host, the Device Controller Driver (DCD) sets up descriptors for endpoints and
manages the real-time needs of the endpoints. The high-speed data transfers between memory and
ULPI are managed by the controller using queue heads and transfer descriptors. The results of each
transfer is reviewed by DCD to take appropriate action.
Device Endpoints. The device controller includes a simple descriptor model to enable the controller
to quickly respond to host requests. Each of the 12 endpoints has two device Queue Heads (dQH);
one for IN and the other for OUT transfer types. There are a total of 24 device dQH’s. An endpoint
data transfer in defined with one dQH and one or more linked list of device Transfer Descriptors
(dTD). An example is shown in Figure 15-13.
Host Mode
Host Schedules. The Host Controller Driver (HCD) maintains two types of transaction schedules to
generate USB traffic: periodic (isochronous/interrupt) and asynchronous (bulk/control).
The Periodic schedule is a list of high to low priority-order periodic transfers. An element in the
periodic frame list is executed at the start of every frame (SOF). The list includes elements that
indicate when to execute (periodic interval) and what to execute. An example is shown in
Figure 15-15.
The asynchronous schedule is a circular loop of Queue Heads that point to transfer descriptors
that are processed in a round-robin priority. Within each microframe, the asynchronous
schedule is executed after the periodic schedule is finished. An example is shown in
Figure 15-16.
Link-list Concept
The host and device controllers use link-list descriptors to manage transfers to and from memory
buffers. The concept is shown in Figure 15-5. The first Transfer Descriptors (TD) is pointed to by a
X-Ref Target - Figure 15-4
Figure 15-4: USB Endpoint Descriptors (device mode) and Schedules (host mode)
Endpoint Queue Heads
Endpoint 11 IN
EndPoint 0 IN
EndPoint 1 OUT
EndPoint 0 OUT
Device
Responds
to Host
Requests
Queue Head
List
Host Schedules (EHCI)
Queue Head a
Aysnchronous
Queue Heads
Queue Head b
Frame n Elements
Periodic Frame
List
Frame 3 Elements
Frame 1 Elements
Frame 2 Elements
Frame 0 Elements
dQH
FRINDEX pointer is advanced
for every USB Frame
Round Robin as
Bandwidth allows.
Programmable
number of
elements Insert and
Remove
QH’s as
needed
Maintain
Queue
Head List
Queue Head b
UG585_c15_33_030713