Abstract:
A switch level simulator having switch level speeds with near the accuracy of a circuit level simulator. Circuit parameters such as peak current, delay, and charge are calculated by using a dynamic short-circuit ratio. In the preferred embodiment a computer having a processor and memory is used to run the circuit simulations. A lookup table is built which represents how the circuit parameters vary with a change in the dynamic short-circuit ratio. The dynamic short-circuit ratio is calculated by taking the ratio of a first resistance in a first circuit path switching OFF to a second resistance in a second circuit path switching on. The circuit paths might be a parallel or series set of transistors which need to be combined to form an effective resistance for each path. The calculated dynamic short-circuit ratio is then used in the lookup table to determine the parameters in question.

Description:
FIELD OF THE INVENTION 
     The present invention relates to the simulation of electronic circuits, and finds particular application in the simulation of such circuits at a switch level abstraction. 
     BACKGROUND AND SUMMARY OF THE INVENTION 
     Current fabrication technologies with line widths of less than 0.5 μm result in chips with greater than 2 million transistors. Such complex electronic circuits are typically simulated before being fabricated in silicon. Simulation allows the operational characteristics of the circuits to be tested and analyzed in a favorable environment, thus preventing costly errors in fabricated circuits. 
     One class of simulators (e.g., SPICE) uses a circuit level abstraction. Such circuit level simulators model the circuit&#39;s transistors using complex non-linear equations. These simulators are time driven so that at each time step (typically a pico or nano second) the state of the circuit is updated through differential equation analysis. 
     While circuit level simulators are extremely accurate, the complicated analysis undertaken at pico or nano second intervals requires extended periods of time, rendering the simulators impractical for simulating circuits larger than a few thousand transistors. 
     To address the speed problems of circuit level simulators, switch level simulators were developed capable of running circuit simulations thousands of times faster. In switch level simulation a transistor is modeled as a switch having a binary ON and OFF state. When turned ON, the switch is a series resistor with some associated capacitance. When OFF, the switch is an infinite resistance. As a result, switch level simulation reduces a complex network of transistors into a RC network, allowing for a simpler computational analysis using an RC network-based algorithm instead of differential equations. 
     A problem with switch level simulators is that they sacrifice accuracy for speed. Switch level simulators only incorporate into their analysis transistors making a transition to the ON or active state; the transistors which are being deactivated or turned OFF are ignored. In practice, however, transistors which are being deactivated play a major role in determination of the circuit&#39;s behavior. 
     One parameter which is affected by transistors making the transition to the OFF state is the dynamic short-circuit current. The dynamic short-circuit current is a transient current between power and ground that occurs when transistor combinations switch, and is typically 20%, but can be as large as 50%, of the total current in the circuit. 
     Other parameters of importance in determining power consumption and noise effects of integrated circuits are the propagation delay and charge. 
     Prior art switch simulation methods have led to inaccuracies on the order of 100% in the actual dynamic short-circuit current, and consequent errors in parameters such as propagation delay and charge. 
     In accordance with a preferred embodiment of the present invention, the foregoing and other drawbacks of the prior art are overcome. One embodiment of the present invention uses a simulator having switch level speeds but accuracy near that of a circuit level simulator. In the preferred embodiment a lookup table is built which represents how parameters such as current, charge, and delay vary with dynamic short-circuit ratio. The dynamic short-circuit ratio is calculated by taking the ratio of a first resistance in a first circuit path switching OFF to a second resistance in a second circuit path switching ON. The circuit paths might be a parallel or series set of transistors which need to be combined to form an effective resistance for each path. The calculated dynamic short-circuit ratio is then used in the lookup table to determine the parameters in question. 
    
    
     The foregoing and additional features and advantages of the present invention will be more readily apparent from the following detailed description, which proceeds with reference to the accompanying drawings. 
     BRIEF DESCRIPTION OP THE DRAWINGS 
     FIG. 1 is a diagram showing a computer system used to execute simulation methods according to one embodiment of the present invention. 
     FIG. 2 is a diagram showing switch level modeling of a transistor as a switch, a resistor, and a load capacitor. 
     FIG. 3 is an illustrative diagram of an inverter which generates a short-circuit current. 
     FIG. 4 is an illustrative diagram of input and output waveforms used in conjunction with the inverter of FIG. 3. 
     FIG. 5 is a diagram showing switch level modeling of the inverter of FIG. 3 as a pair of switches, a pair of resistors, and a load capacitor. 
     FIG. 6 is an illustrative diagram showing a NAND gate. 
     FIG. 7 is a diagram showing switch level modeling of the NAND gate of FIG. 6 as a pair of switches, a pair of resistors, and a load capacitor. 
     FIG. 8 is diagram representing a three-dimensional table used in one embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 1, an illustrative embodiment of the present invention includes a computer aided design system 10 having an internal processor 12, I/O devices 14, and a memory 16 for storing programs 18 and data 20. 
     The processor 12 is a RISC microprocessor run on a Sun or Hewlett-Packard workstation, but any processor with sufficient power to execute the methods described herein can be utilized. The processor 12 is capable of compiling simulated circuit information into a usable format and is capable of running a switch-level simulator which models a circuit&#39;s operation and timing. 
     The I/O devices 14 generally include such peripheral devices as a monitor, a keyboard, and a printer. The monitor typically displays information related to the simulation while the printer allows printouts of signals produced at selected nodes during the simulation. The keyboard or mouse allows the user to input information necessary to run the simulation. 
     Memory 16 is segmented into the program section 18 and the data section 20. The program section 18 stores the simulator programs. Data section 20 stores both event data (which indicates whether nodes will change state) and circuit data (which represents the circuits to be simulated). Additionally, data section 20 stores lookup tables which may contain data related to delay, charge and current for any given capacitive load, input slew, and short-circuit ratio. 
     FIG. 2 shows switch-level modeling of an n-type transistor 30. The transistor 30 includes nodes 24, 26 and gate 28. When gate 28 goes from low to high, transistor 30 allows current to flow from node 24 to node 26. As can be seen, transistor 30 is modeled as a resistor 32, a switch 34, and a load capacitance 36 (assuming node 26 is an output node). When gate 28 goes low to high, switch 34 closes allowing current to flow from node 24a to node 26a. When the gate goes high to low, switch 34 remains open so that the path from node 24a to node 26a has effectively infinite resistance. 
     FIG. 3 shows an inverter 38 and illustrates, in conjunction with FIG. 4, how the dynamic short-circuit current occurs. Inverter 38 includes a p-channel MOS transistor 44, an n-channel MOS transistor 46, Vdd 40, ground 42, an input 48 connected to the gates of the transistors 44, 46, and an output 50. If the input is maintained as a logic high, the p-channel transistor 44 remains OFF and the n-channel transistor 46 remains ON so that output 50 is logic low. Similarly, if the input is maintained as a logic low, then the n-channel transistor 46 remains OFF and the p-channel transistor 44 remains ON so that Vdd 40 is connected to output 50, making the output a logic high. 
     The dynamic short-circuit current occurs when the input 48 switches from a low to high or high to low. 
     FIG. 4 shows a possible input signal 56 which may be applied to the inverter 38 of FIG. 3. As the signal changes from a logic low to a logic high, the p-channel transistor 44 begins to make the transition from ON to OFF. At the same time, the n-channel transistor 46 begins to make the transition from OFF to ON. Consequently, the output waveform 58 of FIG. 4 makes the inverted transition from a logic high to low in a period of time 64 defined by 60, 62. During the transition period 65 of the input 56, starting from transition point 61 to transition point 63, both transistors 44, 46 are in an intermediate state where they are both partially ON. As a result, current flows from Vdd 40 to ground 42 through transistors 44, 46 during the period 65. This current flow is the dynamic short-circuit current. 
     FIG. 5 shows the inverter of FIG. 3 modeled at the switch level as a pair of switches 72, 76 and resistors 70, 74 in series, and load capacitance 82. The resistor 70 and switch 72 model transistor 44. Resistor 74 and switch 76 model the transistor 46. When input 48 makes a transition to a logic high, the switch 72 moves from the closed to the open position and the switch 76 moves from the open to the closed position making the output 50 a logic low. For a transient period of time, both switches are in the closed position, allowing current to flow from Vdd 40 to Vss 42. The dynamic short-circuit ratio, which strongly determines the dynamic short-circuit current, is the ratio of the resistance 70 in the first circuit path 78 switching OFF to the resistance 74 in the second circuit path 80 switching ON. Assuming the resistance 70 is Rp and the resistance 74 is Rn, the dynamic short-circuit ratio would be Rp/Rn. Similarly, if the input switched from a logic high to a logic low, the switch 72 would be closing and the switch 76 would be opening. In this case the dynamic short-circuit ratio would be Rn/Rp. 
     FIG. 6 shows a NAND gate having Vdd 86, Vss 102, transistors 94, 96, 98, 100, with associated resistances R1-R4 (not shown) respectively, inputs 88 and 90, and output 92. Transistors 94 and 96 are p-channel transistors and 98 and 100 are n-channel transistors. The output 92 is always a logic high unless the inputs are both a logic low in which case the output is a logic high. 
     FIG. 7 shows the NAND gate of FIG. 6 modeled as a pair of switches 108, 112 and resistors 106, 110 in series and a load capacitor 114. The resistor 106 and switch 108 model the transistor pair 94 and 96. Similarly, the resistor 110 and switch 112 model transistor pair 98, 100. Assuming that the transistors pair 94 and 96 have associated resistances R1 and R2 which are each equal in value to Rp, then the equivalent resistance of the parallel resistors is 1/2 Rp which is the value of resistor 106. Similarly, the series equivalent of transistor pair 98 and 100 with associated resistance R3 and R4 is R3+R4. Assuming R3 and R4 are equal to Rn, the equivalent resistance of the series resistors is 2Rn, which is the value of resistor 110. The dynamic short-circuit ratio is the ratio of the resistance of the gates transistors turning OFF to the resistance of the transistors turning ON. Assuming the inputs 88 and 90 are such that p-type transistors 94, 96 are turning OFF and the n-type transistors 98, 100 are turning ON, then the dynamic short-circuit ratio is 1/2Rp divided by 2Rn resulting in Rp/4Rn. 
     Thus, to model a circuit into a switch level abstraction, a computer-implemented process partitions the circuit into channel-connected components. A channel-connected component consists of transistors that are connected via source-drain channels. Each channel-connected component is then partitioned into biconnected components, forming a tree of bicomponents. Each bicomponent is then reduced via series-parallel reduction. Driving-point resistances of each node to Vdd and Vss along with the Elmore delay (see below) can be computed. The process takes advantage of the series-parallel and tree bicomponents by employing a linear time algorithm on these parts. Charge-sharing analysis is explicitly performed. For additional information on Elmore delays the reader can consult W. C. Elmore &#34;The Transient Response of Damped Linear Networks with Particular Regard to Wideband Amplifiers,&#34; Journal of Applied Physics, vol. 19, no. 1., at 55-63 (1948). 
     Once the switch-level process has computed the driving point resistances, the new state of each node is computed and the nodes that are changing state are identified. For each channel-connected component, one of three conditions is identified prior to performing current and charge estimation. These conditions include dynamic short-circuit, static short-circuit, or no short-circuit. The no short-circuit situation involves transitions due to charge-sharing or transitions in which a node goes from a non-driven to a driven state. For each of these three conditions, the current and charge drawn from Vdd and Vss nodes are estimated. 
     The load capacitance is determined from the capacitance of the nodes that are changing state. A channel-connected component that has multiple nodes changing state has an effective load capacitance that is the sum of the capacitances of all nodes changing state. 
     Input slew is computed by taking into consideration series and parallel components. For series connected transistors, the effective input slew of a node is the maximum input slew of all the inputs that are switching in the series path. For parallel components, the effective input slew is the minimum input slew of each path in parallel. Inputs that are not switching are considered to have zero input slew. 
     The delay is modeled as the multiplication of the resistance and load capacitance and then added to the no-load delay. The resistance and no-load delay are a function of the dynamic short-circuit ratio and the input slew. The peak current is a function of the dynamic short-circuit ratio, input slew, and load capacitance. 
     Accuracy is gained in estimating delay by utilizing the dynamic short-circuit ratio. The resistance of a switch is obtained via table lookup using the dynamic short-circuit ratio and the input slew. Because the switch resistances are a function of the dynamic short-circuit ratio and input slew, the Elmore delay is computed by explicitly including the no-load delay. 
     Now turning to FIG. 8, a table is created which is a one time per fabrication technology characterization of delay, peak currents and charge per transition while varying input slew, output load capacitance, driver size and dynamic short-circuit ratio. Direct measurement of each parameter to be estimated (delay, peak current, and charge) while varying four of the primary parameters--load, slew, transistor size, and short-circuit ratio--allows high accuracy at the switch level. The three dimensional table of FIG. 8 includes in one dimension 120 the dynamic short-circuit ratio, in a second dimension 118 the input slew, and in a third dimension 116 the load capacitance. Once these values are calculated in the simulation, they can be used to access data 122 in the lookup table of FIG. 8 to determine the charge, peak current, and delay. 
     Having described and illustrated the principles of our invention with reference to preferred embodiments thereof, it will be apparent that these embodiments can be modified in arrangement and detail without departing from the principles of the invention. 
     For example, while the invention has been illustrated with reference to elementary circuit topologies for expository convenience, it will be recognized that the general principles thereof are applicable to circuits of arbitrary complexity. 
     Similarly, while a lookup table is employed containing predetermined values of peak current, delay, and charge, any method of determining one or all of these parameters using a switch level simulator and the dynamic short-circuit ratio may be utilized. 
     In view of the wide variety of embodiments to which the principles of our invention can be applied, it should be apparent that the detailed embodiments are illustrative only and should not be taken as limiting the scope of our invention. Rather, we claim as our invention all such modifications as may come within the scope and spirit of the following claims and equivalents thereto.