A lookup table circuit and configuration method thereof

By designing a lookup table circuit containing n input lookup table and multiplexer, the problem of insufficient application of n input lookup table in the existing technology is solved, flexible arithmetic carry logic and efficient resource utilization are realized, and the application of lookup table is improved. Adaptability.

CN114519320BActive Publication Date: 2024-11-19SHANGHAI FUDAN MICROELECTRONICS GROUP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011296188.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-18
Publication Date
2024-11-19
Estimated Expiration
2040-11-18

AI Technical Summary

Technical Problem

There are shortcomings when using existing lookup table circuits in many scenarios, especially the improvement requirements for n-input lookup tables are not met.

Method used

A lookup table circuit consisting of two n input lookup tables, six multiplexers and two adders is designed. By controlling the output of the multiplexer, selectively applying it to n input lookup tables, n +1 input lookup table, arithmetic carry logic module, etc., improve resource utilization and flexibility.

Benefits of technology

It realizes that increasing the arithmetic carry logic length under the same resource conditions does not affect the number of output ports, while improving the efficiency and flexibility of lookup tables, saving port resources, and enhancing the independence of logic functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114519320B_ABST
    Figure CN114519320B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a lookup table circuit and a configuration method thereof. The lookup table circuit includes two first address input ports, second to n+1th address input ports, a carry input port, a carry output port, a first output port and a second output port, six multiplexers, two n-input lookup tables and two adders. By controlling the outputs of the multiplexers respectively, the lookup table circuit can be selectively applied as one of two n-input lookup tables, one n+1-input lookup table, a two-bit wide arithmetic carry logic module and a one-bit wide arithmetic carry logic module.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of integrated circuits, and in particular to a lookup table circuit and a configuration method thereof. Background Art

[0002] Programmable logic devices include Field Programmable Gate Array (FPGA) and Complex Programmable Logic Device (CPLD). Programmable logic devices include Look-Up Table (LUT) circuits, which can implement combinatorial logic of any n variables through an n-input look-up table.

[0003] The lookup table circuit may include two n-input lookup tables and a selector, wherein the two input terminals of the selector are respectively connected to the two output terminals of the two n-input lookup tables, and the control terminal is connected to the highest address port. The selector may selectively output the signal received by one of its two input terminals based on the signal received by the control terminal, thereby realizing an n+1-input lookup table.

[0004] like Figure 1 As shown, the lookup table circuit 100 includes a first five-input lookup table LUT(5)-A, a second five-input lookup table LUT(5)-B and a selector MUX, wherein the input terminals of the first five-input lookup table LUT(5)-A and the second five-input lookup table LUT(5)-B are commonly connected to the five address input ports IN(1)-IN(5), and the output terminals are respectively connected to the first and second input terminals of the selector MUX, the control terminal of the selector MUX is connected to the sixth address input port IN(6), the output terminal is connected to the second output port OUT6, and the output terminal of the first five-input lookup table LUT(5)-A is connected to the first output port OUT5. When the selector MUX receives the highest bit address signal from the sixth bit address input port through its control terminal, it can output the signal received by one of the first terminal and the second terminal. Summary of the invention

[0005] The technical problem solved by the present invention is that a circuit including two n-input lookup tables needs to be improved so as to be applicable to various scenarios and the like.

[0006] To solve the above technical problems, an embodiment of the present invention provides a lookup table circuit, which includes: two first address input ports, second to n+1th address input ports, a carry input port, a carry output port, a first output port and a second output port, wherein n is an integer greater than or equal to 5; a first n-input lookup table and a second n-input lookup table, which share the second to nth address input ports, the first n-input lookup table uses one of the two first address input ports alone, and the second n-input lookup table uses the other of the two first address input ports alone; three input terminals of a first multiplexer are respectively connected to one of the two first address input ports, a power supply voltage and a ground; three input terminals of a second multiplexer are respectively connected to the other of the two first address input ports, a power supply voltage and a ground; a first input terminal of a third multiplexer is connected to the output terminal of the first n-input lookup table, and a second input terminal is connected to the input terminal of the second n-input lookup table. The first input end of the fourth multiplexer is connected to the output end of the third multiplexer, and the output end is connected to the second output port; the first input end of the fifth multiplexer is connected to the output end of the first n-input lookup table, and the output end is connected to the first output port; the first input end of the sixth multiplexer is connected to the power supply voltage, and the second input end is connected to the output end of the first n-input lookup table; the first input end of the first adder is connected to the carry input port, the second input end is connected to the output end of the first multiplexer, the third input end is connected to the output end of the sixth multiplexer, and the first output end is connected to the second input end of the fifth multiplexer; the first input end of the second adder is connected to the second output end of the first adder, the second input end is connected to the output end of the second multiplexer, the third input end is connected to the output end of the second n-input lookup table, the first output end is connected to the second input end of the fourth multiplexer, and the second output end is connected to the carry output port.

[0007] Optionally, the fourth multiplexer has a control end, including a first static memory connected to the control end of the fourth multiplexer, which is suitable for being configured as a first value or a second value, and the fourth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value.

[0008] Optionally, the n+1th address input port is suitable for receiving a high-level signal or receiving a highest-order address signal, and the third multiplexer is suitable for outputting a signal received at its second input terminal based on the high-level signal, and outputting a signal received at one of its first input terminal and the second input terminal based on the highest-order address signal.

[0009] Optionally, the second adder is suitable for receiving a carry input signal, a carry generation signal and a carry propagation signal respectively, and obtaining a sum output signal and a carry output signal based thereon, the first output end of the second adder is suitable for outputting the sum output signal, and the second output end of the second adder is suitable for outputting the carry output signal.

[0010] Optionally, the other of the two first address input ports is adapted to input the first addend A i One of the second to nth address input ports is suitable for inputting the second addend B i , the second n-input lookup table is adapted based on the first addend A i and the second addend B i A carry propagation signal is obtained and output to the third input terminal of the second adder, and the second multiplexer is adapted to output a carry generation signal corresponding to the carry propagation signal to the second input terminal of the second adder.

[0011] Optionally, the carry input port is suitable for outputting a carry input signal, the first multiplexer is suitable for selecting its grounded first input terminal and outputting a low level signal, the sixth multiplexer is suitable for selecting its first input terminal and outputting a high level signal, and the first adder is suitable for outputting the carry input signal to the first input terminal of the second adder through its second output terminal based on the carry input signal, the low level signal and the high level signal.

[0012] Optionally, the fifth multiplexer is adapted to select its first input terminal to output an output signal of the first n-input lookup table.

[0013] Optionally, the second adder is suitable for receiving the first carry output signal, the second carry generation signal and the second carry propagation signal, and obtaining the second sum output signal and the second carry output signal based thereon, the first output end of the second adder is suitable for outputting the second sum output signal, and the second output end of the second adder is suitable for outputting the second carry output signal.

[0014] Optionally, the other of the two first address input ports is suitable for inputting the high-order first addend A. i+1 , another address input port among the second to nth address input ports is suitable for inputting the second addend B of the high bit i+1 , the second n-input lookup table is adapted based on the high-order first addend A i+1 and the second addend B i+1 A second carry propagation signal is obtained and output to the third input terminal of the second adder, and the second multiplexer is adapted to output a second carry generation signal corresponding to the second carry propagation signal to the second input terminal of the second adder.

[0015] Optionally, the carry input port is suitable for outputting a carry input signal, the sixth multiplexer is suitable for selecting its second input terminal and outputting a first carry propagation signal, the first multiplexer is suitable for outputting a first carry generation signal corresponding to the first carry propagation signal, the first adder is suitable for obtaining a first sum output signal and a first carry output signal based on the carry input signal, the first carry generation signal and the first carry propagation signal, the first output terminal of the first adder is suitable for outputting the first sum output signal, and the second output terminal of the second adder is suitable for outputting the first carry output signal to the first input terminal of the second adder.

[0016] Optionally, one of the two first address input ports is suitable for inputting the first addend A of the lower bit. i One of the second to nth address input ports is suitable for inputting the second addend B of the lower bit. i , the first n-input lookup table is adapted based on the first addend A in the lower order i and the second addend B i A first carry propagation signal is obtained and output to the second input terminal of the sixth multiplexer. The first multiplexer is adapted to output a first carry generation signal corresponding to the first carry propagation signal to the second input terminal of the first adder.

[0017] Optionally, the fifth multiplexer and the sixth multiplexer respectively have a control end, including a second static memory connected to the control ends of the fifth multiplexer and the sixth multiplexer, which is suitable for being configured as a first value or a second value, the fifth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value, and the sixth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value.

[0018] Optionally, the first value is one of 0 or 1, and the second value is the other of 0 or 1.

[0019] Optionally, the lookup table circuit includes a third static memory, and the first multiplexer is adapted to output a corresponding carry generation signal based on a configuration of the third static memory.

[0020] Optionally, the lookup table circuit includes a fourth static memory, and the second multiplexer is adapted to output a corresponding carry generation signal based on a configuration of the fourth static memory.

[0021] An embodiment of the present invention also provides a method for configuring the above-mentioned lookup table circuit, including: outputting a second value to a sixth multiplexer; the sixth multiplexer outputs a first carry propagation signal to a first adder based on the second value; the first adder receives a carry input signal, a first carry generation signal and a first carry propagation signal, and generates a first carry output signal and a first sum output signal based thereon; the second adder receives the first carry output signal, the second carry generation signal and the second carry propagation signal, and generates a second carry output signal and a second sum output signal based thereon; the second adder provides the second carry output signal to a carry output port; the first adder and the second adder respectively provide the first sum output signal and the second sum output signal to a fifth multiplexer and a fourth multiplexer; outputting respective second values ​​to the fourth multiplexer and the fifth multiplexer respectively; the fourth multiplexer and the fifth multiplexer output the second sum output signal and the first sum output signal to the second output port and the first output port respectively based on the second values ​​respectively received.

[0022] Optionally, the method includes: outputting the first value to a sixth multiplexer; the sixth multiplexer outputs a high-level signal to the first adder based on the first value; the first adder receives a carry input signal, a low-level signal and a high-level signal, and outputs a carry input signal based thereon; the second adder receives a carry input signal, a carry generation signal and a carry propagation signal, and generates a carry output signal and a sum output signal based thereon; the second adder provides the carry output signal to a carry output port, and provides the sum output signal to a fourth multiplexer; outputting the second value to the fourth multiplexer; the fourth multiplexer outputs a sum output signal based on the second value it receives, and outputs the sum output signal to the second output port.

[0023] Optionally, the method includes: outputting the first value to a fifth multiplexer; and the fifth multiplexer outputting an output signal of the first n-input lookup table to a first output port based on the first value.

[0024] Optionally, the method includes: outputting the first value to a fourth multiplexer; and the fourth multiplexer outputting a signal received at its first input terminal to a second output port based on the first value.

[0025] Optionally, the method includes: providing a high-level signal to the control end of the third multiplexer via the n+1th address input port; based on the high-level signal, the third multiplexer selects its second input end and outputs the output signal of the second n-input lookup table to the first input end of the fourth multiplexer.

