User`s manual
Running command-line and batch-mode simulations
C-290 Tips and Techniques ModelSim Xilinx User’s Manual
Running command-line and batch-mode simulations
The typical method of running ModelSim is interactive: you push buttons and/or
pull down menus in a series of windows in the GUI (graphic user interface). But
there are really three specific modes of vsim operation: GUI, command line, and
batch. Here are their characteristics:
• GUI mode
This is the usual interactive mode; it has graphical windows, push-button
menus, and a command line in the text window. This is the default mode when
vsim is invoked from within ModelSim.
• Command-line mode - running vsim.exe
This an operational mode that has only an interactive command line; no
interactive windows are opened. To run vsim in this manner, invoke it from the
DOS prompt in Windows 95 or Windows NT.
The resulting transcript file is created in such a way that the transcript can be re-
executed without change if you desire. Everything except the explicit
commands you enter will begin with a leading comment character (#).
• Batch mode - running vsim.exe
Batch mode is an operational mode where no user interaction with the
simulation is required. In this case, vsim is run from a Windows 95 or NT DOS
prompt and standard input and output are re-directed to and from files. This
works great for regression testing. An example is:
C:\modeltech> vsim ent arch <infile >outfile
where infile contains:
force reset 0
force clk 0, 0 1 50 -rep 100
run 10000