Visible to Intel only — GUID: irl1522185820414
Ixiasoft
Answers to Top FAQs
1. FPGA Simulation Basics
2. Siemens EDA QuestaSim* Simulator Support
3. Synopsys VCS* and VCS MX Support
4. Aldec Active-HDL and Riviera-PRO Support
5. Cadence Xcelium* Parallel Simulator Support
6. Quartus® Prime Pro Edition User Guide Third-party Simulation Archive
A. Quartus® Prime Pro Edition User Guides
1.1. FPGA Simulation Essential Elements
1.2. Overview of Simulation Tool Flow
1.3. Simulation Tool Flow
1.4. Supported Simulation Flows
1.5. Supported Hardware Description Languages
1.6. Supported Simulation Types
1.7. Supported Simulators
1.8. Post-Fit Simulation Support by FPGA Family
1.9. Automating Simulation with the Run Simulation Feature
1.10. FPGA Simulation Basics Revision History
1.9.2.1. Specifying Required Simulation Settings for Run Simulation (Batch Mode)
1.9.2.2. Optional Simulation Settings for Run Simulation (Batch Mode)
1.9.2.3. Launching Simulation with the Run Simulation Feature
1.9.2.4. Running RTL Simulation using Run Simulation
1.9.2.5. Output Directories and Files for Run Simulation
Visible to Intel only — GUID: irl1522185820414
Ixiasoft
5.3. Sourcing Cadence Xcelium* Simulator Setup Scripts
- The generated xcelium/xmsim_setup.sh simulation script contains the following template lines. Cut and paste these lines into a new top-level script, for example xmsim.sh. This new top-level script calls the generated simulation script, xmsim_setup.sh.
# # TOP-LEVEL TEMPLATE - BEGIN # # # # QSYS_SIMDIR is used in the Quartus-generated IP simulation script to # # construct paths to the files required to simulate the IP in your Quartus # # project. By default, the IP script assumes that you are launching the # # simulator from the IP script location. If launching from another # # location, set QSYS_SIMDIR to the output directory you specified when you # # generated the IP script, relative to the directory from which you launch # # the simulator. In this case, you must also copy the generated files # # "cds.lib" and "hdl.var" - plus the directory "cds_libs" if generated - # # into the location from which you launch the simulator, or incorporate # # into any existing library setup. # # # # Run Quartus-generated IP simulation script once to compile Quartus EDA # # simulation libraries and Quartus-generated IP simulation files, and copy # # any ROM/RAM initialization files to the simulation directory. # # - If necessary, specify any compilation options: # # USER_DEFINED_COMPILE_OPTIONS # # USER_DEFINED_VHDL_COMPILE_OPTIONS applied to vhdl compiler # # USER_DEFINED_VERILOG_COMPILE_OPTIONS applied to verilog compiler # # # source <script generation output directory>/xcelium/xcelium_setup.sh \ # SKIP_ELAB=1 \ # SKIP_SIM=1 \ # USER_DEFINED_COMPILE_OPTIONS=<compilation options for your design> \ # USER_DEFINED_VHDL_COMPILE_OPTIONS=<VHDL compilation options for your design> \ # USER_DEFINED_VERILOG_COMPILE_OPTIONS=<Verilog compilation options for your design> \ # QSYS_SIMDIR=<script generation output directory> # # # # Compile all design files and testbench files, including the top level. # # (These are all the files required for simulation other than the files # # compiled by the IP script) # # # xmvlog <compilation options> <design and testbench files> # # # # TOP_LEVEL_NAME is used in this script to set the top-level simulation or # # testbench module/entity name. # # # # Run the IP script again to elaborate and simulate the top level: # # - Specify TOP_LEVEL_NAME and USER_DEFINED_ELAB_OPTIONS. # # - Override the default USER_DEFINED_SIM_OPTIONS. For example, to run # # until $finish(), set to an empty string: USER_DEFINED_SIM_OPTIONS="". # # # source <script generation output directory>/xcelium/xcelium_setup.sh \ # SKIP_FILE_COPY=1 \ # SKIP_DEV_COM=1 \ # SKIP_COM=1 \ # TOP_LEVEL_NAME=<simulation top> \ # USER_DEFINED_ELAB_OPTIONS=<elaboration options for your design> \ # USER_DEFINED_SIM_OPTIONS=<simulation options for your design> # # # # TOP-LEVEL TEMPLATE - END
- Delete the first two characters of each line (comment and space):
# TOP-LEVEL TEMPLATE - BEGIN # # QSYS_SIMDIR is used in the Quartus-generated IP simulation script to # construct paths to the files required to simulate the IP in your Quartus # project. By default, the IP script assumes that you are launching the # simulator from the IP script location. If launching from another # location, set QSYS_SIMDIR to the output directory you specified when you # generated the IP script, relative to the directory from which you launch # the simulator. In this case, you must also copy the generated files # "cds.lib" and "hdl.var" - plus the directory "cds_libs" if generated - # into the location from which you launch the simulator, or incorporate # into any existing library setup. # # Run Quartus-generated IP simulation script once to compile Quartus EDA # simulation libraries and Quartus-generated IP simulation files, and copy # any ROM/RAM initialization files to the simulation directory. # - If necessary, specify any compilation options: # USER_DEFINED_COMPILE_OPTIONS # USER_DEFINED_VHDL_COMPILE_OPTIONS applied to vhdl compiler # USER_DEFINED_VERILOG_COMPILE_OPTIONS applied to verilog compiler # source <script generation output directory>/xcelium/xcelium_setup.sh \ SKIP_ELAB=1 \ SKIP_SIM=1 \ USER_DEFINED_COMPILE_OPTIONS=<compilation options for your design> \ USER_DEFINED_VHDL_COMPILE_OPTIONS=<VHDL compilation options for your design> \ USER_DEFINED_VERILOG_COMPILE_OPTIONS=<Verilog compilation options for your design> \ QSYS_SIMDIR=<script generation output directory> # # Compile all design files and testbench files, including the top level. # (These are all the files required for simulation other than the files # compiled by the IP script) # xmvlog <compilation options> <design and testbench files> # # TOP_LEVEL_NAME is used in this script to set the top-level simulation or # testbench module/entity name. # # Run the IP script again to elaborate and simulate the top level: # - Specify TOP_LEVEL_NAME and USER_DEFINED_ELAB_OPTIONS. # - Override the default USER_DEFINED_SIM_OPTIONS. For example, to run # until $finish(), set to an empty string: USER_DEFINED_SIM_OPTIONS="". # source <script generation output directory>/xcelium/xcelium_setup.sh \ SKIP_FILE_COPY=1 \ SKIP_DEV_COM=1 \ SKIP_COM=1 \ TOP_LEVEL_NAME=<simulation top> \ USER_DEFINED_ELAB_OPTIONS=<elaboration options for your design> \ USER_DEFINED_SIM_OPTIONS=<simulation options for your design> # # TOP-LEVEL TEMPLATE - END
- If necessary, add the QSYS_SIMDIR variable to point to the location of the generated IP simulation files. Specify any other changes that you require to match your design simulation requirements. The scripts offer variables to set compilation or simulation options. Refer to the generated script for details.
- Refer to the following xmsim.sh example content, where this file is in the same /xcelium sub-folder as the xmsim_setup.sh file.
# TOP-LEVEL TEMPLATE - BEGIN # # QSYS_SIMDIR is used in the Quartus-generated IP simulation script to # construct paths to the files required to simulate the IP in your Quartus # project. By default, the IP script assumes that you are launching the # simulator from the IP script location. If launching from another # location, set QSYS_SIMDIR to the output directory you specified when you # generated the IP script, relative to the directory from which you launch # the simulator. In this case, you must also copy the generated files # "cds.lib" and "hdl.var" - plus the directory "cds_libs" if generated - # into the location from which you launch the simulator, or incorporate # into any existing library setup. # # Run Quartus-generated IP simulation script once to compile Quartus EDA # simulation libraries and Quartus-generated IP simulation files, and copy # any ROM/RAM initialization files to the simulation directory. # - If necessary, specify any compilation options: # USER_DEFINED_COMPILE_OPTIONS # USER_DEFINED_VHDL_COMPILE_OPTIONS applied to vhdl compiler # USER_DEFINED_VERILOG_COMPILE_OPTIONS applied to verilog compiler # source ./xcelium_setup.sh \ SKIP_ELAB=1 \ SKIP_SIM=1 \ USER_DEFINED_COMPILE_OPTIONS="" \ USER_DEFINED_VHDL_COMPILE_OPTIONS="" \ USER_DEFINED_VERILOG_COMPILE_OPTIONS="" \ QSYS_SIMDIR=./../ # # Compile all design files and testbench files, including the top level. # (These are all the files required for simulation other than the files # compiled by the IP script) # xmvlog $QSYS_SIMDIR/PLL_RAM.v xmvlog $QSYS_SIMDIR/UP_COUNTER_IP/UP_COUNTER_IP.v xmvlog $QSYS_SIMDIR/DOWN_COUNTER_IP/DOWN_COUNTER_IP.v xmvlog $QSYS_SIMDIR/ClockPLL/ClockPLL.v xmvlog $QSYS_SIMDIR/RAMhub/RAMhub.v xmvlog $QSYS_SIMDIR/testbench_1.v # # TOP_LEVEL_NAME is used in this script to set the top-level simulation or # testbench module/entity name. # # Run the IP script again to elaborate and simulate the top level: # - Specify TOP_LEVEL_NAME and USER_DEFINED_ELAB_OPTIONS. # - Override the default USER_DEFINED_SIM_OPTIONS. For example, to run # until $finish(), set to an empty string: USER_DEFINED_SIM_OPTIONS="". # source ./xcelium_setup.sh \ SKIP_FILE_COPY=1 \ SKIP_DEV_COM=1 \ SKIP_COM=1 \ TOP_LEVEL_NAME="tb" \ USER_DEFINED_ELAB_OPTIONS="-timescale\ 1ns/1ps\ -NOWARN\ CSINFI" \ USER_DEFINED_SIM_OPTIONS="-GUI" # # TOP-LEVEL TEMPLATE - END
- Run the resulting top-level script by typing the following at the command-line:
sh xmsim.sh
Specify the path to this file if you run it from a different directory.