[0026] Optionally, the method includes: providing the highest-order address signal to the control end of the third multiplexer via the n+1th address input port; and causing the third multiplexer to output a signal received by one of its first input end and second input end to the first input end of the fourth multiplexer based on the highest-order address signal.

[0027] Compared with the prior art, the technical solution of the embodiment of the present invention has beneficial effects. For example, the lookup table circuit provided by the embodiment of the present invention includes two n-input lookup tables, six multiplexers, two adders and multiple input ports. By controlling the outputs of the multiplexers respectively, the lookup table circuit can be selectively applied as one of two n-input lookup tables, one n+1-input lookup table, a two-bit wide arithmetic carry logic module and a one-bit wide arithmetic carry logic module.

[0028] For another example, the lookup table circuit provided in the embodiment of the present invention not only improves the efficiency and flexibility of the arithmetic carry logic but also improves the resource utilization of the lookup table by embedding arithmetic carry logic that can be configured to be two-bit wide or one-bit wide.

[0029] For another example, in the lookup table circuit provided by an embodiment of the present invention, the first adder and the second adder that respectively implement low-bit and high-bit operations respectively reuse one address input port and another address input port of two n-input lookup tables without additionally adding input ports to the lookup table circuit, thereby saving port resources of the lookup table circuit.

[0030] For another example, when the lookup table circuit provided by the embodiment of the present invention implements a two-bit wide arithmetic carry logic, its two and output signals can respectively multiplex the first output port and the second output port of the lookup table. Under the same lookup table resources, although the length of the arithmetic carry logic is doubled, the number of output ports does not need to be increased, thereby minimizing the impact of the increase in the length of the arithmetic carry logic on the number of output ports.

[0031] For another example, when the lookup table circuit provided by an embodiment of the present invention implements one-bit wide arithmetic carry logic, the first n-input lookup table can be used independently. When the first n-input lookup table is used independently, its newly added, independently used address input port can increase the flexibility of the n-input lookup table in implementing logical functions.

[0032] For another example, when the lookup table circuit provided by the embodiment of the present invention implements two-bit wide or one-bit wide arithmetic carry logic, its output can be freely selected for registered output or direct output, effectively ensuring that the number of output ports does not increase under the same lookup table resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] Figure 1It is a schematic diagram of the structure of a six-output lookup table implemented by two five-input lookup tables in the prior art;

[0034] Figure 2 is a schematic structural diagram of a lookup table circuit including two n-input lookup tables in an embodiment of the present invention;

[0035] Figure 3 is a partial logic circuit diagram of a lookup table circuit in an embodiment of the present invention, wherein a first adder is illustrated, but a first multiplexer is not illustrated;

[0036] Figure 4 is a schematic diagram of the structure of a lookup table circuit including two five-input lookup tables in an embodiment of the present invention;

[0037] Figure 5 is a first flow chart of a method for configuring a lookup table circuit in an embodiment of the present invention;

[0038] Figure 6 is a second flow chart of the method for configuring a lookup table circuit in an embodiment of the present invention. DETAILED DESCRIPTION

[0039] In an embodiment of the present invention, the adder can perform an addition operation on an addend at its i-th position and another addend according to the following formula:

[0040]

[0041]

[0042] make:

[0043] G i =A i *B i (3)

[0044]

[0045] but:

[0046] C i+1 =G i +P i *C i (5)

[0047]

[0048] Among them, A i is an addend at the ith position, B i is another addend at the ith position, C i is the carry input signal of the i-th bit, S i is the sum of the ith bit, G iGenerates a signal for the carry of the i-th bit, P i is the carry propagation signal of the i-th bit, C i+1 is the carry output signal of the i-th bit, that is, the carry input signal of the i+1-th bit, where i is an integer greater than or equal to 1.

[0049] A one-bit wide arithmetic carry logic module can be implemented by two lookup tables, for example, Figure 1 The existing lookup table circuit structure shown can be changed into a one-bit wide arithmetic carry logic module. Specifically, an addend A is input from two of the five address input ports IN(1)-IN(5). i and another addend B i Transmitted to the first five-input lookup table LUT (5)-A, which generates a carry generation signal G i and output to the first output port OUT5; an addend A is input from two of the five address input ports IN(1)-IN(5) i and another addend B i Transmitted to the second five-input lookup table LUT (5)-B, which generates a carry propagation signal P i , and output to the second output port OUT6 through the selector MUX.

[0050] In an embodiment of the present invention, the lookup table circuit includes two n-input lookup tables, six multiplexers, two adders and multiple input ports. By controlling the outputs of the multiplexers respectively, the lookup table circuit can be selectively applied as one of two n-input lookup tables, one n+1-input lookup table, a two-bit wide arithmetic carry logic module and a one-bit wide arithmetic carry logic module.

[0051] In an embodiment of the present invention, the lookup table circuit can be applied as an arithmetic carry logic module, thereby reducing the dependence of small-scale operations on digital signal processing (DSP) resources.

[0052] In an embodiment of the present invention, the lookup table circuit may be applied as an arithmetic carry logic module, and may perform a two-bit wide or one-bit wide carry operation.

[0053] Compared with a one-bit wide arithmetic carry logic module implemented by two lookup tables, the lookup table circuit provided by the embodiment of the present invention can implement a two-bit wide carry operation based on the same number of lookup tables, which not only has a more efficient arithmetic carry logic function, but also improves the utilization rate of the lookup table.

[0054] In an embodiment of the present invention, the first adder and the second adder that respectively implement low-bit and high-bit operations in the lookup table circuit each reuse one address input port and another address input port of two n-input lookup tables without additionally increasing the input ports of the lookup table circuit, thereby saving port resources of the lookup table circuit.

[0055] In an embodiment of the present invention, the lookup table circuit outputs signals through existing ports, such as outputting the second carry output signal through a carry output port, outputting the first sum output signal through a first output port, and outputting the second sum output signal through a second output port, so as to implement a two-bit wide carry operation, and can also choose to output the signal to a register or other computing module without additionally adding an output port of the lookup table circuit, thereby saving port resources of the lookup table circuit.

[0056] In an embodiment of the present invention, the lookup table circuit can also implement a one-bit wide carry operation, and when implementing a one-bit wide carry operation, the first n-input lookup table can be used independently. When the first n-input lookup table is used independently, its newly added, independently used address input port can increase the flexibility of the n-input lookup table in implementing logical functions.

[0057] In order to make the above-mentioned purposes, features and beneficial effects of the embodiments of the present invention more obvious and easy to understand, specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0058] Figure 2 1 is a schematic diagram of the structure of a lookup table circuit including two n-input lookup tables in an embodiment of the present invention.

[0059] like Figure 2 As shown, the lookup table circuit 200 includes two first address input ports IN(1A) and IN(1B), second to n+1th address input ports IN(2), ..., IN(n), IN(n+1), a carry input port CIN, a carry output port COUT, a first output port OUT1 and a second output port OUT2, wherein the first address input port has two, the second to n+1th address input ports have one respectively, and n is an integer greater than or equal to 5.

[0060] The lookup table circuit 200 further includes first to sixth multiplexers MUX1, MUX2, MUX3, MUX4, MUX5 and MUX6, a first n-input lookup table LUT(n)-1 and a second n-input lookup table LUT(n)-2, and a first adder[0] and a second adder[1].

[0061] The first n-input lookup table LUT(n)-1 and the second n-input lookup table LUT(n)-2 both share the second to nth address input ports IN(2), ..., IN(n). The first n-input lookup table LUT(n)-1 solely uses one IN(1A) of the two first address input ports IN(1A) and IN(1B) as its address input port, and the second n-input lookup table LUT(n)-2 solely uses the other IN(1B) of the two first address input ports IN(1A) and IN(1B) as its address input port.

[0062] The first to nth address input ports IN(1A) / IN(1B), IN(2), ..., IN(n) can respectively receive address signals arranged from low to high; the received address signals can be respectively used as input signals of the first n-input lookup table LUT(n)-1 and the second n-input lookup table LUT(n)-2; and the first address input port IN(1A) can also pass through the first multiplexer MUX1 and serve as the input signal of the first adder[0], and the first address input port IN(1B) can also pass through the second multiplexer MUX2 and serve as the input signal of the second adder[1]; the n+1th address input port IN(n+1) is suitable for receiving a high-level signal or an address signal and providing it to the control end of the third multiplexer MUX3.

[0063] The carry input port CIN is adapted to receive a carry input signal and provide it to the first adder [0] for calculating a carry output signal and a sum output signal. The carry output port COUT is adapted to output a carry output signal, which can be used as a carry input signal of the next level arithmetic logic module.

[0064] The first output port OUT1 and the second output port OUT2 output different signals based on different applications of the lookup table circuit 200 . When the lookup table circuit 200 is applied as two n-input lookup tables, the first output port OUT1 and the second output port OUT2 can be used as the output ports of the first n-input lookup table LUT(n)-1 and the second n-input lookup table LUT(n)-2 respectively; when the lookup table circuit 200 is applied as an n+1-input lookup table, the second output port OUT2 can be used as the output port of the n+1-input lookup table; when the lookup table circuit 200 is applied as a two-bit wide arithmetic carry logic module, the first output port OUT1 and the second output port OUT2 can be used as the output ports of the neutralized output signal of the first adder[0] and the second adder[1] respectively; when the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the second output port OUT2 can be used as the output port of the neutralized output signal of the second adder[1]. At this time, the first n-input lookup table can be used independently, and the first output port OUT1 can be used as the output port of the first n-input lookup table LUT(n)-1.

[0065] The first multiplexer MUX1 has three input terminals and one output terminal, wherein the first input terminal is grounded, the second input terminal is connected to the power supply voltage, the third input terminal is connected to one IN(1A) of the two first address input ports IN(1A) and IN(1B), and the output terminal is connected to the second input terminal of the first adder[0].

[0066] The second multiplexer MUX2 has three input terminals and one output terminal, wherein the first input terminal is grounded, the second input terminal is connected to the power supply voltage, the third input terminal is connected to the other IN(1B) of the two first address input ports IN(1A) and IN(1B), and the output terminal is connected to the second input terminal of the second adder[1].

[0067] The third multiplexer MUX3 has two input terminals, a control terminal and an output terminal, wherein the first input terminal is connected to the output terminal of the first n-input lookup table LUT(n)-1, the second input terminal is connected to the output terminal of the second n-input lookup table LUT(n)-2, the control terminal is connected to the n+1th address input port IN(n+1), and the output terminal is connected to the first input terminal of the fourth multiplexer MUX4.

[0068] The fourth multiplexer MUX4 has two input terminals and one output terminal, wherein the first input terminal is connected to the output terminal of the third multiplexer MUX3, the second input terminal is connected to the first output terminal of the second adder [1], and the output terminal is connected to the second output port OUT2.

[0069] The fifth multiplexer MUX5 has two input terminals and one output terminal, wherein the first input terminal is connected to the output terminal of the first n-input lookup table LUT(n)-1, the second input terminal is connected to the first output terminal of the first adder adder[0], and the output terminal is connected to the first output port OUT1.

