An Overview of Serial ATA Technology: Chris Erickson
An Overview of Serial ATA Technology: Chris Erickson
Chris Erickson
Graduate Student Department of Electrical and Computer Engineering Auburn University, Auburn, AL 36849 [email protected]
Objectives
Why SATA was invented The differences between PATA and SATA How the hardware is structured to transmit and receive SATA Protocol of SATA transmission
What is PATA?
All of the below synonyms refer to a modern day PATA drive
PATA Parallel Advanced Technology Attachment
More on PATA
40 & 80 wire cable option
40 wire limited to UDMA 33 MB/s and below 80 wire allowed for UDMA 66, 100, 133 MB/s
Required by ATA spec to be 5v tolerant (3.3v has been the norm for several years) Must support Master/Slave/Cable Select
SATA Basics
New Connector
Saves space More reliable More air flow
SATA Basics
SATA I for 1.5Gbps ~ 150MB/s SATA II for 3.0Gbps ~ 300MB/s Provides support for legacy command set
Connectivity
Serial ATA is point-to-point topology
Hosts can support multiple devices but requires multiple links 100% available link bandwidth
Link Characteristics
SATA uses full-duplex links
Protocol only permits frame transfer in one direction at a time Each link consists of a transmit and a receive pair
Power Management
SATA has
Phy Ready Capable of sending and receiving data. Main phase locked loop are on and active Partial Physical layer is powered but in a reduced state. Must be able to return to Phy Ready within 10 us. Slumber Physical layer is powered but in a reduced state. Must be able to return to Phy Ready within 10 ms.
Transport
Link
Physical
Host Layers
Device Layers
Physical Layer
Transmission (Tx) and Reception (Rx) of a 1.5Gb/s serial stream Perform power on sequencing Perform speed negotiation Provide status to link layer Support power management requests Out-of-Band (OOB) signal generation and detection
Out of Band
Part of normal power on sequence Allows host to issue a device hard reset Allows device to request a hard reset Brings device out of low power state
COMINIT
Always originated by the device Requests a link reset Issued by device in response to COMRESET
320 ns 106.7 ns
COMWAKE
106.7 ns
106.7 ns
Host
Device
Data In
Align Generator
Serializer Tx Clock
Tx -
Rx +
Data Out
RX Clock COMRESET / COMINIT
Deserializer
Rx -
COMWAKE
Transport
Link
Physical
Host Layers
Device Layers
Link Layer
8b / 10b encoding Scrambles and descrambles data and control words Converts data from transport layer into frames Conduct CRC generation and checking Provides frame flow control
Encoding Concepts
All 32 bit Dwords are encoded for SATA
32 bits data = 40 bits of transmission
0 0 1 1 1 1 1 1
This 10b Character transmitted when CRD negative This 10b Character transmitted when CRD positive
1 0 1 0 1 1 1 0 0 1
This character
0 1 0 1 0 0 1 0 0 1
This character
6 ones
4 zeros Disparity +2
4 ones
6 zeros Disparity -2
SATA Primitives
Convey real-time state information Control transfer of information between host and device Provide host/device coordination
SATA Primitives
ALIGN Speed negotiation and at least every 256 Dword SYNC Used when in idle to maintain bit synchronization
SATA Primitives
X_RDY R_RDY
SOF EOF
R_IP
R_OK R_ERR
HOLD HOLDA
SOF
Payload Data
CRC
EOF
Host
SYNC SYNC SYNC SYNC SYNC
Device
SYNC
Host
SYNC SYNC SYNC SYNC SYNC
Device
SYNC
Host
SYNC SYNC R_RDY R_RDY R_RDY
Device
R_RDY
Host
R_RDY R_RDY R_RDY R_RDY R_RDY
Device
R_RDY
Host
R_RDY R_RDY R_IP R_IP R_IP
Device
R_IP
Host
R_IP R_IP R_IP R_IP R_IP
Device
R_IP
Host
R_IP R_IP R_IP R_IP R_IP
Device
R_IP
Host
R_IP R_IP R_OK R_OK R_OK
Device
R_OK
Host
R_OK R_OK R_OK R_OK R_OK
Device
R_OK
Host
R_OK R_OK SYNC SYNC SYNC
Device
SYNC
Transport
Link
Physical
Host Layers
Device Layers
Transport Layer
Responsible for the management of Frame Information Structures (FIS) At the command of Application layer:
Format the FIS Make frame transmission request to Link layer Pass FIS contents to Link layer Receive transmission status from Link layer and reports to Application layer
FIS types
FIS TYPE CODE 27h 34h A1h 39h 41h 58h 5Fh 46h Description Direction D H H H H H H H
Register transfer host to device H Register transfer device to host D Set Device bits
DMA Activate
DMA Setup BIST Activate
D D D D D D
Byte 2
Byte 1
Byte 0
FIS TYPE (27h) Sector Number Sector Number Sector Count
Command Reserved Cyl High Cyl High (exp) Reserved Cyl Low Cyl Low (exp) Sector Count
Byte 2
[ TASLFPRV ]
Byte 1
Reserved Data [15:8]
Byte 0
FIS Type 58h Data [7:0]
Data [15:8]
Data [7:0]
T - Far end transmit only transmit Dwords defined in words 1 & 2 A - No ALIGN transmission (valid only with T) S - Bypass scrambling (valid only with T) L - Far end retimed loopback with ALIGN insertion F - Far end analog loopback P - Transmit primitives defined in words 1 & 2 of the FIS R - Reserved V - Vendor Unique Test Mode other bits undefined
Data FIS
Byte 3 Byte 2 Byte 1 Byte 0
(46h)
... Dword N
Transport
Link
Physical
Host Layers
Device Layers
Host command layer may be the same but may only support legacy commands
Completed !!
Any Question? Comments?