Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


Command-line mode

In command-line mode ModelSim executes any startup command specified by the Startup variable in the modelsim.ini file. If vsim is invoked with the -do <"command_string"> option a DO file (macro) is called. A DO file executed in this manner will override any startup command in the modelsim.ini file.

During simulation a transcript file is created containing any messages to stdout. A transcript file created in command-line mode may be used as a DO file if you invoke the transcript on command (-559) after the design loads (see the example below). The transcript on command will write all of the commands you invoke to the transcript file. For example, the following series of commands will result in a transcript file that can be used for command input if top is resimulated (remove the quit -f command from the transcript file if you want to remain in the simulator).

vsim -c top

library and design loading messages... then execute:

transcript on
force clk 1 50, 0 100 -repeat 100
run 500
run @5000
quit -f

Rename transcript files that you intend to use as DO files. They will be overwritten the next time you run vsim if you don't rename them. Also, simulator messages are already commented out, but any messages generated from your design (and subsequently written to the transcript file) will cause the simulator to pause. A transcript file that contains only valid simulator commands will work fine; comment out anything else with a "#".

Stand-alone tools will pick-up project settings in command-line mode if they are invoked in the project's root directory. If invoked outside the project directory, stand-alone tools will pick up project settings only if you set the MODELSIM environment variable to the path to the project file (<Project_Root_Dir>/<Project_Name>.mpf).


Model Technology Inc.
Model Technology Incorporated
Voice: (503) 641-1340
Fax: (503)526-5410
www.model.com
sales@model.com
Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase