Lookup table circuits, chips and electronic devices

By dividing the input address of the lookup table circuit into two parts and utilizing a combination of multiple lookup table units, adders, and selectors, the problem of large lookup tables occupying too much chip area is solved, achieving a more efficient circuit design.

CN114968171BActive Publication Date: 2025-10-28SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210381493.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-13
Publication Date
2025-10-28
Estimated Expiration
2042-04-13

AI Technical Summary

Technical Problem

Large lookup tables significantly increase chip area in circuit implementation, especially due to the increased number of combinational logic selection circuits resulting from the increased number of lookup table elements and element bit width.

Method used

The input address of the lookup table circuit is divided into two parts, which are configured as the first input address and the second input address respectively. By combining at least two lookup table units, adders and selectors, the number of combinational logic selection circuits is reduced, thus saving chip area.

Benefits of technology

By reducing the combinational logic selection circuitry, the function of a large lookup table is achieved, effectively reducing the area occupied by the lookup table units on the chip and lowering the overall chip area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114968171B_ABST
    Figure CN114968171B_ABST
Patent Text Reader

Abstract

This application provides a lookup table circuit, chip, and electronic device. The lookup table circuit provided in this application sets up a first lookup table unit and at least one second lookup table unit. The output bit width of the first lookup table unit is configured to be the bit width of the output data of the lookup table circuit to store the original value of the data that the lookup table circuit needs to store in advance. The output data bit width of the second lookup table unit is configured to be smaller than the output data bit width of the lookup table circuit to store the difference of the data that the lookup table circuit needs to store in advance. This saves the bit width occupied by the elements in the lookup table unit. With the addition of a small number of adders and selectors, the function of a large lookup table can be realized with a reduction in the number of combinational logic selection circuits, thereby improving the problem that the current large lookup tables occupy chip area and thus cause a significant increase in chip area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of integrated circuits, specifically to a lookup table circuit, chip, and electronic device. Background Technology

[0002] Currently, large-scale computing chips, such as DPU chips, GPU chips, and AI chips, involve numerous lookup operations. These lookup operations are typically implemented using traditional lookup tables (LUTs). The principle of a lookup table is to address the pre-stored content in the lookup table based on the input, and then output the content (i.e., the data) at the corresponding location. The input of a lookup table is an address, and the output is data. The bit width of the input determines the number of elements in the lookup table. The bit width of the output determines the value of the data that each element can store. For example, a lookup table with 13-bit input and 17-bit output can have 8192 (2 to the power of 13) elements, and the maximum value that each element can store is 131072 (2 to the power of 17). However, lookup tables typically involve many combinational logic selection circuits in their circuit implementation. For example, for a lookup table with 13-bit input and 17-bit output, selecting one number from 8192 17-bit numbers requires 17 selection circuits. Therefore, as the number of elements in the lookup table and the bit width occupied by each element increase, large lookup tables will cause a significant increase in chip area in circuit implementation. Summary of the Invention

[0003] This application provides a lookup table circuit, chip, and electronic device that can reduce the chip area occupied by large lookup tables in circuit implementation.

[0004] In a first aspect, this application provides a lookup table circuit, comprising: the bit width of the input address of the lookup table circuit is configured as X bits, the input address of the lookup table circuit includes a first input address and a second input address, the bit width of the first input address is configured as X1 bits, and the bit width of the second input address is configured as X2 bits, wherein X = X1 + X2, and X, X1, and X2 are all positive integers;

[0005] The bit width of the output data of the lookup table circuit is configured as Y bits, where Y is a positive integer;

[0006] The lookup table circuit includes at least two lookup table units, at least one adder, and a selector.

