Logic circuit with carry selection technique

Abstract: A logic circuit with a pipelined structure has a plurality stage of combinational circuits and memory circuits such as flip-flops connected among the pipeline combinational circuits. The pipeline combinational circuits constituting a logic circuit is operated at a cycle time shorter than a signal propagation time for the critical path of the pipeline combinational circuit. For the case of activation of the path not covered by this cycle time, another combinational circuit and its peripheral circuits are additionally provided for generating a correction signal. Another combinational circuit has substantially the same logic. The cycle time is determined so as to cover the critical path including another combinational circuit. A comparator circuit compares an output signal of another combinational circuit and an output signal of the combinational circuit. If both the signals are not coincident, a selector is controlled to correct the signal by using the output signal of another combinational circuit.

Description: Background of the Invention 1. Field of the Invention The present invention generally relates to a logic circuit. The invention particularly relates to a logic circuit with a pipelined structure , capable of shortening a cycle time of an operation clock of logic LSI's such as microprocessors and DSP's (digital signal processors) and improving a processing speed of the logic circuit. 2. Description of the Related Art A logic circuit is mainly divided into a combinational circuit in which a change in an input signal propagates toward the output and influencing an output signal value and a sequential circuit or a memory circuit with a function of holding a value or changing a held value in response to a control signal such as a clock signal. The combinational circuit includes fundamental logic elements (e.g., AND gates and NOT gates) having a function of arithmetic operation. The memory circuit may be a flip-flop, a latch, or the like. In order to obtain a high performance of logic LSI's such as microprocessors and DSP's, in addition to parallel processing, the shortening of an operation cycle is carried out. In order to shorten the operation cycle of a logic LSI, it is essential to shorten the operation cycle of a logic circuit which is a main constituent of the logic LSI. The operation cycle of a logic circuit has been conventionally shortened by development of semiconductor device technology and by utilizing the leading edge circuit technology such as dynamic circuits. In order to meet the market needs, high speed processing is required. To this end, recently, logic circuits are pipelined to shorten the operation cycle. Fig. 1 shows a general logic circuit having a simple pipelined structure. This logic circuit has a combinational circuit 803 as a pipeline arithmetic circuit (first stage) and flip-flops 804 and 805 connected to the input and output sides of the combinational circuit 803 for holding signals. At the rising edge of a clock signal CK, the flip-flops 804 and 805 input (sample) an input signal 801 and an output signal 807 from the combinational circuit 803, the held signals being output to the combinational circuit 803 and the next stage combinational circuit (second stage) 813 as signals 806 and 802, respectively. The clock signal CK periodically changes its value at a preset cycle time. A general logic circuit operates synchronously with this clock. Fig. 2 shows a clock signal waveform input to a logic circuit such as shown in Fig. 1. A cycle time of a logic circuit using a flip-flop operating in response to the rising edge of an input clock is illustrated in Fig. 2. A time required for a change in an input signal to the combinational circuit to reach an output signal is called a signal propagation delay or a signal propagation time. This signal propagation time changes greatly depending on the circuit conditions and the way an input signal changes. A signal path with a longest signal propagation time is called a critical path of the circuit. In order to guarantee a circuit normal operation, the cycle time of a logic circuit is required to be set longer than the signal propagation time of the critical path of the circuit. This signal propagation time of the critical path sometimes contain a signal propagation time of a memory circuit such as a latch, depending upon circuit design. Conventional design of a logic circuit has tried to shorten the signal propagation time of the critical path of the circuit in order to shorten the cycle time. However, there is a limit in merely shortening the cycle time of the operation clock by shortening the signal propagation time of the critical path of a logic circuit. New technology for realizing a faster logic circuit has therefore been desired. As above, if the logic circuit is pipelined, the arithmetic operation cycle can be shortened and the throughput of arithmetic operation is improved. However, a time from an arithmetic operation start to when the arithmetic results can be used, i.e., so-called latency, becomes large. In general processes, there are a number of processes which use the arithmetic results of the preceding stage arithmetic operation. Therefore, even if the logic circuit is pipelined and the operation cycle is shortened, this effects are not satisfactory from the viewpoint of performance. EP-A-0 136 939 discloses an arithmetic and logic unit using means for detecting a carry propagation greater than a predetermined number of consecutive bit positions to cause a stretching of the clock cycle. Publication "Proceedings of the International Symposium on Circuits and Systems (ISCS), Chicago, May 3-5, 1993, vol. 3 OF 4,3 May 1993, Institute of Electrical and Electronics Engineers, pages 1841-1844, XP000390048 Unwalaih et al.: 'Superpipelined Adder Designs'" discloses a logic circuit having a pipeline structure including at least a plurality of combinational circuits and a flip-flop electrically coupled between the combinational circuits, and a high-speed arithmetic result generator for receiving high-speed intermediate arithmetic results from a combinational circuit during calculation among the plurality of combinational circuits, and generating and outputting high-speed arithmetic results. However, this publication does not disclose a decision circuit for judging from the type of calculation whether said high-speed arithmetic results are valid, and accordingly does not disclose outputting a decision signal. SUMMARY OF THE INVENTION It is an object of the present invention to provide a logic circuit of a pipelined structure having a short operation cycle and a short averaged latency of arithmetic operations. According to the present invention, the object is attained by a logic circuit as specified in claim 1. Improvements thereof are specified in further claims being dependent on claim 1. According to the invention, a logic circuit is comprising a pipeline combinational circuit 100 as illustratively shown in Fig. 3A. The pipeline combinational circuit 100 having a plurality of sections (110a, 110b, 110c, 110d,...), each section is arranged at bit positions of data to be calculated by the pipeline combinational circuit 100. And the arithmetic results with and without a carry input are generated at each section, and a carry-select addition is performed for selecting the arithmetic results in accordance with a carry signal from the lower section, and final addition/subtraction results are generated through pipeline processing. Further, the logic circuit of Fig. 3A comprising: a high-speed arithmetic results generator 300 constituted by a group of selectors (310a, 310b, 310c, 310d,...), each selector being provided for each section (110a, 110b, 110c, 110d) in the pipeline combinational circuit 100, the selector inputting the arithmetic results with and without the carry input generated at each section and selecting the arithmetic results in accordance with the lower section carry signal, wherein the arithmetic results selected by the selector are output as intermediate addition/subtraction results 9. Generally, the operation time of addition/subtraction largely depends upon operand data. Although depending upon the circuit configuration, the operation time is generally long as the carry propagation delay during addition/subtraction is long. The arithmetic results for operand data with short carry propagation delay can be generated in a short time. Therefore, for such operand data, the operation cycle of the whole circuit is not affected and the arithmetic results can be output at an earlier pipeline stage. It is known that most of addition/subtraction calculations have short carry propagation delay during the calculations. For example, in the case of addition/subtraction of 32-bit length, 90 % or more of calculations has carry propagation of 8 bits or smaller. Therefore, the arithmetic circuit of this invention has a short operation cycle and the arithmetic results can be output with small latency in most cases. High speed calculation for a certain type of operand is also applied to other calculations such as comparison and shift calculations to which the invention is also applicable. Other and further objects and features of the present invention will become obvious upon an understanding of the illustrative embodiments about to be described in connection with the accompanying drawings or will be indicated in the appended claims, and various advantages not referred to therein will occur to one skilled in the art upon employing of the invention in practice. Brief Description of the Drawings Fig. 1 is a block diagram showing a conventional logic circuit with a pipelined structure. Fig. 2 shows the waveform of a clock input to the logic circuit shown in Fig. 1. Fig. 3A is a block diagram showing the specific and detailed structure of a 32-bit adder/subtractor according to the fourth embodiment of the invention. Fig. 3B is a block diagram showing a decision circuit for the 32-bit adder/subtractor shown in Fig. 12A. Fig. 4 is a block diagram showing a logic circuit according to a further embodiment of the present invention. Fig. 5 is a block diagram showing a logic circuit according to a further embodiment of the present invention. Fig. 6 is a block diagram showing a logic circuit according to a further embodiment of the present invention. Detailed Description of the Embodiments Preferred embodiments of the present invention will be described with reference to the accompanying drawings. It is to be noted that the same or similar reference numerals are applied- to the same or similar parts and elements throughout the drawings, and the description of the same or similar parts and elements will be omitted or simplified. Fig. 3A shows a specific structure of the logic circuit of the fourth embodiment of the invention. The logic circuit shown in Fig. 3A is a 32-bit adder/subtractor circuit. In the pipeline structure of this 32-bit adder/subtractor circuit, the first stage pipeline combinational circuit 100 is divided into four circuit sections each constituted by 8 bits. Reference numerals 110a,110b, 110c, and 110d represent a circuit section for executing 8-bit addition and subtraction, and each circuit section generates arithmetic results 44 with a carry input and arithmetic results 43 without a carry input. At the same time, each circuit section generates a carry output 41 for the arithmetic results 44 and a carry output 42 for the arithmetic results 43. The arithmetic results 43 and 44 are selected by each of selectors 310a, 310b, 310c, and 310d constituting a high-speed arithmetic results generator 300, in accordance with a carry output signal 51 from the lower bit stage circuit section, to thereby output the intermediate arithmetic results 9. The carry output signal 51 is an carry output associated with the arithmetic results at the circuit section without a carry input. The selectors 310a, 310b, 310c, and 310d select the arithmetic results 43 when the signal 51 takes a value "0" i.e., when there is no carry. Therefore, for the operand data with a carry propagation at the 8th bit or lower, the intermediate arithmetic results 9 are output as valid arithmetic results. The arithmetic results of the 8-bit adder/subtractor circuit 110 are fetched by the flip-flop 200 at the final operation cycle, and supplied to along carry generator and final add/subtract results generator 120. This generator 120 calculates the total carry propagation to select the proper arithmetic results and output the final arithmetic results 8. The final arithmetic results 8 and intermediate arithmetic results 9 may be selected by a selector 500 by using the decision signal 7 of the decision circuit 400 or may be selected by another circuit structure, to thereby output the proper arithmetic results to the second stage combinational circuit. Fig. 3B shows an example of the decision circuit 400 of the adder/subtractor circuit shown in Fig. 3A. A decision signal 7 of "1" indicates that the intermediate arithmetic results are invalid. An input to this decision circuit is a carry output of the 8-bit adder/subtractor circuit section 110a, 110b, 110c, 110d shown in Fig. 3A. C 1 n represents a carry output from the n-th bit of the arithmetic results when there is a carry input to the circuit section. C°n represents a carry output from the n-th bit of the arithmetic results when there is no carry input to the circuit section. If C 1 n is "1" and C 0 n is "0", this section is in a carry propagation state. If the consecutive two circuit sections are in the carry propagation state, the intermediate arithmetic results are invalid. The adder/subtractor circuit shown in Fig. 3A is pipelined so that it operates with a short cycle time. If the carry propagation is eight bits or smaller, the arithmetic results are output at the first stage of the pipeline. In the case of addition and subtraction, the carry propagation during calculations of most operands is eighth bits or smaller. Therefore, this adder/subtractor circuit operates with small latency in most cases. Fig. 4 is a block diagram of a logic circuit according to the invention. A high-speed arithmetic results generator 300 of the logic circuit shown in Fig. 4 directly receives operand data signals 1 and 2 and generates high-speed arithmetic results 9. Although the structure having the independent high-speed arithmetic results generator 300 increases the circuit scale, the arithmetic results 8, 9 can be obtained faster so that further optimization becomes possible. Fig. 5 is a block diagram of a logic circuit according to the invention. In this logic circuit shown in Fig. 5, the first stage pipeline combinational circuit 100 is used also for the high-speed arithmetic results generator 300. Depending upon the type of calculation, the main intermediate arithmetic results of the pipeline combinational circuit 100 can be output as the high-speed arithmetic results 9. In such a case, the logic circuit shown in Fig. 5 can suppress an increase of hardware and the arithmetic results can be obtained at high speed. Fig. 6 is a block diagram of a logic circuit according to the invention. A decision circuit 400 of the logic circuit shown in Fig. 6 directly receives operand data signals 1 and 2 and generates a decision signal 7. Depending upon the type of calculation, whether the high-speed arithmetic results 9 are valid can be determined from operand data 1, 2. In such a case, as shown in Fig. 6, intermediate arithmetic signals are not used and the decision circuit 400 with an independent structure can generate the decision signal 7 quickly. Various modifications will become possible for those skilled in the art after receiving the teachings, of the present disclosure without departing from the scope thereof. For example, as the means for judging whether the signal is sampled after the necessary signal propagation time, a circuit other then the decision circuit may be used. For example, an asynchronous circuit or the like generates a signal indicating the end of the circuit operation. Such a signal may be used as the judging means. A path for a generated correction signal may have one flip-flop or two latches. In other words, this path operates by two cycles. The number of flip-flops or latches is not limited to the above embodiments, but it may be increased to operate the logic circuit with a shorter cycle time. The logic circuit may be operated with a shorter cycle time than the signal propagation time for the critical path length. If a path not covered with this cycle time is activated, the time is required for correcting the output signal. A penalty for correction may require one cycle. The number of cycles of the penalty for correction becomes different depending upon the circuit designs and the fabrication methods and is not limited to the embodiments. If the number of stages of signal generator means is increased, a time assigned to the path for the signal generator means is prolonged although the number of penalty processes increases. Therefore, the number of stages of signal holding means is determined so as to realize a fastest process speed. In the embodiments of the invention, an output timing of the decision signal is not described. It is desired to output the decision signal quickly from the viewpoint of system configuration. Even if the decision signal is output after high-speed arithmetic results are output, it is possible to configure a suitable system.

