Technical data
Tcl/Tk and ModelSim
128
-
ModelSim EE Lessons ModelSim EE Tutorial
Let’s make some changes to the light colors and transition arrows.
2
Open the source file with this command:
notepad state-machine.tcl
Note the "ModelSim EXAMPLE part 1" comments in the file. Change "both_red"
state coordinates as indicated in the file.
3
Note the "ModelSim EXAMPLE part 2" comments in the file. Change the transition
arrow coordinates as indicated in the file.
4
Note the "ModelSim EXAMPLE part 3" comments in the file. Change the active color
from "black" to "purple".
5
Reuse the original commands when you're ready to run the state machine (remember,
to copy a previous command to the current command line, select the previous
Model
Sim
prompt):
source state-machine.tcl
draw_state_machine
Notice the changes. Try some additional changes if you wish.
This is the end of the Tcl/Tk examples. Continue to modify and test the examples
if you wish; you can recover the original files at any time in the
tcl_tutorial/originals
directory.