IRSIM

Home
Sue
Sue Example
IRSIM
Netgen
Magic
Pplot
Mosis
Search
Contact

 

Irsim is an event-driven logic-level simulator for MOS (both N and P) circuits.

Two simulation models are available. 

  • Switch model - each transistor is modeled as a voltage controlled switch. It is useful for initializing or determining the functionality of the circuit. 

  • Linear model - each transistor is modeled as a resistor in series with a voltage controlled switch; each node has a capacitance.

For our purpose we will concentrate on the switch model.
 


Starting IRSIM

 

To start IRSIM, type the following command from the c-shell

 

                %irsim scmos.prm file.sim
 

scmos.prm is the electrical parameters file that configure the devices to be simulated. It defines the capacitance of the various layers, transistor resistances, threshold voltages, etc. File.sim is the input file for the simulation generated by Sue or ext2sim. (See .sim file format).

 


 

IRSIM commands

 

After processing the files named on the command line, IRSIM will accept further commands from its command prompt: 
       

irsim>
 

Here are some of the most frequently used commands in IRSIM:

  • @ filename - sources commands from file filename.

  • ana wnode  - display nodes in analyzer window. (Same as analyzer).

  • vector label node1 node2... - group signals in a bit vector.

- easy to set using setvector command:

    irsim> vector C c7 c6 c5 c4 c3 c2 c1 c0

    irsim> setvector C 10110110

- vectors are displayed in the analyzer as a unit.

  • h wnode1 wnode2 ... - sets nodes to logic level high (1).

  • l wnode1 wnode2 ... - sets nodes to logic level low (0).

  • u wnode1 wnode2 ... - sets nodes to logic level undefined (x).

  • x wnode1 wnode2 ... - remove nodes from being inputs (externally driven).

  • inputs - display list of nodes which are inputs (externally driven).

  • d [wnode] ... - print display list or specified node(s).

  • s [n] - simulate for n ns. Default is stepsize.

  • c [n] - simulate for n clock cycles. Default is 1.

  • p - step clock cycle one simulation step

  • stepsize [n] - set simulation step size to n ns.

  • clear - clear analyzer display (a new ana command will display the signals).

  • exit - exit the IRSIM simulation

For a full list of available commands see IRSIM manual page.

 


The Analyzer window

 

After invoking the ana command, the Analyzer window will be displayed on the screen. You will use this window to monitor the simulation curves. First, you have to set the values for the input nodes. Any node can be set using the h, l, u or set commands. Related signals (e.g., 16 bits of a register) can be grouped in a vector using the vector command and display it as a vector. Or you can combine all the commands to use in a file and use the @ filename command to source the commands from the specified file.

 

 

 


 

 

 

 

 

 

 

 

 

 

When you have set the inputs, you have to advance the simulation clock using the s command. For example, if you want to simulate an xnor device (with inputs a, b and output o) for input values a=1, b=0, you should type:
 

irsim> ana a b out

irsim> h a

irsim> l b

irsim> s
 

This will generate an output value on the Analyzer window, corresponding to the input values. To simulate the device for all possible input combinations, repeat the described steps, while setting different values for the input nodes.

For more information see IRSIM tips and tricks manual page. or IRSIM commands

 

Common Pitfalls:

  • The analyzer does not recognize input nodes. The reason for this is most probably missing labels or failed signal declaration. Go back to your circuit drawing (layout) and check the node labels and signal declarations.

  • The output value produced by the simulation is undefined. This might be a result of missing connection or bad circuit design. Go back to your circuit drawing (layout) and check the circuit structure.

Useful Hints:

  • You might need to set your DISPLAY environment variable before running the simulation. This is done by

      %setenv DISPLAY workstation_name:0.0


Printing the results from the simulation

 

From the File menu of the Analyzer window, choose the Print option. This will produce a .ps (postscript format) file, which you can print using the lpr command.


Oklahoma State University