R-tile Avalon® Streaming Intel® FPGA IP for PCI Express* Design Example User Guide

ID 683544
Date 12/13/2021
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.3. Simulating the Design Example

The simulation setup involves the use of a Root Port Bus Functional Model (BFM) to exercise the R-tile Avalon® Streaming IP for PCIe (DUT) as shown in the following figure.

Figure 12. PIO Design Example Simulation Testbench

For a more detailed description of the testbench and the modules inside it, refer to Testbench. Also, for more details on the Root Port BFM specifically, refer to the Root Port BFM section.

The following flow diagram shows the steps to simulate the design example:

Figure 13. Procedure
Note: R-tile does not support parallel PIPE simulations.
Table 4.  Steps to Run Simulation
Simulator Working Directory Instructions
Siemens* EDA QuestaSim* <my_design>/pcie_ed_tb/pcie_ed_tb/sim/mentor
  1. Invoke vsim (by typing vsim, which brings up a console window where you can run the following commands).
  2. set TOP_LEVEL_NAME "pcie_ed_tb.pcie_ed_tb"
  3. Type "do msim_setup.tcl".
    Note: Alternatively, use "source msim_setup.tcl".
  4. ld_debug
  5. run -all
  6. A successful simulation will include the following message: "Simulation stopped due to successful completion!"
VCS* <my_design>/pcie_ed_tb/pcie_ed_tb/sim/synopsys/vcs
  1. Type sh vcs_setup.sh USER_DEFINED_COMPILE_OPTIONS="" USER_DEFINED_ELAB_OPTIONS="-xlrm\ uniq_prior_final" USER_DEFINED_SIM_OPTIONS="" TOP_LEVEL_NAME="pcie_ed_tb" | tee simulation.log
    Note: The command above is a single-line command.
  2. A successful simulation will include the following message: "Simulation stopped due to successful completion!"
Note:
To run a simulation in interactive mode, use the following steps: (if you already generated a simv executable in non-interactive mode, delete the simv and simv.diadir)
  1. Open the vcs_setup.sh file and add a debug option to the VCS command: vcs -kdb -debug_access+all
  2. Compile the design example: sh vcs_setup.sh USER_DEFINED_ELAB_OPTIONS="-xlrm\ uniq_prior_final" SKIP_SIM=1 TOP_LEVEL_NAME="pcie_ed_tb"
  3. Start the simulation in interactive mode: simv -gui &
VCS* MX <my_design>/pcie_ed_tb/pcie_ed_tb/sim/synopsys/vcsmx
  1. Type sh vcsmx_setup.sh USER_DEFINED_COMPILE_OPTIONS="" USER_DEFINED_ELAB_OPTIONS="-xlrm\ uniq_prior_final" USER_DEFINED_SIM_OPTIONS="" TOP_LEVEL_NAME="pcie_ed_tb.pcie_ed_tb" | tee simulation.log
    Note: The command above is a single-line command.
  2. A successful simulation will include the message "Simulation stopped due to successful completion!".
Note:
To run a simulation in interactive mode, use the following steps: (if you already generated a simv executable in non-interactive mode, delete the simv and simv.diadir)
  1. Compile the design example: sh vcsmx_setup.sh USER_DEFINED_COMPILE_OPTIONS="-kdb" USER_DEFINED_ELAB_OPTIONS="-debug_access+all" USER_DEFINED_ELAB_OPTIONS="-xlrm\ uniq_prior_final" USER_DEFINED_SIM_OPTIONS="" SKIP_SIM=1 TOP_LEVEL_NAME="pcie_ed_tb.pcie_ed_tb"
  2. Start the simulation in interactive mode: simv -gui &

The following figure shows the link status information for a Gen5 x16 Endpoint simulation:

Figure 14. Link Status for a Gen5 x16 Endpoint Simulation

After a successful simulation, the simulation.log file will contain the "successful completion" message as shown in the following figure:

Figure 15. Successful Simulation Message

This testbench simulates up to a Gen5 x16 variant.

The simulation reports, "Simulation stopped due to successful completion" if no errors occur.