MIPI CSI-2 IP Design Example User Guide

ID 813931
Date 11/28/2025
Public

1.2. Simulating the Design

The provided testbench simulates the MIPI CSI-2 IP transmitter and receiver, running in loopback mode. You can select Full simulation or Fast simulation.

Full simulation simulates the CSI-2 TX and RX IPs including MIPI D-PHY TX and RX IP in the loopback. Fast simulation bypasses the MIPI D-PHY IP and performs loopback at the PPI between the CSI-2 TX and CSI-2 RX IPs directly. Fast simulation reduces simulation time

The input to and the output from the DUT is AXI4-Stream. When not running in passthrough mode this complies with the Altera FPGA Streaming Video Protocol Specification.

The testbench follows a standard structure, where a source generates stimulus that passes into the DUT. Then the output of the DUT passes into a sink that checks the received signals and data.

Because MIPI CSI-2 is an image transport standard, the source generates image frames as a series of pixel data packets and required control packets. The sink checks that the data and signals received exactly match what was sent by the source.

The stimulus provided creates 10 small image frames with a resolution of 128x96.

The parameters used for the testbench, such as number of MIPI lanes and image format, match those you chose when creating the IP.

Figure 3. Design Simulation Flow
  1. Navigate to the simulation directory of your choice.
  2. Run the simulation script for the supported simulator. The script compiles and runs the testbench in the simulator.
  3. Analyze the results.
A successful simulation ends with the following message:
# ed_sim_tb: 

# ed_sim_tb: SUCCESS: Test has completed! 

# Simulation passed 
Table 2.  Steps to Run Simulation
Simulator Working Directory Instructions
QuestaSIM* /ed_sim/sim/mentor In the command line, type vsim -c -do mentor.do
Riviera-PRO* /ed_sim/sim/aldec In the command line, type vsim -c -do aldec.do
VCS* MX /ed_sim/sim/synopsys/vcsmx In the command line, type source sim.sh
Xcelium* /ed_sim/sim/xcelium In the command line, type: source xcelium_setup.sh