Simulating multi-phase clock designs using a single clock edge based system
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to digital circuits and digital circuit simulation systems and, more particularly, to digital circuits and digital circuit simulation systems which convert a multiple-phase level-sensitive design into a single-clock-edge based system. 
     2. Description of the Related Art 
     The design and development of electronic circuits includes the task of building and testing a system prototype. The system prototype may take the form of a breadboard circuit having various degrees of similarity in form and function to the target circuit, a simulated circuit operating on a general purpose computer system, a hardware simulator or emulator and the like. A prototype is generally useful if it is constructed in a suitable time for a reasonable cost, so long as the prototype effectively mimics the function of the target circuit. 
     The design of highly complex electronic circuits and systems includes an analysis of circuits that contain a large number of active elements. For LSI and VLSI circuits, examination of the total system response involves simulation of hundreds of thousands of circuit elements. Typically simulation of complex circuits is accomplished using a hierarchical approach by analyzing circuits at different levels of abstraction, including simulations at architectural, behavioral, functional, logic and transistor levels. At the architectural level, the abstract definition of the architecture of the circuit is analyzed to set a guideline for the various ways of accomplishing the objective of the circuit. At the behavioral level of simulation, major blocks of the circuit are defined and their interactions are catalogued to examine the details of the overall data or control flow for accomplishing the objective of the circuit. The functional level of simulation describes the overall logical response of the major blocks in the circuit to relate the logical input parameters to output parameters while not considering the details of the internal realization of the logic within the block. The logic level of simulation analyzes each block at the gate level, minimizes logic and in some cases introduces the concept of relative timing. The transistor level simulation examines the transient response of the circuit, including the detailed emulation of all elements within the circuit. Usefulness of the hierarchical simulation is determined by the ability to mix the different levels of abstraction to examine the performance of the entire circuit while analyzing the detailed interactions of circuit elements one block at a time. 
     Certain simulators, emulators and verification tools update system changes on clock cycle by clock cycle basis. These tools, called cycle-based, edge-triggered, latched or edge-based systems, pass information on the falling or rising edge of a clock signal. These tools accurately reflect the performance of the circuit design by allowing only very simple clocking arrangements, usually a single-clock system which supports edge-triggered flip-flops. In a single clock edge trigger system, all sequential elements are updated during each clock cycle. Latches are inherently transparent so that changes to signals on input lines of a latch are immediately expressed on the latch output lines. A typical single-clock edge triggered system 100, shown in FIG. 1, employs edge-triggered flip-flops 102 and 104 as basic sequential circuit elements which control circuit timing of interspersed combinational logic 106. A single-clock edge triggered system 100 is timed using a simple single phase clocking scheme, which is depicted in FIG. 2. This clocking scheme does not allow clock gating. 
     An alternative to edge-based designs are level-sensitive designs. A level-sensitive device, also referred to as a transparent device, transfers information while the clock signal is active. A level-sensitive device updates its output information during the relatively long period of time of clock activity in contrast to an edge-triggered device which updates its output information during the small sampling of time that is centered around the edge of the clock signal. 
     Usage of typical edge-based simulation and emulation tools is advantageous for various reasons. Edge-based tools are simpler and therefore more efficiently perform each operation. Accordingly, edge-based tools emulate larger circuit designs and perform this emulation much more quickly. 
     Large microprocessors and other complex system designs operate on a multiple-phase clock, resulting in an enhanced performance. In a multi-phase clock system, sequential elements are conditionally updated on selected phases of a clock cycle. A multi-phase clock based system 300, shown in FIG. 3, advantageously uses multiple clock edges generated by out-of-phase clock signals of a single clock cycle to drive combinational logic blocks, for example combinational logic blocks 320, 322 and 324, in higher performance circuits. Various enhancements are made to achieve system improvements. For example, back-to-back latches of the same phase 302 and 304, or a latch 306 which is updated on a specific conditional signal (for example, a condition signal from combinational logic block B 324 which is AND gated with an phase clock signal using AND gate 310) are implemented to reduce the number of circuit elements in a system, thereby reducing the size of the system 300. A multiple-phase clock system 300 is timed using a multiple-phase clocking scheme, which is depicted in a timing diagram shown in FIG. 4A and FIG. 4B. 
     Unfortunately the multiphase functionality of such complex systems typically does not allow simulation or emulation on a single-clock-edge based tool. In multiple-phase circuit operation, certain elements are updated only on particular phase clock edges. However, in a single-clock-edge based tool all sequential elements must be updated during each clock cycle. Furthermore, conditional updating of latches, which is extremely useful in a multiple-phase design, is not supported in a single-clock-edge based system because such updating violates the requirement that all sequential elements are updated on every designated transition of a clock edge. 
     SUMMARY OF THE INVENTION 
     The present invention advantageously converts a multiple-phase circuit to a single-clock-edge circuit. 
     The present invention advantageously emulates a multiple-phase circuit using a single-clock-edge test system such as a circuit emulators, simulators, cycle-based simulators, event-driven simulators. The speed of the test system is greatly accelerated by avoiding &#34;dead&#34; time between clock edges during which various circuits are idle. 
     Furthermore, the present invention implements logic condition signals which determine whether a latch is loaded. Conditional updating of sequential elements is prohibited in a conventional edge-based system. 
     Additionally, the present invention implements back-to-back latches in which sequential elements enabled by the same phase clock are connected by combinational logic and updated simultaneously within a single phase cycle. Back-to-back connection of sequential elements is prohibited in a conventional edge-based system. 
     Thus in accordance with a first embodiment, an apparatus converts a multiple-phase circuit to a single-clock-edge circuit. The apparatus includes a first control switch having a data terminal connected to receive a data signal, a feedback terminal connected to receive a feedback signal, a control terminal connected to receive a phase clock signal having a phase clock frequency and an output terminal. The apparatus also includes a latch having an input terminal connected to the first control switch output terminal, an output terminal supplying a latched data signal connected to the first control switch feedback terminal and a clock terminal connected to receive a system clock signal having a system clock frequency which is a multiple of the phase clock frequency. The apparatus further includes a second control switch having a first data terminal connected to receive the data signal, a second data terminal connected to the output terminal of the latch, a control terminal connected to receive the phase clock signal and an output terminal. 
     In accordance with a second embodiment, there is furnished a method for converting a multiple-phase circuit to a single-clock-edge circuit which includes the steps of receiving a data signal at an input terminal, receiving a system clock signal having a system clock frequency and receiving a phase clock signal having a frequency divided from the system clock frequency. The data signal is transferred to an output terminal when the phase clock signal is active and latched upon the occurrence of an edge transition of the system clock signal when the phase clock signal is active. When the phase clock signal is inactive, the latched data signal is latched again upon the occurrence of the edge transition of the system clock signal. The latched data signal is transferred to the output terminal when the phase clock signal is inactive. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the figures, in which like reference characters indicate like parts: 
     FIGS. 1 and 2 respectively illustrate a block diagram and a timing diagram of a prior art single-clock-edge triggered system; 
     FIGS. 3, 4A, and 4B respectively illustrate a block diagram and a timing diagram of a prior art multiple-phase system; 
     FIG. 5 illustrates a circuit diagram of a multiple-phase latch mapping circuit in accordance with the present invention; 
     FIG. 6 illustrates a circuit diagram of a conditional multiple-phase latch mapping circuit in accordance with the present invention; 
     FIG. 7 depicts an example of a portion of a circuit including various multiple-phase latch mapping circuits and having interspersed combinational logic circuits; and 
     FIGS. 8A through 8F is a timing diagram which illustrates exemplary signals on various lines of the circuit portion shown in FIG. 7. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT 
     Referring to FIG. 5, a multiple-phase latch mapping circuit 500 for converting a multiple-phase circuit to a single-clock-edge circuit or for emulating a multiple-phase circuit using a single-clock-edge simulator includes an edge-sensitive flip-flop 502, an input multiplexer 506 and a output multiplexer 508. Input signals to the multiple-phase latch mapping circuit 500 include an A signal on an A input line 510 and a phase clock signal via a control line 514. An output signal Y is generated by the multiple-phase latch mapping circuit 500 and furnished on an output line 518. A phase generator 530 generates a phase clock signal from a system clock signal. 
     The multiple-phase latch mapping circuit 500 is used to convert a multiple-phase circuit to a single-clock-edge triggered circuit. Alternatively, the multiple-phase latch mapping circuit 500 is used to emulate a multiple-phase circuit in a single-clock-edge triggered test system such as circuit emulators, simulators, cycle-based simulators, event-driven simulators. 
     The input multiplexer 506 serves as a first control switch which receives two data signals including the A signal on A input line 510 and a feedback signal on feedback line 512. The input multiplexer 506 receives the phase clock signal, which serves as an enable signal, on control line 514. The input multiplexer 506 passes a signal selected between the A signal and the feedback signal to the D input terminal of edge-sensitive flip-flop 502. The enable signal on control signal 514 determines whether the input multiplexer 506 passes the A signal or the feedback signal to the edge-sensitive flip-flop 502. For example, when the enable signal is a logic &#34;1&#34; the input multiplexer 506 transfers the A signal to the D input terminal of edge-sensitive flip-flop 502. Otherwise, the feedback signal is selected and applied to the D input terminal of edge-sensitive flip-flop 502. 
     The edge-sensitive flip-flop 502 is a D flip-flop which passes a signal which is received on a D input terminal to a Q output terminal when a rising edge is detected on a clock input CLK of the D flip-flop. In the illustrative embodiment of the circuit 500, the clock signal applied to the clock input CLK is a system clock signal having a frequency which is a multiple of the phase clock signal frequency. For example, in some embodiments the system clock frequency is twice the phase clock frequency. The edge-sensitive flip-flop 502 serves to hold the level of a signal which is associated with a particular phase, for example phase φ 1 , of a multi-phase clock system throughout a full cycle of the phase φ 1 , despite multiple intervening system clock transitions. A typical circuit or simulation of a circuit includes several multiple-phase latch mapping circuits 500. 
     The output multiplexer 508 serves as a second control switch which receives two data signals including the A signal on input line 510 and a signal received from the Q output terminal of edge-sensitive flip-flop 502. The output multiplexer 508, like the input multiplexer 506, is controlled by the enabling phase clock signal on control line 514. The output multiplexer 508 generates a Y signal, an output signal of the multiple-phase latch mapping circuit 500, on output line 518. The enable signal on control line 514 controls the transfer, by output multiplexer 508, of either the A signal 510 or the signal from the Q output terminal of the edge-sensitive flip-flop 502 to the output line 518. For example, the output multiplexer 508 generates the Y signal on output line 518 which is equal to the A signal when the enable signal on control line 514 is a logic &#34;1&#34; and which is equal to the signal on the Q output terminal of the edge-sensitive flip-flop 502, otherwise. 
     The signal from the Q output terminal of the edge-sensitive flip-flop 502, in addition to being communicated to an input terminal of the output multiplexer 508, is fed back to feedback line 512 as the feedback signal to the input multiplexer 506. 
     The edge-sensitive flip-flop 502 is a latch which is typically used in a single-clock-edge triggered circuit. Such a latch has an input terminal, an output terminal and an enable terminal. A signal at the input terminal is passed to the output terminal on a selected edge of the a clock signal, for example the falling edge of the clock signal, which is applied to the enable terminal. To convert a multiple-phase circuit such as multiple-phase latch mapping circuits 500 to a single-clock-edge triggered circuit, the input multiplexer 506 is applied to the input terminal of the edge-sensitive flip-flop 502 and the output multiplexer 508 is applied to the output terminal of the edge-sensitive flip-flop 502. The output multiplexer 508 selects the A signal on input line 510 for transfer to output line 518 when the enable signal on control line 514 is activated, for example a data &#34;1&#34;. 
     When the enable signal on control line 514 is inactivated, for example by a data &#34;0&#34; value, the data value that was last latched into the edge-sensitive flip-flop 502 by the edge of the system clock signal. Thus, even though a suitable A signal is not available on input line 510 when the enable signal is inactivated, appropriate data is available via storage by the edge-sensitive flip-flop 502. 
     Referring to FIG. 6, an embodiment of a conditional latch mapping circuit 600 is shown which includes all of elements of the multiple-phase latch mapping circuit 500 and further incorporates an AND gate 602. AND gate 602 furnishes conditional activation of an input signal to selection switch multiplexers 506 and 508. The AND gate 602 is connected to receive two input signals, a phase signal φ 1  and a conditional signal on conditional input line 604. The AND gate 602 generates an enable signal EN on control line 514, which conveys the result from AND gate 602 to control terminals of input multiplexer 506 and output multiplexer 508. Thus, logical condition signals are used to control conditional loading of the edge-sensitive flip-flop 502 while the edge-sensitive latch continues to update on each system clock cycle. In this manner, the practical limitation of edge-based systems prohibiting conditional operation, is avoided. 
     The logical condition signal on conditional input line 604 is supplied from various sources. Combinational logic typically supplies the logical conditional signal. However, external signals and other suitable signals are commonly used as logical condition signals. 
     A typical circuit or emulation of a circuit includes several conditional latch mapping circuits 600. In this manner, conditional latch mapping circuits 600 are updated in accordance with specific conditional signals with the timing of such updating appropriately controlled with respect to multiple phase timing signals. 
     FIG. 7 illustrates an example of a portion of a circuit 700 which includes various multiple-phase latch mapping circuits 500, 704 and 706. The multiple-phase latch mapping circuit 500 is also depicted in FIG. 5. The circuit portion 700 also includes interspersed combinational logic circuits A 710, B 712 and C 714. Two phases, φ 1  and φ 2 , of a multi-phase clock signal are routed as data signals to various circuits of multiple-phase latch mapping circuits 500, 704 and 706. Two of the multiple-phase latch mapping circuits 500 and 704 are actuated by the φ 1  signal. Multiple-phase latch mapping circuit 706 is conditionally actuated by the φ 2  signal. In the exemplary circuit 700, the conditional signal upon which the response of conditional latch 706 is dependent is generated by circuits within combinational logic circuit C 714. In other exemplary embodiments, conditional signals may be generated in any suitable manner and may arise externally with respect to the circuit 700. 
     With regard to the multiple-phase operation of circuit 700, under control of multiple-phase latch mapping circuit 500 a transition of signal A on a signal line 720 is applied to combinational logic B 712 upon the occurrence of a designated level of phase φ 1  signal, for example a logic &#34;1&#34; level. Combinational logic B 712 generates a signal which is applied to combinational logic C 714 through the operation of multiple-phase latch mapping circuit 704 which propagates the signal from combinational logic block B 712 to a signal line 722. Combinational logic C 714 generates a signal C on signal line 724 and a condition signal COND. The condition signal COND and phase φ 2  signal are applied to AND gate 730 and the result of the AND operation is applied as an enable signal to multiple-phase latch mapping circuit 706. Signal C on signal line 724 is propagated to the output of circuit 706 upon the occurrence of a designated level of phase φ 2  signal, for example the logic &#34;1&#34; level (provided the COND is true) and applied to the combinational logic A 710 to generate the signal A on signal line 720. This propagation of signals occurs in one cycle of each phase clock φ 1  and φ 2 . 
     Latch mapping circuits 500 and 704 include latches which are considered &#34;back-to-back&#34; latches in which two phase φ 1  sequential elements are connected by combinational logic. Thus, the two phase φ 1  sequential elements are updated simultaneously within a single phase cycle. 
     An exemplary circuit (not shown) which is similar to the circuit 700, wherein a phase φ 1  timing signal is applied to mapping circuit 706, achieves a circuit in which all signals A, B and C are updated during the same phase cycle. A circuit or emulated circuit which operates in this manner is much faster than a system which steps through a chain of sequential logic one block per cycle. 
     Referring to FIGS. 5 and 7, a timing diagram in FIGS. 8A through 8F illustrates exemplary signals on various lines of the circuit portion 700 shown in FIG. 7. The circuit portion 700 includes a plurality circuits which are the same as the multiple-phase latch mapping circuit 500 shown in FIG. 5. A high frequency system clock signal (CLK) 800 supplies the system clock input signal to edge-sensitive flip-flop 502. A phase one (φ 1 ) signal 802 is the enable signal on control line and is applied to control the selection multiplexers 506 and 508. A signal 804 is applied on A input line 510 to the input terminals of the selection multiplexers 506 and 508. Signal 804 is clocked into the flip-flop 502 upon the falling edge of the system clock CLK 800 to provide a feedback signal (not shown), which is communicated on the feedback line 512 and applied to the feedback input terminal of input multiplexer 506. An output signal Y is generated by the multiple-phase latch mapping circuit 500 in response to the input signal A 804 and the enable signal φ 1  802 and is applied to combinational logic block B 712. The state of the output signal Y is maintained by flip-flop 502 after the enable signal φ 1  returns to logical 0. Combinational logic block B 712 generates a signal which is propagated by latch mapping circuit 704 to generate the signal B 806 on B signal line 722. Signal B 806 reflects signal transitions of signal A 804. 
     In this example, the high frequency system clock signal 800 is divided into two phases φ 1  802 and φ 2  808. One rising edge of the system clock corresponds to the phase φ 1  signal 802. The subsequent rising edge of the system clock corresponds to the phase φ 2  signal 808 and phase signals φ 1  and φ 2  alternate thereafter. Each of phase φ 1  signal 802 and phase φ 2  signal 808 has a frequency which is half the high frequency system clock signal 800. The two phase signals φ 1  and φ 2  have a mutual phase difference of 180°. Two phases are illustrated for simplicity of explanation. It is to be understood that the multiple-phase latch mapping circuit 500 operates in the same manner for additional multiples of clock phases. 
     Edge-sensitive flip-flop 502 latches the signal selected by input multiplexer 506 on every falling edge of the system clock signal 800. This latched signal at the Q output terminal of edge-sensitive flip-flop 502 is immediately fed back to the input multiplexer 506. The input multiplexer 506 selects the input signal A 804 when the phase φ 1  signal is a logic &#34;1&#34; and otherwise selects the signal on the feedback line 512. 
     Thus, the edge-sensitive flip-flop 502 fulfills the requirement of an edge-based system that all sequential elements are updated on every system clock cycle. However, the data value on the output signal line 518 is latched and thereby held for the duration of the phase φ 1  cycle so that multiple-phase operation is achieved. Similarly, conditional updating of latches is achieved in the manner shown in FIG. 6 and by the AND gate 730 shown in FIG. 7 by ANDing the phase signal, such as phase φ 1  signal, with a conditional signal so that the system clock signal continuously updates all sequential elements on every designated transition of a clock edge. 
     When the A signal 804 is a logic &#34;0&#34; for a full cycle of the φ 1  clock or more, the multiple-phase latch mapping circuit 500 is placed in a condition in which the A signal 804 and the feedback signal are a logic &#34;0&#34;. When the A signal 804 takes the value of a logic &#34;1&#34;, input multiplexer 506, when actuated by a logic &#34;1&#34; level of the φ 1  signal 802, passes the A signal logic &#34;1&#34; value to the D terminal of edge-sensitive flip-flop 502. At the same time, output multiplexer 508, which is also actuated by the logic &#34;1&#34; level of the φ 1  signal 802, passes the A signal logic &#34;1&#34; value to the output terminal 518 to communicate the output signal Y. 
     Edge-sensitive flip-flop 502 latches the A signal logic &#34;1&#34; on the falling edge of the system clock signal 800, thereby passing the A signal logic &#34;1&#34; to the Q output terminal. At this time, φ 1  signal 802 takes the value of a logic &#34;0&#34; so that the signal passed by output multiplexer 508 is the logic &#34;1&#34; from the Q output terminal of the edge-sensitive flip-flop 502. In this manner, output signal Y expresses a logic &#34;1&#34; value for two half-cycles of high frequency system clock signal (CLK) 800. 
     The logic &#34;1&#34; data value from the edge-sensitive flip-flop 502 Q output terminal is communicated to the input multiplexer 506 on feedback line 512, which applies feedback signal to the D terminal of edge-sensitive flip-flop 502 since φ 1  signal 882 has a logic &#34;0&#34; value. The logic &#34;1&#34; of feedback signal is thereby passed to output multiplexer 508 and output terminal 518 as output signal Y. In this manner, an A signal 804 is held for a full cycle of high frequency system clock signal (CLK) 800. Output signal Y holds a particular logic level until the alternative logic level is presented on A signal 804 and actuated by φ 1  signal 802. 
     An output signal B 806 generated by the multiple-phase latch mapping circuit 704 in response to the output of combinational logic B 712 and enable signal φ 1  802 is applied to combinational logic block C 714. Combinational logic block C furnishes a data signal to multiple-phase latch mapping circuit 706, which generates a signal C 810 on C signal line 724. Signal C 810 reflects signal transitions of signal B 806 as processed in combinational logic C 714 and shifted by about a 180° phase delay resulting from application of the phase φ 2  signal 808 to the mapping circuit 786. Signal C 810 is the depicted result when the condition signal COND is assumed to have the value of a logic &#34;1&#34; and thus enables the mapping circuit 706. 
     While the invention has been described with reference to various embodiments, it will be understood that these embodiments are illustrative and that the scope of the invention is not limited to them. Variations, modifications, additions and improvements of the embodiments described are possible. The illustrative embodiments are applicable to circuits as well as to emulation systems, simulation systems and other test systems. The number, arrangement and interconnection of latches may be varied. Moreover, various numbers of phases may be employed in a multi-phase circuit. In addition, Furthermore, the logic level &#34;0&#34; and logic level &#34;1&#34; may be interchanged for most of the circuits. Furthermore, although the illustrative embodiment shows a system clock which is divided into only two phases, φ 1  and φ 2 , to simplify the description of the multiple-phase latch mapping circuit, the system clock may also be divided into additional phase clock signals φ 3  to φ n , where n is an arbitrary positive integer. These and other variations, modifications, additions and improvements may fall within the scope of the invention as defined in the claims which follow.