[0070] The sixth multiplexer MUX6 has two input terminals and one output terminal, wherein the first input terminal is connected to the power supply voltage, the second input terminal is connected to the output terminal of the first n-input lookup table LUT(n)-1, and the output terminal is connected to the third input terminal of the first adder[0].

[0071] The first adder [0] has three input terminals and two output terminals, wherein the first input terminal is connected to the carry input port CIN, the second input terminal is connected to the output terminal of the first multiplexer MUX1, the third input terminal is connected to the output terminal of the sixth multiplexer MUX6, the first output terminal is connected to the second input terminal of the fifth multiplexer MUX5 and outputs the sum output signal, and the second output terminal is connected to the first input terminal of the second adder [1] and outputs the carry output signal.

[0072] The second adder[1] has three input terminals and two output terminals, wherein the first input terminal is connected to the second output terminal of the first adder[0], the second input terminal is connected to the output terminal of the second multiplexer MUX2, the third input terminal is connected to the output terminal of the second n-input lookup table LUT(n)-2, the first output terminal is connected to the second input terminal of the fourth multiplexer MUX4 and outputs the sum-output signal, and the second output terminal is connected to the carry output port COUT and outputs the carry output signal.

[0073] In a specific implementation, the fourth multiplexer MUX4 also has a control terminal, and the lookup table circuit 200 also includes a first static memory SRAM0 connected to the control terminal of the fourth multiplexer MUX4. The first static memory SRAM0 is suitable for storing configuration information according to the instruction of the control module, and the configuration information may include a first value or a second value. The fourth multiplexer MUX4 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value.

[0074] Specifically, the first value is one of 0 or 1, and the second value is the other of 0 or 1. For example, the first value may be 0, and the second value may be 1.

[0075] When the first static memory SRAM0 is configured as a first value, the fourth multiplexer MUX4 is adapted to output a signal outputted by the output terminal of the third multiplexer MUX3 received at its first input terminal based on the first value. When the first static memory SRAM0 is configured as a second value, the fourth multiplexer MUX4 is adapted to output a signal outputted by the first output terminal of the second adder [1] received at its second input terminal based on the second value.

[0076] In a specific implementation, the fifth multiplexer MUX5 and the sixth multiplexer MUX6 also have control terminals respectively, and the lookup table circuit 200 also includes a second static memory SRAM1 connected to the control terminals of the fifth multiplexer MUX5 and the sixth multiplexer MUX6. The second static memory SRAM1 is suitable for storing configuration information according to the instructions of the control module, and the configuration information may include a first value or a second value. The fifth multiplexer MUX5 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value. The sixth multiplexer MUX6 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value.

[0077] Specifically, the first value is one of 0 or 1, and the second value is the other of 0 or 1. For example, the first value may be 0, and the second value may be 1.

[0078] When the second static memory SRAM1 is configured to the first value, the fifth multiplexer MUX5 is suitable for outputting the signal output by the first n-input lookup table LUT(n)-1 received at its first input terminal based on the first value, and the sixth multiplexer MUX6 is suitable for outputting the high-level signal (data "1") received at its first input terminal based on the first value.

[0079] When the second static memory SRAM1 is configured to a second value, the fifth multiplexer MUX5 is suitable for outputting the sum output signal of the first output terminal of the first adder[0] received at its second input terminal based on the second value, and the sixth multiplexer MUX6 is suitable for outputting the signal output of the first n-input lookup table LUT(n)-1 received at its second input terminal based on the second value.

[0080] In the embodiment of the present invention, the lookup table circuit 200 can be selectively applied as one of two n-input lookup tables, one n+1-input lookup table, a two-bit wide arithmetic carry logic module, and a one-bit wide arithmetic carry logic module.

[0081] Specifically, the application of the lookup table circuit 200 depends on the configuration of the first static memory SRAM0 , the second static memory SRAM1 , and the n+1th address input port IN(n+1).

[0082] In a specific implementation, when the first static memory SRAM0 is configured as the first value, the second static memory SRAM1 is configured as the first value and the n+1th address input port IN(n+1) is configured as a high level signal, the lookup table circuit 200 can be applied as two n-input lookup tables.

[0083] When the first static memory SRAM0 is configured as the first value and the n+1th address input port IN(n+1) is configured as the highest bit address signal, the lookup table circuit 200 can be applied as an n+1-input lookup table. Further, when the second static memory SRAM1 is configured as the first value, the lookup table circuit 200 can also be applied as the first n-input lookup table.

[0084] When the first static memory SRAM0 is configured as a first value, the second static memory SRAM1 is configured as a second value, and the n+1th address input port IN(n+1) is configured as a high-level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module. At this time, the second n-input lookup table LUT(n)-2 is no longer used alone, and outputs a high-level signal (data "1"); and the second input terminal of the second adder[1] receives a low-level signal (data "0"), and its third input terminal receives a high-level signal (data "1") output by the second n-input lookup table LUT(n)-2. Thus, the carry output signal output by the first adder[0] can be transmitted to the carry output port COUT through the second adder[1].

[0085] When the first static memory SRAM0 is configured as the second value and the second static memory SRAM1 is configured as the second value, the lookup table circuit 200 may be applied as a two-bit wide arithmetic carry logic module.

[0086] When the first static memory SRAM0 is configured as the second value and the second static memory SRAM1 is configured as the first value, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module and a first n-input lookup table.

[0087] Five of these situations are illustrated below.

[0088] In the first case, when the first static memory SRAM0 is configured as a first value (for example, the first value is 0), the second static memory SRAM1 is configured as a first value (for example, the first value is 0) and the n+1th address input port IN(n+1) receives a high level signal, the lookup table circuit 200 can be applied as two n-input lookup tables.

[0089] Specifically, the first address input port IN(1A), the second to nth address input ports IN(2), ..., IN(n) collectively serve as the address input ports of the first n-input lookup table LUT(n)-1, and the fifth multiplexer MUX5 selects the signal received at its first input terminal based on the first value configured in the second static memory SRAM1, that is, the signal output by the first n-input lookup table LUT(n)-1, and outputs it to the first output port OUT1.

[0090] The first address input port IN(1B), the second to the nth address input ports IN(2), ..., IN(n) together serve as the address input ports of the second n-input lookup table LUT(n)-2. The third multiplexer MUX3 selects the signal received at its second input terminal based on the high-level signal received at its control terminal, i.e., the signal output by the second n-input lookup table LUT(n)-2, and outputs it to the first input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the signal received at its first input terminal based on the first value configured in the first static memory SRAM0, i.e., the signal output by the second n-input lookup table LUT(n)-2, and outputs it to the second output port OUT2.

[0091] In the second case, when the first static memory SRAM0 is configured as a first value (eg, the first value is 0) and the n+1th address input port IN(n+1) receives the highest bit address signal, the lookup table circuit 200 can be applied as an n+1-input lookup table.

[0092] Specifically, the first address input port IN(1A), the second to the nth address input ports IN(2), ..., IN(n) collectively serve as the address input ports of the first n-input lookup table LUT(n)-1, the first address input port IN(1B), the second to the nth address input ports IN(2), ..., IN(n) collectively serve as the address input ports of the second n-input lookup table LUT(n)-2, the third multiplexer MUX3 forms an n+1 input lookup table LUT(n+1) based on the highest bit address signal received by the n+1th address input port IN(n+1) and the first n-input lookup table LUT(n)-1 and the second n-input lookup table LUT(n)-2, and outputs the signal output by the n+1 input lookup table LUT(n+1) to the first input terminal of the fourth multiplexer MUX4, the fourth multiplexer MUX4 selects the signal received at its first input terminal, i.e., the signal output by the n+1 input lookup table LUT(n+1), based on the first value configured by the first static memory SRAM0, and outputs it to the second output port OUT2.

[0093] In the third case, when the first static memory SRAM0 is configured as the second value (eg, the second value is 1) and the second static memory SRAM1 is configured as the second value (eg, the second value is 1), the lookup table circuit 200 can be applied as a two-bit wide arithmetic carry logic module.

[0094] When the lookup table circuit 200 is applied as a two-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as a first addend A and a second addend B, respectively, wherein the first addend A includes the first addend A of the lower bit. i and the first addend A in the high position i+1 , the second addend B includes the lower second addend B i and the second addend B in the high digit i+1 .

[0095] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0096] The first addend in the low position A i (In some other embodiments, it may also be the second addend B in the lower order. i ) is input into the first n-input lookup table LUT(n)-1 through one of the two first address input ports IN(1A) and IN(1B), and the second addend B in the lower order i (In some other embodiments, it may also be the first addend A in the lower order. i ) inputs the first n-input lookup table LUT(n)-1 through one of the second to n-th address input ports IN(2), . . . , IN(n). The first n-input lookup table LUT(n)-1 is based on the first addend A of the lower bits. i and the second addend B i According to formula (4), we get the first carry propagation signal P i , and outputs it to the second input terminal of the sixth multiplexer MUX6. The sixth multiplexer MUX6 selects the first carry propagation signal P received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the third input terminal of the first adder [0].

[0097] In some embodiments, the first multiplexer MUX1 can select the first addend A of the lower bit of the first address input port IN(1A) received at its third input terminal. i (In some other embodiments, it may also be the second addend B in the lower order. i ) as the first carry generation signal G i, and output to the second input terminal of the first adder[0].

[0098] Figure 3 1 is a partial logic circuit diagram of a lookup table circuit in an embodiment of the present invention, wherein the first adder is illustrated but the first multiplexer is not illustrated; the second adder has a similar structure and working principle.

[0099] like Figure 3 As shown, the first adder [0] includes a seventh multiplexer MUX7. The seventh multiplexer MUX7 has two input terminals, a control terminal and an output terminal, wherein the first input terminal is used to receive the first addend A of the lower bit. i As the first carry generation signal G i The second input terminal is used to receive the carry input signal C i , the control terminal is used to receive the first carry propagation signal P i , the output terminal is used to output the first carry output signal C i+1 .

[0100] In a specific implementation, the seventh multiplexer MUX7 can be based on the first carry propagation signal P received at its control terminal. i And select the first addend A in the low position i Or carry input signal C i As the first carry output signal C i+1 Output.

[0101] Specifically, when the first addend A in the low position i and the second addend B i When the two take different values, according to formulas (3), (4) and (5), the first carry generation signal G is obtained i =0, the first carry propagation signal P i =1, first carry output signal C i+1 =C i Therefore, when the first carry propagation signal P i =1, the seventh multiplexer MUX7 can select the carry input signal C received at its second input terminal. i As the first carry output signal C i+1 Output.

[0102] When the first addend A i and the second addend B i When both are "1", according to formulas (3), (4) and (5), the first carry generation signal G is obtained. i =1, the first carry propagation signal P i =0, first carry output signal C i+1 =1. Therefore, when the first carry propagation signal Pi =0, the seventh multiplexer MUX7 can select the first addend A of the lower bit received at its first input terminal. i As the first carry output signal C i+1 Output.

