22.214.171.124. Running the Simulation with Default HEX File
Follow these steps to simulate the testbench:
- Open the <simulator_name>_files.tcl script in the <design_example_dir>/<design_example_dir>/ex_100G/sim/common directory.
- Edit the TCL script to change the existing nios_system_onchip_memory2_0_onchip_memory2_0.hex file directory to the pre-generated HEX file directory.
For example, change the following line in the TCL script from:
lappend memory_files "[normalize_path "$QSYS_SIMDIR/../<design_example_dir>/hardware_test_design/ip/nios_system/nios_system_onchip_memory2_0/altera_avalon_onchip_memory2_191/sim/nios_system_onchip_memory2_0_onchip_memory2_0.hex"]"
lappend memory_files "[normalize_path "$QSYS_SIMDIR/../<design_example_dir>/software/dynamic_reconfiguration_sim/nios_system_onchip_memory2_0_onchip_memory2_0.hex"]"
- Using the supported simulator of your choice, change to the testbench simulation directory to <design_example_dir>/example_testbench/ <simulator_name>.
- Run the simulation script for the simulator. The script compiles and runs the testbench in the simulator. Refer to the table Steps to Simulate the Testbench.
- Analyze the results. The successful testbench performs the dynamic reconfiguration (DR) operations, sends and transmits packets for each DR operation, and displays "Nios has completed its transactions" and "Simulation PASSED" after completing the simulation.
Table 27. Steps to Simulate the Testbench Simulator Instructions ModelSim* SE or QuestaSim* In the command line, type vsim -do run_vsim.do
If you prefer to simulate without bringing up the ModelSim GUI, type vsim -c -do run_vsim.doNote: The Questa* Intel® FPGA Edition simulator does not have the capacity to simulate this IP core. You must use ModelSim* SE or QuestaSim* .
Xcelium* In the command line, type sh run_xcelium.sh VCS* / VCS* MX In the command line, type sh run_vcs.sh or sh run_vcsmx.shNote: run_vcs.sh is only available if you select Verilog as the Generated HDL Format. If you select VHDL as the Generated HDL Format, you must simulate the testbench with a mixed language simulator using run_vcsmx.sh.Note: For Nios® II-based testbench, the simulation runs for more than 5 hours.
Did you find the information on this page useful?