X-Amin's command interpreter is TCL (Tool Command Language). The basic syntax for a TCL command is:
command arg1 arg2 arg3
The command is either the name of a built-in command or a TCL procedure. The arguments to a command are just strings. Refer to the Command Reference for X-Amin commands added to TCL.
TCL commands and procedures can be combined into a script which can then be executed by X-Amin. For example, the following script:
read mymod.v hdl flow link eval z
will read in the file mymod.v, display the HDL code and flow diagram for the component, link the component and evaluate the signal 'z'.
TCL procedures can also be defined and then called from within a script. We can convert the above script into a procedure which takes the component name as a parameter:
proc doIt {comp} {
read $comp
hdl
flow
link
eval z
}
Once defined, the procedure can be used like any other TCL command, so our script now becomes:
doIt mymod.v
Scripts/procedures can be either entered into X-Amin on the command-line or GUI Command Entry, or they can be created in a file and read into X-Amin using the TCL source command. Note that if a procedure is created from the command-line or GUI Command Entry, then each line of the procedure, except the last one, must be terminated by a back-slash (\). This prevents X-Amin from processing the procedure's commands until the entire procedure is entered.