1.2. Simulating the Design
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.
- Navigate to the simulation directory of your choice.
- Run the simulation script for the supported simulator. The script compiles and runs the testbench in the simulator.
- Analyze the results.
# ed_sim_tb: # ed_sim_tb: SUCCESS: Test has completed! # Simulation passed
| 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 |