MIPI CSI-2 Intel® FPGA IP User Guide

ID 813926
Date 4/26/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

5.1. MIPI CSI-2 Receiver

Figure 3. MIPI CSI-2 Intel® FPGA IP Receiver Block Diagram

The MIPI CSI-2 RX component consists of multiple layers defined in the MIPI CSI-2 specification version 3.0, such as the lane management layer, low level protocol and byte to pixel conversion. The MIPI CSI-2 RX component receives 16-bit data per lane, with support for up to eight lanes, from the MIPI D-PHY Intel® FPGA IP through the standard PHY Protocol Interface (PPI).

In video mode, the byte data received on the PPI is then processed by the low-level protocol module to extract the real video information. The extracted and formatted video is presented at its native clocked video interface.

In Passthrough mode, the MIPI low-level protocol byte stream is instead presented directly on an AXI4-Stream interface for retransmission or custom processing.

The Clocked Video to AXI convertor (CV2AXI) component primarily converts the clocked video data to AXI4-Streaming video data using the Intel FPGA Streaming Video Protocol. The AXI4-Stream Intel FPGA streaming video packets always follow the pattern of one (and only one) image information metapacket followed by video packets and one (and only one) End-of-Field metapacket.

Each component has an Avalon® memory-mapped register interface for control and status register access and will be given an address space. The most significant bit of the offset addresses from the system base address are 0x0 for MIPI CSI-2 RX component and 0x1 for the CV2AXI component.
Table 23.  Top Level Interfaces
Interface Description
AXI4-Stream Intel FPGA Streaming Video (Full Variant) Carries pure video packet in Intel FPGA streaming video format. Color and byte remapped and ready for processing. Accompanied by Image Information Packet (IIP) and End of Field (EOP) packets. Present only when Video mode is enabled.
AXI4-Streaming MIPI Packet AXI4-Stream interface carrying recovered MIPI CSI-2 packets. Present only when Passthrough mode is enabled.
PPI PHY Protocol Interface. Refer to MIPI D-PHY specification version 2.5 Annex A.
Avalon® memory-mapped interface CSR Control and Status Register.
Figure 4. MIPI CSI-2 Intel® FPGA IP Receiver (Video Mode)
Figure 5. MIPI CSI-2 Intel® FPGA IP Receiver (Passthrough Mode)
Table 24.  MIPI CSI-2 Intel® FPGA IP RX Functional Blocks
Functional Block Description
RX PPI
  • Synchronizes all D-PHY data lanes to a single clock domain (rx_word_clk_hs_d0).
  • Handles lanes de-skew if more than one data lane is in use.
  • For easier packet processing downstream, it generates start-of-packet (SOP) and end-of-packet (EOP) markers for each received packet.
Descrambling
  • Recovers the original CSI-2 data stream by reversing the CSI-2 LFSR scrambling on the video long packets.
  • Present when scrambling/descrambling is enabled when configuring the IP.
Lane Management
  • Performs lane merging function which collects incoming bytes from N number of D-PHY lanes and consolidates them into complete packets to pass on to subsequent low level protocol layers.
Error Correction Code (ECC) checking
  • Generates a new ECC for the received packet header or short packet, computes the syndrome using the new ECC and the received ECC, decodes the syndrome to find if a single bit error has occurred, and if so, corrects it.
  • If more than one bit error has occurred, this means an uncorrectable error has occurred, and an error flag will be asserted in the Control and Status Register (CSR).
Depacketizer
  • Extracts Packet Header, Packet Footer, HS-trail and all short packets.
  • Generates important markers such as start of frame (SOF), interlaced, even field/ line, data type, and Virtual Channel identifier for downstream modules.
CRC and Error checking
  • Calculates the checksum of the payload data of every long packet to detect possible errors in transmission.
  • The calculated checksum will be compared against the received 16-bit CRC checksum from the packet footer and an error will be flagged if there is a mismatch.
  • The Error Detect submodule also detects frame synchronization error when a Frame End (FE) is not paired with a Frame Start (FS) on the same virtual channel.
Byte-to-Pixel Converter
  • The video payload data from the depacketizer is unpacked based on the video data type information. The pixel output is based on the requested number of pixels in parallel.
  • An asynchronous FIFO is used to transfer the byte-based video payload data from rx_word_clk_hs_d0 clock domain to axi4s_clk clock domain. Ensure that the axi4s_clk is selected such that the output bandwidth is greater than the link bandwidth rather than the underlying video data rate, as the bandwidth will peak at the MIPI line rate.
CV2AXI
  • Converts clocked video data from the MIPI CSI-2 RX submodule to AXI4-Stream video data.
  • Resolution Detection submodule retrieves the video attributes such as number of pixels per line, number of video lines per field, number of bits per symbol, color space, and interlaced/progressive at the CSR.
  • Stable bit is generated once video line with consistent width and height is detected. Until the input is stable, no output video will be produced. This takes five video frames.
  • A video line buffer is present to accommodate temporary throttling on output video interface. Configure the buffer depth in the GUI to hold at least two video lines of data.
  • The scheduler ensures that the outgoing AXI4-Stream video data adheres to Intel FPGA Streaming Video (Full variant) video protocol.
Aux Output
  • Buffers the MIPI packets and transfers to axi4s_clk.
  • Present when Passthrough mode is enabled when generating the IP only.
Control and Status Register
  • MIPI CSI-2 RX and CV2AXI submodules each have their own CSRs.
  • A CSR Control MUX resides at the higher layer to multiplex the control operation between both CSRs.
  • The most significant bits of the address select between accessing the MIPI CSI-2 RX and CV2AXI CSRs.