![]() |
![]() |
![]() |
![]() |
Lesson 6 - Executing commands at startup
The goals for this lesson are:
- Specify the design unit to be simulated on the command line
- Edit the modelsim.ini file
- Execute commands at startup with a DO file
Important: Start this lesson from either the UNIX or DOS prompt in the same directory in which you completed Running a batch-mode simulation chapter .
- For this lesson, you will use a macro (DO) file that provides startup information. For convenience, a startup file has been provided with the ModelSim program. You need to copy this DO file from the installation directory to your current directory:
\<install_dir>\modeltech\examples\startup.do- Next, you will edit the modelsim.ini file in the \modeltech directory (or the modelsim.ini file in your current directory if one exists) to specify a command that is to be executed after the design is loaded. To do this, open
<install_dir>\modeltech\modelsim.ini
using a text editor and uncomment the following line (by deleting the leading ;) in the [vsim] section of the file:
Startup = do startup.do
- Take a look at the DO file. It uses the predefined variable $entity to do different things at startup for different designs.
- Start the simulator and specify the top-level design unit to be simulated by entering the following command at the UNIX/DOS prompt:
vsim counterNotice that the simulator loads the design unit without displaying the Load Design dialog box. This is handy if you are simulating the same design unit over and over. Also notice that all the windows are open. This is because the view * command is included in the startup macro.
- If you plan to continue with the following practice sessions, keep ModelSim running. If you would like to quit the simulator, enter the following command at the VSIM prompt:
quit -f- You won't need the startup.do file for any other examples, so use your text editor to comment out the "Startup" line in modelsim.ini.
![]() Model Technology Incorporated Voice: (503) 641-1340 Fax: (503)526-5410 www.model.com sales@model.com |
![]() |
![]() |
![]() |
![]() |