Chip, chip design method, signal processing method and related equipment
By using lookup tables instead of combinational logic circuits in chip design, rapid updates of combinational logic functions are achieved, solving the problems of extended chip design cycles and low efficiency, improving design efficiency and reducing risks.
Patent Information
- Application Number
- CN202311315284.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2043-10-11
AI Technical Summary
As the complexity of chip design increases, the design cycle lengthens, and design costs and risks increase simultaneously. How to shorten the chip design cycle and improve design efficiency has become an urgent problem that needs to be solved.
A lookup table is used to replace the traditional combinational logic circuit, and the combinational logic function is realized through preset record information, allowing the information in the lookup table to be directly modified or updated without changing the hardware circuit, thereby realizing the replacement and update of the combinational logic function.
It effectively shortens the chip design cycle, improves design efficiency, reduces design risks, and reduces manufacturing costs.
Smart Images

Figure CN117473909B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data security technology, and specifically to a chip, a chip design method, a signal processing method and related equipment. Background Art
[0002] With the increasingly urgent demands for improving computer performance and functional integration in various applications such as AI (artificial intelligence), and with the advancement of chip manufacturing technology, the complexity of chip design is increasing, and the chip scale is also growing. Correspondingly, the design cost of chips is increasing, the design cycle is also extending, and the corresponding design risks are also increasing simultaneously. Therefore, how to improve chip design solutions to effectively shorten the chip design cycle and improve chip design efficiency has become a technical problem that technicians in this field need to solve urgently. Summary of the invention
[0003] In view of this, embodiments of the present invention provide a chip, a chip design method, a signal processing method and related devices to effectively shorten the chip design cycle and improve chip design efficiency.
[0004] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions.
[0005] In a first aspect, an embodiment of the present invention provides a chip, including a sequential logic circuit, wherein the sequential logic circuit includes:
[0006] A first trigger, used for storing an input signal input to the chip, wherein the input signal is used for a combinational logic operation of the chip;
[0007] A lookup table, used to receive an input signal stored in the first trigger, and determine a corresponding output signal according to the input signal using record information preset in the lookup table, and output the output signal, wherein the output signal is a result of a combinational logic operation;
[0008] The record information preset in the lookup table includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals.
[0009] In a second aspect, an embodiment of the present invention provides a chip design method, including:
[0010] Determine design requirements for a combinatorial logic design, wherein the combinatorial logic design is used to output a corresponding output signal based on an input signal;
[0011] Designing a target lookup table according to the design requirements, wherein the lookup table stores preset record information, and the preset record information includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals;
[0012] The target lookup table is configured in the chip design.
[0013] In a third aspect, an embodiment of the present invention further provides a signal processing method, including:
[0014] Acquire an input signal, where the input signal is used for combinatorial logic operations of the chip;
[0015] Determine an output signal corresponding to the input signal using preset record information stored in a lookup table, the output signal being a result of a combinational logic operation; wherein the preset record information stored in the lookup table includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals;
[0016] Outputs the determined output value.
[0017] In a fourth aspect, an embodiment of the present invention further provides a design device, comprising a memory and a processor, wherein the memory stores a program, and the processor calls the program stored in the memory to execute the chip design method as described in the second aspect, or executes the signal processing method as described in the third aspect.
[0018] In a fifth aspect, an embodiment of the present invention further provides a storage medium storing a program, which, when executed, implements the chip design method as described in the second aspect, or implements the signal processing method as described in the third aspect.
[0019] An embodiment of the present invention provides a chip, including a sequential logic circuit, wherein the sequential logic circuit includes: a first trigger, used to store an input signal input to the chip, and the input signal is used for a combinational logic operation of the chip; a lookup table, used to receive the input signal stored in the first trigger, and according to the input signal, determine a corresponding output signal using record information preset in the lookup table, and output the output signal, and the output signal is used as a result of the combinational logic operation; wherein the record information preset in the lookup table includes a plurality of preset input signals, and a preset output signal corresponding to each of the preset input signals. It can be seen that the chip provided in the embodiment of the present invention uses a lookup table to implement the combinational logic function in the combinational logic design, replacing the combinational logic circuit (such as a hardware standard unit) originally used to implement the combinational logic function in the chip; since there is preset record information in the lookup table, and the preset record information may include multiple preset input signals, and preset output signals corresponding to each of the preset input signals, therefore, when the combinational logic function of the chip needs to be changed or repaired, the preset record information in the lookup table can be directly modified or updated without changing the combinational logic circuit that has been arranged in the chip to implement the combinational logic function; therefore, the replacement and update of the combinational logic function in the chip can be facilitated, thereby effectively shortening the chip design cycle and improving the chip design efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0021] Figure 1 It is a circuit structure diagram of a sequential logic circuit in chip design;
[0022] Figure 2 It is a schematic diagram of the implementation structure corresponding to the combinational logic design of the chip design;
[0023] Figure 3 It is a schematic diagram of an implementation structure of a combinational logic design by re-implementing the physical implementation and changing the chip design;
[0024] Figure 4 is a schematic diagram of the structure of a chip provided by an embodiment of the present invention;
[0025] Figure 5 It is a circuit structure diagram of a lookup table in the chip provided by an embodiment of the present invention;
[0026] Figure 6yes Figure 2 A schematic diagram of a numerical value and a result recorded in a lookup table corresponding to the combinational logic design shown;
[0027] Figure 7 yes Figure 3 A result schematic diagram of the values recorded in the lookup table corresponding to the modified combinational logic design shown;
[0028] Figure 8a is a schematic diagram of a circuit implementation structure of a first lookup table in a chip provided in an embodiment of the present invention;
[0029] Figure 8b is another circuit implementation structure diagram of the first lookup table in the chip provided by an embodiment of the present invention;
[0030] Figure 8c is a schematic diagram of another circuit implementation structure of the first lookup table in the chip provided by the embodiment of the present invention;
[0031] Figure 8d is another circuit implementation structure diagram of the first lookup table in the chip provided by the embodiment of the present invention;
[0032] Fig. 9 It is a circuit implementation structure of the second lookup table in the chip provided by the embodiment of the present invention;
[0033] Fig.10 It is a circuit structure diagram of a redundant lookup table in the chip provided by an embodiment of the present invention;
[0034] Fig.11 is a schematic diagram of a flow chart of a chip design method provided by an embodiment of the present invention;
[0035] Fig.12 is another schematic flow chart of the chip design method provided by an embodiment of the present invention;
[0036] Fig.13 is a flow chart of a signal processing method provided by an embodiment of the present invention;
[0037] Fig.14 It is a structural schematic diagram of a chip design device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0039] Sequential logic circuits are the main components in chip design. Figure 1 , Figure 1 It is a circuit structure diagram of a sequential logic circuit in chip design.
[0040] like Figure 1 As shown, the sequential logic circuit is formed by a trigger 1 and a combinational logic 2. The trigger 1 is used as a storage logic. The combinational logic 2 is added between the triggers 1 to obtain a sequential logic circuit to realize the combinational logic function of the chip design.
[0041] Since the combinational logic 2 is a circuit structure that uses one logic gate or multiple logic gates in series and parallel to realize a specific logic function, and the logic function of each logic gate is fixed, once the connection relationship between the logic gates is fixed, the corresponding combinational logic function is also determined accordingly.
[0042] When the combinational logic function of the chip design needs to be modified, it can be done by adding or subtracting the logic gates originally used in the combinational logic design and reconnecting the wires between the added or subtracted logic gates. Alternatively, the logic gates originally used can remain unchanged, but the wires between the logic gates need to be reconnected to implement the new combinational logic function. Adding or subtracting logic gates and modifying the wires between logic gates requires physical re-implementation of the chip design, which makes the chip design cycle longer and requires higher manufacturing costs.
[0043] Please refer to Figure 2 and Figure 3 , Figure 2 It is a schematic diagram of the implementation structure corresponding to the combinational logic design of the chip design. Figure 3 It is a schematic diagram of an implementation structure of a combinational logic design that uses physical re-implementation to change the chip design.
[0044] like Figure 2 As shown, based on the design requirements of the combinational logic design, the circuit structure (combinatorial logic circuit) obtained after physical implementation includes an AND logic gate 01, an OR logic gate 02, a NOT logic gate 03 and an AND logic gate 04. Figure 2 The combinatorial logic function of the combinatorial logic design shown can be expressed as:
[0045] E=! (A&B)&(C|D)
[0046] Among them, A, B, C and D are input ports used when the combinational logic design is implemented in hardware, and E is an output port used when the combinational logic design is implemented in hardware.
[0047] For example, A and B can be Figure 2 The two input ports, C and D, of the AND logic gate 01 shown can be Figure 2The two input ports of the OR logic gate 02 shown in the figure, E can be Figure 2 The output port of AND logic gate 04 is shown.
[0048] The above-mentioned combinational logic design can be expressed as an input value combination formed based on the corresponding input values in each input port A, B, C, and D. According to the implemented combinational logic function, that is, the combinational logic operation, the output value corresponding to each input value combination is calculated, and the output value is output from the output port E.
[0049] After the chip design is manufactured, if it is found that there is a problem with the combinational logic design of the chip design or the combinational logic design of the chip design needs to be modified, it can be Figure 3 In the manner shown, the chip design is physically re-implemented and the connections between the logic gates are changed to achieve the combinational logic function of changing the original combinational logic design.
[0050] Figure 3 The combinatorial logic function of the modified combinatorial logic design shown can be expressed as:
[0051] E=(A&B)|!(C&D)
[0052] Coming Soon Figure 2 The combinational logic function E = ! (A & B) & (C | D) of the combinational logic design shown is modified to Figure 3 The combinatorial logic design shown in FIG. 1 has a combinatorial logic function E = (A & B) | (C & D), thereby obtaining Figure 3 The physical implementation structure of the combinatorial logic design shown.
[0053] As you can see, Figure 3 According to the combinational logic circuit corresponding to the modified combinational logic function, the physical positions of the AND logic gate 04, the NOT logic gate 03 and the OR logic gate 02 are changed, and the connections between the logic gates are rearranged.
[0054] Figure 3 The method of changing the combinational logic design of the chip design shown rearranges the physical implementation of the chip design (that is, the line structure and logic gates of the combinational logic circuit are rearranged), so that the design process of the chip design needs to be completed again. For example, when manufacturing the chip design, the design engineer completes the code design first; then the verification engineer performs functional verification on the code design. When the functional verification of the code design is correct, it is handed over to the implementation engineer for physical implementation, and the chip design is subsequently remanufactured and produced.
[0055] However, as chip design becomes increasingly complex, the entire chip R&D cycle is getting longer and longer, and the verification risk of chip design is also getting greater. In order to shorten the chip design R&D cycle and reduce the verification risk of chip design, the embodiment of the present invention provides a chip to effectively shorten the chip design cycle and improve chip design efficiency. Please refer to Figure 4 , Figure 4 It is a schematic diagram of the structure of a chip provided by an embodiment of the present invention.
[0056] like Figure 4 As shown, the chip includes a sequential logic circuit, and the sequential logic circuit includes:
[0057] A first trigger 110, used to store an input signal input to the chip, wherein the input signal is used for a combinational logic operation of the chip;
[0058] A lookup table 111, used to receive the input signal stored in the first trigger 110, and determine the corresponding output signal according to the input signal using the record information preset in the lookup table 111, and output the output signal, the output signal being the result of the combinational logic operation;
[0059] The preset record information of the lookup table 111 includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals.
[0060] It can be seen that the chip provided in the embodiment of the present invention uses the lookup table 111 to implement the combinational logic function in the combinational logic design, replacing the combinational logic circuit (such as a hardware standard unit) originally used to implement the combinational logic function in the chip; since there is preset record information in the lookup table 111, and the preset record information may include multiple preset input signals, and preset output signals corresponding to each of the preset input signals, when the combinational logic function of the chip needs to be changed or repaired, the preset record information in the lookup table 111 can be directly modified or updated without changing the combinational logic circuit that has been arranged in the chip to implement the combinational logic function; therefore, the replacement and update of the combinational logic function in the chip can be facilitated, thereby effectively shortening the chip design cycle and improving the chip design efficiency.
[0061] To facilitate understanding of the chip provided in the embodiment of the present invention, the implementation structure of the lookup table 111 included therein, please refer to Figure 5 , Figure 5 It is a circuit structure diagram of a lookup table in the chip provided in an embodiment of the present invention.
[0062] like Figure 5 As shown, the lookup table 111 includes a plurality of input ports ( Figure 5The input ports A, B, C, D shown in FIG. 1 are used to receive the input signal sent by the first trigger 110, and at least one output port ( Figure 5 The output port E) shown in FIG. 1 is used to determine the corresponding output signal in the preset record information of the lookup table 111 according to the received input signal, and output the determined output signal from the input port.
[0063] To facilitate the description of the chip provided in the embodiment of the present invention, the combinational logic function of the combinational logic circuit can be realized by using a lookup table. Figure 5 ,refer to Figure 6 and Figure 7 , Figure 6 yes Figure 2 A schematic diagram of a numerical value and a result recorded in a lookup table corresponding to the combinational logic design shown; Figure 7 yes Figure 3 A result schematic diagram of the values recorded in the lookup table corresponding to the modified combinational logic design is shown.
[0064] in, Figure 6 The circuit of the lookup table shown is similar to Figure 2 The combinatorial logic function assigned E = (A & B) & (C | D) implemented in the corresponding combinatorial logic design, that is, Figure 6 The lookup table circuit shown can be replaced by Figure 2 The combinational logic circuit shown in the figure has the following values recorded in the lookup table: Figure 2 Various input value combinations and corresponding output values of the combinatorial logic function shown.
[0065] The RTL code design is modified, and the original combinational logic circuit and the lookup table circuit used to implement E=! (A&B)&(C|D) are separated by macro definition. The modified code design can be expressed as:
[0066] Use the macro definition "LOOKUP_REPLACE" to statically control whether to use a lookup table to replace a combinational logic circuit. For example, the input of the combinational logic circuit (the implemented combinational logic design) to be replaced by the lookup table is a standard 4-input 1-output. The corresponding lookup table can be represented by "LOOKUP_4_1", where the input port for inputting each input value can be represented by "in0~in3", and the output port for outputting the output value of each input value combination can be represented by "out0". The input ports "in0~in3" can be connected to input ports A~D respectively, and the output port "out0" can be connected to output port E. The preset record information in the lookup table can be as follows: Figure 6 Store as shown.
[0067] When the replacement requirement of the combinational logic design is to replace E=!(A&B)&(C|D) with E=(A&B)|!(C&D), the preset record information stored in the replaced lookup table is as follows: Figure 7 shown.
[0068] It can be seen that only the output signal in the preset record information stored in the lookup table needs to be replaced. There is no need to adjust the hardware of the chip design, that is, there is no need to re-implement the physical implementation, which facilitates the modification of the combinational logic design of the chip design, improves the design efficiency of the chip design, and effectively shortens the chip design cycle.
[0069] It can be seen that by storing preset record information in the lookup table 111, the lookup table 111 can be used to implement the combinational logic function of the combinational logic circuit, and therefore the lookup table 111 can be used to replace the combinational logic circuit; and when the combinational logic function needs to be updated or replaced, it is only necessary to replace or update the preset record information stored in the lookup table 111, and there is no need to adjust the hardware of the chip, that is, there is no need to re-implement the physical implementation, which facilitates the modification of the chip's combinational logic design, improves the design efficiency of the chip design, and effectively shortens the chip design cycle.
[0070] In order to enable the lookup table to be replaced, a combinational logic circuit with different combinational logic functions, in one implementation, the lookup table 111 may include a first lookup table with multiple inputs and a single output, and the first lookup table may include:
[0071] A plurality of input ports, wherein the input ports are used to input input values in the input signal stored in the first trigger 110, the input values inputted into each input port at one time form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations;
[0072] An output port, the output port is used to output a corresponding output signal according to an input value combination formed by an input signal input by the input port.
[0073] Due to the different implementations of the combinational logic functions, the calculation formulas of the combinational logic operations used are different, and the number of input values in the corresponding input signals and the number of input ports used to input the input signals are also different; for ease of understanding, the corresponding hardware structure of the first lookup table when implementing different combinational logic functions, please refer to Figure 8a-8d , Figure 8a is a schematic diagram of a circuit implementation structure of a first lookup table in a chip provided in an embodiment of the present invention, Figure 8b is another circuit implementation structure diagram of the first lookup table in the chip provided by the embodiment of the present invention, Figure 8cis another circuit implementation structure diagram of the first lookup table in the chip provided in the embodiment of the present invention, Figure 8d It is another circuit implementation structure diagram of the first lookup table in the chip provided by an embodiment of the present invention.
[0074] It can be seen that there are many options for setting the number and serial number of the input ports of the first lookup table, such as Figure 8a The number of input ports of the first lookup table is 4. Figure 8b The number of input ports of the first lookup table is 3; and for the first lookup table with the same number of input ports, different combinational logic operations will be implemented due to different numbers of input ports used, such as Figure 8a The number of input ports in the first lookup table, and Figure 8c The number of input ports of the first lookup table in is 4, but Figure 8a The first lookup table uses the four input ports numbered A, B, C, and D, and the corresponding output port is F, so Figure 8a What is realized is a combinational logic function that uses A, B, C, and D to perform combinational logic operations to obtain an output signal of F. Figure 8c The first lookup table uses the four input ports numbered B, C, D, and E, and the corresponding output port is H, so Figure 8c The realized combinational logic function is to use B, C, D, and E to perform combinational logic operations to obtain another combinational logic function with an output signal of H, so Figure 8a and Figure 8c Although the number of input ports and output ports is the same, the combinational logic operations used are different, that is, the calculation formulas of the combinational logic operations are different, so two different combinational logic functions can be realized.
[0075] Figure 8a-8d In the embodiment, the number and quantity of the input ports included in the first lookup table can be determined based on different combinatorial logic operations to meet the implementation of different combinatorial logic functions, so that when replacing or updating the combinatorial logic function, there is no need to change the hardware settings of the chip design, avoiding physical re-implementation.
[0076] In one implementation, during the chip design process, the circuit structures of multiple first lookup tables can be merged, thereby effectively reducing the address decoding (decoding of input value combinations) and control logic resource overhead of the lookup table circuit and the chip power consumption. Figure 8a-8d refer to Fig. 9 , Fig. 9 It is a circuit implementation structure of the second lookup table in the chip provided by the embodiment of the present invention.
[0077] like Fig. 9As shown, the lookup table may include a second multi-input multi-output lookup table, and the second lookup table includes:
[0078] A plurality of input ports, used to determine corresponding part of the input ports among the plurality of input ports according to the input ports used by the input values in the input signal currently stored in the first trigger 110, so as to input the input values in the input signal according to the determined part of the input ports; the input values inputted into each input port at one time form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations;
[0079] Multiple output ports are used to determine the output port corresponding to the determined output signal among the multiple output ports according to the input value combination formed by the input input in the input signal currently stored in the first trigger 110, so as to output the determined output signal.
[0080] Based on Figure 8a-8d The first 4 lookup tables shown give Fig. 9 Before the second lookup table shown, Figure 8a-8d The four first lookup tables shown are all multi-input single-output lookup tables. Figure 8a-8d In the four first lookup tables shown, the input ports can be obtained by combining any input ports of A, B, C, D, and E. It can be seen that Figure 8a-8d In the input ports of the first lookup table shown in FIG. 1 , the set formed by each input port can be expressed as A, B, C, D, and E, so it can be used as Fig. 9 The five input ports of the second lookup table shown; similarly, Figure 8a-8d The output ports shown in the figure can be represented by the set of F, G, H, and I, so they can be used as Fig. 9 The four output ports of the second lookup table are shown.
[0081] Therefore, when merging the first lookup tables to obtain the second lookup table, a second lookup table with 5 inputs and 4 outputs can be used to replace the aforementioned Figure 8a-8d The four first lookup tables shown use input ports A to E as input ports of the second lookup table, and output ports F to I as output ports of the second lookup table.
[0082] In one implementation, in order to meet the need for adding replacement input ports, redundant input ports may also be set in the lookup table. Fig.10 , Fig.10 It is a circuit structure diagram of a redundant lookup table in a chip provided by an embodiment of the present invention.
[0083] like Fig.10As shown, the lookup table includes a redundant lookup table, and the redundant lookup table includes:
[0084] A plurality of basic input ports, wherein the basic input ports are used to input input values in the input signal stored in the first trigger;
[0085] At least one redundant input port, used as a spare input port to input the newly added input value in the input signal when the number of input values in the input signal increases and the number of used input ports is greater than the number of basic input ports; the input values input once to each basic input port and the redundant output port form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations;
[0086] An output port, the output port is used to output a corresponding output signal according to an input value combination formed by input values input by each of the basic input ports and input values input by the redundant input port.
[0087] The combinational logic function implemented by the redundant lookup table and the initial combinational logic design can be implemented by using a 4-input 1-output structure, sharing 4 input ports A to D, and the output port is F. When the combinational logic function implemented by the initial combinational logic design corresponding to the lookup table is replaced with another combinational logic function implemented by using 5 inputs and 1 output, the redundant lookup table can be used for implementation. In the redundant lookup table, the first 4 input ports of the redundant lookup table are maintained, and the 4 input ports A to D are still recorded. The 5th input port set in the redundant lookup table is a redundant input port, which can be represented by E, for example, and its input value can be fixedly assigned to 0, that is, when the preset redundant input port E is not used, the input value of the redundant input port D can be represented by the value 0. The output port is still F.
[0088] By setting redundant input ports in the redundant lookup table to record the input values of the added input ports, the repairability of the circuit structure of the lookup table can be further enhanced when there are defects in the chip design.
[0089] To enable the lookup table to implement the combinational logic function of the sequential logic circuit, please continue to refer to Figure 4 , the chip may further include:
[0090] The second trigger 112 is used to store the output signal output by the lookup table 111 .
[0091] The second trigger 112 receives the output signal from the lookup table 111 to achieve complete implementation of the combinational logic function and ensure the normal operation of the chip.
[0092] The present invention also provides a chip design method, please refer to Fig.11 , Fig.11 It is a flowchart of a chip design method provided by an embodiment of the present invention.
[0093] like Fig.11 As shown, the process may include the following steps:
[0094] Step S100 , determining design requirements of a combinatorial logic design, wherein the combinatorial logic design is used to output a corresponding output signal based on an input signal.
[0095] The design requirements of the combinatorial logic design can be determined based on the combinatorial logic functions implemented by the chip design, so as to determine the input ports required to implement the combinatorial logic design, so as to input input signals from each input port; and based on the input signals and the combinatorial logic functions implemented in the combinatorial logic design, that is, logical operations, the output signals corresponding to each input signal are obtained and output from the output ports.
[0096] The design requirement of the combinatorial logic design may be a requirement to replace the combinatorial logic circuit that implements the combinatorial logic design with a lookup table, or may be a requirement to replace the combinatorial logic design implemented by the lookup table after the combinatorial logic circuit has been replaced with the lookup table.
[0097] Step S101 : designing a target lookup table according to the design requirements, wherein the lookup table stores preset record information, and the preset record information includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals.
[0098] The lookup table can realize the corresponding combinatorial logic function according to the design requirements of the combinatorial logic design. Since the lookup table records the preset input signal determined based on the combinatorial logic design and the preset output signal calculated according to the combinatorial logic function, the implementation of the combinatorial logic function corresponding to the combinatorial logic design can be satisfied, so that the lookup table can replace the standard unit for realizing the combinatorial logic design, for example Figure 2 The combinational logic circuit shown is formed by connecting multiple logic gates.
[0099] When designing a chip, it will include design requirements for multiple combinational logic designs, so the number and size of the lookup tables can be designed for different combinational logics. The target lookup table is a lookup table designed corresponding to the design requirements of the currently implemented combinational logic design.
[0100] According to the design requirements of different combinational logic designs, the target lookup table can be used to replace the combinational logic circuit corresponding to the combinational logic function required to be implemented by the design requirements, and can also be used to replace the numerical value initially recorded in the target lookup table to implement the combinational logic function to be implemented in the design requirements.
[0101] Step S102, configuring the target lookup table in the chip design.
[0102] Based on the foregoing, the chip design is mainly based on sequential logic circuits, and the sequential logic circuits are formed by triggers and combinational logic. Since the lookup table is used to implement the combinational logic in the embodiment of the present invention, the target lookup table can be configured between the first trigger and the second trigger of the chip design to replace the combinational logic circuit, thereby ensuring the normal implementation of the combinational logic function of the chip design.
[0103] In one embodiment, the target lookup table configured in the chip design can be determined according to the design requirements of the combinatorial logic design. For example, a lookup table is set at the corresponding physical location of a combinatorial logic design where the combinatorial logic function is prone to modification, while a hardware standard unit continues to be used at the corresponding physical location of a combinatorial logic design where the combinatorial logic function is not prone to modification.
[0104] It can be seen that the chip design method provided in the embodiment of the present invention uses a lookup table to implement the combinational logic function in the combinational logic design during the chip design process, replacing the combinational logic circuit (such as a hardware standard unit) originally used to implement the combinational logic function in the chip design; since the lookup table stores preset record information, and the preset record information includes multiple preset input signals and preset output signals corresponding to each of the preset input signals, when the combinational logic function of the chip design needs to be changed or repaired, the preset record information stored in the lookup table can be directly modified or updated without changing the combinational logic circuit that has been arranged in the chip design to implement the combinational logic function; therefore, the replacement and update of the combinational logic function in the chip design can be facilitated, thereby effectively shortening the chip design cycle and improving the chip design efficiency.
[0105] To facilitate recording and distinguishing different combinations of input values and corresponding output values of combinatorial logic functions, in one embodiment, the lookup table includes an input port and an output port;
[0106] There are multiple input ports, and each input port records multiple input value combinations corresponding to multiple different preset input signals, wherein one input port inputs one input value of the preset input signal at a time, and the input values inputted by multiple input ports at a time form an input value combination;
[0107] The number of the output ports is at least one, and each output port outputs a preset output signal corresponding to each input value combination, wherein one output port outputs one preset output signal at a time.
[0108] The input port and the output port can be determined according to the design requirements of the combinatorial logic design and the combinatorial logic function to be implemented by the lookup table. And the preset input signal and the preset output signal in the preset information recorded in the lookup table correspond to the numbers of the input port and the output port set in the hardware structure of the lookup table determined according to the design requirements of the combinatorial logic design.
[0109] For example, when the combinatorial logic function is the aforementioned E=! (A&B)&(C|D), the input ports are A, B, C, D, and the output port is E, then the input ports included in the lookup table can be the input ports A, B, C, D used for the combinatorial logic operation, and in the preset record information recorded in the lookup table, the preset input signal can correspond to the input value inputted by each input port; wherein, in the preset record information, the number A can correspond to the record of an input value in the preset input signal inputted to the input port A used for the combinatorial logic operation; in the preset record information, the number D can correspond to the record of an input value in the preset input signal inputted to the input port B used for the combinatorial logic operation; in the preset record information, the number C can correspond to the record of an input value in the preset input signal inputted to the input port C used for the combinatorial logic operation; in the preset record information, the number D can correspond to the record of an input value in the preset input signal inputted to the input port D used for the combinatorial logic operation.
[0110] The output port included in the lookup table can be the output port E used for combinatorial logic operations, and in the preset record information recorded in the lookup table, the preset output signal can correspond to the output value output by the recorded output port; for example, in the preset record information of the lookup table, the number E can correspond to the record, the output value in the preset output signal corresponding to an input value combination formed with the preset input signal output by the output port E used for combinatorial logic operations.
[0111] The multiple preset input signals recorded in the lookup table can be formed into 2 according to the number n of input values input at one time. n Different input value combinations, for the input value combinations formed by each input signal, based on the implemented combinational logic function, corresponding to 2 n For example, if the input signal includes 4 input values, 2 4= 16 input value combinations, each input value combination corresponds to an output value, so the lookup table records 16 input value combinations and 16 output values corresponding to the 16 input value combinations.
[0112] In the sequential logic circuit of the chip design, the input signal is usually represented by a binary value, for example, 0100 represents an input value combination in the input signal, where each binary value is an input value and requires an input port for transmission; therefore, in order to facilitate the distinction between the combinational logic functions of different combinational logic designs, the input ports used to input the input values of the combinational logic function are numbered and distinguished according to the combinational logic function of each combinational logic design, and the output ports used to output the output values of the combinational logic function are numbered and distinguished, so that the lookup table can correspondingly implement different combinational logic functions.
[0113] In order to configure the target lookup table in the chip design so as to smoothly implement the combinatorial logic function of the chip design, in one embodiment, the target lookup table can be configured according to the design requirements of the combinatorial logic design, including the replacement requirements of the combinatorial logic design.
[0114] Please refer to Fig.12 , Fig.12 It is another flowchart diagram of the chip design method provided by an embodiment of the present invention.
[0115] like Fig.12 The process may include the following steps:
[0116] Step S200 , determining design requirements of a combinatorial logic design, wherein the design requirements of the combinatorial logic design include replacement requirements of the combinatorial logic design.
[0117] The replacement requirement of the combinatorial logic design may refer to replacing the combinatorial logic circuit with a target lookup table; that is, when the lookup table is not used to replace the combinatorial logic circuit, the combinatorial logic circuit is replaced with a lookup table at a location where the combinatorial logic function is likely to change according to the replacement requirement of the combinatorial logic design. For example, a lookup table is set at the corresponding physical location of the combinatorial logic design where the combinatorial logic function is likely to be modified, while the combinatorial logic design where the combinatorial logic function is not likely to be modified continues to be implemented using the combinatorial logic circuit (such as a hardware standard unit) at the corresponding physical location.
[0118] The replacement requirement of the combinational logic design may also refer to replacing an already configured target lookup table with a numerical value representing another combinational logic function, that is, replacing the numerical value recorded in the already configured target lookup table so that the combinational logic function implemented by the target lookup table is replaced with another different combinational logic function.
[0119] Step S201, designing a target lookup table according to the replacement requirements of the combinational logic design.
[0120] According to the content indicated by the replacement requirements of the aforementioned combinational logic design, the designed target lookup table can be a lookup table designed for the combinational logic circuit to be replaced, and the implemented combinational logic function corresponds to the designed lookup table; it can also be a chip design after being configured with the target lookup table. When implementing another different combinational logic function, a lookup table that records the numerical values corresponding to another different combinational logic function is used. Of course, at this time, the hardware circuit is still the target lookup table, but the numerical values recorded in the target lookup table have been replaced by the numerical values corresponding to another different combinational logic function.
[0121] After the target lookup table is designed, the circuit timing of the chip can also be evaluated to ensure that the combinational logic function of the chip design is implemented normally.
[0122] Step S202, evaluating whether the circuit timing of the chip design replaced with the target lookup table meets the circuit timing requirement, if yes, executing step S203, if not, executing step S204.
[0123] When evaluating the circuit timing of a chip design configured with a lookup table, after completing the register transfer level (RTL) code design and main function design verification of each functional module of the chip design, the combinational logic with low verification coverage and difficult to further improve the coverage can be checked, and the design risk of the checked combinational logic can be evaluated from the perspective of chip design. For the combinational logic circuits with higher design risks (circuits formed by various logic gates), further evaluation can be made as to whether the circuit timing after replacement with the lookup table circuit meets the design requirements. This can prevent the combinational logic circuit replaced by the lookup table from failing to meet the realization of the combinational logic function of the chip design.
[0124] Step S203, configuring the target lookup table in the chip design.
[0125] Since the target lookup table uses the stored preset record information, that is, various input value combinations formed by preset input signals and corresponding preset output signals (i.e., output values), to implement the combinatorial logic function of the chip design, when evaluating the circuit timing of the chip design configured with the target lookup table, it is based on meeting the design requirements of the chip design. When replacing the combinatorial logic circuit, or for the chip configured with the target lookup table, when it is necessary to modify the combinatorial logic function implemented by the target lookup table, the combinatorial logic circuit can be replaced with the target lookup table according to the content indicated by the replacement requirements of the combinatorial logic design, or various input value combinations recorded in the target lookup table can be used to obtain new output values based on the replaced combinatorial logic function, and the new output values can be used to update the output values already recorded in the preset record information stored in the target lookup table, so as to achieve the purpose of modifying the combinatorial logic function and ensure that the circuit timing of the chip design is normal after the target lookup table is configured.
[0126] When using a target lookup table to replace a combinational logic circuit, that is, configuring the target lookup table into the chip design, in some embodiments, it can be performed at any stage of the RTL code design stage, the netlist synthesis stage, or the physical implementation stage. To facilitate understanding of the implementation of the lookup table configuration, it is explained at the RTL code design stage, where the RTL code can be implemented according to the Verilog design language.
[0127] Step S204, stop configuring the target lookup table in chip design.
[0128] When the target lookup table is used to replace the combinational logic circuit, and the evaluated circuit timing does not meet the design requirements of the chip design, the target lookup table is stopped from being configured in the chip design. For example, the lookup table circuit is no longer used to replace the combinational logic circuit, or the values in the target lookup table used to replace the combinational logic circuit are stopped from being changed.
[0129] According to the investigation and verification, there may be multiple combinatorial logics with low coverage and difficult to further improve the coverage. There may be multiple combinatorial logic circuits that can be replaced by lookup tables, and the number of lookup tables used can be multiple to meet the design requirements of chip design.
[0130] The replacement requirement of the combinatorial logic design may be to replace the combinatorial logic circuit with the target lookup table, or to replace the value recorded in the configured target lookup table to realize another different combinatorial logic function. Therefore, in one embodiment, when the replacement requirement of the combinatorial logic design refers to replacing the value recorded in the configured target lookup table to realize another different combinatorial logic function, the replacement requirement of the combinatorial logic design may include: a replacement requirement of replacing the first combinatorial logic design with the second combinatorial logic design;
[0131] According to the replacement requirements of the combinational logic design, the design target lookup table includes:
[0132] Determining a target lookup table corresponding to the first combinatorial logic design among the plurality of lookup tables;
[0133] The target lookup table is updated so that the updated target lookup table matches the second combinatorial logic design.
[0134] The first combinatorial logic design may be a combinatorial logic design determined during chip design according to the combinatorial logic function to be implemented by the chip, for example, the combinatorial logic function described above is a combinatorial logic design where E=!(A&B)&(C|D).
[0135] When it is necessary to replace the combinational logic function implemented by the combinational logic design, since there can be multiple lookup tables in the chip for replacing the combinational logic circuit, and each lookup table can implement a different combinational logic function of the combinational logic design, it is necessary to find a target lookup table corresponding to the first combinational logic design determined in the replacement requirement among the multiple lookup tables, so as to replace the numerical values recorded in the target lookup table without causing damage to other non-target lookup tables.
[0136] According to the chip provided by the aforementioned embodiment of the present invention, the Figure 6 and Figure 7 From the values recorded in the lookup table before replacement and the values recorded after replacement, it can be seen that when the embodiment of the present invention replaces the combinational logic design, for a replacement requirement, the target lookup table does not change before and after the replacement, but the values recorded in the target lookup table change according to the replaced combinational logic design.
[0137] Therefore, in order to achieve determination and update of the target lookup table, in one implementation, determining the target lookup table corresponding to the first combinatorial logic design among the multiple lookup tables may include:
[0138] Determine a target lookup table corresponding to first design information of a first combinatorial logic design from among multiple lookup tables, wherein the first design information of the first combinatorial logic design includes: an input port, an output port, a plurality of input value combinations input through the input port, and output values corresponding to each input value combination output through the output port of the first combinatorial logic design;
[0139] The updating of the target lookup table so that the updated target lookup table matches the second combinatorial logic design includes:
[0140] Determining second design information of a second combinatorial logic design, wherein the second design information is obtained by adjusting the first design information of the first combinatorial logic design;
[0141] The target lookup table is updated according to second design information corresponding to the second combinatorial logic design.
[0142] The first design information of the first combinatorial logic design includes an input port, an output port, a plurality of input value combinations input through the input port, and an output value corresponding to each input value combination output through the output port, which corresponds to the combinatorial logic function of the first combinatorial logic design. For example, if the combinatorial logic function of the first combinatorial logic design is E=! (A&B)&(C|D), the input ports of the first combinatorial logic design can be determined as A, B, C, and D, and the output port can be determined as D.
[0143] Because when replacing the values in the target lookup table based on the replacement requirements of the combinatorial logic design, the same lookup table is targeted. Therefore, based on the input ports and output ports of the first combinatorial logic design before the replacement, a target lookup table corresponding to the input ports and output ports before the replacement can be found in multiple lookup tables to facilitate subsequent replacement of the output values recorded in the target lookup table.
[0144] In one implementation, a combinatorial logic function of the second combinatorial logic design is different from a combinatorial logic function of the first combinatorial logic design, and the combinatorial logic function is used to determine an output value corresponding to a combination of input values.
[0145] In the replacement requirements of the combinational logic design, the combinational logic functions to be replaced may include multiple types, so the combinational logic functions implemented by the second combinational logic design after replacement are also different. Therefore, the corresponding second combinational logic design can be obtained according to the specific replacement requirements of the combinational logic design; of course, the lookup tables corresponding to the second combinational logic design after replacement and the first combinational logic design before replacement are both target lookup tables, so that the combinational logic design of the chip design can be replaced without destroying the physical implementation of the chip design.
[0146] In one implementation, determining the second design information of the second combinatorial logic design includes:
[0147] Maintaining the input port, the output port, and the multiple input value combinations input through the input port of the first combinatorial logic design, and adjusting the output value corresponding to each input value combination output through the output port to obtain second design information of the second combinatorial logic design;
[0148] The updating of the target lookup table according to the second design information corresponding to the second combinatorial logic design comprises:
[0149] The output values corresponding to each input value combination recorded in the output port of the target lookup table are replaced with the output values corresponding to each input value combination indicated by the second design information.
[0150] When determining that the second design information of the second combinatorial logic design includes: maintaining the input port, output port, and multiple input value combinations input through the input port of the first combinatorial logic design, and adjusting the output values corresponding to each input value combination output through the output port to obtain the second design information of the second combinatorial logic design, the combinatorial logic function implemented by the second combinatorial logic design that replaces the first combinatorial logic design can be combined with various input value combinations already recorded in the target lookup table to calculate the output value corresponding to each input value combination, that is, to obtain the output value included in the replaced second design information, so that the output value recorded in the target lookup table can be replaced with the output value in the second design information, avoiding re-changing the hardware circuit of the target lookup table. At this time, the hardware implementation of the updated target lookup table can be the first lookup table described in the aforementioned embodiment.
[0151] For example, as mentioned above, Figure 6 The values shown are the initial combinational logic design, the corresponding target lookup table values, and the aforementioned, Figure 7 The values shown are for the replaced combinational logic design, with the corresponding values recorded in the target lookup table as an example.
[0152] As you can see, Figure 6 and Figure 7 The number of the input ports of the target lookup table is the same, and each input value combination in the preset record information recorded in the lookup table has not changed. Since the combinatorial logic function of the combinatorial logic design has changed from E=! (A&B)&(C|D) to E=(A&B)|! (C&D), therefore, in the target lookup table shown in FIG8 , the input value combination recorded in the preset record information recorded in the lookup table has not changed, while the output value corresponding to each input value combination in the preset record information recorded in the lookup table has changed. For example Figure 7 When the input value combination is 0000, the output value calculated based on E=! (A&B)&(C|D) is 0. When the combinational logic function of the second combinational logic design replaced according to the replacement requirements of the combinational logic design is E=(A&B)|! (C&D), the same input value combination 0000, in Figure 7 The output value obtained is 1.
[0153] It can be seen that the replacement of the combinational logic design provided by the embodiment of the present invention does not require changing the hardware circuit of the target lookup table, that is, Figure 6 and Figure 7 The hardware circuits of the corresponding target lookup tables are Figure 5 The circuit structure shown can effectively shorten the chip design cycle and improve chip design efficiency.
[0154] In another embodiment, the input port of the second combinatorial logic design is obtained by deleting the input port of the first combinatorial logic design.
[0155] At this time, although the replacement requirement of the combinatorial logic design requires the second combinatorial logic design to delete the input port, the logical function of the combinatorial logic design is changed synchronously according to the deleted input port, that is, the logical operation of the combinatorial logic function implemented by the replaced second combinatorial logic design corresponds to the deleted input port. Therefore, it is still not necessary to change the preset record information of the target lookup table, and the various input value combinations recorded are only required to recalculate the output value corresponding to each input value combination according to the combinatorial logic function of the second combinatorial logic design that is required to be replaced, and obtain the replaced output value to replace the output value already recorded in the target lookup table.
[0156] For example, in the target lookup table determined based on the first combinatorial logic design, the preset record information corresponds to the input values input into each input port A, B, and C. When the combinatorial logic function implemented by the target lookup table is A&B&C=D, then in the preset record information, the recorded input value combinations can be 000, 001, 010, 011, 100, 101, 110, 111, and the output values corresponding to each input value combination are 0, 0, 0, 0, 0, 0, 0, 1.
[0157] When one input port C is reduced according to the second design information of the second combinatorial logic design at this time, and the corresponding combinatorial logic function to be implemented is! (A&B) = D, then according to the target lookup table corresponding to the second combinatorial logic design at this time, since the combinatorial logic function is! (A&B) = D, even if the preset record information in the target lookup table records the input values of the input port C, when the combinatorial logic function is! (A&B) = D, it is not necessary to use the input value of the input port C recorded by the preset record information, and only the input value combinations formed by the input values of the input ports A and B recorded in the preset record information are used to calculate the replaced output value using! (A&B) = D. For example, the calculated output value can be recorded as 1, 1, 1, 1, 1, 1, 0, 0 in the preset record information of the target lookup table. The input value of the recorded input port C is not considered in the input value combination, and the corresponding output value is determined according to the actual input value combination, that is, when the actual input value combination is "00", for the input value combinations recorded in the target lookup table are "000" and "001", the output values after replacement are all "1"; when the actual input value combination is "01", for the input value combinations recorded in the target lookup table are "010" and "011", the output values after replacement are all "1"; when the actual input value combination is "00", for the input value combinations recorded in the target lookup table are "100" and "101", the output values after replacement are all "1"; when the actual input value combination is "11", for the input value combinations recorded in the target lookup table are "110" and "111", the output values after replacement are all "0". It can be seen that the output value after replacement does not affect the realization of the replaced combinational logic function.
[0158] In some other implementations, the combinatorial logic function of the second combinatorial logic design is different from the combinatorial logic function of the first combinatorial logic design, and the first combinatorial logic design obtains the input port of the second combinatorial logic design by adding an input port.
[0159] That is, in the target lookup table corresponding to the first combinatorial logic design, the newly added preset redundant input port is used to record the newly added input value to obtain the input port corresponding to the second combinatorial logic design.
[0160] In one implementation, a redundant input port may be added to the target lookup table, that is, the target lookup table at this time may be the redundant lookup table described in the foregoing embodiment, so as to realize the increase of input ports, and the second design information for determining the second combinatorial logic design includes:
[0161] Adding an input port of the first combinatorial logic design, adjusting a plurality of input value combinations input through the input port, maintaining an output port of the first combinatorial logic design, and adjusting output values corresponding to each input value combination output through the output port, so as to obtain second design information of the second combinatorial logic design;
[0162] The updating of the target lookup table according to the second design information corresponding to the second combinatorial logic design comprises:
[0163] Replace the input value input to the input port recorded in the preset record information of the target lookup table with the input value input to the input port indicated by the second design information; and replace the multiple input value combinations input through the multiple input ports recorded in the preset record information with the multiple input value combinations input through the input ports indicated by the second design information; and replace the output values corresponding to the respective input value combinations output by the output port recorded in the preset record information of the target lookup table with the output values corresponding to the respective input value combinations indicated by the second design information.
[0164] At this time, in the target lookup table determined based on the first combinatorial logic design, in the preset record information, the input value of the recorded input port may include the numerical value recorded by the redundant input port input. In the first combinatorial logic design, since the redundant input port may be in an unused state, therefore, in the preset record information of the target lookup table, the numerical value recorded by the redundant input port input may be 0, to indicate that the redundant input port is in an unused state at this time.
[0165] In order to enable the replacement requirement at this time to be normally implemented, it is necessary to determine the number of input values of the redundant input port recorded in the preset record information of the target lookup table. In one embodiment, before executing the step of updating the target lookup table according to the second design information corresponding to the second combinatorial logic design, it also includes:
[0166] Determine whether the number of input values inputted by the added input port exceeds the number of input values inputted by the redundant input port recorded in the preset record information of the target lookup table;
[0167] If yes, cancelling the step of updating the target lookup table according to the second design information corresponding to the second combinatorial logic design;
[0168] If not, the process proceeds to the step of updating the target lookup table according to the second design information corresponding to the second combinatorial logic design.
[0169] When the number of input values recorded in the preset record information of the target lookup table for the redundant input port is less than the number of input values input into the newly added input port, it means that the target lookup table cannot satisfy the record of the input values input into the newly added input port. Therefore, the target lookup table is no longer updated according to the replaced second combinatorial logic design, and the step of updating the target lookup table according to the second design information corresponding to the second combinatorial logic design is canceled.
[0170] When the number of input values recorded in the preset record information of the target lookup table for the redundant input port is greater than or equal to the number of input values input into the newly added input port, it means that the target lookup table can satisfy the recording of the input values input into the newly added input port. Therefore, the target lookup table can be updated according to the replaced second combinatorial logic design, and the step of updating the target lookup table according to the second design information corresponding to the second combinatorial logic design is executed.
[0171] In the preset record information of the target mark lookup table, the input value recorded in the redundant input port can be a fixed value input by a signal transmission line connected to the redundant input port added to the target lookup table during hardware design (although the signal transmission line transmits the value at this time, it does not affect the realization of the combinational logic function of the first combinational logic design, for example, the signal transmission line can be used to transmit an invalid signal as an input value); or it can be a preset fixed value directly configured in the redundant input port of the target lookup table, so as to record the input value of the redundant input port in the preset record information of the target mark lookup table.
[0172] When it is determined that the number of input values of the added input port does not exceed the number of input values of the redundant input port recorded in the preset record information of the target lookup table, the input value combination already recorded in the target lookup table and the input value of the redundant input port recorded can be replaced to form a new input value combination; for example, when the input value of the redundant input port recorded in the preset record information is the value input to the redundant input port by the signal transmission line, that is, when the target lookup table replaces the combinational logic circuit, the redundant input port has been pre-connected with a signal transmission line in the hardware structure. At this time, according to the second design information of the second combinational logic design, the signal transmission line pre-connected to the redundant input port can be used to transmit the signal to change the input value of the redundant input port recorded in the preset record information, that is, at this time, only the input value of the redundant input port recorded in the preset record information of the lookup table and the input value of each input port recorded in the preset record information of the lookup table are updated, thereby forming a new plurality of input value combinations and the output value corresponding to each new input value combination, so as to realize the combinational logic function of the second combinational logic design.
[0173] When the input value of the redundant input port recorded in the preset record information is a pre-recorded fixed value (for example, set to 0), that is, when the target lookup table replaces the combinational logic circuit, the redundant input port is not connected to the signal transmission line in the hardware structure, and only a fixed value is recorded in the preset record information of the target lookup table to indicate that the target lookup table is provided with a redundant input port; at this time, according to the number of input ports to be added, a signal transmission line for connecting the redundant input port set by the target lookup table can be added in the physical structure, so as to replace the input value recorded in the preset record information of the target lookup table, that is, the fixed value, and replace the input value combination that has been recorded to form a new input value combination. At this time, although the chip that uses the target lookup table to replace the combinational logic circuit is physically re-set, compared with the method of changing each logic gate and the connection line between the logic gates, the physical setting method of adding the signal transmission line provided by the embodiment of the present invention can significantly reduce the complexity of process manufacturing and shorten the cycle of physical implementation, thereby improving the efficiency of chip design.
[0174] Then, based on the combinatorial logic function of the replaced second combinatorial logic design, the corresponding output value is calculated for each new input value combination to obtain the replaced output value, and replace the output value already recorded in the target lookup table.
[0175] In one embodiment, the design requirements of the combinatorial logic design may include: a combined requirement for combining multiple combinatorial logic designs into a comprehensive combinatorial logic design;
[0176] The design target lookup table according to the design requirements includes:
[0177] Among the plurality of lookup tables, determining a lookup table corresponding to each combinational logic design;
[0178] Merging the input ports of each determined lookup table, and merging the input ports of each determined lookup table to obtain a target lookup table;
[0179] The target lookup table is updated so that the updated target lookup table realizes the merged multiple combinational logic designs.
[0180] During the chip design process, by merging the circuit structures of multiple lookup tables, that is, merging the multiple first lookup tables mentioned above into one second lookup table, the address decoding (decoding of input value combinations) and control logic resource overhead of the lookup table circuit and the chip power consumption can be effectively reduced.
[0181] The present invention also provides a signal processing method, please refer to Fig.13 , Fig.13 It is a flowchart of a signal processing method provided by an embodiment of the present invention.
[0182] like Fig.13 As shown, the process may include the following steps:
[0183] Step S300, obtaining an input signal, wherein the input signal is used for combinatorial logic operations of the chip.
[0184] The input signal may include an input value combination formed by input values input to each input port.
[0185] Step S301, using the preset record information stored in the lookup table, determine the output signal corresponding to the input signal, the output signal being the result of a combinational logic operation.
[0186] The preset record information stored in the lookup table includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals.
[0187] The input value combination in the input signal is used as an index to determine the lookup table, so that the corresponding output value is found according to the input value combination in the numerical values recorded in the lookup table.
[0188] Step S302: output the determined output signal.
[0189] It can be seen that the signal processing method provided by the embodiment of the present invention uses a lookup table to implement the combinatorial logic function in the combinatorial logic design during the chip design process, replacing the combinatorial logic circuit (such as a hardware standard unit) originally used to implement the combinatorial logic function in the chip design; since the lookup table records various input value combinations and output values obtained based on the combinatorial logic function with various input value combinations, when the chip design obtains the input signal, it can directly index to the corresponding lookup table according to the input value combination in the input signal, and obtain the output value corresponding to the input value combination, so as to meet the realization of the combinatorial logic function of the chip design. And when the combinatorial logic function of the chip design needs to be changed or repaired, the output value recorded in the lookup table can be directly modified or updated without changing the combinatorial logic circuit that has been arranged in the chip design to realize the combinatorial logic function; therefore, it can facilitate the replacement and update of the combinatorial logic function in the chip design, thereby effectively shortening the chip design cycle and improving the chip design efficiency.
[0190] The present invention also provides a chip design device, please refer to Fig.14 , Fig.14 It is a structural schematic diagram of a chip design device provided by an embodiment of the present invention.
[0191] like Fig.14As shown, the device may include:
[0192] A combinatorial logic design determination module 140, used to determine the design requirements of the combinatorial logic design, wherein the combinatorial logic design is used to output a corresponding output signal based on an input signal;
[0193] A lookup table design module 141 is used to design a target lookup table according to the design requirements, wherein the lookup table stores preset record information, and the preset record information includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals;
[0194] The lookup table configuration module 142 is used to configure the target lookup table in the chip design.
[0195] The input signals recorded in the lookup table can form multiple input value combinations, and can form 2 n Different input value combinations, for each input value combination, based on the implemented combinational logic function, corresponding to 2 n For example, if 4 input values are input at a time, 2 4 = 16 input value combinations, each input value combination corresponds to an output value, so the lookup table records 16 input value combinations and 16 output values corresponding to the 16 input value combinations.
[0196] In one embodiment, the design requirements of the combinatorial logic design include: replacement requirements of the combinatorial logic design;
[0197] The lookup table design module 141 is used to design a target lookup table according to the design requirements and includes:
[0198] According to the replacement requirements of the combinational logic design, a target lookup table is designed.
[0199] It can be seen that the chip design device provided in the embodiment of the present invention uses a lookup table to implement the combinational logic function in the combinational logic design during the chip design process, replacing the combinational logic circuit (such as a hardware standard unit) originally used to implement the combinational logic function in the chip design; since the lookup table records various input value combinations and output values obtained based on the combinational logic function with various input value combinations, when the combinational logic function of the chip design needs to be changed or repaired, the output value recorded in the lookup table can be directly modified or updated without changing the combinational logic circuit that has been arranged in the chip design to implement the combinational logic function; therefore, the replacement and update of the combinational logic function in the chip design can be facilitated, thereby effectively shortening the chip design cycle and improving the chip design efficiency.
[0200] An embodiment of the present invention also provides a design device, including a memory and a processor, wherein the memory stores a chip design program, and the processor calls the chip design stored in the memory to execute the chip design method as described in any of the aforementioned embodiments, or executes the signal processing method as described in the aforementioned embodiments.
[0201] An embodiment of the present invention further provides a storage medium storing a chip design program. When the chip design program is executed, it implements the chip design method as described in any one of the aforementioned embodiments, or implements the signal processing method as described in the aforementioned embodiments.
[0202] The above describes multiple implementation schemes provided by the embodiments of the present invention. The various optional methods introduced in the implementation schemes can be combined and cross-referenced with each other without conflict, thereby extending a variety of possible implementation schemes, which can all be considered as implementation schemes disclosed and open in the embodiments of the present invention.
[0203] Although the embodiments of the present invention are disclosed 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 chip, It is characterized in that A sequential logic circuit is included, wherein the sequential logic circuit includes: A first trigger, used for storing an input signal input to the chip, wherein the input signal is used for a combinational logic operation of the chip; A lookup table, used to receive an input signal stored in the first trigger, and determine a corresponding output signal according to the input signal using record information preset in the lookup table, and output the output signal, wherein the output signal is a result of a combinational logic operation; Wherein, the lookup table is used to implement the combinational logic function of the combinational logic circuit, and the lookup table includes an input port and an output port; the number of the input ports is multiple, and each input port records multiple input value combinations corresponding to multiple different preset input signals, wherein one input port inputs one input value of the preset input signal at a time, and the input values input by multiple input ports at a time form an input value combination; the number of the output ports is at least one, and each output port outputs a preset output signal corresponding to each input value combination, wherein one output port outputs one preset output signal at a time, and the record information preset in the lookup table includes multiple preset input signals and preset output signals corresponding to each of the preset input signals, and the record information preset in the lookup table can be modified or updated.
2. The chip according to claim 1, It is characterized in that The lookup table comprises a first lookup table with multiple inputs and a single output, wherein the first lookup table comprises: A plurality of input ports, wherein the input ports are used to input input values in the input signal stored in the first trigger, the input values inputted into each input port at one time form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations; An output port, the output port is used to output a corresponding output signal according to an input value combination formed by an input signal input by the input port.
3. The chip according to claim 1, It is characterized in that The lookup table includes a second multi-input multi-output lookup table, wherein the second lookup table includes: A plurality of input ports, used to determine corresponding part of the input ports among the plurality of input ports according to the input ports used by the input values in the input signal currently stored in the first trigger, so as to input the input values in the input signal according to the determined part of the input ports; the input values inputted into each input port at one time form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations; Multiple output ports are used to determine the output port corresponding to the determined output signal among the multiple output ports according to the input value combination formed by the input input in the input signal currently stored in the first trigger, so as to output the determined output signal.
4. The chip according to claim 1, It is characterized in that The lookup table comprises a redundant lookup table, and the redundant lookup table comprises: A plurality of basic input ports, wherein the basic input ports are used to input input values in the input signal stored in the first trigger; at least one redundant input port, used as a spare input port to input the newly added input values in the input signal when the number of input values in the input signal increases and the number of input ports used is greater than the number of basic input ports; the input values input once to each basic input port and the redundant input port form an input value combination, and according to the implemented combinational logic, an input value combination is formed in each input signal, and different input signals form different input value combinations; An output port, the output port is used to output a corresponding output signal according to an input value combination formed by input values input by each of the basic input ports and input values input by the redundant input port.
5. The chip according to any one of claims 1 to 4, It is characterized in that Also includes: The second trigger is used to store the output signal output by the lookup table.
6. A chip design method, It is characterized in that include: Determine design requirements for a combinatorial logic design, wherein the combinatorial logic design is used to output a corresponding output signal based on an input signal; A target lookup table is designed according to the design requirements, wherein the target lookup table is obtained from a plurality of lookup tables, the lookup table is used to implement the combinational logic function of a combinational logic circuit, and the lookup table includes an input port and an output port; the number of the input ports is multiple, and each input port records a plurality of input value combinations corresponding to a plurality of different preset input signals input, wherein one input port inputs one input value in a preset input signal at a time, and the input values input by a plurality of input ports at a time form an input value combination; the number of the output ports is at least one, and each output port outputs a preset output signal corresponding to each input value combination, wherein one output port outputs one preset output signal at a time, the lookup table stores preset record information, and the preset record information includes a plurality of preset input signals and preset output signals corresponding to each of the preset input signals, and the preset record information of the lookup table can be modified or updated; The target lookup table is configured in the chip design.
7. The chip design method according to claim 6, It is characterized in that The design requirements of the combinatorial logic design include: replacement requirements of the combinatorial logic design; The design target lookup table according to the design requirements includes: According to the replacement requirements of the combinational logic design, a target lookup table is designed.
8. The chip design method according to claim 7, It is characterized in that The replacement requirement of the combinatorial logic design includes: a replacement requirement of the first combinatorial logic design being replaced with the second combinatorial logic design; The design target lookup table according to the replacement requirements of the combinational logic design includes: Determining a target lookup table corresponding to the first combinatorial logic design among the plurality of lookup tables; The target lookup table is updated so that the updated target lookup table matches the second combinatorial logic design.
9. The chip design method according to claim 8, It is characterized in that Determining a target lookup table corresponding to the first combinatorial logic design from among the multiple lookup tables comprises: Determine a target lookup table corresponding to first design information of a first combinatorial logic design from among multiple lookup tables, wherein the first design information of the first combinatorial logic design includes: an input port, an output port, a plurality of input value combinations input through the input port, and output values corresponding to each input value combination output through the output port of the first combinatorial logic design; The updating of the target lookup table so that the updated target lookup table matches the second combinatorial logic design includes: Determining second design information of a second combinatorial logic design, wherein the second design information is obtained by adjusting the first design information of the first combinatorial logic design; The target lookup table is updated according to second design information corresponding to the second combinatorial logic design.
10. The chip design method according to claim 9, It is characterized in that The combinatorial logic function of the second combinatorial logic design is different from the combinatorial logic function of the first combinatorial logic design, and the combinatorial logic function is used to determine an output value corresponding to an input value combination.
11. The chip design method according to claim 10, It is characterized in that The determining of the second design information of the second combinatorial logic design includes: Maintaining the input port, the output port, and the multiple input value combinations input through the input port of the first combinatorial logic design, and adjusting the output value corresponding to each input value combination output through the output port to obtain second design information of the second combinatorial logic design; The updating of the target lookup table according to the second design information corresponding to the second combinatorial logic design comprises: The output values corresponding to the various input value combinations recorded in the preset output ports of the target lookup table are replaced with the output values corresponding to the various input value combinations indicated by the second design information.
12. The chip design method according to claim 11, It is characterized in that The input port of the second combinatorial logic design is obtained by deleting the input port of the first combinatorial logic design.
13. The chip design method according to claim 9, It is characterized in that The combinatorial logic function of the second combinatorial logic design is different from the combinatorial logic function of the first combinatorial logic design, and the first combinatorial logic design obtains the input port of the second combinatorial logic design by adding an input port.
14. The chip design method according to claim 13, It is characterized in that The determining of the second design information of the second combinatorial logic design includes: Adding an input port of the first combinatorial logic design, adjusting a plurality of input value combinations input through the input port, maintaining an output port of the first combinatorial logic design, and adjusting output values corresponding to each input value combination output through the output port, so as to obtain second design information of the second combinatorial logic design; The updating of the target lookup table according to the second design information corresponding to the second combinatorial logic design comprises: Replace the input value input to the input port recorded in the preset record information of the target lookup table with the input value input to the input port indicated by the second design information; and replace the multiple input value combinations input through the multiple input ports recorded in the preset record information with the multiple input value combinations input through the input ports indicated by the second design information; and replace the output values corresponding to the respective input value combinations output by the output port recorded in the preset record information of the target lookup table with the output values corresponding to the respective input value combinations indicated by the second design information.
15. The chip design method according to claim 6, It is characterized in that The design requirements of the combinatorial logic design include: a merging requirement of multiple combinatorial logic designs into a comprehensive combinatorial logic design; The design target lookup table according to the design requirements includes: Among the plurality of lookup tables, determining a lookup table corresponding to each combinational logic design; Merging the input ports of each determined lookup table, and merging the input ports of each determined lookup table to obtain a target lookup table; The target lookup table is updated so that the updated target lookup table realizes the merged multiple combinational logic designs.
16. A signal processing method, It is characterized in that include: Acquire an input signal, where the input signal is used for combinatorial logic operations of the chip; The output signal corresponding to the input signal is determined by using the preset record information stored in the lookup table, and the output signal is used as the result of the combinational logic operation; wherein the lookup table is used to implement the combinational logic function of the combinational logic circuit, and the lookup table includes an input port and an output port; the number of the input ports is multiple, and each input port records multiple input value combinations corresponding to multiple different preset input signals input, wherein one input port inputs one input value in the preset input signal at a time, and the input values input by multiple input ports at a time form an input value combination; the number of the output ports is at least one, and each output port outputs a preset output signal corresponding to each input value combination, wherein one output port outputs one preset output signal at a time, and the preset record information stored in the lookup table includes multiple preset input signals and preset output signals corresponding to each of the preset input signals, and the preset record information of the lookup table can be modified or updated; Outputs the determined output value.
17. A design device, It is characterized in that It comprises a memory and a processor, wherein the memory stores a chip design program, and the processor calls the chip design program stored in the memory to execute the chip design method as described in any one of claims 6 to 15, or executes the signal processing method as described in claim 16.
18. A storage medium, It is characterized in that The storage medium stores a chip design program, and when the chip design program is executed, it implements the chip design method according to any one of claims 6 to 15, or implements the signal processing method according to claim 16.
