IRSIM: A Switch-Level Circuit Simulator
Regular readers of this section must have seen many circuit simulators by now, but how many of these actually allow us to modify the circuit at the simulation stage? Well, here we have one such simulator, IRSIM. This tool allows us to modify the circuit under simulation and re-simulate it using IRSIM. IRSIM is available for both Linux and Windows operating systems (OSes).
IRSIM, not the Invisionix Systems’ portable instant messenger you get when you Google the term, is an interactive and incremental logic-level simulator used for metal oxide semiconductor (MOS) transistor based digital circuits. Pronounced as eye-are-sim, this tool is not an infra-red simulator, but is always referred to as a switch-level simulator.
Why switch-level simulator
The open source software IRSIM has the ability to simulate in two modes: switch and linear. During switch mode, it initialises and determines the functionality of a MOS network, whereas in case of linear mode, it determines the number of times the gate delays and the circuit transition occurs.
An interesting point to note is that although it has the ability to work in two different modes, we still relate it to only one mode. The reason is that, IRSIM models the circuits at transistor level where these transistors are modelled as switches. At this point, most analogue and higher order properties of the devices into consideration are ignored and these are treated as ideal on/off connections.
A simulator but not an editor
We are all aware of the importance of a digital circuit simulator and that it needs a netlist to work. A netlist is a circuit schematic with components and connections created by a circuit editor or circuit design tool. Now, do not confuse IRSIM with a design tool or an editor, as it can simulate but cannot create a netlist. Although it is an independent tool, it easily accepts a netlist from other tools.
Circuit behaviour and IRSIM
IRSIM being a switch-level simulator works on three important aspects of the behaviour of a digital circuit, namely, transistor state, logic value and transition events.
A transistor state is a linear model state, where each switch has two states: on and off. This linear model helps IRSIM reflect the differences between the different types of transistors, rise and fall times of the gate and different fabrication processes very accurately.
On the other hand, the logic value behaviour of the circuit allows IRSIM to treat voltages in a circuit as three different values, that is, high (h,1), low (l,0) and indeterminate (unknown or x). This way, IRSIM does not have to bother about the actual voltage that is powering the circuit. The linear model works with these voltage values and helps compute the generation of a normalised (high) voltage.
The above two aspects help us identify the simplified modelling of a circuit using IRSIM. However, on account of transition events, IRSIM treats a circuit as a cascade of events. This makes IRSIM an event-driven simulator. Let us understand how.
All switch-model transistors have a source-to-drain path and a controlling gate that is either on or off. On occasion when the transistor switch is on, source-to-drain nodes are combined to form a single path that can have only one state.
Whereas, when the transistor switch is off, source-to-drain nodes belong to two different paths and may even have independent states, as shown in Fig. 3. This change in state of a gate is considered to be an event that causes IRSIM to re-evaluate the paths between the source and the drain based on the event.
A completely different simulation experience
Each tool has its own advantage that can tempt you to use it, provided the advantages are known and easy to understand.
Modifies simulation and re-simulates incrementally. IRSIM allows modification and re-simulation of corrected errors along with verification of circuit operation. It also maintains a history of all circuit activity during simulation, depending upon which only the circuit that deviates from the history is re-simulated. The overall time taken for this is proportional to the size of the modification and not to the size of the entire circuit; so the simulation is fast.
In order to explain this better, a program was tested with several corrections to the errors that occurred in the design of the VLSI microprocessor at the IEEE Design Automation Conference. It was found that after correction, the circuit was incrementally re-simulated 1.6 to 3500 times faster than the simulation of the entire circuit.
Two simulation models. IRSIM has two different simulation models: switch and linear. It is considered to be an event-driven simulator that uses the switch model to simulate the transistor modelled as a voltage-controlled switch. This model is useful for determining and initialising network functionality.
Whereas the other type of circuit that has a transistor modelled as a resistor (R) in series with a voltage-controlled switch and a capacitor (C) at each node uses the linear model of IRSIM. The resulting RC network helps compute transition times and node values.
Uses text editor. It provides an easy-to-use text editor that can be easily converted into a simulation (.sim) file.
Completely different simulation. IRSIM uses two special commands, at and every, that enable an easy translation from a Verilog test bench. This provides a completely different simulation method, first by scheduling and then by running the simulator without any further input. The non-Tcl version of IRSIM can execute only IRSIM commands in this procedure.
IRSIM also helps identify the total number of transistors in a circuit.
Non-realistic simulation
IRSIM has no way to determine the charging and discharging of the circuit at the nodes without information about parasitic capacitances to the substrate, along with drain and source sizes of the MOS transistor. It sets all these to a minimum time step for fast fabrication of the circuit, but it might not be realistic in most of the cases.
Then there are circuits that hold some value on an electrically-isolated node of the circuit and expect the charge on this node to set a value on a different node through charge sharing. These circuits are dangerous and highly dependent on process parameters. Simulation of such circuits using IRSIM will again be non-realistic, as these will assume the voltages at isolated nodes to be constant.
From users’ mouths
One user on http://opencircuitdesign.com/ likes IRSIM over SPICE because of three important reasons: IRSIM treats transistors as ideal switches; IRSIM, although designed to run in the background, displays information regarding values of signals on VLSI layout; and IRSIM allows quick simulation. The user says, “In my opinion, it is much easier to write complicated test bench simulations using Tcl and IRSIM. I have used IRSIM to validate digital parts of several production chips at MultiGiG, including the simulation of analogue behaviour such as PLL locking.”
However, another user at http://www.edaboard.com/ finds it difficult to identify the input for an inverter circuit using IRSIM.
IRSIM has undergone plenty of revisions to try to be the best in its field, but we all know that nothing in this world is perfect. The current version of this tool does not have any way either to remove or reload a file that is being simulated. So, in case you are simulating a wrong file, you will have to wait till simulation is over.
Thus, although IRSIM is quick, it cannot be used for all types of circuits, as it cannot detect sensitive errors in the circuit. However, if the circuit is detected as error-free, IRSIM can give accurate simulation results.
Download the latest version of the software: click here
Regular readers of this section must have seen many circuit simulators by now, but how many of these actually allow us to modify the circuit at the simulation stage? Well, here we have one such simulator, IRSIM. This tool allows us to modify the circuit under simulation and re-simulate it using IRSIM. IRSIM is available for both Linux and Windows operating systems (OSes).
Fig. 1: IRSIM simulation of the 2-bit up-down counter |
Fig. 2: IRSIM simulation output file created using Print Menu command |
| |
Why switch-level simulator
The open source software IRSIM has the ability to simulate in two modes: switch and linear. During switch mode, it initialises and determines the functionality of a MOS network, whereas in case of linear mode, it determines the number of times the gate delays and the circuit transition occurs.
An interesting point to note is that although it has the ability to work in two different modes, we still relate it to only one mode. The reason is that, IRSIM models the circuits at transistor level where these transistors are modelled as switches. At this point, most analogue and higher order properties of the devices into consideration are ignored and these are treated as ideal on/off connections.
A simulator but not an editor
We are all aware of the importance of a digital circuit simulator and that it needs a netlist to work. A netlist is a circuit schematic with components and connections created by a circuit editor or circuit design tool. Now, do not confuse IRSIM with a design tool or an editor, as it can simulate but cannot create a netlist. Although it is an independent tool, it easily accepts a netlist from other tools.
Circuit behaviour and IRSIM
IRSIM being a switch-level simulator works on three important aspects of the behaviour of a digital circuit, namely, transistor state, logic value and transition events.
A transistor state is a linear model state, where each switch has two states: on and off. This linear model helps IRSIM reflect the differences between the different types of transistors, rise and fall times of the gate and different fabrication processes very accurately.
Fig. 3: NMOS transistor acting as a switch |
| Fig. 4: Layout of 2-input XOR gate |
The above two aspects help us identify the simplified modelling of a circuit using IRSIM. However, on account of transition events, IRSIM treats a circuit as a cascade of events. This makes IRSIM an event-driven simulator. Let us understand how.
All switch-model transistors have a source-to-drain path and a controlling gate that is either on or off. On occasion when the transistor switch is on, source-to-drain nodes are combined to form a single path that can have only one state.
Whereas, when the transistor switch is off, source-to-drain nodes belong to two different paths and may even have independent states, as shown in Fig. 3. This change in state of a gate is considered to be an event that causes IRSIM to re-evaluate the paths between the source and the drain based on the event.
A completely different simulation experience
Each tool has its own advantage that can tempt you to use it, provided the advantages are known and easy to understand.
Modifies simulation and re-simulates incrementally. IRSIM allows modification and re-simulation of corrected errors along with verification of circuit operation. It also maintains a history of all circuit activity during simulation, depending upon which only the circuit that deviates from the history is re-simulated. The overall time taken for this is proportional to the size of the modification and not to the size of the entire circuit; so the simulation is fast.
Fig. 5: The analyser graphic display in IRSIM 9.7 |
Fig. 6: The IRSIM command console in Tcl or Tk based version 9.7 |
Two simulation models. IRSIM has two different simulation models: switch and linear. It is considered to be an event-driven simulator that uses the switch model to simulate the transistor modelled as a voltage-controlled switch. This model is useful for determining and initialising network functionality.
Whereas the other type of circuit that has a transistor modelled as a resistor (R) in series with a voltage-controlled switch and a capacitor (C) at each node uses the linear model of IRSIM. The resulting RC network helps compute transition times and node values.
Uses text editor. It provides an easy-to-use text editor that can be easily converted into a simulation (.sim) file.
Completely different simulation. IRSIM uses two special commands, at and every, that enable an easy translation from a Verilog test bench. This provides a completely different simulation method, first by scheduling and then by running the simulator without any further input. The non-Tcl version of IRSIM can execute only IRSIM commands in this procedure.
IRSIM also helps identify the total number of transistors in a circuit.
Non-realistic simulation
IRSIM has no way to determine the charging and discharging of the circuit at the nodes without information about parasitic capacitances to the substrate, along with drain and source sizes of the MOS transistor. It sets all these to a minimum time step for fast fabrication of the circuit, but it might not be realistic in most of the cases.
Then there are circuits that hold some value on an electrically-isolated node of the circuit and expect the charge on this node to set a value on a different node through charge sharing. These circuits are dangerous and highly dependent on process parameters. Simulation of such circuits using IRSIM will again be non-realistic, as these will assume the voltages at isolated nodes to be constant.
From users’ mouths
| |
However, another user at http://www.edaboard.com/ finds it difficult to identify the input for an inverter circuit using IRSIM.
IRSIM has undergone plenty of revisions to try to be the best in its field, but we all know that nothing in this world is perfect. The current version of this tool does not have any way either to remove or reload a file that is being simulated. So, in case you are simulating a wrong file, you will have to wait till simulation is over.
Thus, although IRSIM is quick, it cannot be used for all types of circuits, as it cannot detect sensitive errors in the circuit. However, if the circuit is detected as error-free, IRSIM can give accurate simulation results.
Download the latest version of the software: click here
No comments:
Post a Comment