MIPI CSI-2 TX Controller Testbench

You can choose to generate the testbench when generating the core in the IP Manager Configuration window.

Note: You must include all .v files generated in the /testbench directory in your simulation.
Important: tested the testbench generated with the default parameter options only.

provides a simulation script for you to run the testbench quickly using the Modelsim software. To run the Modelsim testbench script, run vsim -do modelsim.do in a terminal application. You must have Modelsim installed on your computer to use this script.

The IP Manager generates different encrypted source code for you to simulate with different simulators.

Table 1. Testbench Files
Directory/File Note
../Testbench/modelsim.do Modelsim testbench script.
../Testbench/ efx_<ip>_modelsim.sv Encrypted source code for simulating loop-back example design in Modelsim testbench.
../Testbench/aldec Contains the generated encrypted source code to simulate with the Aldec simulator.
../Testbench/modelsim Contains the generated encrypted source code to simulate with the Modelsim simulator.
../Testbench/ncsim Contains the generated encrypted source code to simulate with the NCSIM simulator.
../Testbench/synopsys Contains the generated encrypted source code to simulate with the VCS simulator.
Tip: The default testbench is Modelsim which complies with CSI-2 TX IP loopback to CSI-2 RX IP. To simulate with other simulators, you can get the encrypted source code from ../Testbench/<simulation_tool>/ folder by generating the targeted CSI-2 IP and replacing it with efx_csi2_tx_modelsim.sv or efx_csi2_rx_modelsim.sv.

The simulation testbench simulates the example design. The design instantiates both MIPI CSI-2 TX and RX Controller cores. The loopback connection on the MIPI interface is done in the testbench file. This design generates an image and sends the image data to the camera image checker through the MIPI CSI-2 TX Controller and MIPI CSI-2 RX Controller. The camera image checker compares the data received with the one created by the image generator. After running the simulation successfully, the test prints the following message:

Correct RX data AA, received
Correct RX data AA, received