A method, apparatus and electronic device for splitting a multiplexer
By calculating the delays of the AND-OR tree and the 2:1 multiplexer tree of the multiplexer, and selecting the minimum delay scheme for splitting, the problem of not considering the delay factor in the prior art is solved, and the comprehensive optimization of the multiplexer and the improvement of process mapping performance are achieved.
Patent Information
- Application Number
- CN202310232869.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-10
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-03-10
AI Technical Summary
In existing technologies, delay factors are not considered when mapping multiplexers, which affects the synthesis quality of ASIC/FPGA logic.
By calculating the delays of the AndOr-Tree scheme and the Mux-Tree scheme of the multiplexer to be split, the scheme with the smallest delay is selected for splitting, and the AndOr-Tree or the 2:1 multiplexer tree is constructed.
The multiplexer has been optimized to improve process mapping performance and logic synthesis quality.
Smart Images

Figure CN116432576B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated circuit technology, and more specifically to a method, apparatus, and electronic device for splitting a multiplexer. Background Technology
[0002] Field-Programmable Gate Arrays (FPGAs) are a further development of programmable devices such as Programmable Array Logic (PAL) and Generic Array Logic (GAL). As a semi-custom circuit in the field of Application Specific Integrated Circuits (ASICs), FPGAs are widely used in artificial neural networks, prototyping, and algorithm acceleration due to their flexible configuration and short development cycle. They address the shortcomings of custom circuits and overcome the limited gate count of traditional programmable devices. The FPGA design flow is implemented using Electronic Design Automation (EDA) tools, mainly including logic synthesis, binning, placement, routing, timing analysis, and code stream generation. Process mapping is the final step in logic synthesis. By binding the cells in the logic netlist to various devices on the chip, the process netlist is obtained, which is crucial for the physical realization of digital systems.
[0003] Early FPGAs were simple, homogeneous structures, consisting only of basic logic devices such as look-up tables (LUTs) and registers. LUTs are indispensable logic devices in FPGAs; each K-input LUT can be programmed to implement a logic function with any K variables. For homogeneous FPGAs, many effective structured process mapping methods exist. These typically involve covering the logic netlist with K-feasible cone sets through steps such as partitioning enumeration, partitioning sorting, and optimal partition selection, and finally binding each K-feasible cone to a K-input LUT. However, the performance of homogeneous FPGAs is far inferior to that of application-specific integrated circuits (ASICs). Therefore, with the continuous improvement of FPGA design capabilities, FPGAs have gradually evolved towards heterogeneous structures, embedding high-performance dedicated functional devices such as block RAM, digital signal processors (DSPs), and multiplexers on the chip to narrow the performance gap with ASICs and expand the application areas of FPGAs.
[0004] Digital circuit logic synthesis objects are divided into data paths and control logic. Multiplexers (MUX) combine the characteristics of both data paths and control logic, making them the most fundamental data path in digital systems. For various FPGA application areas, researchers have analyzed typical user designs, indicating that multiplexers typically account for more than one-quarter of the total logic units. Therefore, with the increasing scale of user designs, the efficient utilization of dedicated function devices, especially the mapping of multiplexers, has become a research hotspot.
[0005] In Verilog, the case statement can be parsed to generate a MUX with N choices and 1 option. Figure 1 This is a diagram illustrating the case statement in Verilog in the prior art, such as... Figure 1 As shown, the case statement in Verilog can parse a 5-to-1 MUX, which contains the default term din[4]. However, when performing process mapping, the N-to-1 MUX needs to be split into basic units primitive cells, which include, but are not limited to: 2-to-1 MUX, AND gate, NOT gate, OR gate, etc. In the prior art, when performing process mapping on multiplexers, for the selector unit to be mapped with basic units, the template is directly instantiated to complete the process mapping. For the selector unit to be mapped without basic units, the structure of the selector unit to be mapped is directly split into several sub-units with signal cascading relationship based on the basic units. The candidate signal and the selected signal of the selector unit to be mapped are assigned to the corresponding sub-units according to the predetermined logic. The templates corresponding to the basic units of the sub-units are instantiated respectively to complete the process mapping of the selector unit to be mapped.
[0006] However, existing technologies do not consider factors such as the delay of multiplexers when mapping them, which are important factors affecting the synthesis quality of ASIC / FPGA logic. Therefore, how to decompose multiplexers to optimize their mapping has become an important issue that needs to be addressed. Summary of the Invention
[0007] In view of this, the present disclosure provides a method, apparatus and electronic device for splitting a multiplexer, which at least partially solves the problems existing in the prior art.
[0008] In a first aspect, embodiments of this disclosure provide a method for splitting a multiplexer, including:
[0009] Based on the selection conditions of the multiplexer to be split, perform an OR operation on all selection conditions and use the selection signal to construct the first MUX that selects the default item and the non-default item.
[0010] Calculate the delay of two schemes for the multiplexer to be split, the two schemes being the AndOr-Tree scheme and the 2:1 multiplexer tree Mux-Tree scheme; if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then construct the AndOr-Tree of the multiplexer to be split using the non-default terms of the multiplexer according to the binary search method and a preset formula;
[0011] If the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then the non-default items of the multiplexer to be split are used to construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split according to the selection signal.
[0012] According to a specific implementation of this disclosure, calculating the delay of the two schemes for the multiplexer to be split includes:
[0013] The delay of the AndOr-Tree scheme is calculated according to formula (1). andOr :
[0014]
[0015] Where p is the number of bits of the selection signal of the multiplexer to be split, N is the number of data input signals of the multiplexer to be split, andDelay is the AND delay of the basic unit AND gate, and orDelay is the OR delay of the basic unit OR gate.
[0016] The delay of the Mux-Tree scheme is calculated according to formula (2). Mux :
[0017]
[0018] Where N is the number of data input signals of the multiplexer to be split, and muxDelay is the delay of the basic unit 2:1 MUX.
[0019] According to a specific implementation of an embodiment of this disclosure, the step of constructing an AndOr-Tree for the non-default items of the multiplexer to be split according to a binary search method and a preset formula includes:
[0020] According to formula (3), the branches corresponding to the non-default items of the multiplexer to be split in the first MUX are split into basic units:
[0021]
[0022] Where f(D,S) is the function represented by the default formula for the non-default term, and the input set of the non-default term data is D={d1,d2,…,d n}, the set of selected signal bits is S = {s1, s2, ..., s} p}
[0023] According to a specific implementation of an embodiment of this disclosure, the step of constructing a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split according to the selection signal based on the non-default items of the multiplexer to be split includes:
[0024] The signal bits to be split are determined based on the distribution of the data input.
[0025] Based on the signal bit, the branch corresponding to the non-default item of the multiplexer to be split in the first MUX is split into left and right subtrees;
[0026] Continue splitting the left and right subtrees separately until the preset termination condition is met.
[0027] According to a specific implementation of this disclosure, determining the signal bits to be split based on the distribution of the data input includes:
[0028] The signal bit to be split is determined based on the number of left and right subtrees after splitting, the number of "don't care" items after splitting, the reduced cost after splitting, the number of pairs of identical elements in the left and right subtrees after splitting, and the positions of the NOT gates.
[0029] Secondly, embodiments of this disclosure provide a multiplexer splitting device, comprising:
[0030] The building module is used to perform an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, and use the result as a selection signal to build the first MUX that selects the default item and the non-default item.
[0031] The calculation module is used to calculate the delay of two schemes for the multiplexer to be split, the two schemes being the AndOr-Tree scheme and the 2:1 multiplexer tree Mux-Tree scheme;
[0032] The first splitting module is used to construct an AND-OR tree (AndOr-Tree) of the multiplexer to be split by using a binary search method and a preset formula if the delay of the AndOr-Tree scheme is less than that of the Mux-Tree scheme.
[0033] The second splitting module is used to construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split by constructing the non-default items of the multiplexer to be split according to the selection signal if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme.
[0034] According to a specific implementation of an embodiment of this disclosure, the computing module is specifically used for:
[0035] The delay of the AndOr-Tree scheme is calculated according to formula (1). andOr :
[0036]
[0037] Where p is the number of bits of the selection signal of the multiplexer to be split, N is the number of data input signals of the multiplexer to be split, andDelay is the AND delay of the basic unit AND gate, and orDelay is the OR delay of the basic unit OR gate.
[0038] The delay of the Mux-Tree scheme is calculated according to formula (2). Mux :
[0039]
[0040] Where N is the number of data input signals of the multiplexer to be split, and muxDelay is the delay of the basic unit 2:1 MUX.
[0041] According to a specific implementation of an embodiment of this disclosure, the first splitting module is specifically used for:
[0042] According to formula (3), the branches corresponding to the non-default items of the multiplexer to be split in the first MUX are split into basic units:
[0043]
[0044] Where f(D, S) is the function represented by the default formula for the non-default term, and the input set of the non-default term data is D = {d1, d2, ..., d...} n The set of selected signal bits is S = {s1, s2, ..., s}. p}
[0045] According to a specific implementation of an embodiment of this disclosure, the second splitting module is specifically used for:
[0046] The signal bits to be split are determined based on the distribution of the data input.
[0047] Based on the signal bit, the branch corresponding to the non-default item of the multiplexer to be split in the first MUX is split into left and right subtrees;
[0048] Continue splitting the left and right subtrees separately until the preset termination condition is met.
[0049] According to a specific implementation of this disclosure, when the second splitting module determines the signal bits to be split based on the distribution of the data input, it is specifically used for:
[0050] The signal bit to be split is determined based on the number of left and right subtrees after splitting, the number of "don't care" items after splitting, the reduced cost after splitting, the number of pairs of identical elements in the left and right subtrees after splitting, and the positions of the NOT gates.
[0051] Thirdly, embodiments of this disclosure also provide an electronic device, the electronic device comprising:
[0052] At least one processor; and,
[0053] The memory is communicatively connected to the at least one processor; wherein,
[0054] The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the multiplexer splitting method in the first aspect or any implementation thereof.
[0055] Fourthly, embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the multiplexer splitting method in the first aspect or any implementation thereof.
[0056] Fifthly, embodiments of this disclosure also provide a computer program product, which includes a computing program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions that, when executed by a computer, cause the computer to perform the multiplexer splitting method in the first aspect or any implementation thereof.
[0057] The multiplexer splitting scheme in this embodiment includes: performing an OR operation on all selection conditions of the multiplexer to be split, constructing a first MUX that selects default and non-default items; calculating the delays of two schemes for the multiplexer to be split, the two schemes being an AndOr-Tree scheme and a 2:1 multiplexer tree Mux-Tree scheme; if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then constructing an AndOr-Tree for the multiplexer to be split using a binary search method and a preset formula for the non-default items; if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then constructing a 2:1 multiplexer tree Mux-Tree for the multiplexer to be split using the selection signals for the non-default items. This scheme achieves comprehensive optimization of the multiplexer. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of a case statement in Verilog in the prior art;
[0060] Figure 2 A schematic flowchart of a multiplexer splitting method provided in this embodiment of the disclosure;
[0061] Figure 3 This is a schematic diagram of method selection in a multiplexer splitting method provided in an embodiment of the present disclosure;
[0062] Figure 4 This is a schematic diagram illustrating the splitting of the AndOr-Tree scheme in a multiplexer splitting method provided in an embodiment of this disclosure;
[0063] Figure 5 A schematic diagram illustrating the splitting of a step in the Mux-Tree scheme of a multiplexer splitting method provided in this embodiment of the disclosure;
[0064] Figure 6 This is a schematic diagram of the Mux-Tree scheme in a multiplexer splitting method provided in an embodiment of this disclosure;
[0065] Figure 7A schematic diagram of a multiplexer splitting device provided in an embodiment of this disclosure;
[0066] Figure 8 A schematic diagram of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0067] The embodiments of this disclosure will now be described in detail with reference to the accompanying drawings.
[0068] The following specific examples illustrate the implementation of this disclosure. Those skilled in the art can easily understand other advantages and effects of this disclosure from the content disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. This disclosure can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed based on different viewpoints and applications without departing from the spirit of this disclosure. It should be noted that, in the absence of conflict, the following embodiments and features in the embodiments can be combined with each other. Based on the embodiments in this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0069] It should be noted that various aspects of embodiments within the scope of the appended claims are described below. It will be apparent that the aspects described herein can be embodied in a wide variety of forms, and any particular structure and / or function described herein is merely illustrative. Based on this disclosure, those skilled in the art will understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, any number of aspects set forth herein can be used to implement the device and / or practice the method. Additionally, this device and / or method can be implemented using structures and / or functionalities other than one or more of the aspects set forth herein.
[0070] It should also be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of this disclosure. The drawings only show the components related to this disclosure and are not drawn according to the number, shape and size of the components in actual implementation. In actual implementation, the form, quantity and proportion of each component can be arbitrarily changed, and the layout of the components may also be more complex.
[0071] Furthermore, specific details are provided in the following description to facilitate a thorough understanding of the examples. However, those skilled in the art will understand that the described aspects can be practiced without these specific details.
[0072] Figure 1 This is a diagram illustrating the case statement in Verilog in the prior art, such as... Figure 1 As shown, the case statement in Verilog can parse a 5-to-1 MUX, which contains a default term din[4]. However, when performing process mapping, the N-to-1 MUX needs to be split into basic cells. In the prior art, when performing process mapping on a multiplexer, for the selector unit to be mapped with basic cells, the template is directly instantiated to complete the process mapping. For the selector unit to be mapped without basic cells, the structure of the selector unit to be mapped is directly split into several sub-units with signal cascading relationship based on the basic cells. The candidate signal and the selected signal of the selector unit to be mapped are assigned to the corresponding sub-units according to the predetermined logic. The templates corresponding to the basic cells of the sub-units are instantiated respectively to complete the process mapping of the selector unit to be mapped. However, existing technologies do not consider the delay of multiplexers when mapping them, which is a crucial factor affecting the synthesis quality of ASIC / FPGA logic. To further map the multiplexers using process technology, in this embodiment, all selection conditions are first ORed according to the selection conditions of the multiplexer to be split, and the result is used as a selection signal to construct a first MUX that selects the default and non-default items. Then, the delays of two schemes for the multiplexer to be split are calculated, namely, the AND-OR tree scheme and the 2:1 multiplexer tree Mux-Tree scheme. If the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, the non-default items of the multiplexer to be split are used to construct the AND-OR tree AndOr-Tree of the multiplexer to be split according to the binary search method and a preset formula. If the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, the non-default items of the multiplexer to be split are used to construct the 2:1 multiplexer tree Mux-Tree of the multiplexer to be split according to the selection signal. In this embodiment, the delay of the multiplexer is calculated, and the delay is used to measure the selection of different multiplexer splitting methods, including the AndOr-Tree splitting scheme and the Mux-Tree splitting scheme, thereby realizing an optimized scheme for multiplexer process mapping and improving process mapping performance.
[0073] The technical solutions of each embodiment of this disclosure are described in detail below with reference to specific examples.
[0074] Figure 2 This is a schematic flowchart of a multiplexer splitting method provided in an embodiment of the present disclosure, as shown below. Figure 2 As shown, the method includes:
[0075] Step S21: Perform an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, and use the result as the selection signal to construct the first MUX that selects the default item and the non-default item.
[0076] Specifically, firstly, based on the selection conditions of the multiplexer to be split, the set of selection signal bits of the multiplexer to be split is determined, and a 2:1 MUX corresponding to all selection conditions of the multiplexer to be split is constructed, denoted as the first MUX. The inputs of the first MUX are the default item and the non-default item of the multiplexer to be split, respectively. The default item is the data terminal input corresponding to the default in the case statement, and the non-default item is the other data terminal inputs.
[0077] Step S22: Calculate the delay of the two schemes of the multiplexer to be split, the two schemes include the AndOr-Tree scheme and the 2:1 multiplexer tree Mux-Tree scheme;
[0078] Specifically, the delay of the multiplexer to be split is calculated, including the delay of basic units such as 2:1 MUX, AND gate, and OR gate.
[0079] Specifically, the delay of the AndOr-Tree scheme can be calculated according to formula (1). andOr :
[0080]
[0081] Where p is the number of bits in the selection signal of the multiplexer to be split, N is the number of data input signals of the multiplexer to be split, and Del ay `orDelay` is the AND delay for a basic unit AND gate, and `orDelay` is the OR delay for a basic unit OR gate.
[0082] The delay of the Mux-Tree scheme is calculated according to formula (2). Mux :
[0083]
[0084] Where N is the number of data input signals of the multiplexer to be split, and muxDelay is the delay of the basic unit 2:1 MUX.
[0085] The splitting method in this disclosure can be referenced. Figure 3 As shown, the delay is calculated according to formulas (1) and (2). andOr and delay MuxThen compare the two delays and choose the one with the smaller delay. andOr <delay Mux If the default value is not specified, the AndOr-Tree splitting scheme is selected; otherwise, the Mux-Tree splitting scheme is selected. That is, the splitting scheme with the least latency is used to split the non-default items in the first MUX.
[0086] Assume the data of each cell in the lib directory of Verilog is as shown in Table 1:
[0087] Table 1. Data table of cells in the lib library
[0088] cell area delay mux2 2.5 2 and2 1 0.5 or2 1 0.5 not 0.1 0.1
[0089] As shown in Table 1 above, in the lib library, the delay of a 2:1 MUX (mux2) is 2 delay units, and the delay of an AND gate (and2) and an OR gate (or2) is 0.5 delay units. Therefore, for... Figure 1 For the non-default option N-choose-1 MUX corresponding to the case statement shown, N=4, p=5. Then targeting Figure 1 As shown, delay andOr <delay Mux Therefore, AndOr-Tree is used directly to split the MUX of non-default items. The splitting process will be described in detail below.
[0090] Assume the data of each cell in the lib directory of Verilog is as shown in Table 2:
[0091] Table 2. Data table of cells in the lib library.
[0092] cell area delay mux2 1.4 1.2 and2 1 0.9 or2 1 0.9 not 0.4 0.1
[0093] As shown in Table 2 above, in the lib library, the delay of a 2:1 MUX (mux2) is 1.2 delay units, and the delay of an AND gate (and2) and an OR gate (or2) is 0.9 delay units. Therefore, for... Figure 1 For the non-default option N-choose-1 MUX corresponding to the case statement shown, N=4, p=5. Then targeting Figure 1 As shown, delay andOr >delay MuxTherefore, the Mux-Tree scheme is used to split the non-default MUX, that is, to further split the non-default MUX into more MUX. The splitting process will be described in detail below.
[0094] Step S23: If the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then construct the AndOr-Tree of the multiplexer to be split using the non-default terms of the multiplexer to be split according to the binary search method and the preset formula.
[0095] Specifically, if the delay of the AndOr-Tree scheme is less than that of the Mux-Tree scheme, then the AndOr-Tree scheme is used. That is, the non-default items of the multiplexer to be split are used to construct an AND-OR tree (AndOr-Tree) of the multiplexer to be split according to the binary search method and a preset formula. Specifically:
[0096] First, AND the selection condition of the multiplexer to be split with the corresponding data input, then OR all the results to determine the non-default item of the first MUX.
[0097] Specifically, according to formula (3), the branch corresponding to the non-default item of the multiplexer to be split in the first MUX is split into basic units:
[0098]
[0099] Where f(D,S) is the function represented by the default formula for the non-default term, and the input set of the non-default term data is D={d1,d2,…,d n The set of selected signal bits is S = {s1, s2, ..., s}. p}
[0100] Figure 4 This is a schematic diagram illustrating the splitting of the AndOr-Tree scheme in a multiplexer splitting method provided in an embodiment of this disclosure, as shown below. Figure 4 As shown, assume that the input set of a non-default item in a MUX is D = {d1, d2, ..., dn}. n The set of selected signal bits is S = {s1, s2, ..., s}. p If we assume that the function of the non-default item of the MUX is written as f(D,S), the function of the non-default item of the MUX can be represented by the following AND-OR-NOT gate.
[0101]
[0102] The default items are first extracted using the first MUX. Then, the selection conditions are ANDed together to increase reusability. Next, the corresponding data input is ANDed together. Finally, all results are ORed together to obtain the netlist of non-default items. Default and non-default items are distinguished using a single condition—the first MUX that ORs all selection conditions. Ultimately, this forms the split netlist of the MUX.
[0103] Step S24: If the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split by using the non-default items of the multiplexer to be split according to the selection signal.
[0104] Specifically, if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then the Mux-Tree scheme is used. That is, the non-default items of the multiplexer to be split are used to construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split according to the selection signal. This includes the following steps:
[0105] Step A: Determine the signal bits to be split based on the distribution of the data input.
[0106] Specifically, the signal bits to be split are determined based on the number of left and right subtrees after splitting, the number of "don't care" items after splitting, the reduced cost after splitting, the number of pairs of identical elements in the left and right subtrees after splitting, and the positions of the NOT gates. The "don't care" items refer to items that are ignored, also known as irrelevant items, meaning that the data input will be output regardless of whether the selection signal bit is 1 or 0.
[0107] Furthermore, after splitting, the following conditions should be met as much as possible:
[0108] (1) The smaller the difference in the number of left and right subtrees, the better; (2) The fewer the number of "don't care" items, the better; (3) The larger the reduceCost, the better; (4) The more even the number of identical elements in the left and right subtrees, the better; (5) Place the "not" gates on the same branch as much as possible.
[0109] Furthermore, reduceCost is used to predict how much area can be reduced by partitioning. Specifically, the following rules apply: two identical data inputs to a MUX can eliminate a MUX; one data input to a MUX that is 1 and the other that is 0 can also eliminate a MUX; one data input to a MUX that is 0 can be simplified to an AND operation.
[0110] For example, Figure 5 for Figure 1In the example using a Mux-Tree, s[2] is selected as the splitting selection signal bit for the resulting MUX. For all non-default items, based on the conditions, s[2] is selected as the splitting signal bit, resulting in the most even number of items in the left and right subtrees. Therefore, s[2] is selected as the splitting signal bit. Since there are "don't care" items on this signal bit, the OR of the conditions for all "don't care" items is used as the splitting condition for the MUX.
[0111] Step B: Based on the signal bits, split the branch corresponding to the non-default item of the multiplexer to be split in the first MUX into left and right subtrees;
[0112] Specifically, the result of the OR operation of all conditions of the signal bit or the "don't care" item corresponding to the signal bit is used as the selection condition for the branch corresponding to the non-default item.
[0113] Step C: Continue to split the left and right subtrees separately until the preset termination condition is met.
[0114] Specifically, the preset termination condition can be that the MUX no longer meets the splitting conditions or has reached the preset number of splitting times, etc.
[0115] Figure 6 This diagram illustrates the splitting of a Mux-Tree scheme in a multiplexer splitting method provided in this embodiment. Similar to the AndOr-Tree scheme, this disclosure first extracts the default term. Then, based on delay and reduceCost, it selects the signal bit to be split, and then splits it into two parts: 0 or 1, or two parts: a "don't care" term and a "not don't care" term. When splitting into "don't care" and "not don't care" terms, the selection signal is the OR of all conditions for the "don't care" term.
[0116] In the Mux-Tree scheme, the selection conditions are first ANDed together. Then, the default and non-default items are distinguished by a single condition that is the MUX of all selection conditions. After that, the signal bit to be split is selected based on delay and reduceCost. Then, the left and right subtrees are split in the same way until the left and right subtrees have only one item left. This forms the netlist split according to the Mux-Tree scheme, where the pentagram icon represents the selection logic.
[0117] The multiplexer decomposition method provided in this disclosure targets multiplexers with multi-bit data input / output and multi-bit selection signals described by commonly used case statements in Verilog. It determines the delay of each basic unit based on cell information from the lib library, and uses a delay estimation method to evaluate the selection of different MUX decomposition methods. The output is a functionally equivalent netlist composed of basic units such as 2:1 MUX, AND, and NOT, achieving comprehensive optimization of the multiplexer. Furthermore, this disclosure proposes a top-down 2:1 MUX decomposition method considering delay and reduceCost, proposing reduceCost to measure how much area is reduced by partitioning, further optimizing the number of logic levels and area, and improving the optimization efficiency of the multiplexer.
[0118] Based on the same inventive concept, this disclosure also provides a multiplexer splitting device, such as... Figure 7 As shown, it includes: a construction module 71, a calculation module 72, a first splitting module 73, and a second splitting module 74, wherein:
[0119] The construction module 71 is used to perform an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, and use the result as a selection signal to construct a first MUX that selects the default and non-default items; the calculation module 72 is used to calculate the delay of the two schemes of the multiplexer to be split, the two schemes being the AndOr-Tree scheme and the 2:1 multiplexer tree Mux-Tree scheme; the first splitting module 73 is used to construct the AndOr-Tree of the multiplexer to be split according to the binary search method and a preset formula if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme; the second splitting module 74 is used to construct the 2:1 multiplexer tree Mux-Tree of the multiplexer to be split according to the selection signal if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme.
[0120] As described above in the multiplexer splitting device, optionally, the calculation module 72 is specifically used for:
[0121] The delay of the AndOr-Tree scheme is calculated according to formula (1). andOr :
[0122]
[0123] Where p is the number of bits of the selection signal of the multiplexer to be split, N is the number of data input signals of the multiplexer to be split, andDelay is the AND delay of the basic unit AND gate, and orDelay is the OR delay of the basic unit OR gate.
[0124] The delay of the Mux-Tree scheme is calculated according to formula (2). Mux :
[0125]
[0126] Where N is the number of data input signals of the multiplexer to be split, and muxDelay is the delay of the basic unit 2:1 MUX.
[0127] As described above in the multiplexer splitting device, optionally, the first splitting module 73 is specifically used for:
[0128] According to formula (3), the branches corresponding to the non-default items of the multiplexer to be split in the first MUX are split into basic units:
[0129]
[0130] Where f(D,S) is the function represented by the predefined formula for the non-default term, and the input set of the non-default term data is D={d1,d2,…,d n The set of selected signal bits is S = {s1, s2, ..., s}. p}
[0131] As described above in the multiplexer splitting device, optionally, the second splitting module 74 is specifically used for:
[0132] The signal bits to be split are determined based on the distribution of the data input.
[0133] Based on the signal bit, the branch corresponding to the non-default item of the multiplexer to be split in the first MUX is split into left and right subtrees;
[0134] Continue splitting the left and right subtrees separately until the preset termination condition is met.
[0135] As described above in the multiplexer splitting device, optionally, when the second splitting module 74 determines the signal bits to be split based on the distribution of the data input, it is specifically used for:
[0136] The signal bit to be split is determined based on the number of left and right subtrees after splitting, the number of "don't care" items after splitting, the reduced cost after splitting, the number of pairs of identical elements in the left and right subtrees after splitting, and the positions of the NOT gates.
[0137] The multiplexer splitting apparatus provided in this disclosure is used to implement the above-described multiplexer splitting method, as detailed in the above method embodiments, which will not be repeated here.
[0138] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this disclosure, such as... Figure 8 As shown, the device includes: a processor 81, a memory 82, and a bus 83;
[0139] The processor 81 and the memory 82 communicate with each other through the bus 83.
[0140] The processor 81 is used to call program instructions in the memory 82 to execute the methods provided in the above-described method embodiments, including, for example, performing an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, and using this as a selection signal to construct a first MUX that selects the default and non-default items; calculating the delay of two schemes of the multiplexer to be split, the two schemes including the AND-OR tree scheme and the 2:1 multiplexer tree Mux-Tree scheme; if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then constructing the AND-OR tree AndOr-Tree of the multiplexer to be split according to the binary search method and a preset formula for the non-default items of the multiplexer to be split; if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then constructing the 2:1 multiplexer tree Mux-Tree of the multiplexer to be split according to the selection signal for the non-default items of the multiplexer to be split.
[0141] This disclosure provides a computer program product, comprising a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer, enable the computer to perform the methods provided in the above-described method embodiments. For example, the methods include: performing an OR operation on all selection conditions of the multiplexer to be split, using this as a selection signal to construct a first MUX that selects the default and non-default items; calculating the delays of two schemes for the multiplexer to be split, including an AND-OR tree (AndOr-Tree) scheme and a 2:1 multiplexer tree (Mux-Tree) scheme; if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then constructing an AND-OR tree (AndOr-Tree) for the multiplexer to be split using a binary search method and a preset formula for the non-default items; if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then constructing a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split using the selection signal for the non-default items.
[0142] This disclosure provides a non-transitory computer-readable storage medium storing computer instructions that cause the computer to execute the methods provided in the above-described method embodiments. These instructions include, for example,: performing an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, using this as a selection signal to construct a first MUX that selects default and non-default items; calculating the delays of two schemes for the multiplexer to be split, the two schemes being an AND-OR tree (AndOr-Tree) scheme and a 2:1 multiplexer tree (Mux-Tree) scheme; if the delay of the AndOr-Tree scheme is less than the delay of the Mux-Tree scheme, then constructing an AND-OR tree (AndOr-Tree) for the multiplexer to be split using a binary search method and a preset formula for the non-default items; if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then constructing a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split using the selection signal for the non-default items.
[0143] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0144] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.
Claims
1. A method for splitting a multiplexer, characterized in that, include: Based on the selection conditions of the multiplexer to be split, perform an OR operation on all selection conditions and use the selection signal to construct the first MUX that selects the default item and the non-default item. Calculate the delay of the two schemes for the multiplexer to be split, the two schemes being the AndOr-Tree scheme and the 2:1 multiplexer tree Mux-Tree scheme; wherein, the delay of the AndOr-Tree scheme is calculated according to formula (1). : Official (1) Where p is the number of bits in the selection signal of the multiplexer to be split, and N is the number of data input signals of the multiplexer to be split. For basic unit AND gate AND delay, Delay for basic unit or gate; The delay of the Mux-Tree scheme is calculated according to formula (2). : Official (2) Where N is the number of data input signals of the multiplexer to be split. Delay for the basic unit 2:1 MUX; If the delay of the AndOr-Tree scheme is less than that of the Mux-Tree scheme, then the non-default items of the multiplexer to be split are used to construct the AND-OR tree AndOr-Tree of the multiplexer to be split according to the binary search method and the preset formula. If the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme, then the non-default items of the multiplexer to be split are used to construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split according to the selection signal.
2. The multiplexer splitting method according to claim 1, characterized in that, The step of constructing an AndOr-Tree for the non-default items of the multiplexer to be split according to a binary search method and a preset formula includes: According to formula (3), the branches corresponding to the non-default items of the multiplexer to be split in the first MUX are split into basic units: Official (3) in, The function is represented by a preset formula for non-default items, and the input set for the data side of non-default items is... Select the set of signal bits as .
3. The method for splitting a multiplexer according to claim 1, characterized in that, The step of constructing a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split according to the selection signal for the non-default items of the multiplexer to be split includes: The signal bits to be split are determined based on the distribution of the data input. Based on the signal bit, the branch corresponding to the non-default item of the multiplexer to be split in the first MUX is split into left and right subtrees; Continue splitting the left and right subtrees separately until the preset termination condition is met.
4. The multiplexer splitting method according to claim 3, characterized in that, The step of determining the signal bits to be split based on the distribution input from the data terminal includes: The signal bit to be split is determined based on the number of left and right subtrees after splitting, the number of "don't care" items after splitting, the reduced cost after splitting, the number of pairs of identical elements in the left and right subtrees after splitting, and the positions of the NOT gates.
5. A multiplexer splitting device, characterized in that, include: The building module is used to perform an OR operation on all selection conditions according to the selection conditions of the multiplexer to be split, and use the result as a selection signal to build the first MUX that selects the default item and the non-default item. The calculation module is used to calculate the delay of two schemes for the multiplexer to be split, namely, the AndOr-Tree scheme and the 2:1 Mux-Tree scheme; wherein, the delay of the AndOr-Tree scheme is... Calculated according to formula (1): Official (1) Where p is the number of bits in the selection signal of the multiplexer to be split, and N is the number of data input signals of the multiplexer to be split. For basic unit AND gate AND delay, Delay for basic unit or gate; Delay of the Mux-Tree scheme The result is obtained according to formula (2): Official (2) Where N is the number of data input signals of the multiplexer to be split. Delay for the basic unit 2:1 MUX; The first splitting module is used to construct an AND-OR tree (AndOr-Tree) of the multiplexer to be split by using a binary search method and a preset formula if the delay of the AndOr-Tree scheme is less than that of the Mux-Tree scheme. The second splitting module is used to construct a 2:1 multiplexer tree (Mux-Tree) for the multiplexer to be split by constructing the non-default items of the multiplexer to be split according to the selection signal if the delay of the Mux-Tree scheme is less than or equal to the delay of the AndOr-Tree scheme.
6. The multiplexer splitting device according to claim 5, characterized in that, The first splitting module is specifically used for: According to formula (3), the branches corresponding to the non-default items of the multiplexer to be split in the first MUX are split into basic units: Official (3) in, The function is represented by a preset formula for non-default items, and the input set for the data side of non-default items is... Select the set of signal bits as .
7. An electronic device, characterized in that, include: The memory and the processor communicate with each other via a bus; The memory stores program instructions that can be executed by the processor, and the processor can invoke the program instructions to perform the method as described in any one of claims 1 to 4.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Select set-based technology mapping method and apparatus
US5526276A
Method for delay-optimizing technology mapping of digital logic
US6470486B1
