Image CSI-2 Decoding in Jingxin SoC

CSI-2 defines the communication data packet format between the host and peripherals for cameras. MIPI Rx supports pixel data parsing in RAW10/RAW12/RAW14 formats.

There are two types of CSI-2 data packets: long frames and short frames. Regardless of whether it is a long frame or a short frame, the beginning of the frame is ST, and the end of the frame is ET. Additionally, after the ST of a long frame, there is a Packet Header (PH), and before the ET, there is a Packet Footer (PF). Between two HS transmission processes, the LP state is inserted, generally LP11 or other Control states, and of course, it can also enter Escape state for LPDT or UPLS.

Image CSI-2 Decoding in Jingxin SoC

LPS: Low Power State, the spacing distance between packets. ST: Start of Transmission (SoT), the start signal of the packet, generally a transient signal transitioning from low speed to high speed. ET: End of Transmission (EoT), the end signal of the packet, generally a transient signal transitioning from high speed to low speed. PH: Packet Header, represented by 32 bits, the header of the packet. PF: Packet Footer, represented by 16 bits, the end of the packet.

Long Frame Structure

Image CSI-2 Decoding in Jingxin SoC

  • Data Identifier (DI): 1 byte. Includes VC and DT, the specific structure will be introduced later.

  • Data Count (WC): 2 bytes. The length of the padding data between the end of PH and the start of PF, measured in bytes. The receiving end uses WC to determine the end position of the packet.

  • Error Detection (ECC): 1 byte. Uses Hamming Code to correct one bit error in PH or detect two bit errors.

  • Data Padding (0~65535 bytes): Length = WC*8 bits. There are no restrictions on the data content.

  • Checksum (CS): 2 bytes. CHECKSUM uses CCITT’s 16-bit CRC check, i.e., x16+x12+x5+x0. CRC can only detect one or more errors but cannot correct them.

  • DI, WC, and ECC together form PH, while Checksum forms PF separately.

Please log into the server to check what the bit width of WC is in the design of Jingxin SoC? Please debug:

Image CSI-2 Decoding in Jingxin SoC

Classic design in digital circuits: implementation of multiple communication data Lane Merging design

Classic design in digital circuits: implementation of multiple communication data Lane Distribution

Image CSI-2 Decoding in Jingxin SoCImage CSI-2 Decoding in Jingxin SoC

【Jingxin SoC Training Camp Mission】: Enable everyone to independently design their own MCU chip!

【The only one on the internet】Jingxin SoC is a low-power ISP image processing SoC used for chip full-process training, adopting a low-power RISC-V processor, built-in ITCM SRAM, DTCM SRAM, integrating IPs including MIPI, ISP, CNN, QSPI, UART, I2C, GPIO, and 100Mbps Ethernet, designed using SMIC40 process technology.Image CSI-2 Decoding in Jingxin SoC

The training data includes SoC frontend design, DFT design, low-power UPF design, layout and routing, providing a server for everyone to practice! Taking you from algorithms, frontend, DFT to backend full-process participation in SoC project design. For more content, please sign up to log into the server for practice, the engineering data is divided into the following three parts.

Image CSI-2 Decoding in Jingxin SoC

Data path for image processing

Image CSI-2 Decoding in Jingxin SoC

CRG design of Jingxin SoC

Image CSI-2 Decoding in Jingxin SoC

One-click completion of C code compilation, simulation, synthesis, DFT insertion, formal verification, layout and routing, parasitic parameter extraction, PT analysis, DRC/LVS, post-simulation, formal verification, power analysis, and other full processes. The upgraded chip design engineering V2.0 flow is as follows:

SoC one-click execution flow

Image CSI-2 Decoding in Jingxin SoC

MIPI DPHY+CSI2 Decoding

Image CSI-2 Decoding in Jingxin SoC

Classic design in digital circuits: implementation of multiple communication data Lane Merging design

Classic design in digital circuits: implementation of multiple communication data Lane Distribution

Image CSI-2 Decoding in Jingxin SoCImage CSI-2 Decoding in Jingxin SoC

Image CSI-2 Decoding in Jingxin SoC

Image CSI-2 Decoding in Jingxin SoC

UPF Low Power Design

Full-chip UPF low power design (including DFT design)

Image CSI-2 Decoding in Jingxin SoC

Chip layout design V1.0

Image CSI-2 Decoding in Jingxin SoC

Chip layout design V2.0

Image CSI-2 Decoding in Jingxin SoC

The DRC/LVS of low power design, the LVS of the chip top layer is very challenging! Unique experience sharing in the industry.

Image CSI-2 Decoding in Jingxin SoC

ISP Image Processing

  • dpc – Bad pixel correction

    Image CSI-2 Decoding in Jingxin SoC

  • blc – Black level correction

    Image CSI-2 Decoding in Jingxin SoC

  • bnr – Bayer noise reduction

    Image CSI-2 Decoding in Jingxin SoC

  • dgain – Digital gain

    Image CSI-2 Decoding in Jingxin SoC

  • demosaic – Demosaicing

    Image CSI-2 Decoding in Jingxin SoC

  • wb – White balance gain

  • ccm – Color correction matrix

  • csc – Color space conversion (RGB2YUV conversion formula based on integer optimization)

  • gamma – Gamma correction (brightness based on lookup table Gamma correction)

    Image CSI-2 Decoding in Jingxin SoC

  • ee – Edge enhancement

    Image CSI-2 Decoding in Jingxin SoC

  • stat_ae – Automatic exposure statistics

  • stat_awb – Automatic white balance statistics

CNN Image Recognition

Image CSI-2 Decoding in Jingxin SoC

Supports handwritten digit AI recognition:

Image CSI-2 Decoding in Jingxin SoC

Simulation results: simulation recognition of images 7, 2, 1, 0, 4, 1, 4, 9

Image CSI-2 Decoding in Jingxin SoC

CPU Boot Instruction Analysis

Image CSI-2 Decoding in Jingxin SoC

Welcome to join the 【Full Stack Chip Engineer】 knowledge community to exchange technology, 【the only one on the internet】 full-process design from algorithm, frontend, DFT to backend. Click the image below to join the knowledge community and learn together!

Image CSI-2 Decoding in Jingxin SoC

Welcome to join the CIS+ISP technology exchange group, add me on WeChat, and I will pull you into the group!

Welcome to join the MCU chip design exchange group, add me on WeChat, and I will pull you into the group!

Image CSI-2 Decoding in Jingxin SoC

Leave a Comment

×