[0007] The at least two lookup table units include a first lookup table unit and at least one second lookup table unit. The input addresses of the first and second lookup table units are configured as a first input address. The bit width of the output data of the first lookup table unit is configured as Y bits. The bit width of the output data of the second lookup table unit is configured to be less than Y bits. The output data of the first lookup table unit is configured as the input data of a selector and as the input data of each adder. The output data of each second lookup table unit is configured as the input data of a corresponding adder. The output data of each adder is configured as the input data of a selector. The selector is configured to select one of the input data of the selector according to the second input address to output as the output data of the lookup table circuit.

[0008] Secondly, this application provides a chip that includes the lookup table circuit provided in the first aspect of this application.

[0009] Thirdly, this application provides an electronic device including the chip provided in the second aspect of this application. Attached Figure Description

[0010] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0011] Figure 1 A schematic diagram of the lookup table circuit provided in the first embodiment of this application;

[0012] Figure 2 This is a schematic diagram of the lookup table circuit provided in the second embodiment of this application. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] Currently, large lookup tables typically require many combinational logic selection circuits in their circuit implementation, which takes up chip area. Furthermore, as the number of elements and the bit width occupied by each element in the lookup table increase, large lookup tables will cause a significant increase in chip area in their circuit implementation.

[0015] This application provides a lookup table circuit that can improve the problem of large lookup tables occupying chip area and thus causing a significant increase in chip area. The input address width of the lookup table circuit provided in this application is configured as X bits. The input address of the lookup table circuit includes a first input address and a second input address. The first input address has a bit width configured as X1 bits, and the second input address has a bit width configured as X2 bits, where X = X1 + X2, and X, X1, and X2 are all positive integers.

[0016] The bit width of the output data of the lookup table circuit is configured as Y bits, where Y is a positive integer;

[0017] The lookup table circuit includes at least two lookup table units, at least one adder, and a selector.

[0018] The at least two lookup table units include a first lookup table unit and at least one second lookup table unit. The input addresses of the first and second lookup table units are configured as a first input address. The bit width of the output data of the first lookup table unit is configured as Y bits. The bit width of the output data of the second lookup table unit is configured to be less than Y bits. The output data of the first lookup table unit is configured as the input data of a selector and as the input data of each adder. The output data of each second lookup table unit is configured as the input data of a corresponding adder. The output data of each adder is configured as the input data of a selector. The selector is configured to select one of the input data of the selector according to the second input address to output as the output data of the lookup table circuit.

[0019] The lookup table circuit provided in this application, by setting a first lookup table unit and at least one second lookup table unit, configures the output bit width of the first lookup table unit to be the bit width of the output data of the lookup table circuit to store the original value of the data that the lookup table circuit needs to store in advance, and configures the output data bit width of the second lookup table unit to be smaller than the output data bit width of the lookup table circuit to store the difference of the data that the lookup table circuit needs to store in advance. This saves the bit width occupied by the elements in the lookup table unit. With the addition of a small number of adders and selectors, the function of a large lookup table can be realized with a reduction in the number of combinational logic selection circuits, thereby improving the problem that the current large lookup tables occupy chip area and thus cause a significant increase in chip area.

[0020] To illustrate this application in detail, a lookup table circuit is provided in the first embodiment. Please refer to... Figure 1 , Figure 1 This is a schematic diagram of a lookup table circuit provided in the first embodiment of this application. The lookup table circuit 10 includes an input interface and an output interface.

[0021] The lookup table circuit 10 receives an input address at the input interface. The bit width of the input address of the lookup table circuit 10 is configured as X bits. The input address includes a first input address and a second input address. The bit width of the first input address is configured as X1 bits. The bit width of the second input address is configured as X2 bits. Where X = X1 + X2, and X1 and X2 are both positive integers. In a modified embodiment of the first embodiment, X1 can be greater than X2.

[0022] In the first embodiment, the first input address can be the lower X1 bit of the input address of the lookup table circuit 10, and the second input address can be the higher X2 bit of the input address of the lookup table circuit 10. In a modified embodiment of the first embodiment, the first input address can also be the higher X1 bit of the input address of the lookup table circuit 10, and the second input address can be the lower X2 bit of the input address of the lookup table circuit 10. This application does not limit the position of the first and second input addresses in the input address; any technical solution involving the first and second input addresses being two parts of the input address is within the protection scope of this application.