[0103] When the first addend A i and the second addend B i When both are "0", according to formulas (3), (4) and (5), the first carry generation signal G is obtained. i =0, the first carry propagation signal P i =0, first carry output signal C i+1 = 0. Therefore, when the first carry propagation signal P i =0, the seventh multiplexer MUX7 can select the first addend A of the lower bit received at its first input terminal. i As the first carry output signal C i+1 Output.

[0104] Thus, in the embodiment of the present invention, the first multiplexer MUX1 can select the first addend A of the lower bit inputted by the first address input port IN(1A) received at its third input terminal. i (In some other embodiments, it may also be the second addend B in the lower order. i ) as the first carry generation signal G i , and output to the second input terminal of the first adder[0].

[0105] In some other embodiments, the lookup table circuit 200 further includes a third static memory SRAM2 connected to the first multiplexer MUX1, and the third static memory SRAM2 is adapted to store configuration information according to the instruction of the control module. The first multiplexer MUX1 is adapted to output a corresponding first carry generation signal G based on the configuration information of the third static memory SRAM2. i .

[0106] Specifically, the configuration information may include a first value or a second value. The first value is one of 0 and 1, and the second value is the other of 0 and 1. For example, the first value may be 0, and the second value may be 1.

[0107] When the third static memory SRAM2 is configured as the first value, the first multiplexer MUX1 is adapted to output the low level signal (data “0”) received at its first input terminal as the first carry generation signal G based on the first value. i When the third static memory SRAM2 is configured as the second value, the first multiplexer MUX1 is adapted to output the power supply voltage VDD signal (data “1”) received at the second input terminal as the first carry generation signal G based on the second value.i .

[0108] In the embodiment of the present invention, when the first carry signal G is generated i When the third static memory SRAM2 is always "0", the third static memory SRAM2 can be configured as the first value, so that the first multiplexer MUX1 can output the low level signal (data "0") received at its first input terminal as the first carry generation signal G based on the first value. i , at this time the first addend A in the low position i is 0; when the first carry generates signal G i When the third static memory SRAM2 is always "1", the third static memory SRAM2 can be configured as the second value, so that the first multiplexer MUX1 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the first carry generation signal G based on the second value. i , at this time the first addend A in the low position i is 1.

[0109] The first adder[0] can be based on the carry input signal C i , the first carry generates a signal G i and the first carry propagation signal P i According to formulas (5) and (6), the first and output signal S are obtained. i and the first carry output signal C i+1 Among them, the first and output signal S i The first output terminal of the first adder [0] is output to the second input terminal of the fifth multiplexer MUX5. The fifth multiplexer MUX5 selects the first and output signals S received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the first output port OUT1, the first carry output signal C i+1 It is output to the first input terminal of the second adder [1] through the second output terminal of the first adder [0] and can be used as a carry input signal of the high-bit arithmetic logic.

[0110] The first addend A in the high position i+1 (In some other embodiments, it may also be the second addend B in the high order. i+1 ) is input into the second n-input lookup table LUT(n)-2 through the other of the two first address input ports IN(1A) and IN(1B), and the second addend B in the high order i+1 (In some other embodiments, it may also be the first addend A in the high order. i+1) inputs the second n-input lookup table LUT(n)-2 through another unoccupied address input port among the second to n-th address input ports IN(2), ..., IN(n). The second n-input lookup table LUT(n)-2 is based on the first addend A of the high order bits. i+1 and the second addend B i+1 According to formula (4), the second carry propagation signal P is obtained i+1 , and output to the third input terminal of the second adder[1].

[0111] In some embodiments, the structure of the second adder [1] can refer to Figure 3 Thus, the second multiplexer MUX2 can also select the high-order first addend A inputted by the first address input port IN(1B) received at its third input terminal. i+1 (In some other embodiments, it may also be the second addend B in the high order. i+1 ) as the second carry generation signal G i+1 , and output to the second input terminal of the second adder[1].

[0112] In some other embodiments, the lookup table circuit 200 further includes a fourth static memory SRAM3 connected to the second multiplexer MUX2, and the fourth static memory SRAM3 is suitable for storing configuration information according to the instruction of the control module. The second multiplexer MUX2 is suitable for outputting the corresponding second carry generation signal G based on the configuration information of the third static memory SARM2. i+1 .

[0113] Specifically, the configuration information may include a first value or a second value. The first value is one of 0 and 1, and the second value is the other of 0 and 1. For example, the first value may be 0, and the second value may be 1.

[0114] When the fourth static memory SRAM3 is configured as the first value, the second multiplexer MUX2 is adapted to output the low level signal (data “0”) received at its first input terminal as the second carry generation signal G based on the first value. i+1 When the fourth static memory SRAM3 is configured as the second value, the second multiplexer MUX2 is adapted to output the power supply voltage VDD signal (data “1”) received at the second input terminal as the second carry generation signal G based on the second value. i+1 .

[0115] In the embodiment of the present invention, when the second carry generation signal G i+1When the fourth static memory SRAM3 is always "0", the fourth static memory SRAM3 can be configured as the first value, so that the second multiplexer MUX2 can output the low level signal (data "0") received at its first input terminal as the second carry generation signal G based on the first value. i+1 , at this time the first addend A in the high position i+1 is 0; when the second carry generates signal G i+1 When the fourth static memory SRAM3 is always "1", the fourth static memory SRAM3 can be configured as the second value, so that the second multiplexer MUX2 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the second carry generation signal G based on the second value. i+1 , at this time the first addend A in the high position i+1 is 1.

[0116] The second adder[1] can be based on the first carry output signal C i+1 , the second carry generation signal G i+1 and the second carry propagation signal P i+1 According to formulas (5) and (6), the second and output signal S i+1 and the second carry output signal C i+2 Among them, the second and output signal S i+1 The first output terminal of the second adder [1] is output to the second input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the second sum output signal S received at its second input terminal based on the second value configured in the first static memory SRAM0. i+1 Output to the second output port OUT2, the second carry output signal C i+2 It is output to the carry output port COUT through the second output terminal of the second adder [1] and can be used as the carry input signal of the next-level arithmetic logic module.

[0117] In a fourth case, when the first static memory SRAM0 is configured as a second value (eg, 1) and the second static memory SRAM1 is configured as a first value (eg, 0), the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module.

[0118] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as the first addend A and the second addend B respectively. i and the second addend B i .

[0119] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0120] The third static memory SRAM2 is configured as a first value, and the first multiplexer MUX1 selects the low-level signal (data "0") received at its first input terminal based on the first value configured in the third static memory SRAM2 and outputs it to the second input terminal of the first adder[0], that is, outputs the empty carry generation signal G=0 to the first adder[0].

[0121] The sixth multiplexer MUX6 selects the high level signal (data "1") received at its first input terminal based on the first value configured in the second static memory SRAM1 and outputs it to the third input terminal of the first adder[0], that is, outputs the empty carry propagation signal P=1 to the first adder[0].

[0122] The first adder is based on the carry input signal C i , empty carry generation signal G and empty carry propagation signal P, according to formula (5), the empty carry output signal C is obtained, that is, C = C i The empty position carries out the output signal C, that is, C i , is output to the first input terminal of the second adder[1] through the second output terminal of the first adder[0], and serves as the carry input signal of the second adder[1].

[0123] The empty bit indicates that the two addend inputs of the first adder adder[0] are empty, which is not used for the logical operation of the two addends, but only for transmitting the carry input signal C. i .

[0124] Therefore, when the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the carry input signal CIN input to the first adder[0] through the carry input port CIN is i It can be directly used as the carry input signal of the second adder[1].

[0125] First addend A i (In some other embodiments, it may also be the second addend B i ) is input into the second n-input lookup table LUT(n)-2 through the other of the two first address input ports IN(1A) and IN(1B), the second addend B i (In some other embodiments, it may also be the first addend A i ) inputs the second n-input lookup table LUT(n)-2 through one of the second to n-th address input ports. The second n-input lookup table LUT(n)-2 is based on the first addend A i and the second addend B iAccording to formula (4), we get the carry propagation signal P i , and output to the third input terminal of the second adder[1].

[0126] When the carry signal G is generated i When it is not always "1" or "0", the second multiplexer MUX2 can select the first addend A inputted by the first address input port IN(1B) received at its third input terminal. i (In some other embodiments, it may also be the second addend B i ) as the carry generation signal G i , and output to the second input terminal of the second adder[1].

[0127] When the carry signal G is generated i When the fourth static memory SRAM3 is always "0", the fourth static memory SRAM3 can be configured as the first value, so that the second multiplexer MUX2 can output the low level signal (data "0") received at its first input terminal as the carry generation signal G based on the first value. i .

[0128] When the carry signal G is generated i When the fourth static memory SRAM3 is always "1", the fourth static memory SRAM3 can be configured as the second value, so that the second multiplexer MUX2 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the carry generation signal G based on the second value. i .

[0129] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, a one-bit wide arithmetic carry logic operation can be implemented by the second adder [1]. The second adder [1] can be based on the carry input signal C i , Carry generates signal G i and the carry propagation signal P i According to formulas (5) and (6), we get the output signal S i and carry output signal C i+1 Among them, the output signal S i The first output terminal of the second adder [1] is output to the second input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the sum output signal S received at its second input terminal based on the second value configured in the first static memory SRAM0. i Output to the second output port OUT2; carry output signal C i+1 It is output to the carry output port COUT through the second output terminal of the second adder [1] and can be used as the carry input signal of the next-level arithmetic logic module.

[0130] When the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the first n-input lookup table LUT(n)-1 can be used independently. The fifth multiplexer MUX5 selects the signal output by the first n-input lookup table LUT(n)-1 received at its first input terminal based on the first value configured in the second static memory SRAM1, and outputs it to the first output port OUT1.

[0131] In the fifth case, when the first static memory SRAM0 is configured as a first value (for example, the first value is 0), the second static memory SRAM1 is configured as a second value (for example, the second value is 1), and the n+1th address input port IN(n+1) is configured as a high level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module.

[0132] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as the first addend A and the second addend B respectively. i and the second addend B i .

[0133] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0134] First addend A i (In some other embodiments, it may also be the second addend B i ) inputs the first n-input lookup table LUT(n)-1 through one of the two first address input ports IN(1A) and IN(1B), and the second addend B i (In some other embodiments, it may also be the first addend A i ) inputs the first n-input lookup table LUT(n)-1 through one of the second to n-th address input ports IN(2), . . . , IN(n). The first n-input lookup table LUT(n)-1 is based on the first addend A i and the second addend B i According to formula (4), we get the carry propagation signal P i , and outputs it to the second input terminal of the sixth multiplexer MUX6. The sixth multiplexer MUX6 selects the carry propagation signal P received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the third input terminal of the first adder [0].

[0135] In some embodiments, the first multiplexer MUX1 can select the first addend A inputted by the first address input port IN(1A) received at its third input terminal. i (In some other embodiments, it may also be the second addend B i ) as the carry generation signal G i , and output to the second input terminal of the first adder[0].

