Scanning line-based layout dead space area calculation method and system, electronic equipment and storage medium
By calculating the dead space area based on the scanning line, the dead space problem caused by the shape and size difference of the macro module is solved, and the fast and accurate dead space area calculation is achieved, which improves the automation level of chip design.
Patent Information
- Application Number
- CN202411607532.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
AI Technical Summary
During the layout planning stage of chip design, the shape and size differences of macro modules lead to the generation of dead space, resulting in a reduction in effective space for standard unit layout, affecting chip performance. The prior art lacks automated dead space area calculation methods.
Using a scanning line-based method, the space occupied by the macro module is scanned by horizontal or vertical scanning lines, the total area is calculated, and the dead space area is calculated by the difference between the total area and the total area of the macro module.
Quickly identifying and calculating dead space areas reduces the computational complexity, helping engineers better understand the current layout efficiency, reduce waste of layout area, and improve the automation level of integrated circuit design.
Smart Images

Figure CN119476178A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of integrated circuit layout planning, and in particular to a scan line-based layout dead space area calculation method, system, electronic device and storage medium. Background Art
[0002] In the prior art, engineers usually manually place macro cells in the layout planning stage of chip design, and place them compactly at the edge of the chip, so as to leave as much blank area as possible in the center area for the layout of standard cells. The more blank areas available for layout, the more conducive it is to the optimization of timing and congestion of standard cell layout. During the macro cell placement process, some blank areas will be generated inside, and these blank areas cannot be effectively utilized in the subsequent layout, resulting in a waste of layout area. These blank areas are also called dead space. However, when there are a large number of macro modules and the shapes are significantly different, the modules with too large size differences will cause the modules to be unable to be seamlessly spliced together, which will generate more dead space, thereby reducing the effective space of the standard cell layout and affecting the overall performance of the chip. Therefore, in order to realize the automation of chip layout planning, it is very necessary to accurately identify and calculate the area of the dead space.
[0003] However, current layout planning is mainly based on manual layout, with few automated methods and a lack of methods for calculating dead space area. Summary of the invention
[0004] The present invention provides a scan line-based layout dead space calculation method, system, electronic device and storage medium, aiming to solve the above-mentioned problem.
[0005] The first object of the present invention is to provide a method for calculating the dead space area of a layout based on scan lines, which specifically comprises the following steps:
[0006] Acquire a layout area; the layout area includes a macro module;
[0007] Scan the space occupied by the macromodule through scanning lines to obtain a total occupied area;
[0008] A dead space area is obtained according to the total occupied area and the total area of the macro modules.
[0009] Furthermore, obtaining the total occupied area specifically includes:
[0010] The scanning line scanning mode includes horizontal scanning and vertical scanning;
[0011] Determine a cutting line and its position according to the scanning line mode; the cutting line is the edge line of the macro module;
[0012] Calculating the vertical distance from the cutting line to the edge of the layout area;
[0013] Multiplying the vertical distance by the cutting line length to obtain a scan area;
[0014] Calculate the sum of all scanned areas to obtain the total occupied area.
[0015] Furthermore, determining the cutting line position according to the scanning line method specifically includes:
[0016] Determining whether the scanning line scanning mode is vertical scanning;
[0017] If yes, then obtain the left edge of the macromodule;
[0018] Sort the left side lines according to the positions of the left side lines to obtain a cutting line list;
[0019] Traversing the cutting line list, storing the left line that meets the rules into the cutting line list, updating the cutting line list, and finally obtaining the cutting line and its position;
[0020] If not, obtaining the lower edge of the macromodule;
[0021] Sort the lower edge lines according to their positions to obtain a cutting line list;
[0022] The cutting line list is traversed, the lower edge lines that meet the rules are stored in the cutting line list, the cutting line list is updated, and finally the cutting lines and their positions are obtained.
[0023] Furthermore, the rules are specifically as follows:
[0024] The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; the positional relationship between the first left line and the second left line is determined;
[0025] If both ends of the second left sideline are located between the two ends of the first left sideline, then delete the second left sideline;
[0026] If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue traversing the next left line;
[0027] If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding portion is stored in the cutting line list as a new left line.
[0028] Further, obtaining the dead space area according to the total occupied area and the total area of the macro modules specifically includes:
[0029] The dead space area is obtained according to the difference between the total occupied area and the total area of the macro module.
[0030] A second object of the present invention is to provide a scan line-based layout dead space area calculation system, comprising a layout area acquisition unit, a total occupied area calculation unit, and a dead space area acquisition unit;
[0031] The layout area acquisition unit is used to determine the area where the dead space area needs to be calculated, specifically including:
[0032] Acquire a layout area; the layout area includes a macro module;
[0033] The total occupied area calculation unit is used to calculate the total occupied area of the macromodule area scanned by the scan line, specifically including:
[0034] Scan the space occupied by the macromodule through scanning lines to obtain a total occupied area;
[0035] The dead space area acquisition unit is used to acquire the wasted area in the layout area, specifically including:
[0036] A dead space area is obtained according to the total occupied area and the total area of the macro modules.
[0037] Furthermore, the occupied area calculation unit further includes:
[0038] The scanning line scanning mode includes horizontal scanning and vertical scanning;
[0039] Determine the cutting line position according to the scanning line mode; the cutting line is the edge line of the macro module;
[0040] Calculate the vertical distance between the cutting line and the edge of the layout area;
[0041] Multiplying the vertical distance by the cutting line length to obtain a scan area;
[0042] Calculate the sum of all scanned areas to obtain the total occupied area;
[0043] Wherein, determining the cutting line position according to the scanning line method specifically includes:
[0044] Determine whether the scanning line scanning mode is vertical scanning;
[0045] If yes, then obtain the left edge of the macromodule;
[0046] Sort the left side lines according to the positions of the left side lines to obtain a cutting line list;
[0047] Traversing the cutting line list, storing the left line that meets the rules into the cutting line list, updating the cutting line list, and finally obtaining the cutting line;
[0048] If not, obtaining the lower edge of the macromodule;
[0049] Sort the lower edge lines according to their positions to obtain a cutting line list;
[0050] The cutting line list is traversed, the lower edge lines that meet the rules are stored in the cutting line list, the cutting line list is updated, and finally the cutting lines and their positions are obtained.
[0051] The specific rules are:
[0052] The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; the positional relationship between the first left line and the second left line is determined;
[0053] If both ends of the second left sideline are located between the two ends of the first left sideline, then delete the second left sideline;
[0054] If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue traversing the next left line;
[0055] If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding portion is stored in the cutting line list as a new left line.
[0056] Furthermore, the dead space area acquisition unit further includes:
[0057] The dead space area is obtained according to the difference between the total occupied area and the total area of the macro module.
[0058] The third object of the present invention is to provide an electronic device, comprising: a memory on which a program code is stored; a processor, which is connected to the memory and when the program code is executed by the processor, implements the scan line-based layout dead space area calculation method described in any embodiment of the present invention.
[0059] A fourth object of the present invention is to provide a computer-readable storage medium having program instructions stored thereon, wherein the program instructions, when executed, implement the scan line-based layout dead space area calculation method described in any embodiment.
[0060] Compared with the prior art, the beneficial effects of this application are:
[0061] (1) For a given layout area, use a scan line to perform a unidirectional scan of the layout area to quickly identify and determine the layout area boundary of the macro module, greatly reducing the calculation time and efficiently and quickly calculating the total occupied area;
[0062] (2) Through the scan line algorithm, the difference between the total occupied area and the total area of the macromodule, which is easy to calculate, is used to accurately estimate the dead space area, which is difficult to measure directly. This effectively reduces the complexity of solving the area problem. At the same time, this method helps engineers better understand the efficiency of the current layout by quantitatively analyzing the dead space area. Based on this, they can make more reasonable macro module placement, reduce layout area waste, form a compact and regular space layout, and improve the automation level of integrated circuit design. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0064] Figure 1 is a flow chart of a method for calculating a layout dead space area based on scan lines provided in Embodiment 1 of the present invention;
[0065] Figure 2 It is a flow chart of obtaining the total occupied area in the scan line-based layout dead space area calculation method provided in the first embodiment of the present invention;
[0066] Figure 3 This is a flow chart of obtaining cutting lines and their positions in the scan line-based layout dead space area calculation method provided in the first embodiment of the present invention;
[0067] Figure 4 It is a schematic diagram of the layout area in the scan line-based layout dead space area calculation method provided in the first embodiment of the present invention;
[0068] Figure 5 It is a schematic diagram of layout area cutting lines and vertical lines thereof in the layout dead space area calculation method based on scan lines provided in the first embodiment of the present invention;
[0069] Figure 6 It is a schematic diagram of the relationship between the cutting line and the vertical line in the scan line-based layout dead space area calculation method provided in the first embodiment of the present invention;
[0070] Figure 7 is a schematic diagram of a scan line pseudo code in a scan line-based layout dead space area calculation method provided in Embodiment 1 of the present invention;
[0071] Figure 8 is a structural diagram of a scan line-based layout dead space area calculation system provided in Embodiment 2 of the present invention;
[0072] Fig. 9 is a schematic diagram of an electronic device provided in Embodiment 3 of the present invention;
[0073] Fig.10 It is a schematic diagram of a storage medium provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0074] The embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0075] The following describes the implementation methods of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that, in the absence of conflict, the following embodiments and the features in the embodiments can be combined with each other. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work belong to the scope of protection of the present application.
[0076] It should be noted that various aspects of the embodiments within the scope of the appended claims are described below. It should be apparent that the aspects described herein can be embodied in a wide variety of forms, and any specific structure and / or function described herein is merely illustrative. Based on the present application, it should be understood by those skilled in the art that an 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 and aspect described herein can be used to implement the device and / or practice the method. In addition, other structures and / or functionalities other than one or more of the aspects described herein can be used to implement this device and / or practice this method.
[0077] It should also be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application. The drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0078] Embodiment 1
[0079] like Figure 1 As shown, a method for calculating the dead space area of a layout based on scan lines specifically includes the following steps:
[0080] S1: Get a layout area; the layout area includes a macro module;
[0081] In integrated circuit design, the design of the layout area includes the process of allocating the physical location of the macro modules, which can directly affect the performance and power consumption of the chip. The placement and size of the macro modules in the acquired layout area are fixed. The layout area can be a complete layout area or a corner area of the complete layout area that includes the macro modules. In this embodiment, Figure 4 , the layout area 1 is a part located at the upper right corner of the complete layout area, which includes a fixed macro module 3 and a dead space 2.
[0082] S2: Scan the space occupied by the macro module through the scanning line to obtain the total occupied area;
[0083] It should be noted that the total occupied area includes:
[0084] S201: Scan line scanning modes include horizontal scanning and vertical scanning;
[0085] S202: determining a cutting line and its position according to a scanning line method; the cutting line is a border line of the macro module;
[0086] Specifically, determining the cutting line position according to the scanning line method specifically includes:
[0087] S2021: Determine whether the scanning line scanning mode is vertical scanning;
[0088] If yes, execute S2022-S2024;
[0089] If not, execute S2025-S2027.
[0090] S2022: Obtain the left line of the macro module;
[0091] S2023: Sort the left lines according to their positions to obtain a cutting line list;
[0092] S2024: traverse the cutting line list, store the left line that meets the rules into the cutting line list, update the cutting line list, and finally obtain the cutting line and its position;
[0093] S2025: Obtain the lower edge of the macro module;
[0094] S2026: Sort the lower edge lines according to their positions to obtain a cutting line list;
[0095] S2027: traverse the cutting line list, store the lower edge lines that meet the rules into the cutting line list, update the cutting line list, and finally obtain the cutting line and its position.
[0096] Different scanning methods determine different cutting line directions: when the scanning method is horizontal scanning, the scanning line is a horizontal straight line, and the upper and lower lines of the macro module can be scanned; when the scanning line is vertical scanning, the scanning line is a vertical straight line, and the left and right lines of the macro module can be scanned. Then, the macro module edge line to be obtained is determined according to the corner area position of the layout area. When the corner area position of the layout area is the upper right corner, the left or lower line of the macro module is obtained; when the corner area position of the layout area is the lower right corner, the left or upper line of the macro module is obtained; when the corner area position of the layout area is the lower left corner, the right or upper line of the macro module is obtained; when the corner area position of the layout area is the upper left corner, the right or lower line of the macro module is obtained.
[0097] In this embodiment, the corner area of the layout area is taken as the upper right corner as an example. Figure 5 , establish a rectangular coordinate system 0-xy on the layout area, using (x i ,y i1 ,y i2 ) represents the left line of the macromodule, where i represents the i-th macromodule, x i is the horizontal coordinate of the left line of the macro module, y i1 y is the vertical coordinate of the endpoint of the left line of the macro module, i2 is the vertical coordinate of the endpoint on the left line of the macro module. Sort all macro modules in ascending order by their horizontal coordinates. When the horizontal coordinates are the same, sort them in ascending order by the vertical coordinates of the endpoints. The left line after sorting is (x sortedi ,y sortedi1 ,y sortedi2 ).
[0098] The cutting line list includes the cutting line number, cutting line coordinates and cutting line length.
[0099] It should be noted that the specific rules are:
[0100] The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; determine the positional relationship between the first left line and the second left line:
[0101] If both ends of the second left line are located between the two ends of the first left line, delete the second left line;
[0102] If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue to traverse the next second left line;
[0103] If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding part is stored as a new left line in the cutting line list.
[0104] In this embodiment, there are five situations for the positional relationship between the first left line and the second left line, such as Figure 6 , the blue solid line indicates the i-th left line currently traversed, which is the first left line, the red solid line indicates the j-th left line, which is the second left line, and the black dotted line indicates the vertical line. Assuming that the current traversal reaches the i-th left line, the ordinate of the upper end point of the left line is top, and the ordinate of the lower end point is bottom. The positional relationship between the i-th left line and the other left lines is determined in order. There are five possible situations for the positional relationship between the two lines, which are listed as follows:
[0105] If both ends of the jth left line are between the top and bottom of the ith left line, then delete the jth left line, such as Figure 6 ①;
[0106] If the lower end of the jth left line exceeds the upper end of the ith left line or the upper end of the jth left line is lower than the lower end of the jth left line, then continue to traverse the next left line, such as Figure 6 ⑤;
[0107] If the upper end of the jth left line exceeds the upper end of the ith left line, the lower end of the jth left line is above the lower end of the ith left line, such as Figure 6 ②, then change the lower end of the jth left line to top, and store the processed second left line into the cutting line list.
[0108] If the upper end of the jth left line does not exceed the upper end of the ith left line, the lower end of the jth left line is below the lower end of the ith left line, such as Figure 6 ③, change the upper end of the jth left line to bottom, and store the processed second left line into the cutting line list.
[0109] If the upper end of the jth left line exceeds the upper end of the ith left line, the lower end of the jth left line is below the lower end of the ith left line, such as Figure 6 ④, change the upper end of the jth left line to bottom, and store the processed second left line into the cutting line list.
[0110] In this embodiment, the above rules are set by setting the scan line pseudo code, such as Figure 7 .
[0111] According to the above rules, after comparing and excluding the i-th left line with the remaining left lines, the remaining lines are stored in the cutting line list, and then the next one is traversed in sequence, and the cutting line list is updated at the same time until all are traversed, and the final cutting line list is output to obtain the cutting line and its position.
[0112] It should be noted that the above rules are also applicable to situations where the corner area of the layout area is located at other positions.
[0113] S203: Calculating the vertical distance from the cutting line to the edge of the layout area;
[0114] In this embodiment, if Figure 6 , the green line is the vertical line 5, and the vertical distance from the cutting line 4 to the layout area boundary is
[0115] S204: multiplying the vertical distance by the cutting line length to obtain a scanning area;
[0116] Traverse the final cutting line list and record the length of the i-th scan line as Then the scanning area S is:
[0117]
[0118] S205: Calculate the sum of all scanned areas to obtain the total occupied area.
[0119] Total occupied area S sweep for:
[0120]
[0121] Where n is the total number of cutting lines.
[0122] S3: Obtain the dead space area according to the total occupied area and the total area of the macro module.
[0123] Specifically, the dead space area is obtained according to the difference between the total occupied area and the total area of the macro module.
[0124] The total macromodule area is calculated based on the position and size of each macromodule in the layout area. The macromodules are numbered from left to right according to the macromodule position. The height of the i-th macromodule is Width is Based on this, the total area S of the macro unit in this area is calculated macro for:
[0125]
[0126] Wherein, m is the number of macro modules in the layout area.
[0127] Based on the total occupied area and the total area of the macromodule, the final dead space area S is obtained dead_space :
[0128] S dead_space =S sweep -S macro
[0129] The present application uses scanning lines to scan a given layout area, quickly identifies and determines the layout area boundary, greatly reduces the calculation time, and efficiently and quickly calculates the scan area.
[0130] Through the scan line algorithm, the difference between the easy-to-calculate total occupied area and the total area of the macro module is used to accurately estimate the dead space area that is difficult to measure directly, effectively reducing the complexity of solving the area problem. At the same time, this method helps engineers better understand the efficiency of the current layout by quantitatively analyzing the dead space area, and based on this, make more reasonable macro module placement, reduce layout area waste, form a compact and regular space layout, and improve the automation level of integrated circuit design.
[0131] Embodiment 2
[0132] like Figure 8 , a scan line-based layout dead space area calculation system 200, comprising a layout area acquisition 201, an occupied area calculation unit 202 and a dead space area acquisition unit 203;
[0133] The layout area acquisition unit 201 is used to determine the area where the dead space area needs to be calculated, specifically including:
[0134] Get the layout area; the layout area includes macro modules;
[0135] The total occupied area calculation unit 202 is used to calculate the total occupied area of the macromodule area scanned by the scan line, specifically including:
[0136] Scan the space occupied by the macromodule by scanning lines to obtain the total occupied area;
[0137] The dead space area acquisition unit 203 is used to acquire the wasted area in the layout area, specifically including:
[0138] The dead space area is obtained based on the total occupied area and the total macromodule area.
[0139] Specifically, the occupied area calculation unit 202 further includes:
[0140] Scan line scanning modes include horizontal scanning and vertical scanning;
[0141] The cutting line position is determined according to the scanning line method; the cutting line is the edge line of the macro module;
[0142] Calculate the vertical distance between the cutting line and the edge of the layout area;
[0143] Multiply the vertical distance by the length of the cutting line to obtain the scanned area;
[0144] Calculate the sum of all scanned areas to obtain the total occupied area;
[0145] Wherein, determining the cutting line position according to the scanning line method specifically includes:
[0146] Determine whether the scanning line scanning mode is vertical scanning;
[0147] If yes, get the left edge of the macromodule;
[0148] Sort the left side lines according to their positions to obtain a cutting line list;
[0149] Traverse the cutting line list, store the left line that meets the rules into the cutting line list, update the cutting line list, and finally obtain the cutting line;
[0150] If not, get the lower edge of the macro module;
[0151] Sort the lower edge lines according to their positions to obtain a cutting line list;
[0152] Traverse the cutting line list, store the lower edge lines that meet the rules into the cutting line list, update the cutting line list, and finally obtain the cutting line.
[0153] The specific rules are:
[0154] The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; the positional relationship between the first left line and the second left line is determined;
[0155] If both ends of the second left line are located between the two ends of the first left line, delete the second left line;
[0156] If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue to traverse the next left line;
[0157] If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding part is stored in the cutting line list as a new left line.
[0158] Specifically, the dead space area acquisition unit 203 further includes:
[0159] The dead space area is obtained from the difference between the total occupied area and the total area of the macromodule.
[0160] Embodiment 3
[0161] An electronic device 300, such as Fig. 9As shown, it includes: a memory 301 on which program codes are stored; a processor 302, which is connected to the memory, and when the program codes are executed by the processor, a method for calculating the dead space area of a layout based on scan lines is implemented. For a detailed description of the method, reference can be made to the corresponding description in the above method embodiment, which will not be repeated here.
[0162] Embodiment 4
[0163] A computer readable storage medium 400, such as Fig.10 As shown, a program instruction 401 is stored thereon, and when the program instruction is executed, a method for calculating the dead space area of a layout based on scan lines is implemented. For a detailed description of the method, reference may be made to the corresponding description in the above method embodiment, and no further description is given here.
[0164] The number of devices and processing scales described here are used to simplify the description of the present invention. Applications, modifications and variations of the present invention will be obvious to those skilled in the art.
[0165] Although the embodiments of the present invention have been disclosed as above, they are not limited to the applications listed in the specification and implementation modes. They can be fully applied to various fields suitable for the present invention. For those familiar with the art, additional modifications can be easily implemented. Therefore, without departing from the general concept defined by the claims and the scope of equivalents, the present invention is not limited to the specific details and the illustrations shown and described herein.
[0166] The apparatus, electronic device, non-volatile computer storage medium and method provided in the embodiments of this specification correspond to each other, and therefore, the apparatus, electronic device and non-volatile computer storage medium also have similar beneficial technical effects as the corresponding method. Since the beneficial technical effects of the method have been described in detail above, the beneficial technical effects of the corresponding apparatus, electronic device and non-volatile computer storage medium will not be repeated here.
[0167] The above description is only an embodiment of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of one or more embodiments of this specification.
Claims
1. A method for calculating the dead space area of a layout based on scan lines, characterized in that: The specific steps include: Acquire a layout area; the layout area includes a macro module; Scan the space occupied by the macromodule through scanning lines to obtain a total occupied area; A dead space area is obtained according to the total occupied area and the total area of the macro modules.
2. The method for calculating the layout dead space area based on scan lines according to claim 1, characterized in that: The obtaining of the total occupied area specifically includes: The scanning line scanning mode includes horizontal scanning and vertical scanning; Determine a cutting line and its position according to the scanning line mode; the cutting line is the edge line of the macro module; Calculating the vertical distance from the cutting line to the edge of the layout area; Multiplying the vertical distance by the cutting line length to obtain a scan area; Calculate the sum of all scanned areas to obtain the total occupied area.
3. The method for calculating the dead space area of a scan line-based layout according to claim 2, characterized in that: Determining the cutting line position according to the scanning line method specifically includes: Determining whether the scanning line scanning mode is vertical scanning; If yes, then obtain the left edge of the macromodule; Sort the left side lines according to the positions of the left side lines to obtain a cutting line list; Traversing the cutting line list, storing the left line that meets the rules into the cutting line list, updating the cutting line list, and finally obtaining the cutting line and its position; If not, obtaining the lower edge of the macromodule; Sort the lower edge lines according to their positions to obtain a cutting line list; The cutting line list is traversed, the lower edge lines that meet the rules are stored in the cutting line list, the cutting line list is updated, and finally the cutting lines and their positions are obtained.
4. The method for calculating the layout dead space area based on scan lines according to claim 3, characterized in that: The specific rules are: The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; the positional relationship between the first left line and the second left line is determined; If both ends of the second left sideline are located between the two ends of the first left sideline, then delete the second left sideline; If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue traversing the next left line; If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding portion is stored in the cutting line list as a new left line.
5. The method for calculating the layout dead space area based on scan lines according to claim 1, characterized in that: Obtaining the dead space area according to the total occupied area and the total area of the macromodule specifically includes: The dead space area is obtained according to the difference between the total occupied area and the total area of the macro module.
6. A layout dead space area calculation system based on scan lines, characterized in that: It includes a layout area acquisition unit, a total occupied area calculation unit and a dead space area acquisition unit; The layout area acquisition unit is used to determine the area where the dead space area needs to be calculated, specifically including: Acquire a layout area; the layout area includes a macro module; The total occupied area calculation unit is used to calculate the total occupied area of the macromodule area scanned by the scan line, specifically including: Scan the space occupied by the macromodule through scanning lines to obtain a total occupied area; The dead space area acquisition unit is used to acquire the wasted area in the layout area, specifically including: A dead space area is obtained according to the total occupied area and the total area of the macro modules.
7. The scan line-based layout dead space area calculation system according to claim 6, characterized in that: The occupied area calculation unit also includes: The scanning line scanning mode includes horizontal scanning and vertical scanning; Determine the cutting line position according to the scanning line mode; the cutting line is the edge line of the macro module; Calculate the vertical distance between the cutting line and the edge of the layout area; Multiplying the vertical distance by the cutting line length to obtain a scan area; Calculate the sum of all scanned areas to obtain the total occupied area; Wherein, determining the cutting line position according to the scanning line method specifically includes: Determine whether the scanning line scanning mode is vertical scanning; If yes, then obtain the left edge of the macromodule; Sort the left side lines according to the positions of the left side lines to obtain a cutting line list; Traversing the cutting line list, storing the left line that meets the rules into the cutting line list, updating the cutting line list, and finally obtaining the cutting line and its position; If not, obtaining the lower edge of the macromodule; Sort the lower edge lines according to their positions to obtain a cutting line list; Traversing the cutting line list, storing the lower edge lines that meet the rules into the cutting line list, updating the cutting line list, and finally obtaining the cutting lines and their positions; The specific rules are: The currently traversed left line is recorded as the first left line, and the remaining left lines are recorded as the second left lines; the positional relationship between the first left line and the second left line is determined; If both ends of the second left sideline are located between the two ends of the first left sideline, then delete the second left sideline; If both ends of the second left line exceed the endpoints of the first left line and are at one end of the first left line, continue traversing the next left line; If both ends of the second left line exceed the endpoint of the first left line and are at both ends of the first left line, or only one end of the second left line exceeds the endpoint of the first left line, the exceeding portion is stored in the cutting line list as a new left line.
8. The scan line-based layout dead space area calculation system according to claim 6, characterized in that: The dead space area acquisition unit further includes: The dead space area is obtained according to the difference between the total occupied area and the total area of the macro module.
9. An electronic device, characterized in that: include: A memory having program code stored therein; A processor is connected to the memory, and when the program code is executed by the processor, the method according to any one of claims 1 to 8 is implemented.
10. A computer-readable storage medium, characterized in that: Program instructions are stored thereon, and when the program instructions are executed, the method according to any one of claims 1 to 8 is implemented.