Architecture
1350
SPRUH82C – April 2013 – Revised September 2016
Copyright © 2013–2016, Texas Instruments Incorporated
Serial ATA (SATA) Controller
28.2.4.2 Interfacing to Multiple Devices
Interfacing to multiple devices is similar to interfacing with a single device, except the existence of a Port
Multiplier on the setup. The couple of additional tasks from the software perspective is that the
requirement for the software to detect and configure the Port Multiplier prior and then after when
accessing individual SATA devices, the software is required to populate the PMP filed of the Command
Headers and PM_PORT field of the FISes with the Port Multiplier Port value.
28.2.5 DMA
The HBA port contains two DMA engines: one to fetch commands from the command list and one to move
FISes in and out of system memory.
The DMA used to move FISes in and out of system memory has a port DMA control register (P0DMACR)
to control the burst transfer. This DMA is used to transfer all information between system memory and the
attached SATA device, as well as configuration and status FISes.
You can program the maximum burst size that is issued on the system bus independently for both reads
and writes. The DMA issues transactions this size or smaller (in DWORD increments). This is used to
optimize burst size for overall system throughput efficiency. See
for details on valid
values. Note that programming a burst size of greater than a transaction size, while not invalid, is
meaningless because the DMA maximizes out at transaction size.
You can also program the transaction size for both receive and transmit (see
). The
transaction size is the minimum amount of data that the DMA works on. For example, if there is a FIS
coming from the device to the host, the DMA does not begin transferring data into system memory until
there is at least rx_transaction_size (RXTS) data in the receive FIFO. During transmit, the DMA reads
data from system memory in tx_transaction_size (TXTS) increments to put into the transmit FIFO. Note
that transactions may be broken up into multiple bursts based on burst size, crossing of a 1K boundary, or
end-of-frame.
28.2.6 Transport Layer
The transport layer handles all of the transport layer functions of the SATA protocol. During reception, it
receives a FIS from the Link layer via the Rx FIFO, decodes the type, and routes it to the proper location
via the port DMA. During transmission, it transfers a FIS constructed by the port DMA to the link layer via
the Tx FIFO. It also passes link layer errors and checks for transport layer errors to pass up to the system.
The transport layer also contains the Tx and Rx FIFOs. These FIFOs are used as asynchronous data
buffers between the serial domain and the bus clock domain. The size of these FIFOs affects the
subsystems ability to buffer data before flow control must be asserted. It also affects the maximum
programmable transaction and burst sizes that can be programmed into the port DMA. The Tx FIFO size
is 32 DWORDS (124 bytes) deep and the Rx FIFO size is 64 DWORDS (256 bytes) deep.
28.2.7 Link Layer
The link layer maintains the link and supports all SATA link layer functionality including:
•
Out-of-band (OOB) transmit signaling
•
Frame negotiation and arbitration
•
Envelope framing/de-framing
•
CRC calculation (receive and transmit)
•
8b/10b encoding/decoding
•
Flow control
•
Frame acknowledgment and status
•
Data width conversion
•
Data scrambling/descrambling
•
Primitive transmission
•
Primitive detection and dropping
•
Power management