proc statemachine states {
array set S $states
proc goto label {
uplevel 1 set this $label
return -code continue
}
set this [lindex $states 0]
while 1 {eval $S($this)}
rename goto {}
}
The [goto] command is global, but as long as you use distinct state
labels, it should work.. In 8.5, one could use states directly as a
dict, but even in this version, S is local.
Are you more worried about hardware, or software?
comp.lang.vhdl is likely to offer firmly held opinions,
albeit not very software-friendly ones.
--
Jonathan Bromley, Consultant
DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services
Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan...@MYCOMPANY.com
http://www.MYCOMPANY.com
The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
I assume you want to talk about implementing them?
If so, have you checked out what is in TclLib (grammar::fa)?
Also I recall announcements, the last of which was about a year ago, of an
FSA package on c.l.t.
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+