Technical data
ModelSim EE/SE Tutorial 4-41
Lesson 4 - Running a batch-mode simulation
The goals for this lesson are:
• Run a batch-mode VHDL simulation.
• Execute a macro (DO) file.
• View a saved simulation.
You’ll work this lesson from a DOS or UNIX prompt.
Note: Batch-mode simulations must be run from a DOS or UNIX prompt.
1 To set up for this lesson you’ll need to create a new directory and make it the current
directory. Copy this file into your new directory:
\<install_dir>\modeltech\examples\counter.vhd
2 Create a new design library:
vlib work
3 Map the library:
vmap work work
4 Then compile the source file:
vcom counter.vhd
5 You will use a macro file that provides stimulus for the counter. For your convenience,
a macro file has been provided with ModelSim. You need to copy this macro file from
the installation directory to the current directory:
<install_dir>\modeltech\examples\stim.do
6 Create a batch file using an editor; name it yourfile. With the editor, put the following
on separate lines in the file:
add list -decimal *
do stim.do
write format list counter.lst
and save to the current directory.