Professional Documents
Culture Documents
UFS Overview
UFS Overview
OVERVIEW
UFS 1. 0 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
UFS 1. 1 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Speed
500 Mbps 800 Mbps 1.5 Gbps 2.5 Gbps 3.0 Gbps 5.0 Gbps 6.0 Gbps 8.0 Gbps 10 Gbps 16 Gbps
UFS 1. 2 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Speed
8-bit / 10-bit coding scheme is used in the frequency band 1-GHz:6-GHz
It has been invented by an engineer from IBM but is now free of patent
freq
In the range 1-6 GHz, only 1000BASE-T Ethernet and HDMI use a different coding
scheme
HDMI is based on 8b/10b Transition Minimized Differential Signalling (TMDS)
Ethernet is based on 4D-PAM5
UFS 1. 3 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Speed
Host Device
8 10 10 8
8-bit/ 8-bit/
Transmission
10-bit Serializer Deserializer 10-bit
Line
Encoder Encoder
8 10 10 8
8-bit/ 8-bit/
Transmission
10-bit Deserializer Serializer 10-bit
Line
Encoder Encoder
UFS 1. 4 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
NAND vs eMCC / UFS
NAND flash
RE#
WE#
RB#
CE#
WP#
ALE
CLE
RESET_n
Rx+/ Tx+/
Rx- Tx-
Host
Processor
ECC
Bad Block Management
Wear Leveling Host
NAND Flash Driver Processor
UFS Host driver
Wear leveling attempts to arrange data so that erasures and re-writes are distributed
evenly across the medium
UFS 1. 5 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
OS and applications
Device Manager Task Manager (SCSI) UFS Command Set Layer (UCS)
(UFS)
Bus / Link management
Data packets
Query req
Power management
Device cfg / management
HCI
UFS Link Layer (MIPI Unipro Version 1.6)
1-Lane
UFS 1. 6 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
UFS is designed to be Protocol-agnostic
But for version 2.0, UFS relies on T10 SCSI Architecture Model (SAM) standard
Command protocol is based on:
SCSI Primary Commands (SPC) Commands for all devices Command structure
SCSI Block Commands (SBC) Command set extensions to facilitate consists of a Command
operation of SCSI Block devices Descriptor Block (CDB)
Application layers:
UCS, Device Manager and Task Manager
The Task Manager handles SCSI Commands meant for queue control
Abort Commands
The Device Manager provides device level UFS-specific control like Query
request and lower level Link-layer control
Low power management
The Device Manager is in charge of enumeration which is done through
descriptors
UFS 1. 7 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
The Device Manager interacts with lower layers using two access points:
Device Manager
Handling of Device
Handling of Host level level operations and
operations configurations
Assertion Query
of RESET_n request
Unipro
Device Management
UTP
Entity
(UIC)
UFS 1. 8 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
If Host side UTP receives a request from Application layer or Device Manager, it
generates an UFS Protocol Information Unit (UPIU) for that request and transports
this UPIU to the peer UTP device side
Host Device
UFS UFS
Device Device
Mgmt Mgmt
SCSI SCSI
SBC, SPC SBC, SPC
SCSI SCSI
Task Task
manager manager
UTP UTP
UIC UIC
UFS 1. 9 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
SCSI SBC and SPC commands are the baseline for UFS
UFS will not modify the SBC and SPC Compliant commands
The goal is to maximize re-use and leverage of the software codebase
available on platforms that are already supporting SCSI
UFS 1. 10 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
The SCSI Architecture Model (SAM-5) is a Client-Server model
UFS 1. 11 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
Target of a Procedure Call is a Logical Unit (LU) contained within a UFS device
A UFS device will contain one or more Logical Units
A Logical Unit is an independent processing entity within the device
Each Logical Unit has an address within the Target device called a Logical Unit
Number (LUN)
UFS 1. 12 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers, SCSI Command model
DDR
Status Qualifier
UFS 1. 13 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers, SCSI Task Management functions
UFS 1. 14 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Protocol layers
Host Device
Hardware UPIU
UTP UTP
UNIPRO UNIPRO
UIC UIC
M-PHY M-PHY
UFS 1. 15 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Host and device
Implementation
SDRAM NAND Flash
example
UFS 1. 16 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
System model
Host Device
Device
Appli level Descriptors
cations Management
Control Configuration
SCSI UFS Host
controller Logical Unit LU-1
protocol Storage
Ref_Clk Command queue
Reset
UNIPRO
UNIPRO
UFSHCI
M-PHY
M-PHY
UFS host DOUT/DOUT_c
UFS
registers
software
driver DIN/DIN_c Logical Unit LU-N
Storage
Command queue
Functional features
Similar functional features as eMMC
Write protection options, including permanent and power-on write protection
Boot operation mode, support for boot partitions and support for Replay Protected Memory Block (RPMB)
Device enumeration and discovery
Supports multiple partitions (LUNs) with partition management
Secure operations, Purge, Erase and Trim to enhance data security
Trim command allows an OS to inform the UFS device which blocks of data are no longer considered in use and
can be wiped internally
UFS 1. 17 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
System model
MMC/eMMC UFS
Same LU
prior to the response to Command #i
response to Command #i (Pipelining)
CMD #i CMD #i+1 CMD #i+2
LUN #A LUN #A LUN #A
RESP #i+1 RESP #i
LUN #A LUN #A
Response #i+1 can be transmitted prior to the
response to Command #i (Command reordering)
CMD #i CMD #i+1 CMD #i+2
LUN #A LUN #B LUN #C
RESP #i RESP #i+1
Different LUs LUN #A LUN #B
Command #i+1 can be transmitted prior to the
response to Command #i (Pipelining)
CMD #i CMD #i+1 CMD #i+2
LUN #A LUN #B LUN #C
RESP #i+1 RESP #i
LUN #B LUN #A
Response #i+1 can be transmitted prior to the
response to Command #i (Command reordering)
UFS 1. 18 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
System model
MMC/eMMC UFS
CMD #i WRITE
CMD #i RESP #i DATA DATA
LUN #A
RESP #i
DATA DATA LUN #A
Command, Data and Response are transferred
Command and Response are transferred
over the same Lane
over CMD line while Data is
transferred over DATA[7:0] Lines CMD #i CMD #i+1 WRITE
DATA DATA
WRITE LUN #A LUN #A
RESP #i RESP #j
LUN #A LUN #B
WriteRq RESP #i
CMD #i RESP #i Ready DATA DATA
LUN #A LUN #A
UFS 1. 19 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
System model
UFS 1.1 Line 1210
Only one Task can be processed at a time within a Logical Unit
UFS 1. 20 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
System model
SD/MMC/USB 2.0
Host Device Host Device
Half duplex
Control Data
SATA
Host Device Host Device
Full duplex
Data Control
Data Data
UFS, USB 3.0
Host Device Host Device
Full duplex
Data Data
Control Data
UHS II Host Device Host Device
Full duplex
Data Control
Data Data
UHS II Host Device Host Device
Half duplex
UFS 1. 21 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
eMMC inheritance - Replay Protected Memory Block (RPMB)
This function provides means for the system to store data to the specific memory
area in an authenticated and replay protected manner
RPMB operation is a separate self-contained security command protocol that has its
own command opcodes (message types) and well-defined data structure
UFS 1. 22 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
eMMC inheritance - Write Protect feature
Permanent write protect Once the permanent write protect is set, the protected memory
becomes read only
Power-on write protect (volatile Once the power-on write protect is set, it is persistent until the
write protect) next power cycle or hardware reset
Host needs to reset the power-on write protect to memory regions
that it wants to apply this type of write protection each time after power
cycle or hardware reset
For User Area Partition and General Partitions, Write Protect is applied to memory
regions defined by multiples of Write Protect Group Size
For UFS, Write Protect is defined per Logical Unit
UFS 1. 23 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
eMMC inheritance - Write Protect feature, example
Write Protect settings
(Assumption: write protect
group size = 4 MB)
UFS 1. 24 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
eMMC inheritance - Secure Trim / Secure Erase
Secure When a Secure Erase command is sent, data in the specified memory addresses must be
erase purged from the physical memory array
Logical memory erase is not acceptable (erase operation in cache)
Secure erase command includes
Start address of erase groups
End address of erase groups
Secure For cases where smaller amounts of data might be spread through multiple erase groups, a
trim force garbage collect command is added
This allows the same function as Secure Erase to be performed on write Blocks (Sectors) instead
of erase Groups
1. Host indicates the start and end addresses of sectors to be erased
2. Host initiates the erase operation
User data area
Erase group
Erase group
Sectors to be erased
UFS 1. 25 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Host interface
NAND Flash
SDRAM controller
controller
SCSI Command
NAND Flash Implementation
SDRAM RxBuffer
example
TxBuffer
The means by which the UFS controller transfers data into and out of Host memory
is via hardware and or firmware mechanism defined in a separate document entitled
UFS Host Controller Interface
UFS 1. 26 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
UTP layer
The device controls the pacing and state transitions needed to satisfy the data
transfers and status completion of a request
UTP Layer flow control
No need for the Host to poll the device for Ready status
1
Command (Data Out) SRAM
Host Device RxBuffer
2
Ready To Transfer SRAM
Host Device RxBuffer
3
Data (out) SRAM
Host Device RxBuffer
4 Status SRAM
Host Device RxBuffer
UFS 1. 27 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
UTP layer
When the Host requests data from device, it must allocate buffer in SDRAM so as to
accept all requested data prior to generating the request
1
SDRAM Command (Data In)
RxBuffer
Host Device
2
SDRAM Data (In)
Host Device
RxBuffer
3 SDRAM Status
RxBuffer
Host Device
UFS 1. 28 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Interface features
Host Device
NAND
VCC (1.8 / 3.0 V)
flash
BER = 10-10 (1 error every 1010 transferred bits = 3.43 second at 2.9152 Gbps)
UFS 1. 29 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Interface features
UFS interface can support 1 or 2 Lanes
An equal number of downstream and upstream Lanes must be provided
Traffic sent over UniPro can be classified as Traffic Class 0 or 1 with TC1 as higher
priority class
TC1 (Low Latency) is not supported by UFS 2.0
The Host interface based on DMA and interrupt is not defined in UFS specification
but in the Host Controller specification
UFS 1. 30 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Encapsulation
SCSI Read Command
(10B)
10 B
UPIU
Read Command
UFS Header
Block (16B)
32 B (16B)
1 B
UniPro
Transport UPIU
L4s DestCPortID_ Fct Eom Read Command
Header
33 B =1 Enc =0 =1 Block (16B)
(16B)
1 B
UniPro
Network UPIU
DestDeviceID L4s DestCPortID_ Fct Eom Read Command
L3s=1 Header
34 B _Enc =1 Enc =0 =1 Block (16B)
(16B)
2 B 2 B
UniPro UPIU
DestDeviceID L4s DestCPortID_ Fct Eom Read Command CRC
Link ESC_DL SOF TC 0 L3s=1 Header ESC_DL EOF Seq#
_Enc =1 Enc =0 =1 Block (16B) 16
40 B (16B)
+
20 b 1 0 0 0 0 0 1 0
16* 17 bits
First Last
UniPro 17 bits
Physical 0/1 1B 1B
Adapter
40 B + 20 b 8 bits
K/D
M-PHY 8b10b encoder
40*10 = 400 bits 10 bits
UFS 1. 31 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Encapsulation
Data
(16 Blocks of
SCSI 4 KB)
10 B
UniPro
Transport 272 B
1 B
16B+64K+16B+4=241*272+20
UFS 1. 32 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Layer 2 initiated traffic
UniPro 2 B 2 B 2 B 2 B 2 B
Link
AFC Cr Rr
ESC_DL AFC TC Seq# Credit CRC-16 NAC ESC_DL NAC CRC-16
Acknowledge and eq eq
Not Ack
Flow Control
1 0 0 1 0
First Last
UniPro 17 bits
Physical 0/1 1B 1B
Adapter
8 bits
K/D
M-PHY 8b10b encoder
10 bits
AFC and NAC can be inserted in the payload of a UniPro Layer 3 SDU
UFS 1. 33 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
OVERVIEW
Layer 1.5 initiated traffic
2 B 2 B 2 B 2 B 2 B 2 B
PACP
ESC_PA PACP_BEGIN Function ID Parameter 0 … Parameter N-1 CRC-16
UniPro
Physical
Adapter
1 0 0 0 0 0
First Last
17 bits
0/1 1B 1B
8 bits
K/D
M-PHY 8b10b encoder
10 bits
UFS 1. 34 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
QUIZ
UFS 1. 35 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6
QUIZ
UFS 1. 36 Overview
Reproduction is strictly forbidden without the express written permission of an authorized representative of AC6