[0136] The first adder[0] can be based on the carry input signal C i , Carry generates signal G i and the carry propagation signal P i According to formulas (5) and (6), we get the output signal S i and carry output signal C i+1 Among them, the output signal S i The first output terminal of the first adder [0] is output to the second input terminal of the fifth multiplexer MUX5. The fifth multiplexer MUX5 selects the sum output signal S received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the first output port OUT1, carry output signal C i+1 The signal is outputted to the first input terminal of the second adder [1] through the second output terminal of the first adder [0].

[0137] At this time, the fourth static memory SRAM3 is configured as a first value (for example, the first value is 0), and the second multiplexer MUX2 outputs a low-level signal (data "0") received at its first input terminal based on the configured first value; the second n-input lookup table LUT(n)-2 is no longer used alone, and outputs a high-level signal (data "1"). The second input terminal of the second adder[1] receives the low-level signal (data "0") output by the second multiplexer MUX2, and the third input terminal receives the high-level signal (data "1") output by the second n-input lookup table LUT(n)-2. Thus, the carry output signal C output by the first adder[0] can be added by the second adder[1]. i+1 Transferred to the carry output port COUT.

[0138] Figure 4 is a schematic diagram of the structure of a lookup table circuit including two five-input lookup tables in an embodiment of the present invention.

[0139] like Figure 4As shown, the lookup table circuit 200 includes two first address input ports IN(1A) and IN(1B), second to sixth address input ports IN(2), IN(3), IN(4), IN(5), IN(6), a carry input port CIN, a carry output port COUT, a first output port OUT1 and a second output port OUT2, wherein the first address input port has two, the second to sixth address input ports have one respectively, and n is an integer greater than or equal to 5.

[0140] The lookup table circuit 200 further includes first to sixth multiplexers MUX1, MUX2, MUX3, MUX4, MUX5 and MUX6, a first five-input lookup table LUT(5)-1 and a second five-input lookup table LUT(5)-2, and a first adder[0] and a second adder[1].

[0141] The first five-input lookup table LUT(5)-1 and the second five-input lookup table LUT(5)-2 both share the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5). The first five-input lookup table LUT(5)-1 solely uses one IN(1A) of the two first address input ports IN(1A) and IN(1B) as its address input port, and the second five-input lookup table LUT(5)-2 solely uses the other IN(1B) of the two first address input ports IN(1A) and IN(1B) as its address input port.

[0142] The first to fifth address input ports IN(1A) / IN(1B), IN(2), IN(3), IN(4), and IN(5) can respectively receive address signals arranged from low to high; the received address signals can respectively serve as input signals of the first five-input lookup table LUT(5)-1 and the second five-input lookup table LUT(5)-2; and the first address input port IN(1A) can also serve as an input signal of the first adder[0] via the first multiplexer MUX1, and the first address input port IN(1B) can also serve as an input signal of the second adder[1] via the second multiplexer MUX2; the sixth address input port IN(6) is suitable for receiving a high level signal or an address signal and providing it to the control end of the third multiplexer MUX3.

[0143] The carry input port CIN is adapted to receive a carry input signal and provide it to the first adder [0] for calculating a carry output signal and a sum output signal. The carry output port COUT is adapted to output a carry output signal, which can be used as a carry input signal of the next level arithmetic logic module.

[0144] The first output port OUT1 and the second output port OUT2 output different signals based on different applications of the lookup table circuit 200 . When the lookup table circuit 200 is applied as two five-input lookup tables, the first output port OUT1 and the second output port OUT2 can be used as the output ports of the first five-input lookup table LUT(5)-1 and the second five-input lookup table LUT(5)-2 respectively; when the lookup table circuit 200 is applied as a six-input lookup table, the second output port OUT2 can be used as the output port of the six-input lookup table; when the lookup table circuit 200 is applied as a two-bit wide arithmetic carry logic module, the first output port OUT1 and the second output port OUT2 can be used as the output ports of the neutralized output signal of the first adder[0] and the second adder[1] respectively; when the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the second output port OUT2 can be used as the output port of the neutralized output signal of the second adder[1]. At this time, the first five-input lookup table can be used independently, and the first output port OUT1 can be used as the output port of the first five-input lookup table LUT(5)-1.

[0145] The first multiplexer MUX1 has three input terminals and one output terminal, wherein the first input terminal is grounded, the second input terminal is connected to the power supply voltage, the third input terminal is connected to one IN(1A) of the two first address input ports IN(1A) and IN(1B), and the output terminal is connected to the second input terminal of the first adder[0].

[0146] The second multiplexer MUX2 has three input terminals and one output terminal, wherein the first input terminal is grounded, the second input terminal is connected to the power supply voltage, the third input terminal is connected to the other IN(1B) of the two first address input ports IN(1A) and IN(1B), and the output terminal is connected to the second input terminal of the second adder[1].

[0147] The third multiplexer MUX3 has two input terminals, a control terminal and an output terminal, wherein the first input terminal is connected to the output terminal of the first five-input lookup table LUT(5)-1, the second input terminal is connected to the output terminal of the second five-input lookup table LUT(5)-2, the control terminal is connected to the sixth address input port IN(6), and the output terminal is connected to the first input terminal of the fourth multiplexer MUX4.

[0148] The fourth multiplexer MUX4 has two input terminals and one output terminal, wherein the first input terminal is connected to the output terminal of the third multiplexer MUX3, the second input terminal is connected to the first output terminal of the second adder [1], and the output terminal is connected to the second output port OUT2.

[0149] The fifth multiplexer MUX5 has two input terminals and one output terminal, wherein the first input terminal is connected to the output terminal of the first five-input lookup table LUT(5)-1, the second input terminal is connected to the first output terminal of the first adder[0], and the output terminal is connected to the first output port OUT1.

[0150] The sixth multiplexer MUX6 has two input terminals and one output terminal, wherein the first input terminal is connected to the power supply voltage, the second input terminal is connected to the output terminal of the first five-input lookup table LUT(5)-1, and the output terminal is connected to the third input terminal of the first adder[0].

[0151] The first adder [0] has three input terminals and two output terminals, wherein the first input terminal is connected to the carry input port CIN, the second input terminal is connected to the output terminal of the first multiplexer MUX1, the third input terminal is connected to the output terminal of the sixth multiplexer MUX6, the first output terminal is connected to the second input terminal of the fifth multiplexer MUX5 and outputs the sum output signal, and the second output terminal is connected to the first input terminal of the second adder [1] and outputs the carry output signal.

[0152] The second adder[1] has three input terminals and two output terminals, wherein the first input terminal is connected to the second output terminal of the first adder[0], the second input terminal is connected to the output terminal of the second multiplexer MUX2, the third input terminal is connected to the output terminal of the second five-input lookup table LUT(5)-2, the first output terminal is connected to the second input terminal of the fourth multiplexer MUX4 and outputs a sum-output signal, and the second output terminal is connected to the carry output port COUT and outputs a carry output signal.

[0153] In a specific implementation, the fourth multiplexer MUX4 also has a control terminal, and the lookup table circuit 200 also includes a first static memory SRAM0 connected to the control terminal of the fourth multiplexer MUX4. The first static memory SRAM0 is suitable for storing configuration information according to the instruction of the control module, and the configuration information may include a first value or a second value. The fourth multiplexer MUX4 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value.

[0154] Specifically, the first value is one of 0 or 1, and the second value is the other of 0 or 1. For example, the first value may be 0, and the second value may be 1.

[0155] When the first static memory SRAM0 is configured as a first value, the fourth multiplexer MUX4 is adapted to output a signal outputted by the output terminal of the third multiplexer MUX3 received at its first input terminal based on the first value. When the first static memory SRAM0 is configured as a second value, the fourth multiplexer MUX4 is adapted to output a signal outputted by the first output terminal of the second adder [1] received at its second input terminal based on the second value.

[0156] In a specific implementation, the fifth multiplexer MUX5 and the sixth multiplexer MUX6 also have control terminals respectively, and the lookup table circuit 200 also includes a second static memory SRAM1 connected to the control terminals of the fifth multiplexer MUX5 and the sixth multiplexer MUX6. The second static memory SRAM1 is suitable for storing configuration information according to the instructions of the control module, and the configuration information may include a first value or a second value. The fifth multiplexer MUX5 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value. The sixth multiplexer MUX6 is suitable for outputting a signal received at its first input terminal based on the first value, and outputting a signal received at its second input terminal based on the second value.

[0157] Specifically, the first value is one of 0 or 1, and the second value is the other of 0 or 1. For example, the first value may be 0, and the second value may be 1.

[0158] When the second static memory SRAM1 is configured to the first value, the fifth multiplexer MUX5 is suitable for outputting the signal output by the first five-input lookup table LUT (5)-1 received at its first input terminal based on the first value, and the sixth multiplexer MUX6 is suitable for outputting the high-level signal (data "1") received at its first input terminal based on the first value.

[0159] When the second static memory SRAM1 is configured to the second value, the fifth multiplexer MUX5 is suitable for outputting the sum output signal of the first output terminal of the first adder[0] received at its second input terminal based on the second value, and the sixth multiplexer MUX6 is suitable for outputting the signal output by the first five-input lookup table LUT(5)-1 received at its second input terminal based on the second value.

[0160] In the embodiment of the present invention, the lookup table circuit 200 can be selectively applied as one of two five-input lookup tables, one six-input lookup table, a two-bit wide arithmetic carry logic module, and a one-bit wide arithmetic carry logic module.

[0161] In a specific implementation, when the first static memory SRAM0 is configured as a first value (for example, the first value is 0), the second static memory SRAM1 is configured as a first value (for example, the first value is 0), and the sixth address input port IN(6) receives a high level signal, the lookup table circuit 200 can be applied as two five-input lookup tables.

[0162] Specifically, the first address input port IN(1A), the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5) collectively serve as address input ports of the first five-input lookup table LUT(5)-1, and the fifth multiplexer MUX5 selects the signal received at its first input terminal based on the first value configured in the second static memory SRAM1, i.e., the signal output by the first five-input lookup table LUT(5)-1, and outputs it to the first output port OUT1.

[0163] The first address input port IN(1B), the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5) collectively serve as address input ports of the second five-input lookup table LUT(5)-2. The third multiplexer MUX3 selects the signal received at its second input terminal based on the high-level signal received at its control terminal, i.e., the signal output by the second five-input lookup table LUT(5)-2, and outputs it to the first input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the signal received at its first input terminal based on the first value configured in the first static memory SRAM0, i.e., the signal output by the second five-input lookup table LUT(5)-2, and outputs it to the second output port OUT2.

[0164] In a specific implementation, when the first static memory SRAM0 is configured as a first value (eg, the first value is 0) and the sixth address input port IN(6) receives a highest bit address signal, the lookup table circuit 200 can be applied as a six-input lookup table.

[0165] Specifically, the first address input port IN(1A), the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5) collectively serve as the address input ports of the first five-input lookup table LUT(5)-1, the first address input port IN(1B), the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5) collectively serve as the address input ports of the second five-input lookup table LUT(5)-2, the third multiplexer MUX3 forms a six-input lookup table LUT6 based on the highest bit address signal received by the sixth address input port IN(6) and the first five-input lookup table LUT(5)-1 and the second five-input lookup table LUT(5)-2, and outputs the signal output by the six-input lookup table LUT6 to the first input terminal of the fourth multiplexer MUX4, the fourth multiplexer MUX4 selects the signal received at its first input terminal, i.e., the signal output by the six-input lookup table LUT6, based on the first value configured in the first static memory SRAM0, and outputs it to the second output port OUT2.