[0023] The lookup table circuit 10 outputs data at the output interface. The bit width of the output data of the lookup table circuit 10 is configured as Y bits, where Y is a positive integer.

[0024] The lookup table circuit 10 receives the input address at the input interface, processes it through its internal logic circuit, and outputs the data at the output interface. The internal logic circuit of the lookup table circuit 10 also includes a first lookup table unit 101, a second lookup table unit 103, an adder 105, and a selector 107.

[0025] In the first embodiment, the lookup table circuit 10 may include a first lookup table unit 101 and at least one second lookup table unit 103, that is, the lookup table circuit 10 includes at least two lookup table units 103. It should be noted that in a modified embodiment of the first embodiment, the lookup table circuit may also include at least two first lookup table units and at least two second lookup table units.

[0026] Specifically, in the first embodiment and its variations, the first lookup table unit 101 includes an input interface and an output interface. Regarding the input / output interface configuration, the first lookup table unit 101 is configured to receive the first input address at the input interface. The first lookup table unit 101 outputs data at the output interface, and the bit width of the output data of the first lookup table unit 101 is configured to be Y bits.

[0027] In terms of circuit connections, the input interface of the first lookup table unit 101 is connected to the input interface of the lookup table circuit 10. The output interface of the first lookup table unit 101 is configured to connect to the input of the selector 107 and to connect to the input of each adder 105.

[0028] In terms of element configuration, the first lookup table unit 101 may include The first lookup table unit 101 has an i-th element. The i-th element can be configured to store the original value of the data that the lookup table circuit 10 needs to pre-store. In a first embodiment, the original value stored in the i-th element of the first lookup table unit 101 can be less than or equal to the original value stored in the (i+1)-th element. In a modified embodiment of the first embodiment, the original value stored in the i-th element of the first lookup table unit 101 can also be greater than or equal to the original value stored in the (i+1)-th element. Where i is a positive integer, and both i and i+1 are less than or equal to... It should be noted that the amount of data that the lookup table circuit 10 needs to pre-store can be... Each data item occupies a bit width of Y bits. The original value of the data to be pre-stored in the lookup table circuit 10 can be an absolute value.

[0029] Specifically, in the first embodiment and its variations, the second lookup table unit 103 includes an input interface and an output interface. Regarding the input / output interface configuration, the second lookup table unit 103 is configured to receive the first input address at the input interface. The second lookup table unit 103 outputs data at the output interface, and the bit width of the output data of the second lookup table unit 103 is configured to be less than Y bits.

[0030] In terms of circuit connections, the input interface of each second lookup table unit 103 is connected to the input interface of the lookup table circuit 10. The output interface of each second lookup table unit 103 is configured to be connected to the input terminal of a corresponding adder 105.

[0031] In terms of element configuration, the second lookup table unit 103 may include The i-th element of the second lookup table unit 103 can be configured to store the difference between the data to be pre-stored by the lookup table circuit 10 and the data stored in the i-th element of the first lookup table unit 101, where i is a positive integer and i is less than or equal to 1. Because the bit width occupied by the difference is smaller than the bit width occupied by the data that the lookup table circuit 10 needs to store, this application stores the difference through the second lookup table unit 103, which can save the element bit width value of the second lookup table unit 103, thereby reducing the combinational logic selection circuit of the second lookup table unit 103, and thus saving the chip area occupied by the lookup table circuit 10.

