Logic unit circuit and adder circuit
Through logic circuit sharing technology, the adder circuit structure is simplified and the logic gate is replaced, which solves the problem of high power consumption at high rates, and achieves circuit performance with lower power consumption and faster frequency.
Patent Information
- Application Number
- CN202390000070.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Utility models(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2033-09-08
AI Technical Summary
While pursuing high speeds, existing adder circuits are difficult to effectively reduce power consumption, and the topology is complex, resulting in high area and power consumption, making it difficult to balance the relationship between power consumption and rate.
The logic circuit sharing technology is adopted to replace the XOR gate with nand and oai gates, simplify the circuit structure, reduce the number of logic gates, and realize the logic operation unit circuit of P logic and G logic, reducing the circuit area and delay.
The area and delay optimization of the adder circuit is achieved, with lower power consumption, better relationship between power consumption and rate, faster circuit operation frequency and better performance.
Smart Images

Figure CN222014739U_ABST
Abstract
Description
Technical Field
[0001] The present application relates to but is not limited to digital circuit technology, and in particular to a logic unit circuit and an adder circuit. Background Art
[0002] As the most basic logic operation unit, adders are widely used in various types of processors. In the circuit system, adders are mainly responsible for calculation, indexing, etc. Moreover, adders are also important components of other hardware logic operation units such as multipliers and subtractors. Adders can be classified according to the different topological structures of adder circuits. Common adder topological structures generally include: ripple carry method, carry lookahead method, etc.
[0003] Adders with different topologies have different areas and speeds. With the requirements for high operating frequency and low power consumption of processor cores, higher requirements are placed on adders. How to reduce power consumption while ensuring high speed; or in specific speed scenarios, using a topology with a smaller area and lower power consumption, balancing the relationship between power consumption and speed has become an urgent problem to be solved. SUMMARY OF THE INVENTION
[0004] The present application provides a logic unit circuit and an adder circuit, which have a simple circuit structure and can well balance the relationship between power consumption and speed.
[0005] The embodiment of the present application provides a logic operation unit circuit, which is applied to a multi-bit adder. The logic operation unit circuit is used to implement !P logic and !G logic, including: two NAND gates and one OR gate; wherein,
[0006] The two inputs of a NAND gate are a i 、b i , the output is! G i , and will! G i The output is fed to one input of another NAND gate;
[0007] The two inputs of the OR gate are a i 、b i , the output is the other input of another NAND gate;
[0008] The two inputs of the other NAND gate are the output of a NAND gate and the output of the OR gate, and the output is! P i ;
[0009] Here, i represents the i-th bit in the multi-bit addition.
[0010] The embodiment of the present application also provides a logic operation unit circuit, which is applied to a multi-bit adder. The logic operation unit circuit is used to implement !G logic and !P logic, including: an AND-NOR gate, an NAND gate;
[0011] The three inputs of the AND-NOR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j ;
[0012] The two inputs of the NAND gate are P k-1:j , the P i:k , the output of the NAND gate is! P i:j ;
[0013] Among them, i, k, and j respectively represent the bit data of the input data of the adder, i>k>j.
[0014] The embodiment of the present application further provides a logic operation unit circuit, which is applied to a multi-bit adder, and the logic operation unit circuit is used to implement G logic and P logic, including: an OR-NAND gate, an NOR gate;
[0015] The three inputs of the OR-NAND gate are respectively! i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j ;
[0016] The two inputs of the NOR gate are respectively! k-1:j , as mentioned! i:k , the output of the NOR gate is P i:j ;
[0017] Among them, i, k, and j respectively represent the bit data of the input data of the adder, i>k>j.
[0018] The embodiment of the present application further provides a logic operation unit circuit, which is applied to a multi-bit adder. The logic operation unit circuit is used to implement P logic and G logic, including: two NOR gates and one AND gate; wherein,
[0019] The two inputs of a NOR gate are a i 、b i , the output is one input of another NOR gate;
[0020] The two inputs of the AND gate are a i 、b i , the output is G i , and G i The output is fed to the other input of another NOR gate;
[0021] The two inputs of the other NOR gate are the output of a NOR gate and the output of the AND gate, and the output is P i ;
[0022] Here, i represents the i-th bit in the multi-bit addition.
[0023] An embodiment of the present application also provides an adder circuit, comprising any combination of the above described logic operation unit circuits.
[0024] In an exemplary embodiment, the adder is an LFA adder or a BK adder.
[0025] The embodiment of the present application further provides an adder circuit, wherein the adder is an n+1=32-bit LFA adder; the LFA adder comprises seven stages of sequentially connected operation units, wherein:
[0026] The first-stage operation unit includes n+1 ninth unit circuits described in the embodiment of the present application and n+1 NOT gates; the output of each ninth unit circuit described in the embodiment of the present application is connected to the input of a NOT gate, and the output of each NOT gate serves as the output of the first-stage operation unit;
[0027] The second-level computing unit includes A second unit circuit and a third unit circuit; wherein the second unit circuit is used to implement P i:j =and(P i-1:j ,P i:k ), G i:j =ao(G i:k ,P i:k ,G k-1:j ); the third unit circuit is used to implement G i:j =ao(G i:k ,P i:k ,G k-1:j );
[0028] The third-level computing unit includes the second unit circuit and two the third unit circuits;
[0029] The fourth level arithmetic unit includes the second unit circuits and four the third unit circuits;
[0030] The fifth level arithmetic unit includes the second unit circuits and eight the third unit circuits;
[0031] The sixth level arithmetic unit includes the third unit circuit;
[0032] The seventh-level operation unit includes n fourth unit circuits; wherein the fourth unit circuit is used to implement S i =xor(P i ,Gi-1,0 ), S i Represents the output i-th bit data after adder operation.
[0033] The embodiment of the present application further provides an adder circuit, wherein the adder is an n+1=32-bit LFA adder; the LFA adder comprises seven stages of sequentially connected operation units, wherein:
[0034] The first-level operation unit includes n+1 ninth unit circuits described in the embodiment of the present application;
[0035] The second-level computing unit includes The sixth unit circuit described in the embodiment of the present application and the eighth unit circuit; wherein the eighth unit circuit is used to implement G logic, including: an OR-NAND gate, and the three inputs of the OR-NAND gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j;
[0036] The third-level computing unit includes A NOT gate, The fifth unit circuit and two seventh unit circuits described in the embodiment of the present application; wherein the seventh unit circuit is used to implement! G logic, including: an AND-NOR gate, the three inputs of the AND-NOR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j;
[0037] The fourth level arithmetic unit includes A NOT gate, The sixth unit circuit described in the embodiment of the present application and four of the eighth unit circuits;
[0038] The fifth level arithmetic unit includes A NOT gate, The fifth unit circuit described in the embodiment of the present application and eight of the seventh unit circuit;
[0039] The sixth level arithmetic unit includes The eighth unit circuit and five NOT gates;
[0040] The seventh-level operation unit includes n fourth unit circuits and 11 NOT gates; wherein the fourth unit circuit is used to implement S i=xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
[0041] The embodiment of the present application further provides an adder circuit, wherein the adder is an n+1=32-bit BK adder; the BK adder comprises ten stages of sequentially connected operation units, wherein:
[0042] The first-stage operation unit includes n+1 ninth unit circuits described in the embodiment of the present application and n+1 NOT gates; the output of each ninth unit circuit described in the embodiment of the present application is connected to the input of a NOT gate, and the output of each NOT gate serves as the output of the first-stage operation unit;
[0043] The second-level computing unit includes A second unit circuit and a third unit circuit; wherein the second unit circuit is used to implement P i:j =and(P i-1:j ,P i:k ), G i:j =ao(P i:k ,G k-1:j ,G i:k ); the third unit circuit is used to implement G i:j =ao(P i:k ,G k-1:j ,G i:k );
[0044] The third-level computing unit includes the second unit circuit and one the third unit circuit;
[0045] The fourth level arithmetic unit includes the second unit circuit and one the third unit circuit;
[0046] The fifth-level operation unit includes one of the second unit circuits and one of the third unit circuits;
[0047] The sixth-level operation unit includes two of the third unit circuits;
[0048] The seventh level arithmetic unit includes the third unit circuit;
[0049] The eighth level arithmetic unit includes the third unit circuit;
[0050] The ninth level arithmetic unit includes the third unit circuit;
[0051] The tenth-level operation unit includes n fourth unit circuits; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
[0052] The embodiment of the present application further provides an adder circuit, wherein the adder is an n+1=32-bit BK adder; the BK adder comprises ten stages of sequentially connected operation units, wherein:
[0053] The first-level operation unit includes n+1 ninth unit circuits described in the embodiment of the present application;
[0054] The second-level computing unit includes The sixth unit circuit described in the embodiment of the present application and the eighth unit circuit; wherein the eighth unit circuit is used to implement G logic, including: an OR-NAND gate, and the three inputs of the OR-NAND gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j;
[0055] The third-level computing unit includes The fifth unit circuit and the seventh unit circuit described in the embodiment of the present application are respectively provided; wherein the seventh unit circuit is used to implement! G logic, including: an AND-NOR gate, wherein the three inputs of the AND-NOR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j;
[0056] The fourth level arithmetic unit includes one sixth unit circuit described in the embodiment of the present application and one eighth unit circuit;
[0057] The fifth-level operation unit includes one fifth unit circuit described in the embodiment of the present application and one seventh unit circuit;
[0058] The sixth-level operation unit includes two of the eighth unit circuits and one NOT gate;
[0059] The seventh-level operation unit includes two seventh unit circuits and two NOT gates, and one eighth unit circuit;
[0060] The eighth-level operation unit includes four eighth-unit circuits and four NOT gates, and three seventh-unit circuits;
[0061] The ninth level arithmetic unit includes The eighth unit circuit and 8 NOT gates;
[0062] The tenth-level operation unit includes n fourth unit circuits and a NOT gate; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
[0063] The adder circuit provided in the embodiment of the present application reduces the circuit by sharing the logic circuit, for example: i The logic circuit structure is transformed into the generation! i The logic circuit structure uses nand and oai gates to replace the xnr circuit, thus saving a nand gate. This topological structure of the adder circuit saves the generation of! i Logical AND! G i In other words, the adder circuit provided in the embodiment of the present application adopts a circuit with the simplest structure and the least logic gates. The adder circuit has a simple structure, is better in terms of area and delay, has lower power consumption, and has a good balance between power consumption and speed, thereby making the circuit run faster and having better performance.
[0064] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] The accompanying drawings are used to provide further understanding of the technical solution of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the technical solution of the present application and do not constitute a limitation on the technical solution of the present application.
[0066] Figure 1 A schematic diagram of a circuit topology structure of a logic operation unit that implements P logic and G logic in an embodiment;
[0067] Figure 2 Schematic diagram of the circuit topology structure of the XOR gate in the embodiment of the present application;
[0068] Figure 3A schematic diagram of a circuit topology structure of a logic operation unit that implements P logic and G logic in another embodiment;
[0069] Figure 4 A schematic diagram of a circuit topology structure of a logic operation unit implementing !P logic and !G logic in an embodiment;
[0070] Figure 5 Schematic diagram of the circuit topology structure of the XNOR gate in the embodiment of the present application;
[0071] Figure 6 A schematic diagram of a circuit topology structure of a logic operation unit for realizing !P logic and !G logic in another embodiment;
[0072] Figure 7 A schematic diagram of a circuit topology structure of a core logic operation unit in an adder in an embodiment;
[0073] FIG8( a ) is a schematic diagram of a circuit structure for implementing continuous two-level P logic in an embodiment;
[0074] FIG8( b ) is a schematic diagram of a circuit structure for implementing continuous two-level P logic in another embodiment;
[0075] FIG9( a ) is a schematic diagram of a circuit structure for implementing continuous two-stage G logic in an embodiment;
[0076] FIG9( b ) is a schematic diagram of a circuit structure for implementing continuous two-stage G logic in another embodiment;
[0077] Fig.10 A schematic diagram of a topological structure of an LFA adder circuit;
[0078] Figure 11(a) shows Fig.10 A circuit structure diagram and corresponding schematic symbols of a first unit circuit in the LFA adder circuit shown;
[0079] Figure 11(b) shows Fig.10 A circuit structure diagram and corresponding schematic symbols of a second unit circuit in the LFA adder circuit shown;
[0080] Figure 11(c) shows Fig.10 A circuit structure diagram and corresponding schematic symbols of the third unit circuit in the LFA adder circuit shown;
[0081] Figure 11(d) shows Fig.10 A circuit structure diagram and corresponding schematic symbols of the fourth unit circuit in the LFA adder circuit shown;
[0082] FIG12( a ) is a schematic diagram of the circuit structure and corresponding schematic symbols of a first replacement unit circuit in an LFA adder circuit according to another embodiment;
[0083] FIG12( b ) is a schematic diagram of the circuit structure and corresponding schematic symbols of a second replacement unit circuit in an LFA adder circuit according to another embodiment;
[0084] FIG12( c ) is a schematic diagram of the circuit structure and corresponding schematic symbols of a third replacement unit circuit in an LFA adder circuit according to another embodiment;
[0085] FIG12( d ) is a schematic diagram of the circuit structure and corresponding schematic symbols of a fourth replacement unit circuit in an LFA adder circuit according to another embodiment;
[0086] FIG12( e ) is a schematic diagram of the circuit structure and corresponding schematic symbols of a fifth replacement unit circuit in an LFA adder circuit according to another embodiment;
[0087] Fig.13 A schematic diagram of the topological structure of a first embodiment of an LFA adder circuit;
[0088] Fig.14 A schematic diagram of the topological structure of a second embodiment of an LFA adder circuit;
[0089] Fig.15 A schematic diagram of the topological structure of a third embodiment of an LFA adder circuit;
[0090] Fig.16 A schematic diagram of a topological structure of a BK adder circuit;
[0091] Fig.17 A schematic diagram of the topological structure of a first embodiment of a BK adder circuit;
[0092] Fig.18 A schematic diagram of the topological structure of a second embodiment of a BK adder circuit;
[0093] Fig.19 FIG. 4 is a schematic diagram of the topological structure of the third embodiment of the BK adder circuit.
[0094] Details
[0095] In order to make the purpose, technical solution and advantages of the present application more clear, the embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other arbitrarily without conflict.
[0096] In order to facilitate understanding of the present application, the present application will be described more fully below with reference to the relevant drawings. Embodiments of the present application are provided in the drawings. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive.
[0097] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0098] In the mainstream adder topology, the core logic units include Propagate logic (P logic for short) and Generate logic (G logic for short). In the adder topology derived by P logic and G logic, there are Figure 1 The logic operation unit circuit shown in Figure 1 In, P i =xor(a i ,b i ), G i =and(a i ,b i ), where i represents the i-th bit in multi-bit addition, a i 、b i They represent the i-th bit data of data a and data b involved in the operation respectively. Among them, xor represents an exclusive-OR gate operation, and and represents an AND gate operation.
[0099] In order to realize equivalent logic with the simplest structure and the least logic gates as much as possible, an embodiment of the present application provides a logic operation unit circuit, which uses logic sharing to reduce circuits as much as possible.
[0100] In one illustrative example, Figure 2 Schematic diagram of the circuit topology structure of the XOR gate in the embodiment of the present application, such as Figure 2 As shown, the XOR gate in this embodiment includes two NOR gates and one AND gate; the two inputs of one NOR gate are respectively a i 、b i , the output is one input of another NOR gate; the two inputs of the AND gate are a i 、b i , the output is the other input of another NOR gate; the output of another NOR gate is P i .
[0101] from Figure 2 It can be seen that the two inputs of the AND gate are a i 、bi ,like Figure 1 As shown, the output of this AND gate is G i , that is to say, in Figure 2 In the logic operation unit circuit shown in the figure, G i and P i The inventor of this application cleverly uses this point to Figure 2 After adjustment, we get Figure 3 FIG. 1 is a schematic diagram of a circuit topology structure of a logic operation unit that implements P logic and G logic in another embodiment. Figure 3 As shown, in one embodiment, the logic operation unit circuit for implementing P logic and G logic may include: two NOR gates and one AND gate; the two inputs of one NOR gate are respectively a i 、b i , the output is one input of another NOR gate; the two inputs of the AND gate are a i 、b i , the output is G i , G i =and(a i ,b i ), and G i The output is given to the other input of another NOR gate; the output of the other NOR gate is P i , P i =nor(and(a i ,b i ),nor(a i ,b i )). Figure 3 The logic operation unit circuit shown can also be regarded as comprising a NOR gate and an AND-NOR (AOI) gate, wherein Figure 6 As shown, the oai gate consists of an AND gate and a NOR gate. i It can also be expressed as: i =aoi(nor(a i ,b i ),a i ,b i ).
[0102] contrast Figure 1 A logic operation unit circuit for realizing P logic and G logic is shown and Figure 3 Another logic operation unit circuit for realizing P logic and G logic is shown. Figure 1 The XOR gate in the circuit belongs to complex logic, and its area and power consumption are greater than those of two NOR gates. In other words, Figure 3Another logic operation unit circuit for implementing P logic and G logic shown in the figure has a smaller area and lower power consumption. In other words, the logic operation unit circuit for implementing P logic and G logic provided in the embodiment of the present application has a simple structure, is better in terms of area and delay, and has a good balance between power consumption and rate.
[0103] From the relevant technology, we know that there is the following P logical relationship: i:j =and(P i:k ,P k-1:j ), P i:j =nor(!P i:k ,! P k-1:j ), from the above P logical relationship, we can see that P i:j The logical value does not matter whether the input value is P i:k Still! i:k , is P k-1:j Still! k-1:j From the related art, we know that there is the following G logical relationship: G i:j =aoi(G i:k ,P i:k ,P k-1:j ), G i:j =oai(!G i:k ,! P i:k ,! P k-1:j ), from the above G logical relationship, we can see that G i:j The logical value does not matter whether the input value is G i:k Still! i:k , is P i:k Still! i:k , is P k-1:j Still! k-1:j According to this derivation, Figure 1 Modification can be obtained as follows Figure 4 The implementation shown! i Logical AND! G i Schematic diagram of the logic circuit structure.
[0104] like Figure 4 As shown, it is realized! i Logical AND! G i The logic circuit structure includes a NAND gate and an XNR gate. i =xnr(a i ,b i ), ! G i =nand(a i ,b i ). In order to realize equivalent logic with the simplest structure and the least logic gates as much as possible, the embodiment of the present application provides a logic operation unit circuit, which uses logic sharing as much as possible to reduce the circuit.
[0105] In one illustrative example, Figure 5 Schematic diagram of the circuit topology structure of the XNOR gate in the embodiment of the present application, such as Figure 5 As shown, the XNOR gate in this embodiment includes two NAND gates and one OR gate; the two inputs of one NAND gate are respectively a i 、b i , the output is one input of another NAND gate; the two inputs of the OR gate are a i 、b i , the output is the other input of another NAND gate; the two inputs of another NOR gate are the output of a NOR gate and the output of the AND gate, and the output is! P i .
[0106] from Figure 5 It can be seen that the two inputs of one of the NAND gates are a i 、b i ,like Figure 4 As shown, the output of this NAND gate is! G i , that is to say, in Figure 5 In the logic operation unit circuit shown, G is generated at the same time! i and! i The inventor of this application cleverly uses this point to Figure 5 After adjustment, we get Figure 6 Another circuit topology diagram of a logic operation unit for realizing !P logic and !G logic is shown in FIG. Figure 6 As shown, in one embodiment, the logic operation unit circuit for realizing !P logic and !G logic may include: two NAND gates and one OR gate; wherein the two inputs of one NAND gate are respectively a i 、b i , the output is! G i ,! G i =nand(a i ,b i ) and will! G i The output is given to one input of another NAND gate; the two inputs of the OR gate are a i 、b i , the output is the other input of another NAND gate; the two inputs of another NAND gate are the output of a NAND gate and the output of the OR gate, and the output is! P i ,! P i =nand(nand(a i ,b i ),or(a i ,b i )). Figure 6The logic operation unit circuit shown can also be regarded as comprising a NAND gate and an OR-NAND (OAI) gate, wherein Figure 6 As shown, the oai gate is composed of an OR gate and a NAND gate. i It can also be expressed as: !P i =oai(nand(a i ,b i ),a i ,b i ).
[0107] contrast Figure 4 A realization of the logic operation unit circuit of P logic and G logic is shown. Figure 6 Another implementation of the logic operation unit circuit shown is !P logic and !G logic, Figure 4 The XNOR gate in the is a complex logic, and its area and power consumption are greater than that of an OR-NAND (OAI) gate. Figure 6 Another implementation of the !P logic and !G logic logic operation unit circuit shown in the embodiment of the present application adopts a smaller area and lower power consumption. That is, the logic operation unit circuit implementing the !P logic and !G logic provided in the embodiment of the present application adopts a logic sharing method to reduce the circuit, so that the circuit structure is simple, the area and delay are better, and the relationship between power consumption and speed is well balanced.
[0108] Since G logic and !G logic, P logic and !P logic can be flexibly converted without incurring additional circuit overhead, the only difference between them is the logic function, and the area and delay are the same. In other words, Figure 1 and Figure 4 Although the logic functions of the circuits shown are different, the area and delay used are the same. In the embodiment of the present application, Figure 6 The logic operation unit circuit and Figure 3 Compared with the logic operation unit circuit for realizing P logic and G logic shown in FIG. Figure 6 The circuit structure shown consists of a nand gate and an oai gate. Figure 3 The circuit structure shown includes two NOR gates and one AND gate. The area and delay of a NAND gate and a NOR gate are equivalent, while the area and delay of an OAI gate are smaller than the area and delay of a NOR gate + an AND gate. Therefore, the embodiment of the present application provides Figure 3 and Figure 6 In the logic operation unit circuit shown in FIG. Figure 6 The logic operation unit circuit shown for implementing !P logic and !G logic has better adoption area and delay.
[0109] In order to realize equivalent logic with the simplest structure and the least logic gates as possible, the present application proposes a logic unit circuit, wherein the P logic circuit includes a P logic circuit of a NOR gate and / or a NAND gate to realize P logic or P NOT (!P) logic; the G logic circuit includes a G logic circuit of an AND-NOR (aoi) gate and / or an OR-NAND (oai) gate to realize G logic or !G logic.
[0110] In an exemplary embodiment, taking two-stage continuous P logic as an example, FIG8(a) is a schematic diagram of a circuit structure for realizing two-stage continuous P logic in one embodiment, and FIG8(b) is a schematic diagram of a circuit structure for realizing two-stage continuous P logic in another embodiment. The two circuit structures of FIG8(a) and FIG8(b) are equivalent, wherein i>k>m>n>j, i, k, m, n, j respectively represent the bit (bit) of the input data, such as i represents the ith bit. As shown in FIG8(a), the circuit structure for realizing two-stage continuous P logic in one embodiment is composed of three AND gates, and as shown in FIG8(b), the circuit structure for realizing two-stage continuous P logic in another embodiment is composed of two NAND gates and one NOR gate. In one embodiment, the circuit structure for realizing two-stage continuous P logic for P logic includes: two NAND gates and two NOR gates; wherein, the two inputs of one of the NAND gates are P, respectively. i:k , P k-1:m , the output is! P i:m ; The two inputs of the other NAND gate are P m-1:n , P n-1:j , the output is! P m-1:j ; The two inputs of the NOR gate are the outputs of the two NAND gates! i:m and! m-1:j , the output of the NOR gate is P i:j , where i>k>m>n>j, P i:j =nor(nand(P i:k ,P k-1:m ),nand(P m-1:n ,P n-1:j )).
[0111] In the two circuit structures shown in Figures 8(a) and 8(b), compared with the AND gate and the NAND gate, the AND gate uses 1 more inv in area and has 1 more inv in delay. Compared with the NAND gate and the NOR gate, the two use almost the same area and delay. So, overall, the circuit structure of the continuous two-stage P logic in another embodiment shown in Figure 8(b) saves 3 inv in area compared to the circuit structure of the continuous two-stage P logic in one embodiment shown in Figure 8(a), and the longest path delay of the circuit is reduced by 2 inv in delay. It can be seen that the P logic provided in the embodiment of the present application uses the circuit with the simplest structure and the least logic gates to achieve the same function as the typical P logic. That is to say, the P logic circuit structure provided in the embodiment of the present application is simple, better in area and delay, and a good balance between power consumption and rate.
[0112] In an exemplary embodiment, taking two-stage continuous G logic as an example, FIG9(a) is a schematic diagram of the circuit structure of two-stage continuous G logic in one embodiment, and FIG9(b) is a schematic diagram of the circuit structure of two-stage continuous G logic in another embodiment. The two circuit structures of FIG9(a) and FIG9(b) are equivalent, wherein i>k>m>n>j. Assume that the expression of FIG9(a) is: G i:j =function1(G i:k ,P i:k ,G k-1:m ,G m-1:n ,P m-1:n ,G n-1:j ,P i:m ). The expression of Figure 9(b) is: G i:j =function2(G i:k ,P i:k ,G k-1:m ,G m-1:n ,P m-1:n ,G n-1:j ,! P i:m ). Comparing the two expressions, the results on the left side of the two equations are the same, and there is one different input item on the right side of the two equations. The different part is P i:m and! i:m According to relevant technology, P i:m =and(P i:k ,P k-1:m ),! P i:m =nor(P i:k ,P k-1:m ), therefore, under the premise of the same input items, P i:m and! i:m The implementation can be achieved by using AND gate and NOR gate for conversion.
[0113] Figure 7FIG. 1 is a schematic diagram of a circuit topology structure of a core logic operation unit in an adder in an embodiment. Figure 7 As shown, the P logic consists of an AND gate, P i:j =and(P i:k ,P k-1:j ); G logic consists of an AND-OR gate, G i:j =or(G i:k ,and(P i:k ,G k-1:j ))=ao(G i:k ,P i:k ,G k-1:j ), where i>k>j, i, k, and j represent the bit of the input data respectively, such as i represents the i-th bit.
[0114] As shown in FIG9(a), in one embodiment, the continuous two-stage G logic circuit structure is composed of three ao gates. As shown in FIG9(b), in another embodiment, the continuous two-stage G logic circuit structure is composed of two and-or-invert (aoi) gates and one or-and-invert (oai) gate. In one embodiment, the continuous two-stage G logic circuit structure for implementing G logic includes: two and-or-invert gates and an or-and-invert gate; wherein the three inputs of one of the and-or-invert gates are P i:k , G k-1:m and G i:k , the output is! G i:m ; The three inputs of the other AND-NOR gate are P m-1:n , G n-1:j and G m-1:n , the output is! G m-1:j ; The three inputs of the OR-NAND gate are the outputs of the two AND-NOR gates, i.e. G i:m and! G m-1:j , and! P i:m , the output is G i:j , where i>k>m>n>j,
[0115] In the two circuit structures shown in Figures 9(a) and 9(b), compared with aoi gate, ao gate has an area of 1 more inv and a delay of 1 more inv. Compared with aoi gate and oai gate, the area and delay of the two are similar. So, overall, the circuit structure of the continuous two-stage G logic in another embodiment shown in Figure 9(b) saves 3 inv in area and reduces the longest path delay of the circuit by 2 inv compared with the continuous two-stage G logic circuit structure shown in Figure 9(a). It can be seen that the P logic provided in the embodiment of the present application uses the circuit with the simplest structure and the least logic gates to achieve the same function as the typical G logic. That is to say, the G logic circuit structure provided in the embodiment of the present application is simple, better in area and delay, and well balances the relationship between power consumption and rate.
[0116] The adder is the most basic logic operation unit. In the mainstream adder topology, the core logic units include P logic circuits and G logic circuits. In order to reduce the area of the adder circuit, reduce its power consumption, reduce its circuit delay, and make the adder circuit run faster and have better performance, the embodiment of the present application provides an adder circuit, wherein the P logic circuit adopts the P logic circuit provided by any one of the embodiments of the present application, and the G logic circuit adopts the G logic circuit provided by any one of the embodiments of the present application.
[0117] In an exemplary embodiment, an LFA adder is taken as an example, where LFA is the abbreviation of Lander Fischer Adder, and the LFA adder is derived using PG logic. Fig.10 is a schematic diagram of the topological structure of an LFA adder circuit in an embodiment, Fig.10 The logic circuit represented by the black hexagonal schematic symbol is the first unit circuit shown in FIG11( a ). The first unit circuit is used to generate P logic, G logic, G i =and(a i ,b i ), P i =xor(a i ,b i ), a i 、b i They respectively represent the i-th bit data of data a and data b involved in the calculation. Fig.10 The logic circuit represented by the black square schematic symbol is the second unit circuit shown in Figure 11(b). The second unit circuit is used to implement P i:j =and(P i-1:j ,P i:k ), G i:j =ao(G i:k ,P i:k ,G k-1:j ). Fig.10The logic circuit represented by the small gray square schematic symbol is the third unit circuit shown in Figure 11(c). The third unit circuit is used to implement G i:j =ao(G i:k ,P i:k ,G k-1:j ). Fig.10 The logic circuit represented by the gray hexagonal schematic symbol is the fourth unit circuit shown in FIG11( d ). The fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i represents the output i-th bit data after the adder operation. Fig.10 The logic circuit represented by the black square schematic symbol is a P logic + G logic circuit. Fig.10 The logic circuit represented by the black hexagonal schematic symbol is Figure 1 The logic operation unit circuit shown.
[0118] In one embodiment, in order to reduce the area of the LFA adder circuit, reduce its power consumption, and reduce its circuit delay, as shown in FIG. Fig.13 As shown, a combination of the fifth unit circuit shown in FIG12(a) whose corresponding schematic diagram symbol is a black pentagon and the sixth unit circuit shown in FIG12(b) whose corresponding schematic diagram symbol is a black diamond, and a combination of the seventh unit circuit shown in FIG12(c) whose corresponding schematic diagram symbol is a gray pentagon and the eighth unit circuit shown in FIG12(d) whose corresponding schematic diagram symbol is a gray diamond. Fig.13 The logic circuit represented by the black pentagonal schematic symbol is a circuit implemented by using the P logic circuit and the G logic circuit provided in the embodiment of the present application as shown in FIG. 12 (a)! P logic +! G logic circuit, Fig.13 The logic circuit represented by the black diamond schematic symbol is a P logic + G logic circuit implemented by the P logic circuit and the G logic circuit provided in the embodiment of the present application as shown in FIG. 12( b ). Fig.13 The logic circuit represented by the gray pentagonal schematic symbol is a circuit implemented by the G logic circuit provided by the embodiment of the present application as shown in FIG. 12( c )! The G logic circuit, Fig.13 The logic circuit represented by the gray diamond schematic symbol is a G logic circuit implemented by the G logic circuit provided in the embodiment of the present application as shown in FIG. 12( d ).
[0119] In one embodiment, FIG. 12( c) provides an implementation! The circuit structure of the G logic is the seventh unit circuit, as shown in FIG. 12( c). The G logic circuit in this embodiment includes an AND-NOR gate, and the three inputs of the AND-NOR gate are P i:k , Gk-1:j and G i:k , the output of the AND-NOR gate is! G i:j , that is! G i:j =aoi(G i:k ,P i:k ,G k-1:j ), where i>k>j.
[0120] In one embodiment, FIG. 12(a) provides a circuit structure for implementing !P logic and !G logic, i.e., the fifth circuit unit. As shown in FIG. 12(a), the P logic + G logic circuit in this embodiment further includes an AND gate based on FIG. 12(c). As shown in FIG. 12(a), the three inputs of the AND-OR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j ,! G i:j =aoi(G i:k ,P i:k ,G k-1:j );The two inputs of the NAND gate are P k-1:j , P i:k , the output of the NAND gate is! P i:j ,! P i:j = nand(P k-1:j ,P i:k ).
[0121] In one embodiment, FIG. 12( d ) provides a circuit structure for implementing G logic, namely, the eighth circuit unit, as shown in FIG. 12( d ), the corresponding schematic diagram symbol is a gray diamond, and the G logic circuit in this embodiment includes an OR-NAND gate, and the three inputs of the OR-NAND gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , that is, G i:j =oai(!G i:k ,! P i:k ,! G k-1:j ).
[0122] In one embodiment, FIG. 12(b) provides a circuit structure for implementing P logic and G logic, namely, the sixth circuit unit. As shown in FIG. 12(b), the P logic + G logic circuit in this embodiment further includes an NOR gate based on FIG. 12(d). As shown in FIG. 12(b), the three inputs of the NOR gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , G i:j=oai(!G i:k ,! P i:k ,! G k-1:j ); the two inputs of the NOR gate are respectively! P k-1:j ,! P i:k , the output of the NOR gate is P i:j , P i:j =nor(!P k-1:j ,! P i:k ).
[0123] like Fig.13 As shown, taking a multi-bit LFA adder of n+1=32 bits as an example, the LFA adder circuit of the first embodiment of the present application includes seven stages of sequentially connected operation units, the first stage operation unit includes n+1 first unit circuits; the second stage operation unit includes The third-level operation unit includes a fifth unit circuit and a seventh unit circuit; A NOT gate, The fourth-level operation unit includes a sixth unit circuit and two eighth unit circuits; A NOT gate, The fifth unit circuit and four seventh unit circuits; the fifth-level operation unit includes A NOT gate, The sixth unit circuit and eight eighth unit circuits; the sixth-level operation unit includes The seventh unit circuit and 5 NOT gates; the seventh-level operation unit includes n fourth unit circuits and 21 NOT gates; among them,
[0124] In the first-level operation unit, each first unit circuit has an input including a i and b i , used to output G after operation i and P i ; Among them, a i is the information of each bit of data a involved in the addition operation, b i is the bit information of data b involved in the addition operation, i=0, 1, 2...n, n+1 represents the number of bits of data a and data b involved in the addition operation.
[0125] In the second-level operation unit, each fifth unit circuit has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j , where k=i, j=i-1, i=3, n-26, n-24...n-6, n-4, n-2, n; the input of the seventh unit circuit includes G i:k , Pi:k , G k-1:j , used to output after operation! G i:j , where k=i, j=i-1, i=1.
[0126] In the third-level operation unit, every two sixth-unit circuits and a NOT gate form a third-level small operation unit (called the first third-level small operation unit), and two eighth-unit circuits and a NOT gate form another third-level small operation unit (called the second third-level small operation unit). In the first third-level small operation unit, the input of the NOT gate is G i-1 and P i-1 , used to output !G i-1 and! i-1 ; One of the inputs of the sixth unit circuit includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j ; The input of another sixth unit circuit includes the output of the NOT gate, namely! G i-1:k ,! P i-1:k And! G k-1:j ,! P k-1:j , used to output G after operation i-1:j and P i-1:j , where k = i-1, j = i-3, i = 7, n-20, n-16, n-12, n-8, n-4, n. In the second and third level small operation units, the input of the NOT gate is G i-1 and P i-1 , used to output !G i-1 and! i-1 ; One of the inputs of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j ; Another input of the eighth unit circuit includes the output of the NOT gate, that is, G i-1 ,! P i-1 And! G k-1:j , used to output G after operation i-1:j , where k=i-1, j=i-3, i=3.
[0127] In the fourth-level operation unit, every four fifth-unit circuits and a NOT gate form a fourth-level small operation unit (called the first fourth-level small operation unit), and four seventh-unit circuits and a NOT gate form another fourth-level small operation unit (called the second fourth-level small operation unit). In the first fourth-level small operation unit, the input of the NOT gate is! G i-2:kand! i-2:k , used to output G i-2:k and P i-2:k ; One of the fifth unit circuits has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j ; Another fifth unit circuit input includes G i-1:k-1 , P i-1:k-1 , G k-1:j , P k-1:j , used to output after operation! G i-1:j and! i-1:j ; The input of the fifth unit circuit includes the output of the NOT gate, that is, G i-2:k ,! P i-2:k , G k-1:j , P k-1:j , used to output after operation! G i-2:j and! i-2:j ; The input of another fifth unit circuit includes G i-3:k , P i-3:k , G k-1:j , P k-1:j , used to output after operation! G i-3:j and! i-3:j , where k = i-3, j = i-7, i = n-16, n-8, n. In the second and fourth level small operation units, the input of the NOT gate is! G i-2:k and! i-2:k , used to output G i-2:k and P i-2:k ; One of the seventh unit circuits has an input including G i:k , P i:k , G k-1:j , used to output after operation! G i:j ; Another seventh unit circuit input includes G i-1:k , P i-1:k , G k-1:j , used to output after operation! G i-1:j ; The input of the seventh unit circuit includes the output of the NOT gate, namely G i-2:k , P i-2:k and G k-1:j , used to output after operation! G i-2:j ; The input of another seventh unit circuit includes G i-3:k , P i-3:k , G k-1:j , used to output after operation! G i-3:j, where k=i-3, j=i-7, i=n-24.
[0128] In the fifth-level arithmetic unit, every eight sixth-unit circuits and three NOT gates form a fifth-level small arithmetic unit (called the first fifth-level small arithmetic unit), and eight eighth-unit circuits and three NOT gates form another fifth-level small arithmetic unit (called the second fifth-level small arithmetic unit). In the first fifth-level small arithmetic unit, the input of the first NOT gate is G i-4:k , P i-4:k , the output is! G i-4:k ,! P i-4:k ; The input of the second NOT gate is G i-5:k , P i-5:k , the output is! G i-5:k ,! P i-5:k ; The input of the third NOT gate is G i-7 , P i-7 , the output is! G i-7 ,! P i-7 ; Wherein, the input of the first and sixth unit circuits includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j ; The input of the second and sixth unit circuits includes! G i-1:k ,! P i-1:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-1:j and P i-1:j ; The inputs of the third and sixth unit circuits include! G i-2:k ,! P i-2:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-2:j and P i-2:j ; The inputs of the fourth and sixth unit circuits include! G i-3:k ,! P i-3:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-3:j and P i-3:j The input of the fifth and sixth unit circuits includes the output of the first NOT gate, that is, G i-4:k ,! P i-4:k And! G k-1:j ,! P k-1:j , used to output G after operation i-4:j and P i-4:j ; The input of the sixth unit circuit includes the output of the second NOT gate, that is, Gi-5:k ,! P i-5:k And! G k-1:j ,! P k-1:j , used to output G after operation i-5:j and P i-5:j The input of the seventh and sixth unit circuits includes the output of the first NOT gate, that is, G i-6:k ,! P i-6:k And! G k-1:j ,! P k-1:j , used to output G after operation i-6:j and P i-6:j ; The input of the eighth and sixth unit circuits includes the output of the third NOT gate, that is! G i-7:k ,! P i-7:k And! G k-1:j ,! P k-1:j , used to output G after operation i-7:j and P i-7:j ; Wherein, k = i-7, j = i-15, i = n, and in this embodiment, n = 31. In the second fifth-level small operation unit, the input of the first NOT gate is G i-4:k , P i-4:k , the output is! G i-4:k ,! P i-4:k ; The input of the second NOT gate is G i-5:k , P i-5:k , the output is! G i-5:k ,! P i-5:k ; The input of the third NOT gate is G i-7 , P i-7 , the output is! G i-7 ,! P i-7 ; Wherein, the input of the first and eighth unit circuits includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j ; The input of the second and eighth unit circuits includes! G i-1:k ,! P i-1:k ,! G k-1:j , used to output G after operation i-1:j ; The input of the third and eighth unit circuits includes! G i-2:k ,! P i-2:k ,! G k-1:j , used to output G after operation i-2:j ; The inputs of the fourth and eighth unit circuits include! G i-3:k ,! P i-3:k ,! G k-1:j , used to output G after operation i-3:j ; The input of the fifth and eighth unit circuits includes the output of the first NOT gate, that is, G i-4:k ,! Pi-4:k And! G k-1:j , used to output G after operation i-4:j ; The input of the sixth and eighth unit circuits includes the output of the second NOT gate, that is, G i-5:k ,! P i-5:k And! G k-1:j , used to output G after operation i-5:j The input of the seventh and eighth unit circuits includes the output of the first NOT gate, that is, G i-6:k ,! P i-6:k And! G k-1:j , used to output G after operation i-6:j ; The input of the eighth unit circuit includes the output of the third NOT gate, that is, G i-7:k ,! P i-7:k And! G k-1:j , used to output G after operation i-7:j ; Among them, k=i-7, j=i-15, i=n-16.
[0129] The sixth level arithmetic unit includes The seventh unit circuit and 5 NOT gates, where the input of each NOT gate is! G i-8-P:k and! i-8-P:k , used to output G i-8-P:k and P i-8-P:k , p = 0, 1, 2, 3 and 6; the input of each seventh unit circuit includes G i-m:k , P i-m:k , G k-1:j , used to output after operation! G i-m:j , where k=i-15, j=i-31, i=17, 18, 19…n, and m represents the number of the seventh unit circuit, m=0, 1, 2…15.
[0130] The seventh-level operation unit includes n fourth unit circuits and 21 NOT gates, where the input of each NOT gate is! G i-P:0 and! i-P:0 , used to output G i-P:0 and P i-P:0 , p = 0, 1, 2, 3 ... 15, 24, 25, 26, 27 and 30; the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after addition operation i , where i = 1, 2, 3 ... n, S0 = P0, carry = G 31:0 .
[0131] contrast Fig.10 and Fig.13 It is not difficult to see that Fig.13The topology of the entire LFA adder circuit is reconstructed as shown. Fig.10 The topological structure of the LFA adder circuit shown, combined with the analysis of Figures 8(b) and 9(b), implements the LFA adder using a circuit with the simplest structure and the least logic gates. That is to say, the LFA adder circuit provided in the embodiment of the present application has a simple structure, is better in terms of area and delay, has lower power consumption, and has a good balance between power consumption and rate, thereby making the circuit run faster and having better performance.
[0132] In one embodiment, FIG. 12( e ) provides a circuit structure of a ninth unit circuit for implementing ! P logic and ! G logic. As shown in FIG. 12( e ), the schematic diagram symbol corresponding to the ninth unit circuit is a black heptagon. The ninth unit circuit has two NAND gates and one OR gate. The two inputs of one of the NAND gates are respectively a i 、b i , the output is! G i ,! G i =nand(a i ,b i ) and will! G i The output is given to one input of another NAND gate; the two inputs of the OR gate are a i 、b i , the output is the other input of another NAND gate; the two inputs of another NAND gate are the output of a NAND gate and the output of the OR gate, and the output is! P i ,! P i =nand(nand(a i ,b i ),or(a i ,b i )). The logic operation unit circuit shown in FIG12(e) can also be regarded as including a NAND gate and an OR-NAND (oai) gate, wherein, as shown in FIG12(e), the oai gate is composed of an OR gate and a NAND gate. i It can also be expressed as: !P i =oai(nand(a i ,b i ),a i ,b i ).
[0133] In one embodiment, in order to reduce the area of the LFA adder circuit, reduce its power consumption, and reduce its circuit delay, as shown in FIG. Fig.14 As shown, the ninth unit circuit and a plurality of NOT gates are used, whose corresponding schematic diagram symbol is a black heptagon as shown in FIG12(e). Fig.14The logic circuit represented by the black heptagonal schematic symbol is a circuit implemented by using the P logic circuit and the G logic circuit provided in the embodiment of the present application as shown in FIG. 12 (e)! P logic +! G logic circuit, Fig.14 The logic circuit represented by the black square schematic symbol is the second unit circuit shown in Figure 11(b). Fig.14 The logic circuit represented by the schematic symbol of the small gray square is the third unit circuit shown in Figure 11(c). Fig.14 The logic circuit represented by the medium grey hexagonal schematic symbol is the fourth unit circuit shown in FIG11( d ).
[0134] like Fig.14 As shown, taking a multi-bit LFA adder of n+1=32 bits as an example, the LFA adder circuit of the second embodiment of the present application includes seven stages of sequentially connected operation units, the first stage operation unit includes n+1 ninth unit circuits and n+1 NOT gates; the second stage operation unit includes A second unit circuit and a third unit circuit; the third-level operation unit includes The fourth-level operation unit includes a second unit circuit and two third unit circuits; The fifth-level operation unit includes The sixth-level operation unit includes The seventh-level operation unit includes n fourth unit circuits; wherein,
[0135] In the first-level operation unit, each ninth unit circuit has an input including a i and b i , used to output after operation! G i and! i The output of each ninth unit circuit is connected to the input of a NOT gate, and the output of each NOT gate is used as the output of the first-level operation unit, namely G i and P i ; Among them, a i is the information of each bit of data a involved in the addition operation, b i is the bit information of data b involved in the addition operation, i=0, 1, 2...n, n+1 represents the number of bits of data a and data b involved in the addition operation.
[0136] In the second-level operation unit, each second unit circuit has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j, where k = i, j = i-1, i = 3, n-26, n-24...n-6, n-4, n-2, n; the input of the third unit circuit includes G i:k , P i:k , G k-1:j , used to output G after operation i:j , where k=i, j=i-1, i=1.
[0137] In the third-level operation unit, every two second unit circuits are one type of third-level small operation unit (called the first third-level small operation unit), and the two third unit circuits are another type of third-level small operation unit (called the second third-level small operation unit). In the first third-level small operation unit, the input of one of the second unit circuits includes G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j ; The input of another second unit circuit includes G i-1:k , P i-1:k and G k-1:j , P k-1:j , used to output G after operation i-1:j and P i-1:j , where k=i-1, j=i-3, i=7, n-20, n-16, n-12, n-8, n-4, n. In the second and third level small operation units, the input of one of the third unit circuits includes G i:k , P i:k , G k-1:j , used to output G after operation i:j ; The input of another third unit circuit includes G i-1 , P i-1 and G k-1:j , used to output G after operation i-1:j , where k=i-1, j=i-3, i=3.
[0138] In the fourth-level operation unit, every four second unit circuits form a fourth-level small operation unit (called the first fourth-level small operation unit), and four third unit circuits form another fourth-level small operation unit (called the second fourth-level small operation unit). In the first fourth-level small operation unit, the input of one of the second unit circuits includes G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j ; The input of another second unit circuit includes G i-1:k-1 , Pi-1:k-1 , G k-1:j , P k-1:j , used to output G after operation i-1:j and P i-1:j ; Another second unit circuit input includes G i-2:k , P i-2:k , G k-1:j , P k-1:j , used to output G after operation i-2:j and P i-2:j ; Another second unit circuit input includes G i-3:k , P i-3:k , G k-1:j , P k-1:j , used to output G after operation i-3:j and P i-3:j , where k = i-3, j = i-7, i = n-16, n-8, n. In the second and fourth level small operation units, the input of one of the third unit circuits includes G i:k , P i:k , G k-1:j , used to output G after operation i:j ; The input of another third unit circuit includes G i-1:k , P i-1:k , G k-1:j , used to output G after operation i-1:j ; The input of the third unit circuit includes the output of the NOT gate, namely G i-2:k , P i-2:k and G k-1:j , used to output G after operation i-2:j ; The input of another third unit circuit includes G i-3:k , P i-3:k , G k-1:j , used to output G after operation i-3:j , where k=i-3, j=i-7, i=n-24.
[0139] In the fifth-level operation unit, every eight second unit circuits form a fifth-level small operation unit (called the first fifth-level small operation unit), and eight third unit circuits form another fifth-level small operation unit (called the second fifth-level small operation unit). In the first fifth-level small operation unit, the inputs of the first and second unit circuits include G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j ; The input of the second unit circuit includes G i-1:k , P i-1:k , Gk-1:j , P k-1:j , used to output G after operation i-1:j and P i-1:j ; The input of the third and second unit circuits includes G i-2:k , P i-2:k , G k-1:j , P k-1:j , used to output G after operation i-2:j and P i-2:j ; The input of the fourth second unit circuit includes G i-3:k , P i-3:k , G k-1:j , P k-1:j , used to output G after operation i-3:j and P i-3:j The input of the fifth second unit circuit includes the output of the first NOT gate, namely G i-4:k , P i-4:k and G k-1:j , P k-1:j , used to output G after operation i-4:j and P i-4:j ; The input of the sixth second unit circuit includes the output of the second NOT gate, namely G i-5:k , P i-5:k and G k-1:j , P k-1:j , used to output G after operation i-5:j and P i-5:j ; The input of the seventh second unit circuit includes the output of the first NOT gate, namely G i-6:k , P i-6:k and G k-1:j , P k-1:j , used to output G after operation i-6:j and P i-6:j ; The input of the eighth second unit circuit includes the output of the third NOT gate, namely G i-7:k , P i-7:k and G k-1:j , P k-1:j , used to output G after operation i-7:j and P i-7:j ; Wherein, k=i-7, j=i-15, i=n, and in this embodiment, n=31. In the second and fifth stage small operation units, the inputs of the first and third unit circuits include G i:k , P i:k , G k-1:j , used to output G after operation i:j ; The inputs of the second and third unit circuits include G i-1:k , P i-1:k , G k-1:j , used to output G after operation i-1:j; The input of the third unit circuit includes G i-2:k , P i-2:k , G k-1:j , used to output G after operation i-2:j ; The input of the fourth third unit circuit includes G i-3:k , P i-3:k , G k-1:j , used to output G after operation i-3:j The input of the fifth third unit circuit includes the output of the first NOT gate, namely G i-4:k , P i-4:k and G k-1:j , used to output G after operation i-4:j ; The input of the sixth third unit circuit includes the output of the second NOT gate, namely G i-5:k , P i-5:k and G k-1:j , used to output G after operation i-5:j The input of the seventh third unit circuit includes the output of the first NOT gate, namely G i-6:k , P i-6:k and G k-1:j , used to output G after operation i-6:j ; The input of the eighth third unit circuit includes the output of the third NOT gate, namely G i-7:k , P i-7:k and G k-1:j , used to output G after operation i-7:j ; Among them, k=i-7, j=i-15, i=n-16.
[0140] The sixth level arithmetic unit includes A third unit circuit, wherein the input of each third unit circuit includes G n-m:k , P n-m:k , G k-1:j , used to output G after operation i-m:j , where k=i-15, j=i-31, i=17, 18, 19...n; m=0, 1, 2...15.
[0141] The seventh-level operation unit includes n fourth unit circuits, wherein the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after addition operation i , where i = 1, 2, 3 ... n, S0 = P0, carry = G 31:0 .
[0142] Fig.14 In the embodiment shown, the circuit is reduced by sharing logic, and the original P iThe logic circuit structure is converted into a part to generate! i The logic circuit structure uses NAND and OAI gates to replace the XNR circuit, thus saving a NAND gate.
[0143] In another embodiment, in order to further reduce the area of the LFA adder circuit, reduce its power consumption, and reduce its circuit delay, as shown in FIG. Fig.15 As shown, using Figure 12(a)~12(e) To implement the LFA adder. Fig.15 The logic circuit represented by the black heptagonal schematic symbol is the ninth unit circuit shown in FIG12(e). Fig.15 The logic circuit represented by the black pentagonal schematic symbol is the fifth unit circuit shown in FIG12(a). Fig.15 The logic circuit represented by the black diamond schematic symbol is the sixth unit circuit shown in FIG12( b ). Fig.15 The logic circuit represented by the gray pentagonal schematic symbol is the seventh unit circuit shown in FIG12(c). Fig.15 The logic circuit represented by the medium grey diamond schematic symbol is the eighth unit circuit shown in FIG12( d ).
[0144] like Fig.15 As shown, taking a multi-bit LFA adder of n+1=32 bits as an example, the LFA adder circuit of the third embodiment of the present application includes seven stages of sequentially connected operation units, the first stage operation unit includes n+1 ninth unit circuits; the second stage operation unit includes The third-level operation unit includes a sixth unit circuit and an eighth unit circuit; A NOT gate, The fourth-level operation unit includes a fifth unit circuit and two seventh unit circuits; A NOT gate, The fifth-level operation unit includes: A NOT gate, The sixth-level operation unit includes The seventh-level operation unit includes n fourth-level unit circuits and 11 non-gates; among them,
[0145] In the first-level operation unit, each ninth unit circuit has an input including a i and b i , used to output after operation! G i and! i ; Among them, a i is the information of each bit of data a involved in the addition operation, b iis the bit information of data b involved in the addition operation, i=0, 1, 2...n, n+1 represents the number of bits of data a and data b involved in the addition operation.
[0146] In the second-level operation unit, each sixth unit circuit has an input including! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j , where k=i, j=i-1, i=3, n-26, n-24...n-6, n-4, n-2, n; the input of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j , where k=i, j=i-1, i=1.
[0147] In the third-level operation unit, every two fifth-unit circuits and a NOT gate form a third-level small operation unit (called the first third-level small operation unit), and two seventh-unit circuits and a NOT gate form another third-level small operation unit (called the second third-level small operation unit). In the first third-level small operation unit, the input of the NOT gate is! G i-1 and! i-1 , used to output G i-1 and P i-1 ; One of the fifth unit circuits has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j ; The input of the other fifth unit circuit includes the output of the NOT gate, namely G i-1:k , P i-1:k and G k-1:j , P k-1:j , used to output after operation! G i-1:j and! i-1:j , where k = i-1, j = i-3, i = 7, n-20, n-16, n-12, n-8, n-4, n. In the second and third level small operation units, the input of the NOT gate is! G i-1 and! i-1 , used to output G i-1 and P i-1 ; One of the seventh unit circuits has an input including G i:k , P i:k , G k-1:j , used to output after operation! Gi:j ; The input of the seventh unit circuit includes the output of the NOT gate, namely G i-1 , P i-1 And! G k-1:j , used to output after operation! G i-1:j , where k=i-1, j=i-3, i=3.
[0148] In the fourth-level operation unit, every four sixth-unit circuits and a NOT gate form a fourth-level small operation unit (called the first fourth-level small operation unit), and four eighth-unit circuits and a NOT gate form another fourth-level small operation unit (called the second fourth-level small operation unit). In the first fourth-level small operation unit, the input of the NOT gate is G i-2:k and P i-2:k , used to output !G i-2:k and! i-2:k ; One of the inputs of the sixth unit circuit includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j ; Another input of the sixth unit circuit includes! G i-1:k-1 ,! P i-1:k-1 ,! G k-1:j ,! P k-1:j , used to output G after operation i-1:j and P i-1:j ; The input of the sixth unit circuit includes the output of the NOT gate, that is, G i-2:k ,! P i-2:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-2:j and P i-2:j ; Another input of the sixth unit circuit includes! G i-3:k ,! P i-3:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-3:j and P i-3:j , where k = i-3, j = i-7, i = n-16, n-8, n. In the second and fourth level small operation units, the input of the NOT gate is G i-2:k and P i-2:k , used to output !G i-2:k and! i-2:k ; One of the inputs of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operationi:j ; Another input of the eighth unit circuit includes! G i-1:k ,! P i-1:k ,! G k-1:j , used to output G after operation i-1:j ; Another input of the eighth unit circuit includes the output of the NOT gate, that is, G i-2:k ,! P i-2:k And! G k-1:j , used to output G after operation i-2:j ;Another input of the eighth unit circuit includes! G i-3:k ,! P i-3:k ,! G k-1:j , used to output G after operation i-3:j , where k=i-3, j=i-7, i=n-24.
[0149] In the fifth-level operation unit, every eight fifth-unit circuits and three NOT gates form a fifth-level small operation unit (called the first fifth-level small operation unit), and eight seventh-unit circuits and three NOT gates form another fifth-level small operation unit (called the second fifth-level small operation unit). In the first fifth-level small operation unit, the input of the first NOT gate is! G i-4:k ,! P i-4:k , the output is G i-4:k , P i-4:k ; The input of the second NOT gate is! G i-5:k ,! P i-5:k , the output is G i-5:k , P i-5:k ; The input of the third NOT gate is! G i-7 ,! P i-7 , the output is G i-7 , P i-7 ; Wherein, the input of the first and fifth unit circuits includes G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j ; The input of the second and fifth unit circuits includes G i-1:k , P i-1:k , G k-1:j , P k-1:j , used to output after operation! G i-1:j and! i-1:j ; The inputs of the third and fifth unit circuits include G i-2:k , P i-2:k , G k-1:j , P k-1:j , used to output after operation! G i-2:j and! i-2:j; The input of the fourth and fifth unit circuits includes G i-3:k , P i-3:k , G k-1:j , P k-1:j , used to output after operation! G i-3:j and! i-3:j ; The input of the fifth unit circuit includes the output of the first NOT gate, namely G i-4:k , P i-4:k and G k-1:j , P k-1:j , used to output after operation! G i-4:j and! i-4:j The input of the sixth and fifth unit circuits includes the output of the second NOT gate, namely G i-5:k , P i-5:k and G k-1:j , P k-1:j , used to output after operation! G i-5:j and! i-5:j The input of the seventh and fifth unit circuits includes the output of the first NOT gate, namely G i-6:k , P i-6:k and G k-1:j , P k-1:j , used to output after operation! G i-6:j and! i-6:j ; The input of the eighth fifth unit circuit includes the output of the third NOT gate, namely G i-7:k , P i-7:k and G k-1:j , P k-1:j , used to output after operation! G i-7:j and! i-7:j ; Wherein, k = i-7, j = i-15, i = n, and in this embodiment, n = 31. In the second fifth-level small operation unit, the input of the first NOT gate is! G i-4:k ,! P i-4:k , the output is G i-4:k , P i-4:k ; The input of the second NOT gate is! G i-5:k ,! P i-5:k , the output is G i-5:k , P i-5:k ; The input of the third NOT gate is! G i-7 ,! P i-7 , the output is G i-7 , P i-7 ; Wherein, the input of the first and seventh unit circuits includes G i:k , P i:k , G k-1:j , used to output after operation! G i:j ; The input of the second and seventh unit circuits includes G i-1:k , P i-1:k, G k-1:j , used to output after operation! G i-1:j ; The input of the third and seventh unit circuits includes G i-2:k , P i-2:k , G k-1:j , used to output after operation! G i-2:j ; The input of the fourth and seventh unit circuits includes G i-3:k , P i-3:k , G k-1:j , used to output after operation! G i-3:j The input of the fifth and seventh unit circuits includes the output of the first NOT gate, namely G i-4:k , P i-4:k and G k-1:j , used to output after operation! G i-4:j The input of the sixth and seventh unit circuits includes the output of the second NOT gate, namely G i-5:k , P i-5:k and G k-1:j , used to output after operation! G i-5:j ; The input of the seventh unit circuit includes the output of the first NOT gate, namely G i-6:k , P i-6:k and G k-1:j , used to output after operation! G i-6:j The input of the eighth and seventh unit circuits includes the output of the third NOT gate, namely G i-7:k , P i-7:k and G k-1:j , used to output after operation! G i-7:j ; Among them, k=i-7, j=i-15, i=n-16.
[0150] The sixth level arithmetic unit includes The eighth unit circuit and 5 NOT gates, where the input of each NOT gate is G i-8-P:k and P i-8-P:k , used to output !G i-8-P:k and! i-8-P:k , p = 0, 1, 2, 3 and 6; the input of each eighth unit circuit includes! G n-m:k ,! P n-m:k ,! G k-1:j , used to output G after operation n-m:j , where k=i-15, j=i-31, i=17, 18, 19...n; m=0, 1, 2...15.
[0151] The seventh-level operation unit includes n fourth-unit circuits and 11 NOT gates, where the input of each NOT gate is G n-p:0 and P n-p:0 , used to output !G n-p:0 and!n-p:0 , p = 16, 17 ... 23, 28, 29 and 31; the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after addition operation i , where i = 1, 2, 3 ... n, S0 = P0, carry = G 31:0 .
[0152] Fig.15 In the embodiment shown, the circuit is reduced by sharing logic, and the original P i The logic circuit structure is transformed into the generation! i The logic circuit structure uses NAND and OAI gates to replace the XNR circuit, thus saving a NAND gate.
[0153] In an exemplary embodiment, a BK adder is taken as an example, where BK is the abbreviation of Brent Kung Adder. The BK adder was proposed by Richard P. Brent and Professor HT Kung in the 1980s. The BK adder is derived using typical PG logic. Fig.16 Schematic diagram of the topological structure of a BK adder circuit in one embodiment, Fig.17 FIG. 1 is a schematic diagram of the topological structure of the first embodiment of the BK adder circuit. In this embodiment, similarly, Fig.17 In the BK adder circuit shown, a combination of the fifth unit circuit whose corresponding schematic symbol is a black pentagon as shown in FIG12(a) and the sixth unit circuit whose corresponding schematic symbol is a black diamond as shown in FIG12(b), and a combination of the seventh unit circuit whose corresponding schematic symbol is a gray pentagon as shown in FIG12(c) and the eighth unit circuit whose corresponding schematic symbol is a gray diamond as shown in FIG12(d).
[0154] like Fig.17 As shown, taking a multi-bit BK adder of n+1=32 bits as an example, the BK adder circuit of the first embodiment of the present application includes ten stages of sequentially connected operation units, the first stage operation unit includes n+1 first unit circuits; the second stage operation unit includes The third-level operation unit includes a fifth unit circuit and a seventh unit circuit; The fourth-level operation unit includes a sixth unit circuit and an eighth unit circuit; The fifth-level operation unit includes one sixth-level unit circuit and one eighth-level unit circuit; the sixth-level operation unit includes two seventh-level unit circuits and one NOT gate; the seventh-level operation unit includes two eighth-level unit circuits and two NOT gates, and one seventh-level unit circuit; the eighth-level operation unit includes four seventh-level unit circuits and four NOT gates, and three eighth-level unit circuits; the ninth-level operation unit includes seven seventh-level unit circuits, eight eighth-level unit circuits, and eight NOT gates; the tenth-level operation unit includes n fourth-level unit circuits and nine NOT gates; wherein,
[0155] In the first-level operation unit, each first unit circuit has an input including a i and b i , used to output G after operation i and P i ; Among them, a i is the information of each bit of data a involved in the addition operation, b i is the bit information of data b involved in the addition operation, i=0, 1, 2...n, n represents the number of bits of data a and data b involved in the addition operation.
[0156] In the second-level operation unit, each fifth unit circuit has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j , where k = i, j = i-1, i = n, n-2, n-4, n-6 ... n-24, n-26, 3; the input of the seventh unit circuit includes G i:k , P i:k , G k-1:j , used to output after operation! G i:j , where k=i, j=i-1, i=1.
[0157] In the third-level operation unit, the input of each sixth unit circuit includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i-m:j and P i-m:j ; Wherein, k = i-1, j = i-3, i = n, n-4, n-8, n-2, n-12, n-16, n-20, 7. The input of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j, where k=i-1, j=i-3, i=3.
[0158] In the fourth-level operation unit, the input of each fifth unit circuit includes G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j , where k=i-3, j=i-7, i=n, n-8, n-16.
[0159] In the fifth-level operation unit, the input of a sixth unit circuit includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j ; Wherein, k = i-7, j = i-15, i = n; the input of an eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j , where k=i-7, j=i-15, i=n-16=15.
[0160] In the sixth-level operation unit, the input of a NOT gate is! G i-8:k and! i-8:k , used to output G i-8:k and P i-8:k ; One of the seventh unit circuits has an input including G i:k , P i:k , G k-1:j , used to output after operation! G i:j ; The input of the seventh unit circuit includes the output of the NOT gate, namely G i-8:k , P i-8:k and G k-1:j , used to output after operation! G i-8:j , where k=i-15, j=i-31, i=n.
[0161] In the seventh-level operation unit, the input of a seventh unit circuit includes G i-12:k , P i-12:k and G k-1:j , used to output after operation! G i-12:j ; The input of one of the NOT gates (the first NOT gate) is G i-4:k+8 and P i-4:k+8 , used to output !G i-4:k+8 and! i-4:k+8, one of the inputs of the eighth unit circuit includes the output of the first NOT gate, that is! G i-4:k+8 and! i-4:k+8 And! G k-1:j , used to output G after operation i-4:j ; The input of the other NOT gate (the second NOT gate) is G i-20:k-8 and P i-20:k-8 , used to output !G i-20:k-8 and! i-20:k-8 , the input of another eighth unit circuit includes the output of the second NOT gate, that is! G i-20:k-8 and! i-20:k-8 And! G k-1:j , used to output G after operation i-20:j ; Among them, k=16, j=i-31, i=n.
[0162] In the eighth-level operation unit, the inputs of the four NOT gates are:! G i:k and! i:k ,! G i-12:k-12 and! i-12:k-12 ,! G i-16:k and! i-16:k ,! G i-24:k and! i-24:k , respectively used to output G i:k and P i:k , G i-12:k-12 and P i-12:k-12 , G i-16:k and P i-16:k , G i-24:k and P i-24:k ; The inputs of the 4 seventh unit circuits include: the output of the NOT gate, i.e. G i:k , P i:k and G k-2:j The output of the NOT gate is G i-12:k-12 , P i-12:k-12 and G k-14:j The output of the NOT gate is G i-16:k-16 , P i-16:k-16 and G k-18:j The output of the NOT gate is G i-24:k-24 , P i-24:k-24 and G k-26:j , respectively used to output after operation:! G i:j ,! G i-12:j ,! G i-16:j and,! G i-24:j ; The inputs of the three eighth unit circuits include:! G i-4:k-4 ,! P i-4:k-4 and! G k-5:j ,! G i-8:k-8 ,! P i-8:k-8 and! Gk-9:j ,! G i-20:k-20 ,! P i-20:k-20 and! G k-21:j , which are used to output G after operation. i-4:j , G i-8:j and G i-20:j ; Among them, k=i-1, j=i-29, i=n-2.
[0163] In the ninth-level operation unit, the input of the seven seventh-unit circuits is: G i:k , P i:k and G k-2:j , where k=i, j=0, and the values of i corresponding to the 7 seventh unit circuits are: i=n-3, n-5, n-9, n-15, n-19, n-21, n-27; the input of each NOT gate is: G i:k and P i:k , for output! G i:k and! i:k The output of each NOT gate is connected to an input of each eighth unit circuit, and the input of each eighth unit circuit includes! G i:k ,! P i:k and! G k-1:j-i , which are used to output G after operation. i-4:j ; Among them, k=i, j=i, and the values of i corresponding to the 8 NOT gates are: i=n-1, n-7, n-11, n-13, n-17, n-23, n-25, n-29.
[0164] The tenth-level operation unit includes n fourth unit circuits and 9 NOT gates, where the input of each NOT gate is! G i-P:0 and! i-P:0 , used to output G i-P:0 and P i-P:0 , the value of i corresponding to each NOT gate is n, p = 0, 3, 5, 9, 15, 19, 21, 27 and 30; the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after operation i , where the value of i corresponding to each fourth unit is: i=1, 2, 3…n, in addition S0=P0, carry=G 31:0 .
[0165] contrast Fig.16 and Fig.17 It is not difficult to see that Fig.17 The topology of the entire BK adder circuit is reconstructed as shown. Fig.16The topological structure of the BK adder circuit shown, combined with the analysis of Figure 8(b) and Figure 9(b), implements the BK adder using a circuit with the simplest structure and the least logic gates. That is to say, the BK adder circuit provided in the embodiment of the present application has a simple structure, is better in terms of area and delay, has lower power consumption, and has a good balance between power consumption and rate, thereby making the circuit run faster and having better performance.
[0166] In one embodiment, in order to reduce the area of the BK adder circuit, reduce its power consumption, and reduce its circuit delay, as shown in FIG. Fig.18 As shown, the ninth unit circuit and a plurality of NOT gates are used, whose corresponding schematic diagram symbol is a black heptagon as shown in FIG12(e). Fig.14 The logic circuit represented by the black heptagonal schematic symbol is a circuit implemented by using the P logic circuit and the G logic circuit provided in the embodiment of the present application as shown in FIG. 12 (e)! P logic +! G logic circuit, Fig.14 The logic circuit represented by the black square schematic symbol is the second unit circuit shown in Figure 11(b). Fig.14 The logic circuit represented by the schematic symbol of the small gray square is the third unit circuit shown in Figure 11(c). Fig.14 The logic circuit represented by the medium grey hexagonal schematic symbol is the fourth unit circuit shown in FIG11( d ).
[0167] like Fig.18 As shown, taking a multi-bit BK adder of n+1=32 bits as an example, the BK adder circuit of the second embodiment of the present application includes ten stages of sequentially connected operation units, the first stage operation unit includes n+1 ninth unit circuits and n+1 NOT gates; the second stage operation unit includes The second unit circuit and the third unit circuit; the third-level operation unit includes The fourth-level operation unit includes a second unit circuit and a third unit circuit; The fifth-level operation unit includes one second unit circuit and one third unit circuit; the sixth-level operation unit includes two third unit circuits; the seventh-level operation unit includes The third unit circuit; the eighth level operation unit includes The ninth-level operation unit includes The tenth-level operation unit includes n fourth unit circuits; wherein,
[0168] In the first-level operation unit, each ninth unit circuit has an input including a i and b i , used to output after operation! G i and! i, the output of each ninth unit circuit is connected to the input of a NOT gate, and the output of each NOT gate is used as the output of the first-level operation unit; where a i is the information of each bit of data a involved in the addition operation, b i is the bit information of data b involved in the addition operation, i=0, 1, 2...n, n+1 represents the number of bits of data a and data b involved in the addition operation.
[0169] In the second-level operation unit, each second unit circuit has an input including G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j , where k = i, j = i-1, i = n, n-2, n-4, n-6 ... n-24, n-26, 3; the input of the third unit circuit includes G i:k , P i:k , G k-1:j , used to output G after operation i:j , where k=i, j=i-1, i=1.
[0170] In the third-level operation unit, the input of each second unit circuit includes G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i-m:j and P i-m:j ; Wherein, k = i-1, j = i-3, i = n, n-4, n-8, n-2, n-12, n-16, n-20, 7. The input of the third unit circuit includes G i:k , P i:k , G k-1:j , used to output G after operation i:j , where k=i-1, j=i-3, i=3.
[0171] In the fourth-level operation unit, the input of each second unit circuit includes G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j , where k = i-3, j = i-7, i = n, n-8, n-16. The third unit circuit input includes G i:k , P i:k , G k-1:j , used to output G after operation i:j , where k=i-3, j=i-7, i=7.
[0172] In the fifth-level operation unit, the input of a second unit circuit includes G i:k , P i:k , G k-1:j , P k-1:j , used to output G after operation i:j and P i:j ; Wherein, k = i-7, j = i-15, i = n; the input of a third unit circuit includes G i:k , P i:k , G k-1:j , used to output G after operation i:j , where k=i-7, j=i-15, i=n-16=15.
[0173] In the sixth-level operation unit, the input of one of the third unit circuits includes G i:k , P i:k , G k-1:j , used to output G after operation i:j ; The input of another third unit circuit includes G i-8:k , P i-8:k and G k-1:j , used to output G after operation i-8:j , where k=i-15, j=i-31, i=n.
[0174] In the seventh-level operation unit, the input of one of the third unit circuits includes G i-12:k , P i-12:k and G k-1:j , used to output G after operation i-12:j ; The input of another third unit circuit includes G i-4:k+8 and P i-4:k+8 and G k-1:j , used to output G after operation i-4:j ; The input of the third unit circuit includes G i-20:k-8 and P i-20:k-8 and G k-1:j , used to output G after operation i-20:j ; Among them, k=16, j=i-31, i=n.
[0175] In the eighth-level operation unit, the inputs of the seven third-unit circuits include: G i:k , P i:k and G k-2:j , G i-4:k-4 , P i-4:k-4 and G k-5:j , G i-8:k-8 , P i-8:k-8 and! G k-9:j , Gi-12:k-12 , P i-12:k-12 and G k-14:j , G i-16:k-16 , P i-16:k-16 and G k-18:j , G i-20:k-20 , P i-20:k-20 and G k-21:j , G i-24:k-24 , P i-24:k-24 and G k-26:j , which are used to output respectively after operation: G i:j , G i-4:j , G i-8:j , G i-12:j , G i-16:j , G i-20:j and G i-24:j ; Among them, k=i-1, j=i-29, i=n-2.
[0176] In the ninth-level operation unit, the input of each third unit circuit is: G i:k , P i:k and G k-1:j , which are used to output G after operation. i:j Among them, k=i, j=0, and the values of i corresponding to each third unit circuit are: i=n-1, n-3, n-5, n-7, n-9, n-11, n-13, n-15, n-17, n-19, n-21, n-23, n-25, n-27, n-29.
[0177] In the tenth-level operation unit, the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after operation i , where the value of i corresponding to each fourth unit is: i=1, 2, 3…n, in addition S0=P0, carry=G 31:0 .
[0178] Fig.18 In the embodiment shown, the circuit is reduced by sharing logic, and the original P i The logic circuit structure is transformed into the generation! i The logic circuit structure uses NAND and OAI gates to replace the XNR circuit, thus saving a NAND gate.
[0179] In another embodiment, in order to further reduce the area of the BK adder circuit, reduce its power consumption, and reduce its circuit delay, as shown in FIG. Fig.19 As shown, using Figure 12(a)~12(e) To implement the BK adder. Fig.19The logic circuit represented by the black heptagonal schematic symbol is a ninth unit circuit of P logic + G logic implemented by the P logic circuit and G logic circuit provided in the embodiment of the present application as shown in FIG. 12 (e). Fig.19 The logic circuit represented by the black pentagonal schematic symbol is a fifth unit circuit of P logic + G logic implemented by the P logic circuit and G logic circuit provided in the embodiment of the present application as shown in FIG. 12 (a). Fig.19 The logic circuit represented by the black diamond schematic symbol is the sixth unit circuit of P logic + G logic implemented by the P logic circuit and G logic circuit provided in the embodiment of the present application as shown in FIG. 12( b ). Fig.19 The logic circuit represented by the gray pentagonal schematic symbol is a G logic circuit implemented by the G logic circuit provided by the embodiment of the present application shown in FIG. 12 (c)! The seventh unit circuit of the G logic, Fig.19 The logic circuit represented by the gray diamond schematic symbol is the eighth unit circuit of a G logic implemented by the G logic circuit provided in the embodiment of the present application as shown in FIG. 12( d ).
[0180] like Fig.19 As shown, taking a multi-bit BK adder of n+1=32 bits as an example, the BK adder circuit of the third embodiment of the present application includes ten stages of sequentially connected operation units, the first stage operation unit includes n+1 ninth unit circuits; the second stage operation unit includes The third-level operation unit includes a sixth unit circuit and an eighth unit circuit; A fifth unit circuit and a seventh unit circuit; the fourth-level operation unit includes The fifth-level operation unit includes one fifth-level unit circuit and one seventh-level unit circuit; the sixth-level operation unit includes two eighth-level unit circuits and one NOT gate; the seventh-level operation unit includes two seventh-level unit circuits and two NOT gates, and one eighth-level unit circuit; the eighth-level operation unit includes four eighth-level unit circuits and four NOT gates, and three seventh-level unit circuits; the ninth-level operation unit includes The eighth unit circuit and 8 NOT gates; the tenth level operation unit includes n fourth unit circuits and 1 NOT gate; wherein,
[0181] In the first-level operation unit, each ninth unit circuit has an input including a i and b i , used to output after operation! G i and! i ; Among them, a i is the information of each bit of data a involved in the addition operation, b iis the bit information of data b involved in the addition operation, i=0, 1, 2...n, n+1 represents the number of bits of data a and data b involved in the addition operation.
[0182] In the second-level operation unit, each sixth unit circuit has an input including! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j , where k=i, j=i-1, i=n, n-2, n-4, n-6...n-24, n-26, 3; the input of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j , where k=i, j=i-1, i=1.
[0183] In the third-level operation unit, the input of each fifth unit circuit includes G i:k , P i:k , G k-1:j , P k-1:j , used to output after operation! G i-m:j and! i-m:j ; Wherein, k = i-1, j = i-3, i = n, n-4, n-8, n-2, n-12, n-16, n-20, 7. The input of the seventh unit circuit includes G i:k , P i:k , G k-1:j , used to output after operation! G i:j , where k=i-1, j=i-3, i=3.
[0184] In the fourth-level operation unit, the input of each sixth unit circuit includes! G i:k ,! P i:k ,! G k-1:j ,! P k-1:j , used to output G after operation i:j and P i:j , where k = i-3, j = i-7, i = n, n-8, n-16. The eighth unit circuit input includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j , where k=i-3, j=i-7, i=7.
[0185] In the fifth-level operation unit, the input of a fifth unit circuit includes G i:k , Pi:k , G k-1:j , P k-1:j , used to output after operation! G i:j and! i:j ; Where k = i-7, j = i-15, i = n; the input of the seventh unit circuit includes G i:k , P i:k , G k-1:j , used to output after operation! G i:j , where k=i-7, j=i-15, i=n-16=15.
[0186] In the sixth-level operation unit, the input of a NOT gate is G i-8:k and P i-8:k , used to output !G i-8:k and! i-8:k ; One of the inputs of the eighth unit circuit includes! G i:k ,! P i:k ,! G k-1:j , used to output G after operation i:j ; Another input of the eighth unit circuit includes the output of the NOT gate, that is, G i-8:k ,! P i-8:k And! G k-1:j , used to output G after operation i-8:j , where k=i-15, j=i-31, i=n.
[0187] In the seventh-level operation unit, the input of an eighth unit circuit includes! G i-12:k ,! P i-12:k And! G k-1:j , used to output G after operation i-12:j ; The input of one of the NOT gates (the first NOT gate) is! G i-4:k+8 and! i-4:k+8 , used to output G i-4:k+8 and P i-4:k+8 , where the input of the seventh unit circuit includes the output of the first NOT gate, namely G i-4:k+8 and P i-4:k+8 and G k-1:j , used to output after operation! G i-4:j ; The input of the other NOT gate (the second NOT gate) is! G i-20:k-8 and! i-20:k-8 , used to output G i-20:k-8 and P i-20:k-8 The input of the seventh unit circuit includes the output of the second NOT gate, namely G i-20:k-8 and P i-20:k-8 and G k-1:j , used to output after operation! G i-20:j; Among them, k=16, j=i-31, i=n.
[0188] In the eighth-level operation unit, the inputs of the four NOT gates are: G i:k and P i:k , G i-12:k-12 and P i-12:k-12 , G i-16:k and P i-16:k , G i-24:k and P i-24:k , respectively used for output! G i:k and! i:k ,! G i-12:k-12 and! i-12:k-12 ,! G i-16:k and! i-16:k ,! G i-24:k and! i-24:k ; The inputs of the four eighth unit circuits include: the output of the NOT gate, that is! G i:k ,! P i:k And! G k-2:j , the output of the NOT gate is G i-12:k-12 ,! P i-12:k-12 And! G k-14:j , the output of the NOT gate is G i-16:k-16 ,! P i-16:k-16 And! G k-18:j , the output of the NOT gate is G i-24:k-24 ,! P i-24:k-24 And! G k-26:j , which are used to output respectively after operation: G i:j , G i-12:j , G i-16:j and G i-24:j ; The inputs of the three seventh unit circuits include: G i-4:k-4 , P i-4:k-4 and G k-5:j , G i-8:k-8 , P i-8:k-8 and G k-9:j , G i-20:k-20 , P i-20:k-20 and G k-21:j , which are used to output after operation respectively! G i-4:j ,! G i-8:j and! G i-20:j ; Among them, k=i-1, j=i-29, i=n-2.
[0189] In the ninth-level operation unit, the input of each NOT gate is: G i:j , for output! G i:j, the output of each NOT gate is connected to one input of 8 eighth unit circuits, wherein the value of i corresponding to each NOT gate is i=29, 23, 19, 17, 13, 7, 5 and 1, j=0. The input of each eighth unit circuit is:! G i:k ,! P i:k And! G k-1:j , which are used to output G after operation. i:j , where k=i, j=0, and the value of i corresponding to each eighth unit circuit is i=n-1, n-3, n-5, n-7...n-25, n-27, n-29.
[0190] The tenth-level operation unit includes n fourth-unit circuits and one NOT gate, wherein the input of the NOT gate is the output of one of the NOT gates in the ninth-level operation unit, that is, G 1:0 , used to output G 1:0 , the input of each fourth unit circuit includes G i-1:0 , P i , used to output S after operation i , where the value of i corresponding to each fourth unit is: i=1, 2, 3…n, in addition S0=P0, carry=G 31:0 .
[0191] Fig.19 In the embodiment shown, the circuit is reduced by sharing logic, and the original P i The logic circuit structure is transformed into the generation! i The logic circuit structure uses NAND and OAI gates to replace the XNR circuit, thus saving a NAND gate.
[0192] It should be noted that if Fig.13 , 14 , 15, 17, 18, and 19, where necessary, some NOT gate circuits will be added, such as Fig.19 In As shown in the schematic diagram symbols, correct logic implementation is ensured, which is something that a person skilled in the art can easily think of when implementing a BK adder based on the P logic circuit and the G logic circuit provided in the embodiment of the present application.
[0193] As described above, an embodiment of the present application provides an adder circuit, wherein the P logic circuit adopts the P logic circuit provided by any one of the embodiments of the present application, and the G logic circuit adopts the G logic circuit provided by any one of the embodiments of the present application.
[0194] The adder circuit provided in the embodiment of the present application reduces the circuit by sharing the logic circuit, for example: iThe logic circuit structure is transformed into the generation! i The logic circuit structure uses nand and oai gates to replace the xnr circuit, thus saving a nand gate. This topological structure of the adder circuit saves the generation of! i Logical AND! G i In other words, the adder circuit provided in the embodiment of the present application adopts a circuit with the simplest structure and the least logic gates. The adder circuit has a simple structure, is better in terms of area and delay, has lower power consumption, and has a good balance between power consumption and speed, thereby making the circuit run faster and having better performance.
[0195] Although the embodiments disclosed in this application are as above, the contents described are only embodiments adopted to facilitate understanding of this application and are not intended to limit this application. Any technician in the field to which this application belongs can make any modifications and changes in the form and details of implementation without departing from the spirit and scope disclosed in this application, but the scope of patent protection of this application shall still be based on the scope defined in the attached claims.
Claims
1. A logic unit circuit, characterized in that: Applied to a multi-bit adder, the logic operation unit circuit is used to implement !P logic and !G logic, including: two NAND gates and one OR gate; wherein, The two inputs of a NAND gate are a i , b i , the output is! G i , and will! G i The output is fed to one input of another NAND gate; The two inputs of the OR gate are a i 、b i , the output is the other input of another NAND gate; The two inputs of the other NAND gate are the output of a NAND gate and the output of the OR gate, and the output is! P i ; Here, i represents the i-th bit in the multi-bit addition.
2. A logic unit circuit, characterized in that: Applied to a multi-bit adder, the logic operation unit circuit is used to implement !G logic and !P logic, including: an AND-NOR gate, an NAND gate; The three inputs of the AND-NOR gate are G i:k , P i:k and G k-1:j , the output of the AND-NOR gate is! G i:j ; The two inputs of the NAND gate are P k-1:j , the P i:k , the output of the NAND gate is! P i:j ; Among them, i, k, and j respectively represent the bit data of the input data of the adder, i>k>j.
3. A logic unit circuit, characterized in that: Applied to a multi-bit adder, the logic operation unit circuit is used to implement G logic and P logic, including: an OR-NAND gate, an NOR gate; The three inputs of the OR-NAND gate are respectively! i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j ; The two inputs of the NOR gate are respectively! k-1:j , as mentioned! i:k , the output of the NOR gate is P i:j ; Among them, i, k, and j respectively represent the bit data of the input data of the adder, i>k>j.
4. A logic unit circuit, characterized in that: Applied to a multi-bit adder, the logic operation unit circuit is used to implement P logic and G logic, including: two NOR gates and one AND gate; wherein, The two inputs of a NOR gate are a i , b i , the output is one input of another NOR gate; The two inputs of the AND gate are a i 、b i , the output is G i , and G i The output is fed to the other input of another NOR gate; The two inputs of the other NOR gate are the output of a NOR gate and the output of the AND gate, and the output is P i ; Here, i represents the i-th bit in the multi-bit addition.
5. An adder circuit, characterized in that: A logic operation unit circuit comprising any one of claims 1 to 4.
6. The adder circuit according to claim 5, wherein: The adder is an LFA adder or a BK adder.
7. An adder circuit, characterized in that: The adder is an n+1=32-bit LFA adder; the LFA adder includes seven stages of sequentially connected operation units, wherein: The first-level operation unit comprises n+1 logic operation unit circuits as claimed in claim 1 and n+1 NOT gates; the output of each logic operation unit circuit as claimed in claim 1 is connected to the input of a NOT gate, and the output of each NOT gate serves as the output of the first-level operation unit; The second-level computing unit includes A second unit circuit and a third unit circuit; wherein the second unit circuit is used to implement P i:j =and(P i-1:j ,P i:k ), G i:j =ao(P i:k ,G k-1:j ,G i:k ); the third unit circuit is used to implement G i:j =ao(P i:k ,G k-1:j ,G i:k ); The third-level computing unit includes the second unit circuit and two the third unit circuits; The fourth level arithmetic unit includes the second unit circuits and four the third unit circuits; The fifth level arithmetic unit includes the second unit circuits and eight the third unit circuits; The sixth level arithmetic unit includes the third unit circuit; The seventh-level operation unit includes n fourth unit circuits; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
8. An adder circuit, characterized in that: The adder is an n+1=32-bit LFA adder; the LFA adder includes seven stages of sequentially connected operation units, wherein: The first-level operation unit includes n+1 logic operation unit circuits as claimed in claim 1; The second-level computing unit includes A logic operation unit circuit as claimed in claim 3, an eighth unit circuit; wherein the eighth unit circuit is used to implement G logic, including: an OR-NAND gate, the three inputs of the OR-NAND gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j; The third-level computing unit includes A NOT gate, a logic operation unit circuit as claimed in claim 2 and two seventh unit circuits; wherein the seventh unit circuit is used to implement! G logic, including: an AND-NOR gate, the three inputs of the AND-NOR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j; The fourth level arithmetic unit includes A NOT gate, a logic operation unit circuit as claimed in claim 3 and four of the eighth unit circuits; The fifth level arithmetic unit includes A NOT gate, a logic operation unit circuit as claimed in claim 2 and eight of the seventh unit circuits; The sixth level arithmetic unit includes The eighth unit circuit and five NOT gates; The seventh-level operation unit includes n fourth unit circuits and 11 NOT gates; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
9. An adder circuit, characterized in that: The adder is an n+1=32-bit BK adder; the BK adder includes ten stages of sequentially connected operation units, wherein: The first-level operation unit comprises n+1 logic operation unit circuits as claimed in claim 1 and n+1 NOT gates; the output of each logic operation unit circuit as claimed in claim 1 is connected to the input of a NOT gate, and the output of each NOT gate serves as the output of the first-level operation unit; The second-level computing unit includes A second unit circuit and a third unit circuit; wherein the second unit circuit is used to implement P i:j =and(P i-1:j ,P i:k ), G i:j =ao(P i:k ,G k-1:j ,G i:k ); the third unit circuit is used to implement G i:j =ao(P i:k ,G k-1:j ,G i:k ); The third-level computing unit includes the second unit circuit and one the third unit circuit; The fourth level arithmetic unit includes the second unit circuit and one the third unit circuit; The fifth-level operation unit includes one of the second unit circuits and one of the third unit circuits; The sixth-level operation unit includes two of the third unit circuits; The seventh level arithmetic unit includes the third unit circuit; The eighth level arithmetic unit includes the third unit circuit; The ninth level arithmetic unit includes the third unit circuit; The tenth-level operation unit includes n fourth unit circuits; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
10. An adder circuit, characterized in that: The adder is an n+1=32-bit BK adder; the BK adder includes ten stages of sequentially connected operation units, wherein: The first-level operation unit includes n+1 logic operation unit circuits as claimed in claim 1; The second-level computing unit includes A logic operation unit circuit as claimed in claim 3, an eighth unit circuit; wherein the eighth unit circuit is used to implement G logic, including: an OR-NAND gate, the three inputs of the OR-NAND gate are respectively! P i:k ,! G k-1:j and! G i:k , the output of the OR-NAND gate is G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j; The third-level computing unit includes a logic operation unit circuit as claimed in claim 2 and a seventh unit circuit; wherein the seventh unit circuit is used to implement! G logic, comprising: an AND-NOR gate, wherein the three inputs of the AND-NOR gate are P i:k , G k-1:j and G i:k , the output of the AND-NOR gate is! G i:j , wherein i, k, and j respectively represent the bit data of the input data of the adder, i>k>j; The fourth level arithmetic unit includes a logic operation unit circuit as claimed in claim 3 and one of the eighth unit circuits; The fifth-level operation unit comprises one logic operation unit circuit as claimed in claim 2 and one of the seventh unit circuits; The sixth-level operation unit includes two of the eighth unit circuits and one NOT gate; The seventh-level operation unit includes two seventh unit circuits and two NOT gates, and one eighth unit circuit; The eighth-level operation unit includes four eighth-unit circuits and four NOT gates, and three seventh-unit circuits; The ninth level arithmetic unit includes The eighth unit circuit and 8 NOT gates; The tenth-level operation unit includes n fourth unit circuits and a NOT gate; wherein the fourth unit circuit is used to implement S i =xor(P i ,G i-1,0 ), S i Represents the output i-th bit data after adder operation.
