User manual

Table Of Contents
Zynq-7000 AP SoC Technical Reference Manual www.xilinx.com 365
UG585 (v1.11) September 27, 2016
Chapter 13: SD/SDIO Controller
The host-AHB controller acts as bridge between the AHB bus and the host controller. The SD/SDIO
controller registers are programmed by the processor through the AHB interface. Interrupts are
generated based on the values set in the Interrupt Status and Interrupt Enable registers.
The bus monitor checks for violations occurring on the SD bus and timeout conditions. The clock
generation block generates the SD clock depending on the value programmed in the Clock Control
register.
The CRC7 and CRC16 generators calculate the CRC for command and data transfers to the SD/SDIO
card. The CRC7 and CRC16 checker checks for any CRC errors in the response and data received from
the SD/SDIO card. To detect data defects on the card, the host can include error correction codes in
the payload data. ECC code is used to store data on the card. This ECC code is used by the application
to decode the user data.
13.2.3 Data FIFO
The controller uses two 512 byte dual port FIFOs for performing write and read transactions. During
a write transaction (data is transferred from the processor to an attached card) data is written by the
processor alternatively into the first and second FIFO. When data is transferred to an attached card,
alternatively the second and first FIFO is used, providing maximum data throughput.
During a read transaction (data is transferred from an attached card to the processor) the data from
the card is alternatively written in the two FIFOs. When data from one FIFO is transferred to the
processor the second FIFO is filled with data from the card and vice versa, optimizing data
throughput.
If the controller cannot accept any data from a connected card, it issues a read wait, stopping the
data transfer from the card by stopping the clock.
13.2.4 Command and Control Logic
The control logic block transmits data on the data lines during a write transaction and receives data
during read transaction The command control logic block transmits commands on the command
lines and receives the response from the SD2.0 or SDIO2.0.
13.2.5 Bus Monitor
The bus monitor checks for violations occurring in the SD bus, and timeout conditions.