[0032] In the first embodiment, the number of second lookup table units 103 can be [number missing]. If the number of cells in the second lookup table If the value is greater than 1, then the data stored in the i-th element of the j-th second lookup table unit 103 can be less than or equal to the data stored in the (j+1)-th second lookup table unit 103. Here, j is a positive integer, and both j and j+1 are less than or equal to... In a modified embodiment of the first embodiment, the data stored in the i-th element of the j-th second lookup table unit 103 can also be greater than or equal to the data stored in the i-th element of the (j+1)-th second lookup table unit 103. This application sets the data stored in the same position of two adjacent second lookup table units 103 to a size relationship of less than or equal to or greater than or equal to. This allows the data stored in the same position of the second lookup table units 103 to be arranged in approximately or almost ascending or descending order, thereby minimizing the difference in the stored elements of the second lookup table units 103, and thus minimizing the bit width occupied by the difference. This saves on the element bit width of the second lookup table units 103, thereby reducing the combinational logic selection circuit of the second lookup table units 103, and further saving the chip area occupied by the lookup table circuit 10.

[0033] In the first embodiment, the number of adders 105 is the same as the number of second lookup table units 103. Each second lookup table unit 103 corresponds to one adder 105. Each adder 105 includes two input terminals and one output terminal. The adder 105 is used to add the two input data at the two input terminals and output the sum from the output terminal. One input terminal of each adder 105 is connected to the output interface of the first lookup table unit 101, and each adder receives the output data of the first lookup table unit from one input terminal. The other input terminal of each adder 105 is connected to the output interface of its corresponding second lookup table unit 103, and each adder receives the output data of the corresponding second lookup table unit from the other input terminal. The output terminal of each adder 105 is connected to the input terminal of the selector 107, and each adder provides input data to the selector from its output terminal.

[0034] In the first embodiment, selector 107 is configured to select one of its inputs as an output based on a second input address, to serve as the output of lookup table circuit 10. Specifically, selector 107 includes... The selector 107 comprises one input terminal, one output terminal, and one control terminal. The input terminal of the selector 107 is configured to connect to the output interface of the first lookup table unit 101 and the output terminal of each adder 105, respectively. The selector 107 receives the output data of the first lookup table unit 101 and the output data of each adder 105 from its input terminal. The output terminal of the selector 107 is configured to receive a second input address of the input address of the lookup table circuit 10. In a modified embodiment of the first embodiment, the selector may also include multiple selection units; any selector capable of selecting the output from one of its input data based on the second input address is within the scope of protection of this application.

[0035] The lookup table circuit provided in the first embodiment and its modified embodiments of this application, by setting a first lookup table unit and at least one second lookup table unit, configures the output bit width of the first lookup table unit to be the bit width of the output data of the lookup table circuit to store the original value of the data that the lookup table circuit needs to pre-store, and configures the output data bit width of the second lookup table unit to be smaller than the output data bit width of the lookup table circuit to store the difference of the data that the lookup table circuit needs to pre-store, so as to save the bit width occupied by the elements in the lookup table unit. With the help of a small number of adders and selectors, the function of a large lookup table can be realized with a reduction in the number of combinational logic selection circuits, thereby improving the problem that the current large lookup table occupies chip area and thus causes a significant increase in chip area.

[0036] To facilitate understanding of the lookup table circuit provided in this application, this application combines... Figure 2 The lookup table circuit is described in detail. Please refer to [link / reference]. Figure 2 , Figure 2 This is a schematic diagram of the lookup table circuit 10 provided in the second embodiment of this application.

[0037] The lookup table circuit 10 includes an input interface and an output interface.

[0038] The lookup table circuit 10 receives an input address at the input interface. The bit width of the input address of the lookup table circuit 10 is assumed to be 13 bits. The input address includes a first input address and a second input address. The bit width of the first input address is assumed to be 10 bits. The bit width of the second input address is assumed to be 3 bits. The first input address can be the lower 10 bits of the input address of the lookup table circuit 10, and the second input address can be the higher 3 bits of the input address of the lookup table circuit 10. That is, the lower 10 bits of the 13-bit input address of the lookup table circuit 10 are the first output address, and the higher 3 bits of the 13-bit input address of the lookup table circuit are the second output address.