[0166] In a specific implementation, when the first static memory SRAM0 is configured to the second value (for example, the second value is 1), the second static memory SRAM1 is configured to the second value (for example, the second value is 1), and the sixth address input port IN(6) receives a high-level signal, the lookup table circuit 200 can be applied as a two-bit wide arithmetic carry logic module.

[0167] When the lookup table circuit 200 is applied as a two-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as a first addend A and a second addend B, respectively, wherein the first addend A includes the first addend A of the lower bit. i and the first addend A in the high position i+1 , the second addend B includes the lower second addend B i and the second addend B in the high digit i+1 .

[0168] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0169] The first addend in the low position A i (In some other embodiments, it may also be the second addend B in the lower order. i ) is input into the first five-input lookup table LUT(5)-1 through one of the two first address input ports IN(1A) and IN(1B), and the second addend B in the lower order i (In some other embodiments, it may also be the first addend A in the lower order. i) is input into the first five-input lookup table LUT(5)-1 through one of the second to fifth address input ports IN(2), IN(3), IN(4), and IN(5). The first five-input lookup table LUT(5)-1 is based on the first addend A of the lower bits. i and the second addend B i According to formula (4), we get the first carry propagation signal P i , and outputs it to the second input terminal of the sixth multiplexer MUX6. The sixth multiplexer MUX6 selects the first carry propagation signal P received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the third input terminal of the first adder [0].

[0170] When the first carry generates signal G i When it is not always "1" or "0", the first multiplexer MUX1 can select the first addend A of the lower bit inputted by the first address input port IN(1A) received at its third input terminal. i (In some other embodiments, it may also be the second addend B in the lower order. i ) as the first carry generation signal G i , and output to the second input terminal of the second adder[1].

[0171] When the first carry generates signal G i When the third static memory SRAM2 is always "0", the third static memory SRAM2 can be configured as the first value, so that the first multiplexer MUX1 can output the low level signal (data "0") received at its first input terminal as the first carry generation signal G based on the first value. i , at this time the first addend A in the low position i is 0; when the first carry generates signal G i When the third static memory SRAM2 is always "1", the third static memory SRAM2 can be configured as the second value, so that the first multiplexer MUX1 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the first carry generation signal G based on the second value. i , at this time the first addend A in the low position i is 1.

[0172] The first adder[0] is based on the carry input signal C i , the first carry generates a signal G i and the first carry propagation signal P i According to formulas (5) and (6), the first and output signal S are obtained. i and the first carry output signal C i+1 Among them, the first and output signal S iThe first output terminal of the first adder [0] is output to the second input terminal of the fifth multiplexer MUX5. The fifth multiplexer MUX5 selects the first and output signals S received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the first output port OUT1, the first carry output signal C i+1 It is output to the first input terminal of the second adder [1] through the second output terminal of the first adder [0] and can be used as a carry input signal of the high-bit arithmetic logic.

[0173] The first addend A in the high position i+1 (In some other embodiments, it may also be the second addend B in the high order. i+1 ) is input into the second five-input lookup table LUT(5)-2 through the other of the two first address input ports IN(1A) and IN(1B), and the second addend B in the high order i+1 (In some other embodiments, it may also be the first addend A in the high order. i+1 ) inputs the second five-input lookup table LUT(5)-2 through another unoccupied address input port among the second to fifth address input ports IN(2), IN(3), IN(4), IN(5). The second five-input lookup table LUT(5)-2 is based on the first addend A of the high order bits. i+1 and the second addend B i+1 According to formula (4), the second carry propagation signal P is obtained i+1 , and output to the third input terminal of the second adder[1].

[0174] When the second carry generates signal G i+1 When it is not always "1" or "0", the second multiplexer MUX2 can also select the high-order first addend A inputted by the first address input port IN(1B) received at its third input terminal. i+1 (In some other embodiments, it may also be the second addend B in the high order. i+1 ) as the second carry generation signal G i+1 , and output to the second input terminal of the second adder[1].

[0175] When the second carry generates signal G i+1 When the fourth static memory SRAM3 is always "0", the fourth static memory SRAM3 can be configured as the first value, so that the second multiplexer MUX2 can output the low level signal (data "0") received at its first input terminal as the second carry generation signal G based on the first value. i+1 , at this time the first addend A in the high position i+1 is 0; when the second carry generates signal G i+1When the fourth static memory SRAM3 is always "1", the fourth static memory SRAM3 can be configured as the second value, so that the second multiplexer MUX2 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the second carry generation signal G based on the second value. i+1 , at this time the first addend A in the high position i+1 is 1.

[0176] The second adder[1] is based on the first carry output signal C i+1 , the second carry generation signal G i+1 and the second carry propagation signal P i+1 According to formulas (5) and (6), the second and output signal S i+1 and the second carry output signal C i+2 Among them, the second and output signal S i+1 The first output terminal of the second adder [1] is output to the second input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the second sum output signal S received at its second input terminal based on the second value configured in the first static memory SRAM0. i+1 Output to the second output port OUT2, the second carry output signal C i+2 It is output to the carry output port COUT through the second output terminal of the second adder [1] and can be used as the carry input signal of the next-level arithmetic logic module.

[0177] In a specific implementation, when the first static memory SRAM0 is configured as a second value (for example, the second value is 1), the second static memory SRAM1 is configured as a first value (for example, the first value is 0), and the sixth address input port IN(6) receives a high-level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module.

[0178] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as the first addend A and the second addend B respectively. i and the second addend B i .

[0179] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0180] The third static memory SRAM2 is configured as a first value, and the first multiplexer MUX1 selects the low-level signal (data "0") received at its first input terminal based on the first value configured in the third static memory SRAM2 and outputs it to the second input terminal of the first adder[0], that is, outputs the empty carry generation signal G=0 to the first adder[0].

[0181] The sixth multiplexer MUX6 selects the high level signal (data "1") received at its first input terminal based on the first value configured in the second static memory SRAM1 and outputs it to the third input terminal of the first adder[0], that is, outputs the empty carry propagation signal P=1 to the first adder[0].

[0182] The first adder is based on the carry input signal C i , empty carry generation signal G and empty carry propagation signal P, according to formula (5), the empty carry output signal C is obtained, that is, C = C i The empty position carries out the output signal C, that is, C i , is output to the first input terminal of the second adder[1] through the second output terminal of the first adder[0], and serves as the carry input signal of the second adder[1].

[0183] The empty bit indicates that the two addend inputs of the first adder [0] are empty, and are not used for the logic operation of the two addends, but are only used to transmit the carry input signal Ci.

[0184] Therefore, when the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the carry input signal CIN input to the first adder[0] through the carry input port CIN is i It can be directly used as the carry input signal of the second adder[1].

[0185] First addend A i (In some other embodiments, it may also be the second addend B i ) is input into the second five-input lookup table LUT(5)-2 through the other of the two first address input ports IN(1A) and IN(1B), the second addend B i (In some other embodiments, it may also be the first addend A i ) inputs the second five-input lookup table LUT(5)-2 through one of the second to nth address input ports. The second five-input lookup table LUT(5)-2 is based on the first addend A i and the second addend B i According to formula (4), we get the carry propagation signal P i, and output to the third input terminal of the second adder[1].

[0186] When the carry signal G is generated i When it is not always "1" or "0", the second multiplexer MUX2 can select the first addend A inputted by the first address input port IN(1B) received at its third input terminal. i (In some other embodiments, it may also be the second addend B i ) as the carry generation signal G i , and output to the second input terminal of the second adder[1].

[0187] When the carry signal G is generated i When the fourth static memory SRAM3 is always "0", the fourth static memory SRAM3 can be configured as the first value, so that the second multiplexer MUX2 can output the low level signal (data "0") received at its first input terminal as the carry generation signal G based on the first value. i , at this time the first addend A i is 0; when the carry bit generates signal G i When the fourth static memory SRAM3 is always "1", the fourth static memory SRAM3 can be configured as the second value, so that the second multiplexer MUX2 can output the power supply voltage VDD signal (data "1") received at its second input terminal as the carry generation signal G based on the second value. i , at this time the first addend A i is 1.

[0188] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, the one-bit wide arithmetic carry logic operation is implemented by the second adder [1]. The second adder [1] is based on the carry input signal C i , Carry generates signal G i and the carry propagation signal P i According to formulas (5) and (6), we get the output signal S i and carry output signal C i+1 Among them, the output signal S i The first output terminal of the second adder [1] is output to the second input terminal of the fourth multiplexer MUX4. The fourth multiplexer MUX4 selects the sum output signal S received at its second input terminal based on the second value configured in the first static memory SRAM0. i Output to the second output port OUT2; carry output signal C i+1 It is output to the carry output port COUT through the second output terminal of the second adder [1] and can be used as the carry input signal of the next-level arithmetic logic module.

[0189] When the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the first five-input lookup table LUT(5)-1 can be used independently. The fifth multiplexer MUX5 selects the signal output by the first five-input lookup table LUT(5)-1 received at its first input terminal based on the first value configured in the second static memory SRAM1, and outputs it to the first output port OUT1.

[0190] In a specific implementation, when the first static memory SRAM0 is configured as a first value (for example, the first value is 0), the second static memory SRAM1 is configured as a second value (for example, the second value is 1), and the sixth address input port IN(6) is configured as a high-level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module.

[0191] When the lookup table circuit 200 is used as a one-bit wide arithmetic carry logic module, for the addition and carry operation of two binary numbers, the two binary numbers can be represented as the first addend A and the second addend B respectively. i and the second addend B i .

[0192] Specifically, the carry input signal C i The carry input port CIN is input to the first input terminal of the first adder [0].

[0193] First addend A i (In some other embodiments, it may also be the second addend B i ) is input into the first five-input lookup table LUT(5)-1 through one of the two first address input ports IN(1A) and IN(1B), and the second addend B i (In some other embodiments, it may also be the first addend A i ) inputs the first five-input lookup table LUT(5)-1 through one of the second to fifth address input ports IN(2), . . . , IN(5). The first five-input lookup table LUT(5)-1 is based on the first addend A i and the second addend B i According to formula (4), we get the carry propagation signal P i , and outputs it to the second input terminal of the sixth multiplexer MUX6. The sixth multiplexer MUX6 selects the carry propagation signal P received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the third input terminal of the first adder [0].

[0194] In some embodiments, the first multiplexer MUX1 can select the first addend A inputted by the first address input port IN(1A) received at its third input terminal. i(In some other embodiments, it may also be the second addend B i ) as the carry generation signal G i , and output to the second input terminal of the first adder[0].

