In mobile-telephone technology, the UniPro protocol stackMIPI Alliance Specification for Unified Protocol (UniProSM) v1.10.01 , requires an account at the MIPI website follows the architecture of the classical OSI Reference Model. In UniPro, the OSI Physical Layer is split into two sublayers: Layer 1 (the actual physical layer) and Layer 1.5 (the PHY Adapter layer) which abstracts from differences between alternative Layer 1 technologies. The actual physical layer is a separate specification as the various PHY options are reusedOverview of MIPI specifications, D-PHY is used in the DSI, CSI, and UniPro specifications, M-PHY is used in the UniPro, DigRFv4 and LLI specifications in other MIPI Alliance specifications.
+ UniPro protocol stack (this color-coding is a long-standing UniPro tradition) Layer # Layer name Functionality Data unit name LA Application Payload and transaction semantics Message DME Layer 4 Transport Ports, multiplexing, flow control Segment Layer 3 Network Addressing, routing Packet Layer 2 Data link Single-hop reliability and priority-based arbitration Frame Layer 1.5 PHY adapter Physical layer abstraction and multi-lane support UniPro symbol Layer 1 Physical layer (PHY) Signaling, clocking, line encoding, power modes PHY symbol
The UniPro specification itself covers Layers 1.5, 2, 3, 4 and the DME (Device Management Entity). The Application Layer (LA) is out of scope because different uses of UniPro will require different LA protocols. The Physical Layer (L1) is covered in separate MIPI specifications in order to allow the PHY to be reused by other (less generic) protocols if needed.
OSI Layers 5 (Session) and 6 (Presentation) are, where applicable, counted as part of the Application Layer.
Physical Layer (L1)
D-PHY Versions 1.0 and 1.1 of UniPro use MIPI's D-PHY technology for the off-chip Physical Layer. This PHY allows inter-chip communication. Data rates of the D-PHY are variable, but are in the range of 500-1000 Mbit/s (lower speeds are supported, but at decreased power efficiency). The D-PHY was named after the Roman number for 500 ("D").
The D-PHYMIPI Alliance Specification for D-PHY v1.00.00 , requires an account at the MIPI website uses differential signaling to convey PHY symbols over micro-stripline wiring. A second differential signal pair is used to transmit the associated clock signal from the source to the destination. The D-PHY technology thus uses a total of 2 clock wires per direction plus 2 signal wires per lane and per direction. For example, a D-PHY might use 2 wires for the clock and 4 wires (2 lanes) for the data in the forward direction, but 2 wires for the clock and 6 wires (3 lanes) for the data in the reverse direction. Data traffic in the forward and reverse directions are totally independent at this level of the protocol stack.
In UniPro, the D-PHY is used in a mode (called "8b9b" encoding) which conveys 8-bit bytes as 9-bit symbols. The UniPro protocol uses this to represent special control symbols (outside the usual 0 to 255 values). The PHY itself uses this to represent certain special symbols that have meaning to the PHY itself (e.g. IDLE symbols). Note that the ratio 8:9 can cause some confusion when specifying the data rate of the D-PHY: a PHY implementation running with a 450 MHz clock frequency is often rated as a 900 Mbit/s PHY, while only 800 Mbit/s is then available for the UniPro stack.
The D-PHY also supports a Low-Power Data Transmission (LPDT) mode and various other low-power modes for use when no data needs to be sent.
M-PHY Versions 1.4 and beyond of UniPro support both the D-PHY as well as M-PHYMIPI Specification for M-PHY version 1.00.00 , requires an account at the MIPI website technology. The M-PHY technology is still in draft status, but supports high-speed data rates starting at about 1000 Mbit/s (the M-PHY was named after the Roman number for 1000). In addition to higher speeds, the M-PHY will use fewer signal wires because the clock signal is embedded with the data through the use of industry-standard 8b10b encoding. Again, a PHY capable of transmitting user data at 1000 Mbit/s is typically specified as being in 1250 Mbit/s mode due to the 8b10b encoding.
+ Physical layer technologies supported by UniPro PHY technology Version / Released Symbol encoding Gbit/s (payload) lanes Supported in D-PHY 1.2/September 2014 8b/9b 4.5 Gbit/s/lane 4 lane port M-PHY 3.1/June 2014 8b/10b 11.6 Gbit/s/lane 4+1 lane port C-PHY 1.00.00 / October 2014 ? 2.5Gbit/s/lane ? 3 lane port
The D- and M-PHY are expected to co-exist for several years. D-PHY is a less complex technology, M-PHY provides higher bandwidths with fewer signal wires, and C-PHY provides low-power.
Low speed modes and power savings
It is worth noting that UniPro supports the power efficient low speed communication modes provided by both the D-PHY (10 Mbit/s) and M-PHY (3 Mbit/sec up to 500 Mbit/s). In these modes, power consumption roughly scales with the amount of data that is sent. Furthermore, both PHY technologies provide additional power saving modes because they were optimized for use in battery-powered devices.
PHY Adapter Layer (L1.5)
Architecturally, the PHY Adapter layer serves to hide the differences between the different PHY options (D- and M-PHY). This abstraction thus mainly gives architectural flexibility. Abstracted PHY details include the various power states and employed symbol encoding schemes.
L1.5 symbols + Example sequence of a UniPro's 17-bit L1.5 symbols ctl b15 b14 b13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00 1 1st byte of L1.5 control symbol 2nd byte of L1.5 control symbol 0 1st byte of L1.5 data symbol 2nd byte of L1.5 data symbol 0 1st byte of L1.5 data symbol 2nd byte of L1.5 data symbol 0 1st byte of L1.5 data symbol 2nd byte of L1.5 data symbol 0 1st byte of L1.5 data symbol 2nd byte of L1.5 data symbol 1 1st byte of L1.5 control symbol 2nd byte of L1.5 control symbol 0 1st byte of L1.5 data symbol 2nd byte of L1.5 data symbol
L1.5 thus has its own (conceptual) symbol encoding consisting of 17-bit symbols. These 17-bit symbols never show up on the wires, because they are first converted by L1.5 to a pair of PHY symbols. The extra 17th control bit indicates special control symbols which are used by the protocol (L1.5 and L2) itself. In the figures, the control bits are shown in "L1.5 red" as a reminder that they are defined in- and used by protocol Layer 1.5.
L1.5 multi-lane support The main feature that L1.5 offers users is to allow the bandwidth of a UniPro link to be increased by using 2, 3 or 4 lanes when a single lane does not provide enough bandwidth. To the user, such a multi-lane link simply looks like a faster physical layer because the symbols are sent across 2, 3 or 4 lanes. Applications that require higher bandwidth in one direction but require less bandwidth in the opposite direction, can have different numbers of lanes per direction.
L1.5 lane discovery Starting in UniPro v1.4, L1.5 automatically discovers the number of usable M-PHY lanes for each direction of the link. This involves a simple discovery protocol within L1.5 that is executed on initialization. The protocol transmits test data on each available outbound lane, and receives information back from the peer entity about which data on which lane actually made it to the other end of the link. The mechanism also supports transparent remapping of the lanes to give circuit board designers flexibility in how the lanes are physically wired.
L1.5 link power management Starting in UniPro v1.4, L1.5 has a built in protocol called PACP (PA Control Protocol) that allows L1.5 to communicate with its peer L1.5 entity at the other end of an M-PHY-based link. Its main usage is to provide a simple and reliable way for a controller at one end of the link to change the power modes of both the forward and reverse directions of the link. This means that a controller situated at one end of the link can change the power mode of both link directions in a single atomic operation. The intricate steps required for doing this in a fully reliable way are handled transparently within L1.5.
L1.5 peer parameters control In addition to the L1.5 link power management the PACP is also used to access control and status parameters of the peer UniPro device.
L1.5 guarantees The mechanisms in L1.5 guarantee the following to upper layer protocols: after reset, each L1.5 transmitter will wait until the connected L1.5 receiver is known to be active (handled via a handshake) if more than one lane is used, the ordering of the original symbol stream is preserved (despite usage of multiple lanes and freedom on how to interconnect these lanes) power mode changes are executed reliably (even in the presence of bit errors)
Data Link Layer (L2) The main task of UniPro's Data Link layer (L2) is to allow reliable communication between two adjacent nodes in the network - despite occasional bit errors at the Physical layer or potential link congestion if the receiver cannot absorb the data fast enough.
L2 data frames L2 clusters 17-bit UniPro L1.5 symbols into packet-like data frames (the term packet is reserved for L3). These data frames start with a 17-bit start-of-frame control symbol, followed by up to 288 bytes of data (144 data symbols) and followed by an end-of-frame control symbol and a checksum.
Note that two or more of the 288 bytes are used by higher layers of the UniPro protocol. The maximum frame size of 288 payload bytes per frame was chosen to ensure that the entire protocol stack could easily transmit 256 bytes of application data in a single chunk. Payloads consisting of odd numbers of bytes are supported by padding the frame to an even number of bytes and inserting a corresponding flag in the trailer.
+ Example UniPro Data Frame ctl b15 b14 b13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00 1 Start-of-Data-Frame control symbol (header) 0 Frame payload 0 : 0 : 0 Frame payload 1 End-of-Data-Frame control symbol (trailer) 0 16-bit checksum
L2 control frames
In addition to data frames which contain user data, L2 also transmits and receives control frames. The control frames can be distinguished from data frames by three bits in the first symbol. There are two types of control frames: One type ("AFC- Acknowledgement and L2 Flow Control", 3 symbols) serves to acknowledge successfully received data frames. The other type ("NAC", 2 symbols) notifies the corresponding transmitter that an incorrect frame has been received. Note that these L2 types of control frames are sent autonomously by L2.
+ Example UniPro Control Frame ctl b15 b14 b13 b12 b11 b10 b09 b08 b07 b06 b05 b04 b03 b02 b01 b00 1 Start-of-Control-Frame control symbol (header) 0 Control frame payload (AFC only) 0 16-bit checksum
L2 retransmission High speed communication at low power levels can lead to occasional errors in the received data. The Data Link layer contains a protocol to automatically acknowledge correctly received data frames (using AFC control frames) and to actively signal errors that can be detected at L2 (using NAC control frames). The most likely cause of an error at L2 is that a data frame was corrupted at the electrical level (noise, EMI). This results in an incorrect data or control frame checksum at the receiver side and will lead to its automatic retransmission. Note that data frames are acknowledged (AFC) or negatively acknowledged (NAC). Corrupt control frames are detected by timers that monitor expected or required responses.
A bandwidth of 1 Gbit/s and a bit-error rate of 10−12 at a speed of 1 gigabit/s would imply an error every 1000 seconds or once every 1000th transmitted Gbit. Layer 2 thus automatically corrects these errors at the cost of marginal loss of bandwidth and at the cost of buffer space needed in L2 to store copies of transmitted data frames for possible retransmission or "replay".
L2 flow control