[0039] The lookup table circuit 10 outputs data at the output interface. The bit width of the output data of the lookup table circuit 10 is assumed to be 17 bits.

[0040] The lookup table circuit 10 receives the input address at the input interface, passes it through the internal logic circuit, and outputs the data at the output interface. The internal logic circuit of the lookup table circuit 10 also includes a first lookup table unit (LUT0) 101, seven second lookup table units (LUT1-LUT7) 103, seven adders (ADD1-ADD7) 105, and a selector 107.

[0041] Currently, for those that can be pre-stored The number of data items and the bit width occupied by each data item are For large lookup tables of a certain size, their implementation requires a large number of combinational logic selectors, consuming significant chip area. To reduce the number of combinational logic selectors needed for implementation, this application's lookup table circuit divides the large lookup table into eight smaller lookup tables. Combined with a small number of adders and selectors, the functionality of a large lookup table can be achieved with significantly less combinational logic selectors. It should be noted that the number of divisions is related to the bit width of the input address of the divided lookup table; this application preferably uses an input address width of no more than 10 bits for each divided lookup table.

[0042] Specifically, the first lookup table unit (LUT0) 101 includes an input interface and an output interface. Regarding the input / output interface configuration, the first lookup table unit (LUT0) 101 is configured to receive the first input address at the input interface. The first lookup table unit (LUT0) 101 outputs data at the output interface, and the bit width of the output data of the first lookup table unit (LUT0) 101 is configured to be 17 bits.

[0043] In terms of circuit connections, the input interface of the first lookup table unit (LUT0) 101 is connected to the input interface of the lookup table circuit 10. The output interface of the first lookup table unit (LUT0) 101 is configured to connect to the input of the selector 107 and to connect to the input of each adder 105.

[0044] In terms of element configuration, the first lookup table unit (LUT0) 101 may include The first lookup table unit (LUT0) 101 has one element. The i-th element is configured to store the original value of the data that the lookup table circuit needs to pre-store. The original value stored in the i-th element of the first lookup table unit (LUT0) 101 is less than or equal to the original value stored in the (i+1)-th element. Here, i is a positive integer, and both i and i+1 are less than or equal to... It should be noted that the amount of data that the lookup table circuit 10 needs to pre-store can be... Each data item can occupy a bit width of 17 bits. The original value of the data to be pre-stored in the lookup table circuit 10 can be the absolute value of the data to be pre-stored.

[0045] Specifically, each of the seven second lookup table units (LUT1-LUT7) 103 includes an input interface and an output interface. Regarding the input / output interface configuration, each second lookup table unit 103 is configured to receive the first input address at its input interface. Each second lookup table unit 103 outputs data at its output interface, and the bit width of the output data of each second lookup table unit 103 is configured to be less than 17 bits.

[0046] In terms of circuit connections, the input interface of each second lookup table unit 103 is connected to the input interface of the lookup table circuit 10. The output interface of each second lookup table unit 103 is configured to connect to the input terminal of a corresponding adder 105. For example... Figure 2 As shown, the output interface of LUT1 is configured to connect to the input terminal of ADD1, the output interface of LUT2 is configured to connect to the input terminal of ADD2, the output interface of LUT3 is configured to connect to the input terminal of ADD3, the output interface of LUT4 is configured to connect to the input terminal of ADD4, the output interface of LUT5 is configured to connect to the input terminal of ADD5, the output interface of LUT6 is configured to connect to the input terminal of ADD6, and the output interface of LUT7 is configured to connect to the input terminal of ADD7.

[0047] In terms of element configuration, each second lookup table unit 103 may include Each second lookup table unit 103 has an i-th element, which is configured to store the difference between the data to be pre-stored by the lookup table circuit 10 and the data stored in the i-th element of the first lookup table unit 101, where i is a positive integer and i is less than or equal to 1. Because the bit width occupied by the difference is smaller than the bit width occupied by the data that the lookup table circuit 10 needs to store, this application uses the second lookup table unit 103 to store the difference, which can save the element bit width value of the second lookup table unit 103, thereby reducing the combinational logic selection circuit of the second lookup table unit 103, and thus saving the chip area occupied by the lookup table circuit.