[0195] The first adder[0] can be based on the carry input signal C i , Carry generates signal G i and the carry propagation signal P i According to formulas (5) and (6), we get the output signal S i and carry output signal C i+1 Among them, the output signal S i The first output terminal of the first adder [0] is output to the second input terminal of the fifth multiplexer MUX5. The fifth multiplexer MUX5 selects the sum output signal S received at its second input terminal based on the second value configured in the second static memory SRAM1. i Output to the first output port OUT1, carry output signal C i+1 The signal is outputted to the first input terminal of the second adder [1] through the second output terminal of the first adder [0].

[0196] At this time, the fourth static memory SRAM3 is configured as a first value (for example, the first value is 0), and the second multiplexer MUX2 outputs a low-level signal (data "0") received at its first input terminal based on the configured first value; the second five-input lookup table LUT (5)-2 is no longer used alone, and outputs a high-level signal (data "1"). The second input terminal of the second adder [1] receives the low-level signal (data "0") output by the second multiplexer MUX2, and the third input terminal receives the high-level signal (data "1") output by the second five-input lookup table LUT (5)-2. Thus, the carry output signal C output by the first adder [0] can be added by the second adder [1]. i+1 Transferred to the carry output port COUT.

[0197] The embodiment of the present invention also provides a method for configuring a lookup table circuit. By this method, the lookup table circuit provided by the embodiment of the present invention can be selectively applied as one of two n-input lookup tables, one n+1-input lookup table, a two-bit wide arithmetic carry logic module, and a one-bit wide arithmetic carry logic module.

[0198] Specifically, the application of the lookup table circuit 200 depends on the configuration of the first static memory SRAM0 , the second static memory SRAM1 , and the n+1th address input port IN(n+1).

[0199] In a specific implementation, when the first static memory SRAM0 is configured as the first value, the second static memory SRAM1 is configured as the first value and the n+1th address input port IN(n+1) is configured as a high level signal, the lookup table circuit 200 can be applied as two n-input lookup tables.

[0200] When the first static memory SRAM0 is configured as the first value and the n+1th address input port IN(n+1) is configured as the highest bit address signal, the lookup table circuit 200 can be applied as an n+1-input lookup table. Further, when the second static memory SRAM1 is configured as the first value, the lookup table circuit 200 can also be applied as the first n-input lookup table.

[0201] When the first static memory SRAM0 is configured as a first value, the second static memory SRAM1 is configured as a second value and the n+1th address input port IN(n+1) is configured as a high level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module, and a second n-input lookup table or an n+1-input lookup table.

[0202] When the first static memory SRAM0 is configured as the second value and the second static memory SRAM1 is configured as the second value, the lookup table circuit 200 may be applied as a two-bit wide arithmetic carry logic module.

[0203] When the first static memory SRAM0 is configured as the second value and the second static memory SRAM1 is configured as the first value, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module and a first n-input lookup table.

[0204] Figure 5 It is a first flow chart of a method for configuring a lookup table circuit in an embodiment of the present invention.

[0205] like Figure 5 As shown, the method 400 includes:

[0206] S401, outputting a second value to a sixth multiplexer;

[0207] S402, the sixth multiplexer outputs a first carry propagation signal to the first adder based on the second value;

[0208] S403, the first adder receives a carry input signal, a first carry generation signal and a first carry propagation signal, and generates a first carry output signal and a first sum output signal based thereon;

[0209] S404, the second adder receives the first carry output signal, the second carry generation signal and the second carry propagation signal, and generates a second carry output signal and a second sum output signal based thereon;

[0210] S405, the second adder provides a second carry output signal to the carry output port;

[0211] S406, the first adder and the second adder provide the first sum output signal and the second sum output signal to the fifth multiplexer and the fourth multiplexer respectively;

[0212] S407, outputting respective second values ​​to the fourth multiplexer and the fifth multiplexer;

[0213] S408: The fourth multiplexer and the fifth multiplexer output the second sum output signal and the first sum output signal to the second output port and the first output port respectively based on the second values ​​received respectively.

[0214] During the execution of step S401 , the second value (for example, the second value is 1) may be output to the sixth multiplexer MUX6 through the second static memory SRAM1 .

[0215] In the execution of step S402, the sixth multiplexer MUX6 selects the first carry propagation signal P received at its second input terminal based on the second value. i Output to the first adder [0]. Among them, the first carry propagation signal P i Obtained through the first n-input lookup table LUT(n)-1.

[0216] In the execution of step S403, the first adder[0] receives the carry input signal CIN, the first carry generation signal G and the first carry generation signal G through its three input terminals. i and the first carry propagation signal P i , and based on the three, the first carry output signal C is generated i+1 and the first and output signal S i Among them, the first carry generates a signal G i Obtained from the first multiplexer MUX1.

[0217] In the execution of step S404, the second adder [1] receives the first carry output signal C through its three input terminals. i+1 , the second carry generation signal G i+1 and the second carry propagation signal P i+1 , and based on it, generates a second carry output signal C i+2 and the second and output signal S i+1 Among them, the second carry generates a signal G i+1 The second carry propagation signal P is obtained by the second multiplexer MUX2. i+1 Obtained through the second n-input lookup table LUT(n)-2.

[0218] In the execution of step S405, the second adder [1] converts the second carry output signal C i+2 Provided to the carry output port COUT.

[0219] In the execution of step S406, the first adder [0] and the second adder [1] respectively add the first and output signals S i and the second and output signal S i+1 Provided to the fifth multiplexer MUX5 and the fourth multiplexer MUX4.

[0220] During the execution of step S407 , the respective second values ​​are output to the fourth multiplexer MUX4 and the fifth multiplexer MUX5 .

[0221] In the execution of step S408, the fourth multiplexer MUX4 and the fifth multiplexer MUX5 output the second and output signals S to the second output port OUT2 and the first output port OUT1 respectively based on the second values ​​received respectively. i+1 and the first and output signal S i .

[0222] When the first static memory SRAM0 is configured to a second value (for example, the second value is 1), the second static memory SRAM1 is configured to a first value (for example, the first value is 0), and the n+1th address input port IN(n+1) receives a high-level signal, the lookup table circuit 200 can be applied as a one-bit wide arithmetic carry logic module.

[0223] Figure 6 is a second flow chart of the method for configuring a lookup table circuit in an embodiment of the present invention.

[0224] like Figure 6 As shown, the method 500 includes:

[0225] S501, outputting a first value to a sixth multiplexer;

[0226] S502, the sixth multiplexer outputs a high level signal to the first adder based on the first value;

[0227] S503, the first adder receives a carry input signal, a low level signal and a high level signal, and outputs a carry input signal based thereon;

[0228] S504, the second adder receives the carry input signal, the carry generation signal and the carry propagation signal, and generates a carry output signal and a sum output signal based thereon;

[0229] S505, the second adder provides the carry output signal to the carry output port, and provides the sum output signal to the fourth multiplexer;

[0230] S506, outputting the second value to the fourth multiplexer;

[0231] S507 , the fourth multiplexer outputs the sum-output signal based on the second value received, and outputs the sum-output signal to the second output port.

[0232] During the execution of step S501 , the first value is output to the sixth multiplexer MUX6 through the second static memory SRAM1 .

[0233] In the execution of step S502, the sixth multiplexer MUX6 outputs a high level signal to the first adder [0] based on the first value, wherein the high level signal is obtained through the first input terminal of the sixth multiplexer MUX6.

[0234] In the execution of step S503, the first adder[0] receives the carry input signal CIN, the low level signal and the high level signal through its three input terminals respectively, and outputs the carry input signal CIN based on the three signals. The low level signal is obtained through the first multiplexer MUX1.

[0235] In the execution of step S504, the second adder[1] receives the carry input signal CIN, the carry generation signal G and the carry generation signal G through its three input terminals. i and the carry propagation signal P i , and generate a carry output signal C based on the three i+1 The sum of the output signal S i Among them, the carry signal G i The carry propagation signal P is obtained through the second multiplexer MUX2. i Obtained through the second n-input lookup table LUT(n)-2.

[0236] In the execution of step S505, the second adder [1] outputs the carry signal C i+1 Provided to the carry output port COUT, and the output signal S i Provided to the fourth multiplexer MUX4.

[0237] During the execution of step S506 , the second value is output to the fourth multiplexer MUX4 through the first static memory SRAM0 .

[0238] In the execution of step S507, the fourth multiplexer MUX4 outputs the output signal S to the second output port OUT2 based on the second value received. i .

[0239] When the lookup table circuit 200 is applied as a one-bit wide arithmetic carry logic module, the first n-input lookup table LUT(n)-1 can be used independently. The fifth multiplexer MUX5 can select the signal output by the first n-input lookup table LUT(n)-1 received at its first input terminal based on the first value configured in the second static memory SRAM1, and output it to the first output port OUT1.

[0240] In a specific implementation, the method 500 further includes:

[0241] S508, outputting the first value to the fifth multiplexer;

[0242] S509 , the fifth multiplexer outputs an output signal of the first n-input lookup table to the first output port based on the first value.

[0243] During the execution of step S508 , the first value is output to the fifth multiplexer MUX5 through the second static memory SRAM1 .

[0244] In step S509 , the fifth multiplexer MUX5 selects the output signal of the first n-input lookup table LUT(n)-1 received at its first input terminal based on the first value, and outputs the output signal to the first output port OUT1 .

[0245] When the first static memory SRAM0 is configured to a first value (for example, the first value is 0), the second static memory SRAM1 is configured to a first value (for example, the first value is 0), and the n+1th address input port IN(n+1) receives a high-level signal, the lookup table circuit provided in an embodiment of the present invention can be applied as two n-input lookup tables.

[0246] Based on this, the method 400 or 500 further includes:

[0247] S601, a high level signal is provided to a control terminal of a third multiplexer via the (n+1)th address input port;

[0248] S602, based on the high level signal, the third multiplexer outputs the output signal of the second n-input lookup table to the fourth multiplexer;

[0249] S603, outputting the first value to the fourth multiplexer and the fifth multiplexer;

[0250] S604, the fourth multiplexer and the fifth multiplexer respectively output an output signal of the second n-input lookup table and an output signal of the first n-input lookup table based on the first value;

[0251] S605 , outputting the output signal of the first n-input lookup table and the output signal of the second n-input lookup table to the first output port and the second output port respectively.

[0252] During the execution of step S601 , a high level signal is input to the n+1th address input port IN(n+1) and output to the control terminal of the third multiplexer MUX3 .

[0253] In step S602 , the third multiplexer MUX3 outputs the output signal of the second n-input lookup table LUT(n)-2 received at its second input terminal to the first input terminal of the fourth multiplexer MUX4 based on the high level signal received at its control terminal.

[0254] In step S603 , the first static memory SRAM0 outputs the first value (eg, the first value is 0) to the fourth multiplexer MUX4 , and the second static memory SRAM1 outputs the first value (eg, the first value is 0) to the fifth multiplexer MUX5 .

[0255] During the execution of step S604, the fourth multiplexer MUX4 outputs the output signal of the second n-input lookup table LUT(n)-2 received at its first input terminal based on the first value, and the fifth multiplexer MUX5 outputs the output signal of the first n-input lookup table LUT(n)-1 received at its first input terminal based on the first value.

