SATA / SAS — Framing, Link Layer & Flow Control
Overview
SATA (Serial ATA) and SAS (Serial Attached SCSI) are high‑speed serial storage interfaces designed for reliable, low‑latency, point‑to‑point communication between hosts and storage devices. Both protocols evolved from parallel ATA/SCSI buses into modern serial architectures with:
- structured framing
- link‑layer flow control
- out‑of‑band signaling
- robust error detection
- deterministic state machines
SATA is optimized for consumer and client storage, while SAS targets enterprise environments with higher reliability, multi‑initiator support, and advanced link management.
Despite their differences, both share a common architectural foundation based on framing, primitives, link‑layer state machines, and credit‑based flow control.
Protocol Architecture
Physical Layer
The physical layer defines:
- differential signaling
- lane speeds (1.5G, 3G, 6G, 12G, 22.5G for SAS)
- 8b/10b encoding (SATA, SAS‑1/2)
- 128b/150b encoding (SAS‑3/4)
- out‑of‑band (OOB) signaling for link bring‑up
SAS uses more advanced encoding and supports full‑duplex operation, while SATA is half‑duplex.
Link Layer
The link layer is responsible for:
- framing and primitive insertion
- flow control
- CRC validation
- retry mechanisms
- link initialization and training
SAS includes additional features such as arbitration and routing for multi‑initiator topologies.
Transport / Protocol Layer
Defines:
- command structures (FIS for SATA, SSP/STP/SMP for SAS)
- data payload formats
- error handling semantics
- device addressing (SAS WWN, SATA port multipliers)
SAS supports multiple protocol personalities (SSP, STP, SMP), enabling interoperability with SATA devices.
Framing and Packetization
Frame Structure
Both SATA and SAS use structured frames composed of:
- SOF (Start‑of‑Frame)
- Header (command, address, control)
- Payload (data or control information)
- CRC (32‑bit)
- EOF (End‑of‑Frame)
Frames are interleaved with primitives, which are special control words used for link management.
Primitives
Primitives are 32‑bit control tokens used for:
- flow control (X_RDY, R_RDY)
- acknowledgments (R_OK, R_ERR)
- alignment (ALIGN)
- idle signaling (IDLE)
- OOB sequences (COMRESET, COMINIT, COMWAKE)
Primitives are the backbone of SATA/SAS link‑layer behavior.
FIS (Frame Information Structure) — SATA
SATA uses FIS types to encode:
- register commands
- DMA setup
- PIO data
- device‑to‑host status
- data payloads
FIS structures provide a clean separation between control and data.
SSP/STP/SMP — SAS
SAS supports three transport personalities:
- SSP (Serial SCSI Protocol) — native SCSI command transport
- STP (SATA Tunneling Protocol) — encapsulates SATA frames
- SMP (Serial Management Protocol) — topology discovery and management
This flexibility is a key advantage of SAS in enterprise systems.
Link Initialization and Training
OOB Signaling (SATA)
SATA uses out‑of‑band sequences for link bring‑up:
- COMRESET — host reset
- COMINIT — device detection
- COMWAKE — handshake and alignment
OOB signaling is robust and simple, ideal for consumer devices.
SAS Link Training
SAS uses:
- speed negotiation
- alignment sequences
- training patterns
- PHY reset and discovery
SAS supports multiple PHYs and complex topologies (expanders).
Flow Control Mechanisms
Credit‑Based Flow Control
Both SATA and SAS use a credit‑based scheme:
- transmitter sends X_RDY when ready
- receiver responds with R_RDY when buffer space is available
- data transfer proceeds only when both sides agree
This prevents buffer overflow and ensures deterministic behavior.
Retry and Error Recovery
Error handling includes:
- CRC validation
- R_ERR signaling
- frame retransmission
- link reset if recovery fails
SAS provides more advanced recovery mechanisms due to enterprise requirements.
Full‑Duplex vs Half‑Duplex
- SATA is half‑duplex: only one direction active at a time.
- SAS is full‑duplex: simultaneous transmit and receive.
This difference significantly impacts performance and flow‑control behavior.
Error Handling and Reliability
CRC Protection
All frames include a 32‑bit CRC covering header and payload.
Disparity and Encoding Errors
8b/10b encoding provides:
- running disparity checks
- invalid symbol detection
- control character integrity
SAS‑3/4 use 128b/150b encoding with improved BER performance.
Link Reset and Recovery
Persistent errors trigger:
- link reset
- OOB renegotiation (SATA)
- PHY reset and re‑training (SAS)
SAS supports more granular recovery due to multi‑initiator environments.
Topology and Routing
SATA Topology
SATA is strictly point‑to‑point:
- one host ↔ one device
- optional port multipliers (hub‑like behavior)
Simple and low‑cost.
SAS Topology
SAS supports:
- multi‑initiator
- multi‑target
- expanders
- routing tables
- zoning and isolation
SAS is designed for large storage fabrics.
Performance Considerations
Throughput
SAS supports higher lane speeds and full‑duplex operation.
SATA is optimized for simplicity and cost.
Latency
Both protocols provide low, deterministic latency due to:
- structured framing
- credit‑based flow control
- hardware‑driven state machines
Scalability
SAS scales to:
- many devices
- multiple initiators
- complex topologies
SATA scales primarily through port multipliers.
Power and Cost
SATA is lower power and lower cost.
SAS is higher performance and enterprise‑grade.
Comparison of SATA and SAS
| Features | SATA | SAS |
|---|---|---|
| Duplex | Half‑duplex | Full‑duplex |
| Encoding | 8b/10b | 8b/10b → 128b/150b |
| Topology | Point‑to‑point | Multi‑initiator, expanders |
| Flow Control | Primitives | Primitives + advanced recovery |
| Transport | FIS | SSP/STP/SMP |
| Use Case | Consumer storage | Enterprise storage fabrics |
Use Cases
SATA
- consumer SSDs and HDDs
- embedded systems
- low‑cost storage appliances
SAS
- enterprise SSDs and HDDs
- RAID controllers
- storage arrays
- high‑availability systems
Related Pages
- SERDES & High‑Speed Interfaces — Architecture
- Packetization — Architecture & Data Flow
- Flow Control & Data Path — Overview
- Reassembly & Segmentation — Architecture & Use Cases
Summary
SATA and SAS are serial storage protocols built on structured framing, link‑layer primitives, and credit‑based flow control. SATA provides a simple, robust, point‑to‑point interface for consumer devices, while SAS extends the architecture with full‑duplex operation, multi‑initiator support, advanced routing, and enterprise‑grade reliability. Both protocols exemplify how framing, flow control, and link‑layer state machines enable efficient, deterministic data movement in modern digital systems.