[0048] In the second embodiment, in the seven second lookup table units 103, the data stored in the i-th element of the j-th second lookup table unit 103 can be less than or equal to the data stored in the i-th element of the (j+1)-th second lookup table unit 103. Here, j is a positive integer, and both j and j+1 are less than or equal to 7. This application sets the data stored in the same position of two adjacent second lookup table units 103 to a less than or equal size relationship, which allows the data stored in the same position of the seven second lookup table units 103 to be arranged in approximately or almost ascending order. This minimizes the difference in the stored elements of the second lookup table units 103, thus minimizing the bit width occupied by the difference, saving the element bit width of the second lookup table units 103, thereby reducing the combinational logic selection circuit of the second lookup table units 103, and further saving the chip area occupied by the lookup table circuit 10.

[0049] In the second embodiment, each of the seven adders (ADD1-ADD7) 105 includes two input terminals and one output terminal. One input terminal of each adder 105 is connected to the output interface of the first lookup table unit 101. The other input terminal of each adder 105 is connected to the output interface of its corresponding second lookup table unit 103. The output terminal of each adder 105 is connected to the input terminal of the selector 107. Figure 2 As shown, one input terminal of each of ADD1-ADD7 is connected to the output interface of LUT0. The other input terminal of ADD1 is connected to the output interface of LUT1. The other input terminal of ADD2 is connected to the output interface of LUT2. The other input terminal of ADD3 is connected to the output interface of LUT3. The other input terminal of ADD4 is connected to the output interface of LUT4. The other input terminal of ADD5 is connected to the output interface of LUT5. The other input terminal of ADD6 is connected to the output interface of LUT6. The other input terminal of ADD7 is connected to the output interface of LUT7. The output terminals of ADD1-ADD7 are all connected to the input terminals of selector 107.

[0050] In the second embodiment, selector 107 is configured to select one of its inputs and output it according to the second input address, as the output of lookup table circuit 10. Specifically, selector 107 includes an input terminal, an output terminal, and a control terminal. The input terminal of selector 107 includes... There are one input. The input terminal of selector 107 is configured to be connected one-to-one with the output interface of the first lookup table unit (LUT0) 101 and the output terminal of each adder (ADD1-ADD7) 105. The output terminal of selector 107 is configured as the output interface of lookup table circuit 10, and the control terminal of selector 107 is configured to receive the second input address of the input address of lookup table circuit 10.

[0051] The lookup table circuit provided in the second embodiment of this application sets up a first lookup table unit LUT0 and seven second lookup table units LUT1-LUT7. The output bit width of the first lookup table unit LUT0 is configured to be the bit width of the output data of the lookup table circuit to store the original value of the data that the lookup table circuit needs to store in advance. The output data bit width of the second lookup table units is configured to be smaller than the output data bit width of the lookup table circuit to store the difference of the data that the lookup table circuit needs to store in advance. This saves the bit width occupied by the elements in the lookup table unit. With the help of a small number of adders and selectors, the function of a large lookup table can be realized with a reduction in the number of combinational logic selection circuits. This improves the problem that the current large lookup tables occupy chip area and thus cause a significant increase in chip area.

[0052] It should be noted that the lookup table circuit provided in the second embodiment of this application is a specific example of the lookup table circuit provided in the first embodiment or a modified embodiment of the first embodiment of this application. The first embodiment or a modified embodiment of the first embodiment of this application can be referred to in the detailed description of the second embodiment of this application.

[0053] This application also provides a chip. The chip can be a data processing chip, which may be an FPGA chip with CPU capabilities or an ASIC chip with SOC capabilities. The chip includes the lookup table circuit. The lookup table circuit may be the lookup table circuit provided in the first embodiment of this application or a modified embodiment of the first embodiment. The lookup table circuit may also be the lookup table circuit provided in the second embodiment of this application.