[0256] In step S605, the output signal of the first n-input lookup table LUT(n)-1 is output to the first output port OUT1 through the fifth multiplexer MUX5, and the output signal of the second n-input lookup table LUT(n)-2 is output to the second output port OUT2 through the fourth multiplexer MUX4.

[0257] When the first static memory SRAM0 is configured as a first value (for example, the first value is 0) and the n+1th address input port IN(n+1) receives the highest bit address signal, the lookup table circuit provided in the embodiment of the present invention can be applied as an n+1 input lookup table.

[0258] Based on this, the method 400 or 500 further includes:

[0259] S701, the highest address signal is provided to the control terminal of the third multiplexer via the (n+1)th address input port;

[0260] S702, based on the highest bit address signal, causing the third multiplexer to output a signal received by one of its first input terminal and second input terminal;

[0261] S703, outputting the first value to the fourth multiplexer;

[0262] S704 , the fourth multiplexer outputs the signal received at its first input port to the second output port based on the first value.

[0263] During the execution of step S701 , the highest address signal is input to the n+1th address input port IN(n+1) and output to the control terminal of the third multiplexer MUX3 .

[0264] During the execution of step S702, the third multiplexer MUX3 forms an n+1 input lookup table LUT(n+1) based on the highest bit address signal received from the n+1th address input port IN(n+1) and the first n input lookup table LUT(n)-1 and the second n input lookup table LUT(n)-2, and outputs the output signal of the n+1 input lookup table LUT(n+1).

[0265] During the execution of step S703 , the first static memory SRAM0 outputs the first value (for example, the first value is 0) to the fourth multiplexer MUX4 .

[0266] In step S704 , the fourth multiplexer MUX4 outputs the output signal of the n+1-input lookup table LUT(n+1) to the second output port OUT2 based on the first value.

[0267] The method for configuring the lookup table circuit in the embodiment of the present invention can be based on the above content and combined with Figures 2 to 4 Therefore, the execution of each step in the method and the relationship between each step can also refer to the above description of the lookup table circuit, which will not be repeated here.

[0268] Although the present invention is disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.

Claims

1. A lookup table circuit, characterized in that: include: two first address input ports, second to n+1th address input ports, a carry input port, a carry output port, a first output port, and a second output port, wherein n is an integer greater than or equal to 5; A first n-input lookup table and a second n-input lookup table, which share the second to n-th address input ports, wherein the first n-input lookup table uses only one of the two first address input ports, and the second n-input lookup table uses only the other of the two first address input ports; The three input terminals of the first multiplexer are respectively connected to one of the two first address input ports, a power supply voltage and a ground; The three input terminals of the second multiplexer are respectively connected to the other of the two first address input ports, the power supply voltage and the ground; A first input terminal of the third multiplexer is connected to the output terminal of the first n-input lookup table, a second input terminal is connected to the output terminal of the second n-input lookup table, and a control terminal is connected to the n+1th address input port; A first input terminal of a fourth multiplexer is connected to an output terminal of the third multiplexer, and an output terminal of the fourth multiplexer is connected to the second output port; A first input terminal of a fifth multiplexer is connected to an output terminal of the first n-input lookup table, and an output terminal of the fifth multiplexer is connected to the first output port; A first input terminal of the sixth multiplexer is connected to a power supply voltage, and a second input terminal is connected to an output terminal of the first n-input lookup table; The first adder has a first input terminal connected to the carry input port, a second input terminal connected to the output terminal of the first multiplexer, a third input terminal connected to the output terminal of the sixth multiplexer, and a first output terminal connected to the second input terminal of the fifth multiplexer; The first input end of the second adder is connected to the second output end of the first adder, the second input end is connected to the output end of the second multiplexer, the third input end is connected to the output end of the second n-input lookup table, the first output end is connected to the second input end of the fourth multiplexer, and the second output end is connected to the carry output port.

2. The look-up table circuit according to claim 1, characterized in that: The fourth multiplexer has a control end, including a first static memory connected to the control end of the fourth multiplexer, which is suitable for being configured as a first value or a second value. The fourth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value.

3. The look-up table circuit according to claim 2, characterized in that: The n+1th address input port is suitable for receiving a high-level signal or a highest-order address signal, and the third multiplexer is suitable for outputting a signal received by its second input terminal based on the high-level signal, and for outputting a signal received by one of its first input terminal and the second input terminal based on the highest-order address signal.

4. The look-up table circuit according to claim 2, characterized in that: The second adder is suitable for receiving a carry input signal, a carry generation signal and a carry propagation signal respectively, and obtaining a sum output signal and a carry output signal based thereon, the first output terminal of the second adder is suitable for outputting the sum output signal, and the second output terminal of the second adder is suitable for outputting the carry output signal.

5. The look-up table circuit according to claim 4, characterized in that: The other of the two first address input ports is adapted to input the first addend A i One of the second to nth address input ports is suitable for inputting the second addend B i The second n-input lookup table is adapted to be based on the first addend A i and the second addend B i The carry propagation signal is obtained and output to the third input terminal of the second adder, and the second multiplexer is suitable for outputting the carry generation signal corresponding to the carry propagation signal to the second input terminal of the second adder.

6. The look-up table circuit according to claim 4, characterized in that: The carry input port is suitable for outputting the carry input signal, the first multiplexer is suitable for selecting its grounded first input terminal and outputting a low level signal, the sixth multiplexer is suitable for selecting its first input terminal and outputting a high level signal, and the first adder is suitable for outputting the carry input signal to the first input terminal of the second adder through its second output terminal based on the carry input signal, the low level signal and the high level signal.

7. The look-up table circuit according to claim 4, characterized in that: The fifth multiplexer is adapted to select its first input terminal to output the output signal of the first n-input lookup table.

8. The look-up table circuit according to claim 2, characterized in that: The second adder is adapted to receive the first carry output signal, the second carry generation signal and the second carry propagation signal, and obtain a second sum output signal and a second carry output signal based thereon, the first output terminal of the second adder is adapted to output the second sum output signal, and the second output terminal of the second adder is adapted to output the second carry output signal.

9. The look-up table circuit according to claim 8, characterized in that: The other of the two first address input ports is suitable for inputting the high-order first addend A i+1 , another address input port among the second to nth address input ports is suitable for inputting the second addend B of the high bit i+1 The second n-input lookup table is adapted to be based on the high-order first addend A i+1 and the second addend B i+1 The second carry propagation signal is obtained and output to the third input terminal of the second adder, and the second multiplexer is suitable for outputting the second carry generation signal corresponding to the second carry propagation signal to the second input terminal of the second adder.

10. The look-up table circuit according to claim 8, characterized in that: The carry input port is suitable for outputting a carry input signal, the sixth multiplexer is suitable for selecting its second input terminal and outputting a first carry propagation signal, the first multiplexer is suitable for outputting a first carry generation signal corresponding to the first carry propagation signal, the first adder is suitable for obtaining a first sum output signal and a first carry output signal based on the carry input signal, the first carry generation signal and the first carry propagation signal, the first output terminal of the first adder is suitable for outputting the first sum output signal, and the second output terminal of the second adder is suitable for outputting the first carry output signal to the first input terminal of the second adder.

11. The look-up table circuit according to claim 10, characterized in that: One of the two first address input ports is suitable for inputting the first addend A of the lower order i One of the second to nth address input ports is suitable for inputting the second addend B of the lower bit. i The first n-input lookup table is suitable for the first addend A based on the lower bits. i and the second addend B i The first carry propagation signal is obtained and output to the second input terminal of the sixth multiplexer, and the first multiplexer is suitable for outputting the first carry generation signal corresponding to the first carry propagation signal to the second input terminal of the first adder.

12. The look-up table circuit according to any one of claims 6, 7, 10 and 11, characterized in that: The fifth multiplexer and the sixth multiplexer respectively have a control end, including a second static memory connected to the control ends of the fifth multiplexer and the sixth multiplexer, which is suitable for being configured as a first value or a second value. The fifth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value. The sixth multiplexer is suitable for outputting a signal received at its first input end based on the first value, and outputting a signal received at its second input end based on the second value.

13. The look-up table circuit according to claim 2 or 12, characterized in that: The first value is one of 0 or 1, and the second value is the other of 0 or 1.

14. The look-up table circuit according to any one of claims 6, 10 and 11, characterized in that: A third static memory is included, and the first multiplexer is adapted to output a corresponding carry generation signal based on a configuration of the third static memory.

15. The look-up table circuit according to claim 5 or 9, characterized in that: A fourth static memory is included, and the second multiplexer is adapted to output a corresponding carry generation signal based on a configuration of the fourth static memory.

16. A method for configuring a lookup table circuit as claimed in any one of claims 1 to 14, characterized in that: include: outputting a second value to the sixth multiplexer; the sixth multiplexer outputting a first carry propagate signal to the first adder based on the second value; The first adder receives a carry input signal, a first carry generate signal, and the first carry propagate signal, and generates a first carry output signal and a first sum output signal based thereon; the second adder receiving the first carry output signal, the second carry generate signal and the second carry propagate signal, and generating a second carry output signal and a second sum output signal based thereon; The second adder provides the second carry output signal to the carry output port; The first adder and the second adder provide the first sum output signal and the second sum output signal to the fifth multiplexer and the fourth multiplexer, respectively; Outputting respective second values ​​to the fourth multiplexer and the fifth multiplexer; The fourth multiplexer and the fifth multiplexer output the second sum output signal and the first sum output signal to the second output port and the first output port, respectively, based on the second values ​​received respectively.

17. A method for configuring a lookup table circuit as claimed in any one of claims 1 to 14, characterized in that: include: Outputting the first value to the sixth multiplexer; The sixth multiplexer outputs a high level signal to the first adder based on the first value; The first adder receives the carry-in signal, the low-level signal, and the high-level signal, and outputs the carry-in signal based thereon; The second adder receives the carry-in signal, the carry-generate signal and the carry-propagate signal, and generates a carry-out signal and a sum-out signal based thereon; The second adder provides the carry output signal to the carry output port and provides the sum output signal to the fourth multiplexer; outputting a second value to the fourth multiplexer; The fourth multiplexer outputs the sum output signal based on the second value received therefrom, and outputs the sum output signal to the second output port.

18. The method according to claim 17, characterized in that include: outputting the first value to the fifth multiplexer; The fifth multiplexer outputs an output signal of the first n-input lookup table to the first output port based on the first value.

19. The method according to any one of claims 16 to 18, characterized in that: include: outputting the first value to the fourth multiplexer; The fourth multiplexer outputs the signal received at its first input terminal to the second output port based on the first value.

20. The method according to claim 19, characterized in that include: The high level signal is provided to the control terminal of the third multiplexer via the n+1th address input port; The third multiplexer selects its second input terminal based on the high level signal and outputs the output signal of the second n-input lookup table to the first input terminal of the fourth multiplexer.

21. The method according to claim 19, characterized in that include: The highest address signal is provided to the control terminal of the third multiplexer via the n+1th address input port; The third multiplexer outputs a signal received at one of its first input terminal and second input terminal to the first input terminal of the fourth multiplexer based on the highest address signal.