MIPI CPNX Reference Design

View as Markdown

For developers and sensor module manufacturers focused on building HSB-compatible cameras, radars or other MIPI/GMSL-interfaced sensors, the open-source MIPI CPNX Reference Design is a great launchpad for your project. The FPGA reference design features:

  • One or two MIPI interfaces
  • Dedicated I2C interfaces for sensor, I2C EEPROM, and auxiliary use.

This design targets the Lattice Semiconductor CertusPro-NX.

Design Overview

mipi_cpnx_ref_design_block_diagram

Figure 1. MIPI CPNX Reference Design hardware / FPGA IP block diagram

The MIPI CPNX Reference Design centers on a CertusPro-NX FPGA that receives one or two MIPI CSI-2 camera inputs, processes the sensor data through the Holoscan Sensor Bridge IP, and exchanges data with a host over a 10 GbE link. The FPGA bitstream contains three main functional blocks:

  1. Soft MIPI D-PHY RX ×2 — receives up to two independent 4-lane MIPI CSI-2 inputs using Lattice soft D-PHY IP.
  2. Hololink Core — the Holoscan Sensor Bridge IP; packetizes sensor data, handles control-plane traffic, and manages peripheral interfaces (I2C, GPIO).
  3. 10 GbE MAC + PCS + SERDES — provides the bidirectional 10 GbE host interface for sensor data egress and control-plane traffic.

The block diagram above shows the FPGA internals and the external hardware connections required by the design.

FPGA inputs and outputs

  • MIPI Inputs (×2) — 4-lane MIPI CSI-2 camera interfaces (Ports 0 and 1).
  • I2C, GPIO — control and general-purpose I/O routed to the Hololink Core for sensor configuration and board-level control.
  • 10G Ethernet — bidirectional high-speed link to the host over an SFP+ interface.

See Suggested BOM below for the required external components and suggested part numbers.

Reprogramming the lane count and clock rate

If you wish to use the design with 1- or 2-lane sensors, or use a different clock range, you can reprogram the MIPI Soft DPHY registers from Python or C++ without modifying the FPGA bitfile. Here is an example Python function to do this:

1def program_soft_mipi_phy(camera_idx, num_lanes, clock_freq):
2 base_addr = 0x4000_0000
3
4 lane_prog = num_lanes - 1
5
6 if clock_freq >= 1000:
7 data_lane_settle_cycle = 6
8 elif clock_freq >= 350:
9 data_lane_settle_cycle = 7
10 elif clock_freq >= 200:
11 data_lane_settle_cycle = 8
12 elif clock_freq >= 150:
13 data_lane_settle_cycle = 9
14 else:
15 data_lane_settle_cycle = 11
16
17 reg28 = (lane_prog << 1)
18 regD8 = (data_lane_settle_cycle)
19
20 hololink.write_uint32(base_addr + 0x28 + (camera_idx * 0x1000_0000), reg28)
21 hololink.write_uint32(base_addr + 0xD8 + (camera_idx * 0x1000_0000), regD8)

Source Files

The FPGA source code for the project is located in the Holoscan Sensor Bridge repository at fpga/nv_mipi_ref_design/mipi_cpnx_ref_design. The pre-built bitfile is located here.

Reference Hardware

You can use the MIPI CPNX Reference Design on supported hardware. The current hardware platforms that supports this design include the Tauro Technologies DA326 Holoscan GMSL adapter.

We have several examples that illustrate the DA326 connected to a Leopard Imaging Hawk camera in the repository’s examples directory; these have the name “hawk” in them. These can be modified to support different GMSL2 cameras or raw MIPI sensors with your own hardware.

Custom Hardware

Developers can use this design (including the prebuilt bitfile) in custom hardware designs built around the Lattice Semiconductor CertusPro-NX device. Consult Lattice documentation (especially the CertusPro-NX Hardware Checklist) when working with the part — paying special attention to the power topology for the SERDES block.

To ensure 100% bitfile compatibility with your reference design, please use the following design constraints when designing your PCB.

Suggested BOM

The following external components are required for a bitfile-compatible implementation of this reference design.