[0054] This application also provides an electronic device. The electronic device includes the chip provided in this application. It is understood that the electronic device can be a network interface card, a server, a mobile terminal, or other similar devices. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0055] This application uses specific embodiments to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this application specification should not be construed as a limitation of this application.

Claims

1. A lookup table circuit, characterized in that, The input address of the lookup table circuit is configured with a bit width of X bits. The input address of the lookup table circuit includes a first input address and a second input address. The bit width of the first input address is configured with X1 bits, and the bit width of the second input address is configured with X2 bits, where X = X1 + X2, and X, X1, and X2 are all positive integers. The bit width of the output data of the lookup table circuit is configured as Y bits, where Y is a positive integer; The lookup table circuit includes at least two lookup table units, at least one adder, and a selector. The at least two lookup table units include a first lookup table unit and at least one second lookup table unit, wherein the input addresses of the first lookup table unit and the second lookup table unit are configured as a first input address. The output data width of the first lookup table unit is configured to be Y bits. The first lookup table unit includes 2... X1 The first lookup table unit has 1, and the i-th element is configured to store the original value of the data that the lookup table circuit needs to pre-store, where i is a positive integer, less than or equal to 2. X1 , The bit width of the output data of the second lookup table unit is configured to be less than Y bits. The second lookup table unit includes 2 X1 The i-th element of the second lookup table unit is configured to store the difference between the data that the lookup table circuit needs to pre-store and the data stored in the i-th element of the first lookup table unit. The output data of the first lookup table unit is configured as the input data of the selector and as the input data of each adder. The output data of each second lookup table unit is configured as the input data of a corresponding adder. The output data of each adder is configured as the input data of the selector. The selector is configured to select one of the input data of the selector according to the second input address to output as the output data of the lookup table circuit.

2. The lookup table circuit according to claim 1, characterized in that, The original value stored in the i-th element of the first lookup table unit is less than or equal to the original value stored in the (i+1)-th element, or the original value stored in the i-th element of the first lookup table unit is greater than or equal to the original value stored in the (i+1)-th element, where i+1 is less than or equal to 2. X1 .

3. The lookup table circuit according to claim 1, characterized in that, The number of cells in the second lookup table is 2. X2 -1, if the number of cells in the second lookup table is 2 X2 If -1 is greater than 1, then the data stored in the i-th element of the j-th second lookup table unit is less than or equal to the data stored in the i-th element of the (j+1)-th second lookup table unit, or the data stored in the i-th element of the j-th second lookup table unit is greater than or equal to the data stored in the i-th element of the (j+1)-th second lookup table unit, where j is a positive integer, and both j and j+1 are less than or equal to 2. X2 -1.

4. The lookup table circuit according to claim 1, characterized in that, Each second lookup table unit corresponds to an adder. Each adder includes two inputs and one output. Each adder receives the output data of the first lookup table unit from one input and receives the output data of the corresponding second lookup table unit from the other input. Each adder provides input data to the selector from its output.

5. The lookup table circuit according to claim 1, characterized in that, The selector includes 2 X2 The selector has one input terminal, one output terminal, and one control terminal. The selector receives the output data of the first lookup table unit and the output data of each adder from the input terminal. The selector outputs the output data of the lookup table circuit from the output terminal. The selector receives the second input address of the input address of the lookup table circuit from the control terminal.

6. The lookup table circuit according to claim 1, characterized in that, The first input address is the lower X1 bit of the input address of the lookup table circuit, and the second input address is the higher X2 bit of the input address of the lookup table circuit.

7. A chip, characterized in that, The chip includes a lookup table circuit as described in any one of claims 1 to 6.

8. An electronic device, characterized in that, Includes the chip as described in claim 7.

Citation Information

Patent Citations

  • Programmable logic block based on improved lookup table structure

    CN113971159A