
6 Start Here for ModelSim EE/SE
A quick ModelSim tutorial
Let’s assume you have ModelSim installed and properly configured. Here
are the basic steps to simulation. These commands work within ModelSim
at the ModelSim prompt, or on your operating system command line. You
must be in the modeltech/examples directory to run the examples. (Go to
Licensing and installation if ModelSim is NOT ready to run.)
Use these commands at the VSIM prompt within ModelSim:
For more simulation exercises and lessons, choose one of the following
from the ModelSim Main window Help menu:
• Help > QuickStart menu > See an Example (button)
• Help > EE Documentation > EE Tutorial
Command Description
vlib work creates a work library for holding your
compiled designs
vcom counter.vhd
or
vlog counter.v tcounter.v
compiles the HDL source code, use vcom
for VHDL or vlog for Verilog
vsim counter
or
vsim test_counter
loads and simulates the design unit, use
counter for VHDL or test_counter for
Verilog
view * opens all ModelSim windows
add wave * adds all signals in the design to the Wave
window
force clk 1 50, 0 100
-repeat 100
(this command must be
invoked on one line)
forces the clock (VHDL design only) to
value 1 after 50 ns after the current time,
then to 0 at 100 ns after the current time
and repeats every 100 ns
run 1000 runs the design for 1000 ns
quit exits ModelSim (use quit -f to exit
ModelSim without confirmation)
Kommentare zu diesen Handbüchern