We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome,
Internet Explorer 11,
Safari. Thank you!
General Description: How do I run a functional simulation with ModelSim?
For information on running a back-annotated (timing) simulation using ModelSim stand-alone, please see (Xilinx Answer 10177).
Running Simulation from Project Navigator (VHDL or Verilog) When running a simulation from ProjNav, ProjNav will automatically run the behavioral simulation. Select the Testbench in the Sources Window in ProjNav, then run the Simulate Behavioral Model process in the Processes Window.
3. Load the design in ModelSim and use the -L switch to point to the libraries being used in the design. The "glbl" needs to be loaded as well. vsim -t ps -L unisims_ver -L xilinxcorelib_ver work.<testbench> work.glbl
NOTE: The "glbl.v" automatically pulses Global Set/Reset (GSR) for the first 100 ns of the simulation. See (Xilinx Answer 6537) for more information.
VHDL - Running MTI Stand-alone 1. If you have not compiled the Xilinx Simulation Libraries, please see (Xilinx Answer 15338) for information on how to compile the libraries.
2. Compile the source files and the testbench. For example: vcom -93 <source1>.vhd <source1>.vhd ... testbench.vhd
3. Load the design: vsim -t 1ps work.<testbench>
NOTE: In a back-annotated (timing) simulation, the Global Set/Reset (GSR) will automatically be pulsed for the first 100 ns of simulation. To prepare for this, it would be good to reserve the first 100 ns in the testbench for reseting the design. For additional information about GSR in simulation, please refer to (Xilinx Answer 5009).