|
IRSIMThere is quite a bit of on-line documentation forirsim . Try man
irsim for information on all the commands that irsim supports.
irsim is a switch-level simulator, in the sense it models the
circuit at the level of transistors.
Commonly Used CommandsThe most frequently used commands inirsim are those that set the
values of inputs and those that are used to view signals.
h or
l commands, the node keeps being set to high or low (no
matter what the circuit is trying to do to the node!) until you use the x
command to stop setting the node.
VectorsSince nodes typically are grouped into vectors, it is usually easier to look at N-bit quantities as single vector entities. The following commands can be used to define vectors and display them.
To set a vector to a hexadecimal number, use:
For instance, you can now say:
A useful shortcut to defining arrays as long vectors is to say: Clock DefinitionThe standard clock definition for EE/CS 314 is shown below:
The first line defines
The following runs the simulation for 10 cycles:
ScriptsAll the text commands shown above can be typed into a text file and then read in at once. If you create a file calledfoo.src , you can read it
into irsim by saying: If your script is called foo.cmd , then simply saying: in irsim will execute
it. foo is treated as a new irsim command that is
defined by the contents of script foo.cmd
.
Some useful commands for scripts are given below.
|