Intelligently optimized transistor layout method for standard unit circuits
Through the intelligently optimized standard cell circuit transistor layout method, variable neighborhood search and wire network centralization rules are used to solve the problem of time-consuming and labor-consuming traditional layout, improve circuit performance and stability, and reduce design time and cost.
Patent Information
- Application Number
- CN202410243815.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2044-03-04
AI Technical Summary
In traditional methods, transistor layout is time-consuming and labor-intensive, especially for complex circuits. Manual calculation and drawing require a lot of time and effort, which affects the company's development progress and project delivery time.
Adopt intelligently optimized standard cell circuit transistor layout method, through changing neighborhood search and network centralized rules, first deploy one type of transistor, then another type of transistor, define different search strategies, optimize the layout process, and reduce the design time of integrated circuits and cost.
It improves the efficiency and circuit performance of transistor layout, reduces the time and cost of integrated circuits, and improves the stability of the circuit.
Smart Images

Figure CN118133761B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of circuit optimization, and in particular to a transistor layout method for an intelligently optimized standard unit circuit. Background Art
[0002] In the development of standard cell libraries for digital circuits, the optimization of transistor layout is a crucial step. In traditional methods, the layout first needs to be manually calculated and drawn according to the design specifications and constraints. This process requires a high degree of expertise and experience, so it often requires experienced employees to complete it.
[0003] However, since layout involves many factors, such as circuit performance, power consumption, wiring capacitance, etc., it is easy to violate constraints during the layout process, which requires constant modification and adjustment. In addition, the layout time in traditional methods is also very long, especially for more complex circuits. Manual calculation and drawing require a lot of time and effort, which is very detrimental to the company's development progress and project delivery time. Summary of the invention
[0004] The present invention provides an intelligently optimized transistor layout method for a standard unit circuit, aiming to solve the problem that the transistor layout in the prior art is time-consuming and labor-intensive.
[0005] In order to solve the above technical problems, the present invention provides a transistor layout method for a standard unit circuit with intelligent optimization, and the transistor layout method comprises the following steps:
[0006] S11, obtaining transistor data to be laid out;
[0007] S12, preprocessing the transistor data to obtain transistor coding data, wherein the transistor coding data is divided into PMOS transistor coding data and NMOS transistor coding data according to transistor types;
[0008] S13, generating an initial transistor sequence according to the transistor coding data;
[0009] S14, generating an initial transistor layout according to the initial transistor sequence and a preset layout rule, and defining a global optimal solution as the initial transistor layout;
[0010] S15, calling a preset layout search algorithm to perform layout calculation according to the initial transistor layout and the global optimal solution to obtain a new global optimal solution;
[0011] S16. Output the global optimal solution as a layout result of the transistor data.
[0012] Furthermore, the preset layout search algorithm includes the following steps:
[0013] S151, determining whether the preset first variable k reaches the preset first time limit K, if so, terminating the preset layout search algorithm and outputting the global optimal solution; if not, setting the preset first variable k=1 and executing step S152;
[0014] S152, determining whether the preset first variable k is less than or equal to the preset first time limit K, if so, executing step S153; if not, returning to step S151;
[0015] S153, using the kth preset vibration operator to perturb the initial transistor sequence to obtain a perturbed transistor sequence;
[0016] S154, calculating the local optimal solution corresponding to the perturbed transistor sequence based on a variable neighborhood descent search algorithm;
[0017] S155. Determine whether the local optimal solution is better than the global optimal solution. If so, use the local optimal solution as the new global optimal solution, set the preset first variable k=1, and return to step S152; if not, set the preset first variable k=k+1, and return to step S152.
[0018] Furthermore, the variable neighborhood descent search algorithm comprises the following steps:
[0019] S1541, using the current global optimal solution as the initial local optimal solution, and defining a preset second variable l=1;
[0020] S1542, determining whether the preset second variable l is less than or equal to the preset first time limit L, if so, executing step S1543; if not, outputting the local optimal solution;
[0021] S1543, using the first preset neighborhood operator to perform range perturbation on the initial transistor sequence to obtain a second perturbation transistor sequence;
[0022] S1544, calculating a transistor layout solution according to the second perturbation transistor sequence and the preset layout rule;
[0023] S1545. Determine whether the transistor layout solution is better than the local optimal solution. If so, use the transistor layout solution as the new local optimal solution, and set the preset first variable l=1, and return to step S1542; if not, set the preset first variable l=l+1, and return to step S1542.
[0024] Furthermore, the preset layout rule is specifically:
[0025] S21, according to the transistor type of the transistor encoding data, select one type based on multi-threading technology to start layout;
[0026] S22, taking the horizontal direction of the circuit to be laid out of the standard unit as the abscissa axis, and the left end point of the circuit to be laid out for laying out the transistor as the origin, selecting a transistor whose source and drain wire models appear the least times among all the transistors corresponding to the transistor encoding data of the current type and laying it out at the position where the abscissa is 0, and setting the side of the transistor whose source and drain wire models appear the least times on the left side;
[0027] S23, starting from the position where the horizontal axis is 1, a transistor set to be laid out is established from transistors corresponding to all transistor encoding data of the current type, and a transistor with the largest number of occurrences of source and drain wire models is selected from the transistor set to be laid out according to a first preset wire network selection rule and laid out at the current position until the first type of transistor layout on the circuit to be laid out is completed;
[0028] S24, starting layout according to the transistor encoding data of another type different from the transistor type in step S21;
[0029] S25. According to the first type transistor layout in step S23, a transistor is selected and laid out at the current position according to the second preset network selection rule, until the second type transistor layout on the circuit to be laid out is completed.
[0030] Furthermore, the preset vibration operator includes:
[0031] k = 1, half-reversal operator, used to randomly select two elements a and b from the sequence and swap the sequence before a with the sequence after b;
[0032] k=2, full reversal operator, used to flip the sequence horizontally;
[0033] k=3, random shuffle operator, used to randomly reorder each element in the sequence.
[0034] Furthermore, the preset neighborhood operator includes:
[0035] l=1, the exchange operator is used to randomly select two elements a and b from the sequence and exchange the positions of a and b;
[0036] l = 2, the insertion operator is used to randomly select two elements a and b from the sequence and set the position of a to the previous position of b;
[0037] l=3, a flip operator, which is used to randomly select two elements a and b from a sequence and horizontally flip the sequence between elements a and b.
[0038] Furthermore, in step S23, the step of establishing a transistor set to be laid out from transistors corresponding to all transistor encoding data of the current type is specifically as follows:
[0039] Match the unplaced transistors among the transistors corresponding to all the transistor encoding data of the current type with the last placed transistor one by one, and determine whether the two transistors can share an active area, and determine whether a groove appears:
[0040] If the active area can be shared and no grooves appear, the matched unplaced transistors are placed into the transistor set to be placed, and the transistors in the transistor set to be placed are placed one placement unit away from the last transistor that has been placed;
[0041] If all matching transistors cannot simultaneously meet the conditions of sharing active areas and not having grooves, all unplaced transistors are treated as a set of transistors to be placed, and the transistors in the set of transistors to be placed are placed 2 placement units away from the last placed transistor.
[0042] Furthermore, the first preset wire network selection rule is specifically:
[0043] The number of occurrences of each wire model of the source, gate and drain in the laid-out transistors is counted, and then the number of occurrences of the wire model of the source, gate and drain of each transistor to be laid out in the set of transistors to be laid out is counted, and the counted occurrences of the laid-out and unlaid ones are matched and summed to obtain the number of occurrences of the wire model of each source, gate and drain, and the unlaid transistor containing the wire signal with the largest number of occurrences is selected as the selection result.
[0044] Furthermore, the second preset wire network selection rule is specifically:
[0045] Based on the horizontal coordinate positions of the already laid out transistors in the first type of transistor layout, determining the same layout positions for transistor layout; or based on the horizontal coordinates of all available layout units as layout positions for transistor layout;
[0046] According to the layout length of the first type of transistor layout, at the layout position within the layout length, the number of occurrences of the wire models of the transistor source, gate and drain at the four positions before and after are counted, and then the number of occurrences of the wire models of the transistor source, gate and drain to be laid out are counted, the number of occurrences of the laid out and unlaid ones are summed, and the unlaid transistor with the largest sum is selected as the selection result;
[0047] According to the layout length of the first type of transistor layout, at the layout position outside the layout length, the number of occurrences of the wire model of the source, gate and drain of all the laid out transistors is counted, and then the number of occurrences of the wire model of the source, gate and drain of the transistor to be laid out is counted, the number of occurrences of the laid out and unlaid statistics are summed, and the unlaid transistor with the largest sum is selected as the selection result.
[0048] Furthermore, step S25 is specifically as follows:
[0049] For the transistor layout with the horizontal coordinate of 0, by judging whether the wire at the gate of the transistor with the horizontal coordinate of 0 in the first type of transistor can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule;
[0050] For a transistor layout whose abscissa is greater than 0 and whose layout length is less than the layout length of the first type transistor, by judging whether the transistor at the corresponding coordinate position in the first type transistor shares an active area, whether a groove exists, and whether the wire at the gate can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule;
[0051] For a transistor layout whose layout length is greater than the layout length of the first type of transistor, by judging whether the transistors share an active area and whether grooves appear, transistors that can be connected are placed in a candidate transistor set, and the second preset wire network selection rule is used to select candidate transistors for layout.
[0052] The beneficial effect achieved by the present invention is to propose a transistor layout algorithm in a standard unit circuit based on intelligent optimization of variable neighborhood search and wire net concentration rules. The method first layouts one type of transistors, and then layouts another type of transistors after the layout of this type of transistors is completed, so as to obtain a complete standard unit circuit transistor layout solution, wherein the variable neighborhood search can define different search strategies according to the characteristics of the transistor layout; the advantage of the wire net concentration rule is that it can make the standard circuit after the layout has been completed have good routability, thereby reducing the integrated circuit design time and cost, and improving the performance and stability of the final circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] Figure 1 It is a schematic flow chart of the steps of a transistor layout method for an intelligently optimized standard unit circuit provided by an embodiment of the present invention;
[0054] Figure 2 is an internal schematic diagram of a standard unit provided by an embodiment of the present invention;
[0055] Figure 3 is a schematic diagram of a preset vibration operator provided by an embodiment of the present invention;
[0056] Figure 4 is a schematic diagram of a preset neighborhood operator provided by an embodiment of the present invention;
[0057] Figure 5 is a schematic diagram of a first transistor layout provided by an embodiment of the present invention;
[0058] Figure 6 is a schematic diagram of a subsequent transistor layout provided by an embodiment of the present invention after first being laid out;
[0059] Figure 7 is a schematic diagram of symmetrical positions of transistors in a secondary layout provided by an embodiment of the present invention;
[0060] Figure 8 is a schematic diagram of the coordinate positions of transistors in the secondary layout provided by an embodiment of the present invention;
[0061] Fig. 9 is a schematic diagram of a transistor layout according to a second layout provided by an embodiment of the present invention;
[0062] Fig.10 is a schematic diagram of a first evaluation layout provided by an embodiment of the present invention;
[0063] Fig.11 It is a schematic diagram of a second evaluation layout provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0065] Please refer to Figure 1 , Figure 1 1 is a schematic flow chart of the steps of a transistor layout method for an intelligently optimized standard unit circuit provided by an embodiment of the present invention, wherein the transistor layout method comprises the following steps:
[0066] S11, obtaining transistor data to be laid out.
[0067] S12. Preprocess the transistor data to obtain transistor coding data, wherein the transistor coding data is divided into PMOS transistor coding data and NMOS transistor coding data according to transistor types.
[0068] The present invention first introduces the circuit concepts involved:
[0069] Standard unit circuit: It is composed of common basic logic gates and devices such as transistors, resistors and capacitors. Common standard unit circuits include inverters, NOT gates, AND gates, OR gates, etc.
[0070] Nets: A transistor has three electrodes, the left side is called the source, the middle is called the gate, and the right side is called the drain. These three electrodes can be connected to other transistors through pins or wires, and these wires form a net. If the type of wires required to be connected at the source or drain of two transistors of the same type are the same, then the two transistors can be connected; if the type of wires required to be connected at the gate of two transistors of different types are the same, then the two transistors can also be connected.
[0071] Active area: refers to the area in the transistor that actively participates in signal amplification or control. When two transistors of the same type are connected, they share the active area.
[0072] Please refer to Figure 2 , the internal structure of the standard cell discussed in the embodiments of the present invention is as follows Figure 2 shown.
[0073] Transistors are divided into two categories and placed in two rows, with PMOS transistors in the upper row and NMOS transistors in the lower row, with the active areas of all transistors aligned to the power rail;
[0074] The transistor consists of two parts, the gate and the active region. The electrode on the left side of the active region is the source, and the electrode on the right side is the drain.
[0075] In a transistor, the source, gate, and drain electrodes can all be connected to wires, and the wires that can be connected to the three electrodes of each transistor have different models. For example, the wires that need to be connected to the source, gate, and drain of a transistor are "A1", "BD23", and "BD23" respectively, while the wires that need to be connected to the source, gate, and drain of another transistor are "GR2", "BD23", and "BD23" respectively. The three electrodes of the same transistor can have the same wire model, and different transistors can also have the same wire model, depending on the data;
[0076] When there are two transistors of the same type, and the type of wire required to be connected to the drain of one transistor is the same as the type of wire required to be connected to the source of the other transistor, then the two transistors can be connected and share the active area. At this time, the distance between the two transistors differs by 1 unit. Otherwise, the two transistors do not share the active area, that is, the distance differs by 2 units.
[0077] The transistor can be flipped during layout. After flipping, the left side of the transistor is no longer the source but the drain, and the right side of the transistor is no longer the drain but the source. If the transistor has shared the active area with other transistors, the transistor cannot be flipped.
[0078] When there are two transistors of different types, and the type of wires required to be connected to the gates of the two transistors is the same as the type of wires required to be connected to the gate of another transistor, the two transistors can be connected and share the gate. At this time, the two transistors are at the same horizontal position. Otherwise, the two transistors do not share the gate and cannot be at the same horizontal position.
[0079] The horizontal direction of the transistor is the length, and the vertical direction is the width. Generally speaking, the length of each transistor is basically the same, and the width is slightly different. The length and width can be ignored in solving this layout problem;
[0080] The distance between any two transistors is an integer number of unit lengths.
[0081] To discuss the layout optimization problem in a mathematical way, the embodiment of the present invention establishes the following mathematical problem based on the transistor layout in the standard cell:
[0082] Problem Decision:
[0083] 1. Transistor horizontal axis;
[0084] 2. Whether the transistor is flipped.
[0085] Question Objective:
[0086] 1. After the transistor layout, the standard cell width is the smallest, that is, the largest transistor has the smallest horizontal coordinate;
[0087] Second, the layout has good routability, that is, the wires of various types in the wire net of the standard unit are relatively concentrated, neat and as short as possible;
[0088] 3. Different types of transistors can share the same gate, making the transistor layout in the entire standard unit circuit symmetrical;
[0089] Problem constraints:
[0090] 1. When the horizontal coordinates of two transistors of the same type differ by 1 unit, the wires connected to the source or drain of the two transistors must be of the same type;
[0091] 2. The horizontal coordinates of two transistors of the same type cannot be the same, that is, the layout positions cannot overlap;
[0092] 3. When two transistors of different types are at the same horizontal position, the wires connected to the gates of the two transistors must be of the same type;
[0093] 4. When multiple transistors share an active area, active area grooves are prohibited. For example, when three transistors are arranged together and the width of the middle transistor is smaller than the width of the transistors on both sides, active area grooves will appear.
[0094] S13. Generate an initial transistor sequence according to the transistor coding data.
[0095] S14. Generate an initial transistor layout according to the initial transistor sequence in accordance with preset layout rules, and define a global optimal solution as the initial transistor layout.
[0096] S15. According to the initial transistor layout and the global optimal solution, a preset layout search algorithm is called to perform layout calculation to obtain a new global optimal solution.
[0097] The preset layout search algorithm comprises the following steps:
[0098] S151, determining whether the preset first variable k reaches the preset first time limit K, if so, terminating the preset layout search algorithm and outputting the global optimal solution; if not, setting the preset first variable k=1 and executing step S152;
[0099] S152, determining whether the preset first variable k is less than or equal to the preset first time limit K, if so, executing step S153; if not, returning to step S151;
[0100] S153, using the kth preset vibration operator to perturb the initial transistor sequence to obtain a perturbed transistor sequence;
[0101] S154, calculating the local optimal solution corresponding to the perturbed transistor sequence based on a variable neighborhood descent search algorithm;
[0102] S155. Determine whether the local optimal solution is better than the global optimal solution. If so, use the local optimal solution as the new global optimal solution, set the preset first variable k=1, and return to step S152; if not, set the preset first variable k=k+1, and return to step S152.
[0103] The variable neighborhood descent search algorithm comprises the following steps:
[0104] S1541, using the current global optimal solution as the initial local optimal solution, and defining a preset second variable l=1;
[0105] S1542, determining whether the preset second variable l is less than or equal to the preset first time limit L, if so, executing step S1543; if not, outputting the local optimal solution;
[0106] S1543, using the first preset neighborhood operator to perform range perturbation on the initial transistor sequence to obtain a second perturbation transistor sequence;
[0107] S1544, calculating a transistor layout solution according to the second perturbation transistor sequence and the preset layout rule;
[0108] S1545. Determine whether the transistor layout solution is better than the local optimal solution. If so, use the transistor layout solution as the new local optimal solution, and set the preset first variable l=1, and return to step S1542; if not, set the preset first variable l=l+1, and return to step S1542.
[0109] like Figure 3 As shown, the preset vibration operator includes:
[0110] k = 1, half-reversal operator, used to randomly select two elements a and b from the sequence and swap the sequence before a with the sequence after b;
[0111] k=2, full reversal operator, used to flip the sequence horizontally;
[0112] k=3, random shuffle operator, used to randomly reorder each element in the sequence.
[0113] like Figure 4 As shown, the preset neighborhood operator includes:
[0114] l=1, the exchange operator is used to randomly select two elements a and b from the sequence and exchange the positions of a and b;
[0115] l = 2, the insertion operator is used to randomly select two elements a and b from the sequence and set the position of a to the previous position of b;
[0116] l=3, a flip operator, which is used to randomly select two elements a and b from a sequence and horizontally flip the sequence between elements a and b.
[0117] In the embodiment of the present invention, the first variable k and the second variable l can be understood as setting a certain search time, and the entire search process is exited when the time limit is reached.
[0118] The algorithm uses three vibration operators, namely, full reversal operator, half reversal operator and random disturbance operator, to vibrate the current transistor sequence to greatly disturb the transistor sequence. For each new transistor sequence obtained by each vibration operator, it will enter the variable neighborhood descent search process to search for the local optimal solution of this transistor sequence. When the local optimal solution is greater than the global optimal solution, the value of the local optimal solution is assigned to the global optimal solution to update the global optimal solution; when the local optimal solution is less than or equal to the global optimal solution, it will continue to use the current vibration operator to perturb the transistor sequence again and then perform the variable neighborhood descent search again until the global optimal solution is updated. The next vibration operator will be used only after the global optimal solution is updated. This cycle is repeated, and the algorithm exits when the time limit is reached.
[0119] In the variable neighborhood descent search process, the three neighborhood search operators, namely the exchange operator, the insertion operator and the flip operator, are used to slightly perturb the current transistor sequence. Each new transistor sequence perturbed by the neighborhood search operator will be decoded, that is, a certain type of transistor is laid out first, and then another type of transistor is laid out to obtain a complete transistor layout solution. If the layout solution is better than the local optimal solution, the solution is assigned to the local optimal solution to update the local optimal solution; if the layout solution is less than or equal to the local optimal solution, the currently used neighborhood search operator is continued to be used to perturb the transistor sequence again until the local optimal solution is updated, and then the next neighborhood search operator will be used. This cycle is repeated, and after all three neighborhood operators are used once, the variable neighborhood search is jumped out and the local optimal solution is returned.
[0120] The preset layout rules are specifically:
[0121] S21, according to the transistor type of the transistor encoding data, select one type based on multi-threading technology to start layout;
[0122] S22, taking the horizontal direction of the circuit to be laid out of the standard unit as the abscissa axis, and the left end point of the circuit to be laid out for laying out the transistor as the origin, selecting a transistor whose source and drain wire models appear the least times among all the transistors corresponding to the transistor encoding data of the current type and laying it out at the position where the abscissa is 0, and setting the side of the transistor whose source and drain wire models appear the least times on the left side;
[0123] S23, starting from the position where the horizontal axis is 1, a transistor set to be laid out is established from transistors corresponding to all transistor encoding data of the current type, and a transistor with the largest number of occurrences of source and drain wire models is selected from the transistor set to be laid out according to a first preset wire network selection rule and laid out at the current position until the first type of transistor layout on the circuit to be laid out is completed;
[0124] S24, starting layout according to the transistor encoding data of another type different from the transistor type in step S21;
[0125] S25. According to the first type transistor layout in step S23, a transistor is selected and laid out at the current position according to the second preset network selection rule, until the second type transistor layout on the circuit to be laid out is completed.
[0126] Specifically, steps S21-S23 are the process of firstly laying out one type of transistors. The layout of S22 is shown in FIG. Figure 5 As shown, the layout of S23 is shown as follows Figure 6 shown.
[0127] In step S23, the step of establishing a transistor set to be laid out from transistors corresponding to all transistor encoding data of the current type is specifically as follows:
[0128] Match the unplaced transistors among the transistors corresponding to all the transistor encoding data of the current type with the last placed transistor one by one, and determine whether the two transistors can share an active area, and determine whether a groove appears:
[0129] If the active area can be shared and no grooves appear, the matched unplaced transistors are placed into the transistor set to be placed, and the transistors in the transistor set to be placed are placed one placement unit away from the last transistor that has been placed;
[0130] If all matching transistors cannot simultaneously meet the conditions of sharing active areas and not having grooves, all unplaced transistors are treated as a set of transistors to be placed, and the transistors in the set of transistors to be placed are placed 2 placement units away from the last placed transistor.
[0131] The first preset wire network selection rule is specifically:
[0132] The number of occurrences of each wire model of the source, gate and drain in the laid-out transistors is counted, and then the number of occurrences of the wire model of the source, gate and drain of each transistor to be laid out in the set of transistors to be laid out is counted, and the counted occurrences of the laid-out and unlaid ones are matched and summed to obtain the number of occurrences of the wire model of each source, gate and drain, and the unlaid transistor containing the wire signal with the largest number of occurrences is selected as the selection result.
[0133] Steps S24-S25 are for another type of transistor layout process different from S21, wherein the second preset line network selection rule is specifically:
[0134] Based on the horizontal coordinate position of the already laid out transistors in the first type of transistor layout, the same layout position is determined to arrange the transistors, such as Figure 7 As shown; or transistor placement is performed based on the horizontal coordinates of all available placement units as the placement positions, such as Figure 8 As shown;
[0135] According to the layout length of the first type of transistor layout, at the layout position within the layout length, the number of occurrences of the wire models of the transistor source, gate and drain at the four positions before and after are counted, and then the number of occurrences of the wire models of the transistor source, gate and drain to be laid out are counted, the number of occurrences of the laid out and unlaid ones are summed, and the unlaid transistor with the largest sum is selected as the selection result;
[0136] According to the layout length of the first type of transistor layout, at the layout position outside the layout length, the number of occurrences of the wire models of the source, gate and drain of all the transistors that have been laid out is counted, and then the number of occurrences of the wire models of the source, gate and drain of the transistor to be laid out is counted, and the number of occurrences of the laid out and unlaid statistics is summed, and the unlaid transistor with the largest sum is selected as the selection result, such as Fig. 9 shown.
[0137] Step S25 is specifically as follows:
[0138] For the transistor layout with the horizontal coordinate of 0, by judging whether the wire at the gate of the transistor with the horizontal coordinate of 0 in the first type of transistor can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule;
[0139] For a transistor layout whose abscissa is greater than 0 and whose layout length is less than the layout length of the first type transistor, by judging whether the transistor at the corresponding coordinate position in the first type transistor shares an active area, whether a groove exists, and whether the wire at the gate can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule;
[0140] For a transistor layout whose layout length is greater than the layout length of the first type of transistor, by judging whether the transistors share an active area and whether grooves appear, transistors that can be connected are placed in a candidate transistor set, and the second preset wire network selection rule is used to select candidate transistors for layout.
[0141] In step S21, it is mentioned that the embodiment of the present invention uses multi-threading technology to first perform one type of transistor layout. During the implementation process, there are two situations: first perform PMOS transistor layout, then perform NMOS transistor layout; first perform NMOS transistor layout, then perform PMOS transistor layout. In fact, based on multi-threading technology, the embodiment of the present invention can use two thread tasks to respectively execute the above two situations, and select a better solution as the output result based on the execution results of different threads.
[0142] In order to facilitate the comparison of the advantages and disadvantages of different layout solutions, an embodiment of the present invention also provides an evaluation standard. Specifically, each standard cell transistor layout solution will correspond to a score, which consists of four parts, including a width score of 50 points, a routability score of 30 points, a symmetry score of 10 points, and a groove-free score of 10 points. The evaluation criteria are as follows:
[0143]
[0144]
[0145]
[0146] max k ≥x i -0.5μ ki +0.5ν ki
[0147]
[0148] min k ≤x i -0.5μ ki +0.5v ki
[0149]
[0150] left i -netLis k ≤M(1-μ ki )
[0151]
[0152] left i -netList k ≥-M(1-μ ki )
[0153]
[0154] right i -netList k≤M(1-v ki )
[0155]
[0156] right i -netList k ≥-M(1-v ki )
[0157]
[0158] μ ki +v ki =1
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165]
[0166] β ij ∈{0,1} i∈{1,2,…,n-1},j∈{i+1,i+2,…,n} (17);
[0167] p ij1 ∈{0,1}i∈{1,2,…,n-1},j∈{i+1,i+2,…,n} (18);
[0168] p ij2 ∈{0,1}i∈{1,2,…,n-1},j∈{i+1,i+2,…,n} (19);
[0169] z ij1 ∈{0,1}i∈{1,2,…,n-1},j∈{i+1,i+2,…,n} (20);
[0170] z ij2 ∈{0,1}i∈{1,2,…,n-1},j∈{i+1,i+2,…,n} (21);μ ki ∈{0,1}
[0171]
[0172] ν ki ={0,1}
[0173]
[0174] Formula (1) is used to calculate the layout width score, w represents the layout width of the solution, and R is the reference width value. Formulas (2) to (12) are used to calculate the routability score, where max k Indicates the maximum horizontal coordinate value of the kth conductor model, min k Indicates the minimum horizontal coordinate value of the kth wire model, x i Represents the horizontal coordinate of the i-th transistor, netList k represents the kth wire model, s i , g i , d i Respectively represent the wire models at the source, gate, and drain of the i-th transistor, μ ki , v ki is a zero-one variable, left i Indicates the wire type on the left side of the i-th transistor (usually the wire type of the source, and after flipping it is the wire type of the drain), right i Indicates the wire type on the right side of the i-th transistor (usually the wire type of the drain, and after flipping it is the wire type of the source), and M is a very large positive number. Among them, formulas (2) to (10) are used to find the maximum horizontal coordinate value max of the k-th wire type k and the minimum horizontal coordinate value min k , bbox in formula (11) is used to represent the sum of the maximum horizontal coordinate values of all wire types minus the sum of the minimum horizontal coordinate values of all wire types. bsScore in formula (12) represents the routability score. Formula (13) is used to calculate the symmetry score. For t i , if there is no other transistor sharing the gate with it, that is The symmetry score is deducted by 1 point. Equations (14) to (23) are used to define the range of decision variables. Equation (14) defines x i The maximum value is That is, first assume that all transistors cannot share active areas and gates. At this time, all x i Are less than or equal to For example, when When , the maximum horizontal coordinate value is 2φ-1, such as Fig.10 As shown; when When , the maximum horizontal coordinate value is 2φ-2, such as Fig.11 As shown; similarly, when When
[0175] S16. Output the global optimal solution as a layout result of the transistor data.
[0176] The beneficial effect achieved by the present invention is to propose a transistor layout algorithm in a standard unit circuit based on intelligent optimization of variable neighborhood search and wire net concentration rules. The method first layouts one type of transistors, and then layouts another type of transistors after the layout of this type of transistors is completed, so as to obtain a complete standard unit circuit transistor layout solution, wherein the variable neighborhood search can define different search strategies according to the characteristics of the transistor layout; the advantage of the wire net concentration rule is that it can make the standard circuit after the layout has been completed have good routability, thereby reducing the integrated circuit design time and cost, and improving the performance and stability of the final circuit.
[0177] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).
[0178] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0179] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0180] The embodiments of the present invention are described above in conjunction with the accompanying drawings. What is disclosed is only the preferred embodiment of the present invention. However, the present invention is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is only illustrative rather than restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms and equivalent changes without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A transistor layout method for a standard unit circuit of intelligent optimization, characterized in that: The transistor layout method comprises the following steps: S11, obtaining transistor data to be laid out; S12, preprocessing the transistor data to obtain transistor coding data, wherein the transistor coding data is divided into PMOS transistor coding data and NMOS transistor coding data according to transistor types; S13, generating an initial transistor sequence according to the transistor coding data; S14, generating an initial transistor layout according to the initial transistor sequence and a preset layout rule, and defining a global optimal solution as the initial transistor layout; S15, calling a preset layout search algorithm to perform layout calculation according to the initial transistor layout and the global optimal solution to obtain a new global optimal solution; S16, outputting the global optimal solution as a layout result of the transistor data; The preset layout search algorithm includes the following steps: S151, determining whether the preset first variable k reaches the preset first time limit K, if so, terminating the preset layout search algorithm and outputting the global optimal solution; if not, setting the preset first variable k=1, and executing step S152; S152, determining whether the preset first variable k is less than or equal to the preset first time limit K, if so, executing step S153; if not, returning to step S151; S153, using the kth preset vibration operator to perturb the initial transistor sequence to obtain a perturbed transistor sequence; S154, calculating the local optimal solution corresponding to the perturbed transistor sequence based on a variable neighborhood descent search algorithm; S155, determining whether the local optimal solution is better than the global optimal solution, if so, taking the local optimal solution as the new global optimal solution, and setting the preset first variable k=1, and returning to step S152; if not, setting the preset first variable k=k+1, and returning to step S152; The variable neighborhood descent search algorithm comprises the following steps: S1541, using the current global optimal solution as the initial local optimal solution, and defining a preset second variable l=1; S1542, determining whether the preset second variable l is less than or equal to the preset first time limit L, if so, executing step S1543; if not, outputting the local optimal solution; S1543, using the first preset neighborhood operator to perform range perturbation on the initial transistor sequence to obtain a second perturbation transistor sequence; S1544, calculating a transistor layout solution according to the second perturbation transistor sequence and the preset layout rule; S1545, determining whether the transistor layout solution is better than the local optimal solution, if so, taking the transistor layout solution as the new local optimal solution, and setting the preset first variable l=1, and returning to step S1542; if not, setting the preset first variable l=l+1, and returning to step S1542; The preset layout rules are specifically: S21, according to the transistor type of the transistor encoding data, select one type based on multi-threading technology to start layout; S22, taking the horizontal direction of the circuit to be laid out of the standard unit as the abscissa axis, and the left end point of the circuit to be laid out for laying out the transistor as the origin, selecting a transistor whose source and drain wire models appear the least times among all the transistors corresponding to the transistor encoding data of the current type and laying it out at the position where the abscissa is 0, and setting the side of the transistor whose source and drain wire models appear the least times on the left side; S23, starting from the position where the horizontal axis is 1, a transistor set to be laid out is established from transistors corresponding to all transistor encoding data of the current type, and a transistor with the largest number of occurrences of source and drain wire models is selected from the transistor set to be laid out according to a first preset wire network selection rule and laid out at the current position until the first type of transistor layout on the circuit to be laid out is completed; S24, starting layout according to the transistor encoding data of another type different from the transistor type in step S21; S25, according to the first type transistor layout in step S23, a transistor is selected and laid out at the current position according to the second preset line network selection rule, until the second type transistor layout on the circuit to be laid out is completed; The preset vibration operator includes: k=1, half-reversal operator, used to randomly select two elements a and b from the sequence and swap the sequence before a with the sequence after b; k=2, full reversal operator, used to flip the sequence horizontally; k=3, random shuffle operator, used to randomly reorder each element in the sequence; The preset neighborhood operator includes: l=1, the exchange operator is used to randomly select two elements a and b from the sequence and exchange the positions of a and b; l=2, the insertion operator, is used to randomly select two elements a and b from the sequence and set the position of a to the previous position of b; l=3, flip operator, used to randomly select two elements a and b from the sequence and horizontally flip the sequence between elements a and b; The first preset wire network selection rule is specifically: Counting the number of occurrences of each wire model of the source, gate and drain in the laid-out transistors, then counting the number of occurrences of the wire model of the source, gate and drain of each transistor to be laid out from the set of transistors to be laid out, matching and summing the number of occurrences counted for the laid-out and unlaid transistors to obtain the number of occurrences of each wire model of the source, gate and drain, and selecting the unlaid transistor containing the wire signal with the largest number of occurrences as the selection result; The second preset wire network selection rule is specifically: Based on the horizontal coordinate positions of the already laid out transistors in the first type of transistor layout, determining the same layout positions for transistor layout; or based on the horizontal coordinates of all available layout units as layout positions for transistor layout; According to the layout length of the first type of transistor layout, at the layout position within the layout length, the number of occurrences of the wire models of the transistor source, gate and drain at the four positions before and after are counted, and then the number of occurrences of the wire models of the transistor source, gate and drain to be laid out are counted, the number of occurrences of the laid out and unlaid ones are summed, and the unlaid transistor with the largest sum is selected as the selection result; According to the layout length of the first type of transistor layout, at the layout position outside the layout length, the number of occurrences of the wire model of the source, gate and drain of all the laid out transistors is counted, and then the number of occurrences of the wire model of the source, gate and drain of the transistor to be laid out is counted, the number of occurrences of the laid out and unlaid statistics are summed, and the unlaid transistor with the largest sum is selected as the selection result.
2. The transistor layout method for the standard unit circuit of intelligent optimization according to claim 1, characterized in that: In step S23, the step of establishing a transistor set to be laid out from transistors corresponding to all transistor encoding data of the current type is specifically as follows: Match the unplaced transistors among the transistors corresponding to all transistor encoding data of the current type with the last placed transistor one by one, and determine whether the two transistors can share an active area, and determine whether a groove appears: If the active area can be shared and no grooves appear, the matched unplaced transistors are placed into the transistor set to be placed, and the transistors in the transistor set to be placed are placed one placement unit away from the last transistor that has been placed; If all matching transistors cannot simultaneously meet the conditions of sharing active areas and not having grooves, all unplaced transistors are treated as a set of transistors to be placed, and the transistors in the set of transistors to be placed are placed 2 placement units away from the last placed transistor.
3. The transistor layout method for the standard unit circuit of intelligent optimization according to claim 1, characterized in that: Step S25 is specifically as follows: For the transistor layout with the horizontal coordinate of 0, by judging whether the wire at the gate of the transistor with the horizontal coordinate of 0 in the first type of transistor can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule; For a transistor layout whose abscissa is greater than 0 and whose layout length is less than the layout length of the first type transistor, by judging whether the transistor at the corresponding coordinate position in the first type transistor shares an active area, whether a groove exists, and whether the wire at the gate can be connected, the transistor that can be connected is placed in the candidate transistor set, and the candidate transistor is selected for layout using the second preset wire network selection rule; For a transistor layout whose layout length is greater than the layout length of the first type of transistor, by judging whether the transistors share an active area and whether grooves appear, transistors that can be connected are placed in a candidate transistor set, and the second preset wire network selection rule is used to select candidate transistors for layout.
