Kyros Engineering Engineering Tools
Home › Tools › MIPI CSI-2 Bandwidth
// Camera tools Proto v0.1CSI-2D-PHY · C-PHYLine timing

MIPI CSI-2 Bandwidth

Enter the image size, frame rate, pixel format and blanking. You get the per-lane rate the link must run at, the HS clock, how much of the PHY it uses, the fewest lanes that work and the fastest frame rate this setup can carry.

Runs entirely in your browser. Nothing is uploaded.

1 · Image

px
lines
fps

2 · Blanking

px
lines
%
%

Default: 2200 × 1125 total, the CEA-861 1080p timing. Sensors give it as line_length_pck and frame_length_lines (HTS/VTS).

3 · Link

bps
Mbps
%

4 · Protocol overhead

ns

Always counted: 4-byte packet header, 2-byte footer and the 8-UI sync byte per line (C-PHY: header twice per trio plus a sync word).

5 · Frame buffer

B/px

Result

Required per-lane rate
—
HS clock (DDR)
—
Utilisation
—
Minimum lanes
—
Max fps (this config)
—
Sensor pixel clock
—
Total link rate
—
—

Line timing

Line period
—
Lane busy per line
—
Idle per line
—
Line payload
—

Frame buffer

Bytes per frame
—
DDR write bandwidth
—
Packet overhead
—

Lane rate vs frame rate

Required per-lane rate for 1, 2 and 4 lanes (and your lane count) under the chosen timing model. The dashed lines are the PHY limit and the sensor/SoC limit.

Timing models side by side

ModelLane rateUtilisationMax fpsWhat it assumes

By lane count

LanesLane rateHS clockUtilisationMax fpsStatus
// How it works

What sets a CSI-2 lane rate

A CSI-2 camera sends each image line as one long packet: a 4-byte header, the pixel payload and a 2-byte checksum. The bytes are dealt out round-robin across the data lanes. Between lines the lanes usually drop to low-power (LP) state and come back, which costs a few hundred nanoseconds each time. Blanking adds no bytes, but it shortens the time available to send the bytes. That is why net-bandwidth arithmetic says a link has plenty of room when the line timing says it does not.

pixel clock f_pix = (W + H_blank) × (H + V_blank) × fps line period T_line = 1 / ((H + V_blank) × fps) line payload P = ceil(W × bpp / 8) bytes busiest-lane bits b = 8 × ceil((P + 4 + 2 [+ 8 LS/LE]) / N) + 8 sync (D-PHY) b = 7 × (6 + 1 + ceil((P + 2) / 2N)) symbols × 16/7 (C-PHY) line-paced R = b / (T_line − t_LP) each line fits its own line period sensor-paced R = f_pix × bpp / N link tied to the pixel clock net average R = W × H × bpp × fps / N floor only D-PHY HS clock = R / 2 (DDR) C-PHY symbol rate = R × 7 / 16 max fps (line) = 1 / ((H + V_blank) × (b / R_max + t_LP)) DDR write = bytes per frame × fps

The line-paced rate is the lowest the link can run if the transmitter buffers a line: it is the Infineon CX3 formula (active pixels × bits per pixel ÷ line time ÷ lanes) with the packet and LP costs added. Most sensors instead set their MIPI PLL so the link runs at pixel clock × bpp ÷ lanes, and hide the packet overhead and LP time in horizontal blanking. The Linux IMX219 driver is an example: 182.4 MHz × 10 bits ÷ 2 lanes = 912 Mbps, a 456 MHz HS clock. This page checks that the packet plus LP time still fits the line in that mode.

YUV420 8-bit and 10-bit alternate a luma-only line with a line carrying chroma, so the long line (16 or 20 bpp) sets the lane rate even though the average is 12 or 15 bpp. Legacy YUV420 sends 12 bpp on every line. RGB444 and RGB555 travel as 16 bits per pixel.

LP↔HS time

The "spec minimum" option adds the D-PHY minimums for one LP→HS→LP round trip: TLPX 50 ns, THS-PREPARE + THS-ZERO 145 ns + 10 UI, THS-TRAIL 60 ns + 4 UI and THS-EXIT 100 ns. Real transmitters often use more, so read the sensor's timing registers or measure it. C-PHY has its own preamble and post sequences; enter a custom time from your PHY datasheet.

Limits

References

  1. MIPI Alliance, MIPI CSI-2 Specification Brief: D-PHY v1.1 1.5 Gbps/lane, v1.2 2.5 Gbps/lane, C-PHY 2.28 bits/symbol at 2.5 Gsps, lane count not limited, x8 D-PHY port. mipi.org D-PHY and C-PHY pages: D-PHY v3.0 9 Gbps; C-PHY 6 Gsps (13.7 Gbps per trio).
  2. Arasan Chip Systems, C-PHY vs D-PHY white paper (2016): D-PHY v2.0 up to 4.5 Gbps per lane.
  3. Linux kernel include/media/mipi-csi2.h (data type codes); drivers/media/i2c/imx219.c and ov5647.c (pixel rates, line/frame lengths and link frequencies). Read for numbers only.
  4. Infineon, AN90369 How to interface a MIPI CSI-2 image sensor with EZ-USB CX3 (CSI clock is DDR) and KBA Analysis of CX3 video timing parameters (minimum CSI clock formula).
  5. Lattice, FPGA-IPUG-02080 CSI-2/DSI D-PHY Tx IP Core, and Teledyne LeCroy QPHY-MIPI-DPHY manual: D-PHY LP↔HS timing minimums.
  6. Efinix, MIPI CSI-2 RX Controller Core User Guide, and NXP AN13573 i.MX 8/RT MIPI DSI/CSI-2: pixel packing and YUV420 line structure.
  7. Sony IMX219PQH5-C datasheet (3280×2464, 30 fps all-pixel, 755 Mbps/lane on 4 lanes, 912 Mbps/lane on 2) and IMX477-AACK flyer (60 fps 10-bit, 40 fps 12-bit); OmniVision OV5647 datasheet (2592×1944 15 fps, 1080p30, 2-lane); onsemi AR0234CS datasheet (1920×1200 120 fps on 4 lanes, 90 Mp/s per lane); Leopard Imaging / Kurokesu IMX477 module data (2.1 Gbps/lane).
  8. CTA-861 / SMPTE 274M: 1080p total raster 2200 × 1125 (74.25 MHz at 30 fps), used for the default blanking.

Bringing up a camera on a new board?

Kyros designs camera boards and bring-up firmware: sensor and SoC selection, CSI-2 routing, PLL and lane setup, and the driver work that turns a black frame into a picture.

Talk about your project →