VSIM OVERVIEW With 'vsim', one can simulate a circuit using a variety of methods. However, each method has the same basic process associated with it once loaded: - setup the desired inputs (also termed stimulus) - 'advance time' to allow the circuit to react to the stimulus - observe the result The three methods of performing this function are to explicitly setup and query the desired nodes, create a 'bitvec' to make the setting and querying of a group of nodes easier, and finally setting up a series of vectors in time to step through a sequence of inputs. This note will cover a subset of the commands associated with each of these simulation techniques. Simulation by explicit node manipulation ---------------------------------------- Three commands which can be used to perform this function are: hi, lo, and node. hi {node} Set nodes as high inputs. This forces nodes specified to have a high value, it overrides previous commands if necessary. lo {node} Set nodes as low inputs. This forces nodes specified to have a low value, it overrides previous commands if necessary. node [-l] {node} Display the value of the specified node(s). If the '-l' flag is specified, display all information on the specified node(s). Simulation by utilization of 'bitvec's -------------------------------------- The three commands used to perform this function are bitvec, sbvec, and dl. bitvec label {node} Watch a bit vector. This command adds a bit vector with the name given by label to the display list. The bit vector is composed of the values of the nodes specified. bitvec -label Unwatch a bit vector. Removes the bit vector specified by label from the display list. sbvec bv_name value_string Set a bitvec named 'bv_name' to the value defined by 'value_string'. The length of 'value_string' must match the length of the bit vector exactly. The 'value_string' is expressed in descending order high bit to low bit. dl {node} Display one or more nodes or bit vectors. Displays the values of nodes and bit vectors specified; if none are specified, displays the values of nodes and bit vectors currently on the display list. Simulation by utilization of 'runvec' ------------------------------------- The three commands used to perfrom this function are watch, uvec, and runvec. watch {[-]node} Watch or unwatch one or more nodes. This command adds nodes to the display list if no minus sign is included, and deletes nodes from the display list if a minus sign is included. Only 'watch'ed nodes are output after a 'runvec' command. uvec {node vector} Define/display an input vector for a node. After each cycle of a runvec command, the node is set to the next value specified in the vector. If the vector contains a '+' or a '*', the last value will be repeated to obtain enough input values; otherwise, the specification is cycled through again. runvec [n] This command cycles n times, or as long as the longest user defined vector if n is not specified. Miscellaneous useful commands ----------------------------- st [n] Step. This command propagates new input values through the network and returns when n, or stepsize if n is not specified, time units pass. If n is specified, it is the new default value, stepsize. alias [alias_name alias_string] Show or define a command alias (see 'vsim' man. page) print text ... Print the text specified up to the next newline on the console. This is useful within a command file to keep the user posted of the progress through the file. logfile [filename] Create a logfile with the specified namer 'logfile' commands in the command file. quit Quit the current input stream. If this is typed at the top level, the simulator will exit back to the system; otherwise, input reverts to the previous input stream. | Lines beginning with a vertical bar are treated as comments all text up to the next newline is ignored.