Visible to Intel only — GUID: hog1619462912976
Ixiasoft
1.4. Simulating the Design Example Testbench
Figure 6. Procedure
Follow these steps to simulate the testbench:
- At the command prompt, change to the testbench simulation directory. The directory path is <design_example_installation_dir>/example_design/testbench.
- Run the simulation script for the supported simulator of your choice. The script compiles and runs the testbench in the simulator. Your script should check that the SOP and EOP counts match after simulation is complete.
Table 5. Steps to Run Simulation Simulator Instructions VCS* In the command line, type: sh run_vcs.sh
VCS* MX In the command line, type: sh run_vcsmx.sh
QuestaSim* or Questa*-Intel® FPGA Edition In the command line, type:vsim -do run_mentor.tcl
If you prefer to simulate without bringing up the GUI, type:vsim -c -do run_mentor.tcl
Xcelium* In the command line, type: sh run_xcelium.sh
- Analyze the results. A successful simulation sends and receives packets, and displays "Test PASSED".
The testbench for the design example completes the following tasks:
- Instantiates the F-Tile Interlaken Intel® FPGA IP core.
- Prints PHY status.
- Checks metaframe synchronization (SYNC_LOCK) and word (block) boundaries (WORD_LOCK).
- Waits for individual lanes to be locked and aligned.
- Starts transmitting packets.
- Checks packet statistics:
- CRC24 errors
- SOPs
- EOPs
****************************************** INFO: Waiting for lanes to be aligned All of the receiver lanes are aligned and are ready to receive traffic. *************************************************** *************************************************** INFO: Start transmitting packets *************************************************** *************************************************** INFO: Stop transmitting packets *************************************************** *************************************************** INFO: Checking packets statistics *************************************************** CRC 24 errors reported: 0 SOPs transmitted: 100 EOPs transmitted: 100 SOPs received: 100 EOPs received: 100 ECC error count: 0 *************************************************** INFO: Test PASSED ***************************************************
Note: The Interlaken design example simulation testbench sends 100 packets and receives 100 packets.The following sample output illustrates a successful simulation test run for Interlaken Look-aside mode:------------------------------------------------- check if rx received all of pkt from tx ------------------------------------------------- ------------------------------------------------- rx received all of pkt from tx ------------------------------------------------- ------------------------------------------------- Check CRC32 errors ------------------------------------------------- CRC32 PASS ------------------------------------------------- Check TX and RX Counter equal or not ------------------------------------------------- ------------------------------------------------- De-assert Counter equal bit ------------------------------------------------- ------------------------------------------------- RX_SOP COUNTER ------------------------------------------------- ------------------------------------------------- RX_EOP COUNTER ------------------------------------------------- ------------------------------------------------- Display Final Report ------------------------------------------------- 0 Detected Error 0 CRC24 errors reported 273 SOPs transmitted 273 EOPs transmitted 273 SOPs received 273 EOPs received ------------------------------------------------- ------------------------------------------------- Finish Simulation ------------------------------------------------- ------------------------------------------------- TEST PASSED --------------------------------------------------