1. Field of the Invention
The present invention is related to circuit simulation by over-approximation techniques that reduce simulation burden over that of exhaustive analysis, and more specifically to simulation programs, methods and systems that use symbolic states in sequential simulations and their results, to enhance the simulation, perform netlist reduction and other model simplification.
2. Description of Related Art
Logic simulators typically verify designs of processor integrated circuits (ICs), as well as other large-scale logic, by observing certain behaviors during the simulation process and reducing the netlist that describes the logic in various ways using the information gathered during the simulation process.
One part of the simulation performed on such devices is reachability analysis, which in present systems is typically an approximate reachability analysis that, through certain assumptions, reduces the amount of time to approximate very closely the state-space that can be reached by the logic in a device, or a portion of a device being simulated. By using values of initial state including both binary states as well as an unknown state, behavior of the logic can be observed and any logic output that appears to resolve to one of the two known states, or to a pattern oscillating between the two known states, can be simplified. Through this process, the simulation can be trimmed dynamically while in process, leading to an approximate, but generally valid description of the state flow of the logic that is obtained in a far shorter time than would be possible with exhaustive simulation.
However, due to the very large and increasing size of logic designs, even existing techniques are time-consuming and memory intensive. Therefore, it would be desirable to provide a simulation program, method and system that have improved performance and/or reduced memory requirements.
The invention is embodied in a method, computer system and computer program product that perform reachability analysis on a logic design. The computer system is a computer system executing program instructions for carrying out the method and the computer program product is a program for carrying out the method.
The method is a method of simulating a logic design that obtains a set of reachable states containing values of true, false and one or more symbolic values. The resulting output can be used to provide input to other algorithms that simplify the netlist describing the logic design or perform other types of processing. The techniques of the present invention apply symbolic values to the inputs of the logic, at least some of which are retained in the set of reachable states obtained as the output. The method first sets initial values of inputs in the logic design to corresponding symbolic values and simulates sequential operation of the logic design while collecting subsequent states of the logic design in a set of reachable states until a next state of the logic design is a first previous state already present in the set of reachable states. The states in the set of reachable states include values from the symbolic states that were applied to the inputs.
The foregoing and other objectives, features, and advantages of the invention will be apparent from the following, more particular, description of the preferred embodiment of the invention, as illustrated in the accompanying drawings.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives, and advantages thereof, will best be understood by reference to the following detailed description of the invention when read in conjunction with the accompanying Figures, wherein like reference numerals indicate like components, and:
The present invention encompasses computer-performed methods and programs for sequentially simulating digital logic circuits for verification and for netlist reduction/simplification. The computer-performed methods implement reachability analyses that explore the states that the logic can assume given a set of values at the inputs to the logic by simulating subsequent state behavior across the set of input value combinations of interest. However, rather than simulating using defined values from the set {TRUE, FALSE} or defined and unknown values from the set {TRUE, FALSE, unknown}, the present invention assigns symbolic values to at least some of the inputs to the logic, permitting the symbolic input values to propagate through the simulation if circuit node states are truly dependent on the symbolic input values, so that the output result of the reachability analysis contain at least some of the symbolic values. The symbolic values can then be used, along with the non-symbolic values in the results, to perform netlist reduction, as well as other logic simplification such as oscillator detection and modeling, transient node detection and chicken switch detection. The above-incorporated U.S. patent application provides detailed disclosure of such netlist reduction and logic simplification, using the output of the methods of the present invention, as well as alternative sources of information that provide analysis results that indicate symbolic relationships within the logic.
Referring now to
Other types of simplification/netlist reduction are performed according to specific techniques that have been developed for identifying particular circuit behaviors and simplifying the logic netlist to take advantage of the identified behaviors. In the flow chart, if a node is observed to be oscillating between two symbolic values, which includes oscillations between symbolic values or a symbolic value and a constant value (decision 22), then an oscillator model can be inserted in the netlist to replace the logic that was providing the node's state (step 23). Existing phase abstraction techniques can detect oscillators, but not oscillators that are dependent on other logic or the value of an input provided to the logic. Also, if a node quiesces to a stable symbolic value, including stable symbolic values, after an initial portion of circuit operation (decision 24), then a register representing the ultimate stable value can be inserted to represent the node (step 25). If the stable value is a constant, then the register is not needed and the stable value is replaced by the constant value, as in existing temporal decomposition techniques, which cannot detect transient signals that quiesce to stable values other than constants. The present invention also provides for chicken switch detection, which is not possible using the results of ordinary reachability techniques such as ternary simulation. Chicken switches are special configuration bits that are provided to the logic network at power-on. The values of the configuration bits are captured as the initial states of dedicated registers that hold the values of the configuration bits permanently while power is applied to the logic. Chicken switches can be difficult to detect in simulation due to complex logic surrounding the capture-and-hold register. However, using the techniques of the present invention, the dependence of values that are set by chicken switches on initial values of the logical circuit inputs can be detected (decision 26) and a register having the appropriate logic for deriving the chicken switch value inserted in the netlist (step 27). Until the last node of the netlist is analyzed (decision 28), the netlist processing of steps 21-28 is repeated for the next node (step 29). As mentioned above, further details of such processing is disclosed in the above-incorporated U.S. patent application, which can use results of reachability analyses performed with the techniques of the present invention as illustrated in step 20 of
Referring now to
In order to aid convergence and minimize the number of symbolic unknowns that must be represented by registers in subsequent netlist reduction and other circuit model simplifications, as mentioned above, the introduction of new symbolic values can be restricted to the initial iteration of the simulation algorithm. The above-described behavior is provided by the function simulate_and_introduce_new_symbols( ) that is only applied at time-zero. At all subsequent times, function simulate( ) which does not introduce new symbols. Further, if a new symbolic value has been introduced at any time during the simulation, a table can be maintained that stores the new symbolic value and its “parent” symbolic values that were AND-ed at a node to yield the new symbolic value. Then if the same AND condition is found by the simulation, the previously introduced new symbolic value can be used to label the node's value in the current state at step 39 of
Referring now to
Therefore, the logic simulated as shown in
Referring now to
As noted above, portions of the present invention may be embodied in a computer program product, which may include firmware, an image in system memory or another memory/cache, or stored on a fixed or re-writable media such as an optical disc having computer-readable code stored thereon. Any combination of one or more computer readable medium(s) may store a program in accordance with an embodiment of the invention. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the context of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
While the invention has been particularly shown and described with reference to the preferred embodiments thereof, it will be understood by those skilled in the art that the foregoing and other changes in form, and details may be made therein without departing from the spirit and scope of the invention.
The present U.S. patent application is related to co-pending U.S. patent application Ser. No. 13/______, entitled “LOGICAL CIRCUIT NETLIST REDUCTION AND MODEL SIMPLIFICATION USING SIMULATION RESULTS CONTAINING SYMBOLIC VALUES”, filed contemporaneously herewith, the disclosure of which is incorporated herein by reference.