3.2.1. Running Simulation
To run a simulation, navigate to the simulation directory <example_design_directory>/sim/ed_sim/ and run the simulation script of your choice.
For ModelSim* SE and Siemens* EDA QuestaSim*- Intel FPGA Edition Simulators
Working directory: <example_design_directory>/sim/ed_sim/mentor
- Invoke vsim by typing vsim, which launches a window where you can run the following commands.
- Change directory to the design example simulator directory ( .
- Run the following commands on the transcript terminal:
- Do: source msim_setup.tcl
- ld_debug
- run -all
- A successful simulation ends with the following message: Simulation stopped due to successful completion!
For VCS Simulator
Working directory: <example_design_directory>/sim/ed_sim/synopsys/vcs
- On a single line, type:
sh vcs_setup.sh USER_DEFINED_COMPILE_OPTIONS="" USER_DEFINED_ELAB_OPTIONS="-xlrm\ uniq_prior_final" USER_DEFINED_SIM_OPTIONS=""
- A successful simulation ends with the following message: Simulation stopped due to successful completion!
To run a simulation in interactive mode, follow these steps:
Note: If you have already generated a simv executable in noninteractive mode, delete the simv and simv.diadir.
- Open the vcs_setup.sh file and add a debug option to the VCS command: vcs -debug_access+r
- Compile the design example: sh vcs_setup.sh USER_DEFINED_ELAB_OPTIONS="- xlrm\ uniq_prior_final" SKIP_SIM=1
- Start the simulation in interactive mode: simv -gui &
Cycle-Accurate NoC Simulation
EMIF IP designs that use the NoC can enable a cycle-accurate NoC simulation model; to do so, follow these steps:
- Compile your ED project up to the Plan stage of the Fitter.
- The system creates a file called noc_sim_defparams.inc in the qii/ folder.
- Modify the noc_sim_defparams.inc file, to add the line `define SIM_TOP_PATH before initial begin, as shown:
`define SIM_TOP_PATH ed_sim initial begin #1; $display("Using NOC accurate model");
- Save the noc_sim_defparams.inc file, and then paste a copy into your simulator directory, as follows:
- For ModelSim* SE and Siemens* EDA QuestaSim*- Intel FPGA Edition Simulators: <example_design_directory>/sim/ed_sim/mentor
- For VCS: <example_design_directory>/sim/ed_sim/synopsys/vcs.
- Open the <example_design_directory>/sim/ed_sim/sim/ed_sim.v file in an editor, navigate to the bottom of the file, and comment the line `include "ed_sim_noc_sim.inc" and add `include "noc_sim_defparams.inc" immediately before the endmodule line, as shown below:
//`include "ed_sim_noc_sim.inc" `include "noc_sim_defparams.inc" endmodule
The next steps depend on which simulator you are using, as follows:
For ModelSim* SE and Siemens* EDA QuestaSim*- Intel FPGA Edition simulators:
- In an editor, open the <example_design_directory>/sim/ed_sim/mentor/msim_setup.tcl file.
- Find the line set USER_DEFINED_COMPILE_OPTIONS "-O0" and change it to: set USER_DEFINED_COMPILE_OPTIONS "+define+PERFORMANCE_ACC_NOC_SIM_MODEL_AGILEX"
- Save the file and then follow the usual instructions to launch the simulation.
For VCS simulator:
- In an editor, open the <example_design_directory>/sim/ed_sim/synopsys/vcs/vcs_setup.sh file.
- Find the line USER_DEFINED_ELAB_OPTIONS="" and change it to USER_DEFINED_ELAB_OPTIONS="+define+PERFORMANCE_ACC_NOC_SIM_MODEL_AGILEX".
- Save the file and then follow the usual instructions to launch the simulation.