Technical data

Tcl/Tk and ModelSim
ModelSim EE/SE Tutorial 6-51
mouse), or middle (3 button mouse). You can also select a ModelSim or VSIM
prompt from the Main transcript to paste a previous command to the current
command line.
Make a transcript DO file
You can rerun the commands executed during the current session with a Do file
created from the Main transcript. Make the DO file by saving the transcript with
the File > Save Main As menu selection at any time during the exercises. Run the
DO file to repeat the commands (do <do filename>).
Preparing for the Tcl/Tk examples
These steps must be completed before running the Tcl examples.
1 Create, and change to a new working directory for the Tcl/Tk exercises. Copy the
lesson files in the following directory (include all subdirectories and files) to your new
directory:
<install_dir>\modeltech\examples\tcl_tutorial
2 Make the new directory the current directory, then invoke ModelSim:
for UNIX
vsim -gui
for Windows (from a shortcut or Start > Run, etc.)
modelsim.exe
3 At the ModelSim prompt, create a work library in the /vhdl directory:
vlib vhdl/work
4 Map the work library.
vmap work vhdl/work
5 Compile the VHDL example files with these commands (or the Compile dialog box):
vcom vhdl/traffic.vhd
vcom vhdl/queue.vhd
vcom vhdl/tb_traffic.vhd
Now you’re now ready to run the examples.