Figure 3 defines the conceptual layer structure used in CSI-2. The layers can be characterized as follows:
图3定义了CSI-2中使用的概念层结构。其层次特征如下:
• PHY Layer. The PHY Layer specifies the transmission medium (electrical conductors), the input/output circuitry and the clocking mechanism that captures “ones” and “zeroes” from the serial bit stream. This part of the Specification documents the characteristics of the transmission medium, electrical parameters for signaling and for the D-PHY physical layer option, the timing relationship between clock and data Lanes.
The mechanism for signaling Start of Transmission (SoT) and End of Transmission (EoT) is specified as well as other “out of band” information that can be conveyed between transmitting and receiving PHYs. Bit-level and byte-level synchronization mechanisms are included as part of the PHY.
The PHY layer is described in [MIPI01] and [MIPI02].
• Protocol Layer. The Protocol layer is composed of several layers, each with distinct responsibilities. The CSI-2 protocol enables multiple data streams using a single interface on the host processor. The Protocol layer specifies how multiple data streams may be tagged and interleaved so each data stream can be properly reconstructed.
• Pixel/Byte Packing/Unpacking Layer. The CSI-2 specification supports image applications with varying pixel formats. In the transmitter this layer packs pixels from the Application layer into bytes before sending the data to the Low Level Protocol layer. In the receiver this layer unpacks bytes from the Low Level Protocol layer into pixels before sending the data to the Application layer. Eight bits per pixel data is transferred unchanged by this layer.
• Low Level Protocol. The Low Level Protocol (LLP) includes the means of establishing bit-level and byte-level synchronization for serial data transferred between SoT (Start of Transmission) and EoT (End of Transmission) events and for passing data to the next layer. The minimum data granularity of the LLP is one byte. The LLP also includes assignment of bit-value interpretation within the byte, i.e. the “Endian” assignment.
• Lane Management. CSI-2 is Lane-scalable for increased performance. The number of data Lanes is not limited by this specification and may be chosen depending on the bandwidth requirements of the application. The transmitting side of the interface distributes (“distributor” function) bytes from the outgoing data stream to one or more Lanes. On the receiving side, the interface collects bytes from the Lanes and merges (“merger” function) them together into a recombined data stream that restores the original stream sequence. For the C-PHY physical layer option, this layer exclusively distributes or collects byte pairs (i.e. 16-bits) to or from the data Lanes. Scrambling on a per-Lane basis is an optional feature, which is specified in detail in Section 9.15.
Data within the Protocol layer is organized as packets. The transmitting side of the interface appends header and error-checking information on to data to be transmitted at the Low Level Protocol layer. On the receiving side, the header is stripped off at the Low Level Protocol layer and interpreted by corresponding logic in the receiver. Error-checking information may be used to test the integrity of incoming data.
• Application Layer. This layer describes higher-level encoding and interpretation of data contained in the data stream and is beyond the scope of this specification. The CSI-2 Specification describes the mapping of pixel values to bytes.
• PHY Layer. PHY层指定传输介质(电导体),输入/输出电路和从串行比特流捕获“1”和“0”的时钟机制。本规范的这一部分记录了传输介质的特性、信令和D-PHY物理层选项的电气参数、时钟和数据通道之间的时序关系。
指定了发送开始(SoT)和发送结束(EoT)的信令机制,以及其他可以在发送和接收物理节点之间传递的“带外”信息。位级和字节级同步机制是PHY的一部分。
PHY层在[MIPI01]和[MIPI02]中描述。
• Protocol Layer. 协议层由几层组成,每一层都有不同的职责。CSI-2协议使用主机处理器上的一个接口支持多个数据流。协议层指定了如何标记和交叉多个数据流,以便每个数据流可以正确地重构。
• Pixel/Byte Packing/Unpacking Layer. CSI-2规范支持不同像素格式的图像应用程序。在发送器中,这一层在将数据发送到低层协议层之前,将来自应用层的像素打包成字节。在接收端,将数据发送到应用层之前,这一层将低级别协议层的字节解包为像素。每像素8位的数据通过这一层不变地传输。
• Low Level Protocol. Low Level Protocol (LLP)包括为SoT(传输开始)和EoT(传输结束)事件之间传输的串行数据建立位级和字节级同步的方法,并将数据传递给下一层。LLP的最小数据粒度为1字节。LLP还包括字节内位值解释的赋值,即“Endian”赋值。
• Lane Management. CSI-2是lane可扩展的,以提高性能。数据通道的数量不受此规范的限制,可以根据应用程序的带宽要求来选择。接口的发送端(“分发器”功能)将字节从outgoing data stream 分发到一个或多个lane。在接收端,接口从lane中收集字节并合并(“merger”功能)成一个重新组合的数据流,恢复原来的流序列。对于C-PHY物理层选项,该层专门分配或收集字节对(即16位)到数据通道或从数据通道。基于每条车道的置乱是一个可选特性,在章节9.15中详细说明。
协议层中的数据被组织为数据包。接口的发送端在要在低层协议层传输的数据上附加报头和错误检查信息。在接收端,在低级别协议层剥离报头,并在接收端用相应的逻辑解释。错误检查信息可用于测试传入数据的完整性。
• Application Layer. 这一层描述了数据流中包含的更高层次的数据编码和解释,超出了本规范的范围。CSI-2规范描述了像素值到字节的映射。
The normative sections of the Specification only relate to the external part of the Link, e.g. the data and bit patterns that are transferred across the Link. All internal interfaces and layers are purely informative.
规范的规范部分只涉及链路的外部部分,例如通过链路传输的数据和位模式。所有内部接口和层都是纯信息的。