Claims: A logic circuit having a pipelined structure, comprising a plurality of combinational circuits (110a-d) for performing arithmetic operations, each of said combinational circuits generating intermediate arithmetic results; flip-flops (200) for holding said intermediate arithmetic results of the arithmetic operations performed by said combinational circuits (110a-d), said flip-flops being electrically coupled between said combinational circuits and a final result generator circuit (120) generating an arithmetic final result (8) in response to said intermediate arithmetic results stored in said flip-flops (200); and a high-speed arithmetic result generator (300) for receiving said intermediate arithmetic results from said combinational circuits (110a-d) during calculation, and for generating a second arithmetic final result (9); said logic circuit further comprising a decision circuit (400) supplied with intermediate carry signals from said intermediate arithmetic results generated by said plurality of combinational circuits (110a-d), said intermediate carry signals indicating the carry propagation state of consecutive combinational circuits, for judging from said carry propagation state during calculation whether said second arithmetic final result (9) is valid, and outputting a decision signal (7) ; and selecting means (500) electrically coupled to said high-speed arithmetic result generator (300) and said final result generator circuit (120), for generating a final operation result in accordance with said decision signal (7) received from said decision circuit (400); wherein each of said combinational circuits (110a-d) generates intermediate arithmetic results in the assumption there is a carry input and in the assumption there is no carry input; and said high-speed arithmetic result generator (300) generates and outputs said second arithmetic final result (9) in the assumption there is no carry output. A logic circuit according to claim 1, wherein said high-speed arithmetic result generator (300) comprises a plurality of selectors (310a-d) for each of said plurality of combinational circuits (110a-d), said selectors receiving arithmetic results with and without the carry input generated at each of said combinational circuits, selecting said arithmetic results in accordance with a carry signal (51) form a lower bit stage circuit section and outputting the arithmetic result selected by said selector as intermediate addition/subtraction result. A logic circuit according to any of the preceding claims, wherein said flip-flops (200) fetch the arithmetic results of the combinational circuits (110a-d) at the final operation cycle and supply the arithmetic results to said final result generator circuit (120) which calculates the total carry propagation to select the proper arithmetic results for outputting the final arithmetic result (8). A logic circuit according to any of the preceding claims, wherein said selecting means (500) are provided to select said arithmetic final result (8) or said second arithmetic final result (9) in response to said decision signal (7) so as to generate the final operation result.

Inventors: KONDO YOSHIHISA, KONDO, YOSHIHISA
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1996
Main classification: G06F7
IPC codes: G06F7