Table of Contents Previous page Next page Index

ModelSim Documentation Bookcase

Model Technology Inc.


The Tcl source command

The Tcl source command reads the Tcl file into the Tcl interpreter, which parses the procedures for use within the current environment. Once sourced, a Tcl procedure can be called from the ModelSim prompt as shown in the syntax below. ModelSim executes the instructions within the procedure.

Syntax

source <tcl filename> 
<tcl procedure name> 

Arguments

<tcl filename>  

The Tcl file read into the ModelSim Tcl interpreter with the source command.

<tcl procedure name> 

The Tcl procedure defined within <tcl filename>, called from the ModelSim prompt, and executed by ModelSim.

The traffic.do file is a good example of the source command syntax (the file is a macro that runs the traffic light simulation). View it with Notepad:

notepad traffic.do 

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