ComponentSuggested partFunction
FPGALFCPNX-100-9CBG256ICertusPro-NX (100K LE, CBG256, speed grade 9); main programmable device
161.13 MHz oscillatorNX33G1101Z10 GbE SERDES reference clock and primary FPGA datapath clocks
I2C EEPROMAT24C02Stores Ethernet MAC address and board enumeration data
QSPI NOR flashMT25QL256Stores the FPGA configuration bitstream
SFP+ module, stand-alone PHY, or direct-attach10 GbE host interface to the sensor bridge

Equivalent parts may be substituted provided they meet the electrical and timing requirements described in the pin tables below.

Banks and Voltage Rails

BankVCCIOI/O standardNotes
03.3 VLVCMOS33QSPI config flash, config pins
13.3 VLVCMOS33Control I2C, GPIO, sensor control, SFP_TX_DIS, JTAG
23.3 VLVCMOS33GPIO
31.2 VMIPI_DPHY / LVCMOS12HMIPI CSI-2 Port 1
51.2 VMIPI_DPHY / LVCMOS12HMIPI CSI-2 Port 0
63.3 VLVCMOS33GPIO
73.3 VLVCMOS33Camera I2C, auxiliary/PoC I2C, power control
801.0 VSERDES10 GbE transceiver (TX / RX / refclk).

10 GbE host interface

SignalPin PPin NI/O typeDirFunction
ETH_TXDA9A8SERDES (HSO)Out10 GbE SERDES transmit → SFP+
ETH_RXDC8B7SERDES (HSI)In10 GbE SERDES receive ← SFP+
ETH_REFCLKD10E10SERDES refclk (HSI)In161.1328125 MHz reference clock, supplied externally
SFP_TX_DISF9LVCMOS33 (bank 1, 3.3 V)OutSFP+ transmit disable

MIPI CSI-2 receive — Port 0

SignalPin PPin NFunction
MIPI_CAM_CLK[0]L12K12Clock lane
MIPI_CAM_DATA[0]K13L13Data lane 0
MIPI_CAM_DATA[1]K11L11Data lane 1
MIPI_CAM_DATA[2]L14K14Data lane 2
MIPI_CAM_DATA[3]K16L16Data lane 3

MIPI CSI-2 receive — Port 1

SignalPin PPin NFunction
MIPI_CAM_CLK[1]L3L2Clock lane
MIPI_CAM_DATA[4]L4M4Data lane 0
MIPI_CAM_DATA[5]M2M1Data lane 1
MIPI_CAM_DATA[6]N2P2Data lane 2
MIPI_CAM_DATA[7]P1N1Data lane 3

Sensor & power control

SignalPinBankDirFunction
CAM_RSTH41OutSensor reset / power-down (active low)
CAM_MCLKH31OutSensor reference clock (27 MHz)

I2C buses

SignalPin SCLPin SDABankFunction
CTRL_I2CH6H71Control I2C (bus 0) — management / ID EEPROM
CAM_I2C[0]H10H97Camera / sensor I2C (bus 1)
I2C_POCE15E147Auxiliary I2C (bus 2) — e.g. PoC power switch

QSPI configuration flash

SignalPinDirFunction
FLASH_SPI_MCSNE5OutChip select (active low)
FLASH_SPI_MSCKE7OutClock
FLASH_SPI_SDIO[0]D5I/OData 0
FLASH_SPI_SDIO[1]C2I/OData 1
FLASH_SPI_SDIO[2]C1I/OData 2
FLASH_SPI_SDIO[3]D4I/OData 3

GPIO

These GPIO signals can be direction runtime-configurable and used for any application; defaults shown below:

SignalPinBankDefault dir
GPIO[0]F31Out
GPIO[1]F21In
GPIO[2]H21Out
GPIO[3]G51Out
GPIO[4]G61In
GPIO[5]F71Out
GPIO[6]J86Out
GPIO[7]E61Out
GPIO[8]J96Out
GPIO[9]J42Out
GPIO[10]J32Out

Note: on the Tauro Technologies DA326, GPIO[0] is used as the enable signal for the PoC controller, and GPIO[1] is used as the INT signal for this chip.

Clock & configuration

SignalPinBankDirFunction
RESET_NH11InReset (active low, pulled high)
PROGRAMNC30InProgram (active low)
INITNC40I/OInit (active low, open-drain)
DONED70OutConfiguration done
JTAG_END61InJTAG enable
TCKE21InJTAG clock
TMSG71InJTAG mode select
TDIF51InJTAG data in
TDOF41OutJTAG data out