User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 419
UG585 (v1.11) September 27, 2016
Chapter 15: USB Host, Device, and OTG Controller
After the device has loaded the dTD, the leading data in the packet is stored in a FIFO in the device
controller. This FIFO is split into virtual channels so that the leading data can be stored for any
endpoint up to the maximum number of endpoints configured at device synthesis time.
After a priming request is complete, an endpoint state of primed is indicated in the ENDPTSTATUS
register. For a primed transmit endpoint, the device controller can respond to an IN request from the
host and meet the stringent bus turnaround time of High Speed USB.
Since only the leading data is stored in the device controller FIFO, it is necessary for the device
controller to begin filling in behind leading data after the transaction starts. The FIFO must be sized
to account for the maximum latency that can be incurred by the system memory bus. More
information about FIFO sizing is presented in section Bandwidth and Latency Issues.
15.6.2 Prime Receive Endpoints
Priming receive endpoints is identical to priming of transmit endpoints from the point of view of the
DCD. At the device controller the major difference in the operational model is that there is no data
movement of the leading packet data simply because the data is to be received from the host.
Note as part of the architecture, the FIFO for the receive endpoints is not partitioned into multiple
channels like the transmit FIFO. Thus, the size of the RxFIFO does not scale with the number of
endpoints.
15.6.3 Interrupt and Bulk Endpoint Operational Model
The behaviors of the device controller for interrupt and bulk endpoints are identical. All valid IN and
OUT transactions to bulk pipes will handshake with a NAK unless the endpoint had been primed.
Once the endpoint has been primed, data delivery will commence.
A dTD will be retired by the device controller when the packets described in the transfer descriptor
have been completed. Each dTD describes N packets to be transferred according to the USB Variable
Length transfer protocol. The formula and table on the following page describe how the device
controller computes the number and length of the packets to be sent/received by the USB vary
according to the total number of bytes and maximum packet length.
With Zero Length Termination dTD.ZLT = 0,
N = INT(Number of Bytes/Max. Packet Length) + 1
With Zero Length Termination dTD.ZLT = 1,
N = MAXINT(Number of Bytes/Max. Packet Length)