← All IP cores Source on GitHub · Linux V4L2 driver

MIPI CSI-2 receiver IP core for FPGA: IronCapture

IronCapture converts two-lane MIPI CSI-2 camera data into packed YUYV video and captures complete frames in DDR, with no CPU in the pixel path.

A CSI-2 receiver, a Bayer image pipeline and an AXI4 DDR writer in SystemVerilog for AMD 7-series FPGAs. It captures 720p30 and 1080p30 from a Digilent Pcam 5C on the Zybo Z7-20, with a Linux V4L2 driver and a bare-metal API.

Part of H.264 video over Ethernet. All documents · Pricing and licenses

Overview

The receiver aligns the two lane byte streams, checks CSI-2 packet headers, selects the programmed virtual channel and unpacks RAW10 payloads. A clock-crossing FIFO carries pixels and markers into the processing domain, where the image pipeline reconstructs RGB and converts to YUYV.

A host can give the capture engine one destination address per frame, or connect the streaming receiver directly to FPGA logic. Both interfaces deliver the same two-pixel word. An internal pattern source (static bars, scrolling bars, a moving box and a noise band) exercises the downstream path with the sensor idle.

Highlights

  • Two-lane MIPI CSI-2, RAW10. Header ECC, payload CRC and data-type checks, each with its own counter.
  • Image pipeline. Black level, white-balance gains, 3 × 3 bilinear demosaic, green equalization, gamma and highlight clamp.
  • Frames straight to DDR. Write-only AXI4 master at 32, 64 or 128 bits.
  • Two tops. A memory top with the DDR writer, and a stream top with 32-bit AXI4-Stream YUYV.
  • Pattern generator. Brings up the downstream path without a camera.
  • Diagnostics. Twelve receiver counters separate ECC, CRC, truncation, overflow and clock-loss events.
  • Software. Linux V4L2 capture driver with DMA-BUF export, and a freestanding MMIO API.

At a glance

Sensor interfaceTwo CSI-2 lanes, RAW10, virtual channel filter
OutputPacked YUYV, two pixels per 32-bit word
Modes1280 × 720 and 1920 × 1080 at 30 frames/s
Memory busAXI4 write master, 32/64/128 bits
Control32-bit AXI4-Lite, completion interrupt
Front endAMD 7-series SelectIO
LanguageSystemVerilog, Verilog top
Proven onZybo Z7-20 (XC7Z020) with Pcam 5C (OV5640)

From the CSI-2 lanes to a frame in DDR

Each stage has register controls and observable status, so a camera bring-up proceeds one stage at a time.

StageControls and observable behavior
Physical receiverPer-lane input delays, high-speed settle interval, lane enable and bit-order selection.
Packet filterDefault virtual channel 0 and data type 0x2B (RAW10). Corrected headers, uncorrectable headers, payload CRC and unexpected data types have separate counters.
Bayer reconstructionSubtract black level and apply per-channel gains to 10-bit samples. A 3 × 3 bilinear filter reconstructs missing colors with mirrored borders.
Color processingOptional green equalization, gamma and highlight clamp.
DDR writerWaits for a frame start, packs stream words into full-width beats and generates incrementing AXI bursts of up to 16 beats. It reports the result after the write responses return.
IronCapture block diagram: a two-lane CSI-2 camera feeds the physical receiver, packet filter, Bayer reconstruction and color processing; the YUYV stream goes to the AXI4-Stream output or to the DDR writer, under AXI4-Lite control.
Figure 1. IronCapture camera, receiver and memory interfaces, from the specification.

Measured MIPI CSI-2 capture on the Zybo Z7-20

Recorded tests with a Digilent Pcam 5C under IronForge Linux.

Recorded testResult
Physical sensor, 720p30120 of 120 requested frames returned.
Physical sensor, 1080p30300 of 300 requested frames returned. Concurrent 1080p60 HDMI scanout recorded zero underruns.
Internal pattern under encoder load, 1080pIn a 90-second sample, capture averaged 30.0 frames/s and 124.4 MB/s. Capture DMA errors and HDMI underruns stayed at zero.
Payload rate55.296 MB/s at 720p30 and 124.416 MB/s at 1080p30.

Documentation

The specification is the interface reference. The board brief shows the camera inside a complete Linux system.

DocumentContentsOpen
IronCapture specificationReceiver stages, DDR writer, capture and receiver registers, Zybo reference, softwarePDF
Zybo Z7-20 board briefPcam 5C capture with 1080p60 HDMI and H.264 streaming under IronForge LinuxPDF
H.264 video over Ethernet briefIronCapture in the camera-to-network chainPDF
Source repositorySystemVerilog source, testbenches, the V4L2 driver and the MMIO APIGitHub
ArticleMIPI CSI-2 on a 7 Series FPGA. How a Pcam 5C reaches DDR on a Zybo Z7-20, stage by stage, and what to check when the first frame does not arrive.Read

Pricing and licenses

One-time fees in USD per product/SKU. No royalties and no per-unit fees.

Evaluation

Free

Evaluation, development, research, teaching and personal use, including prototypes that are not sold.

Open Products ship free when their complete design sources are published.

$0Free public updates GitHub

Every core uses the IronKernel source-available license model, the same one as the VITA 46.11 IPMC. Evaluation, research, teaching and personal use cost nothing. An Open Product ships free when its complete design sources are published and changes are offered back within 90 days. A product with private design sources needs a commercial license before it ships. Enterprise licensing for multiple products/SKUs is by quote: support@ironkernel.com. The Linux kernel driver is GPL-2.0-only. The source is public on GitHub. Public access alone does not grant unrestricted commercial use: a product with private design sources needs the commercial license.

Questions and answers

Does IronCapture need an external MIPI D-PHY chip?

The supplied AMD front end receives the two CSI-2 lanes with 7-series SelectIO and a 200 MHz delay reference, using the board's termination network. The Zybo Z7-20 reference connects a Digilent Pcam 5C this way.

Which cameras and formats does the CSI-2 receiver support?

Two CSI-2 lanes carrying RAW10. The reference camera is the Digilent Pcam 5C with an OV5640 sensor at 1280 × 720 and 1920 × 1080, 30 frames/s. The image pipeline converts Bayer RAW10 to packed YUYV.

How do frames reach memory?

A write-only AXI4 master captures complete frames in DDR without a CPU in the pixel path. The host gives one destination address per frame and receives a completion interrupt. A streaming top with AXI4-Stream output is also included.

Is there Linux support?

Yes. A Linux V4L2 single-plane capture driver is included, with MMAP buffers that export as DMA-BUF for the IronH264 encoder, plus a freestanding MMIO driver for bare metal.

Works with

Connect a MIPI camera to your FPGA

Send the sensor, lane configuration, capture format and frame-rate target. We integrate the receiver, memory path and V4L2 capture into your board design.