Multi-threaded splicing method, system, medium and device for memory netlist or layout

Through the multi-threaded splicing method, the Cell hierarchy structure is constructed concurrently using thread pools and temporary threads, which solves the problem of time-consuming and low efficiency of large-scale memory netlists or layout splicing in the existing technology, and achieves a fast and efficient memory design.

CN118709615BActive Publication Date: 2024-11-12SUZHOU KUANWEN ELECTRONICS SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411178797.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-11-12
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

Existing memory design tools are time-consuming and inefficient when dealing with large-scale memory netlists or layout splicing due to single-thread sequential execution.

Method used

Using multi-threaded splicing method, by dividing the hierarchical structures between cells into deep chimerization and surface association, using thread pools and temporary threads to concurrently build Cell hierarchical structures, reducing the number of hierarchies and improving concurrency, and generating a stitching completed layout or netlist .

Benefits of technology

It realizes the rapid completion of memory netlists or layout splicing, reduces the time-consuming and efficient process, and is suitable for memory design in large-scale scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118709615B_ABST
    Figure CN118709615B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of memory design technology, and discloses a multi-threaded splicing method, system, medium and device for a memory netlist or layout, including: dividing the inclusion relationship between cells into deep embedding and surface association according to the attribute characteristics of cells, excluding the layer where the sub-cell with only surface association is located in the hierarchical structure of cells when obtaining the hierarchical structure of cells, creating pointer routing to automatically synchronize the sub-cell content; when constructing a memory netlist or layout structure, executing the layer construction except the top-level cell through multi-threads in a thread pool, and constructing the sub-cell with only surface association through temporary threads. The present invention can quickly complete the splicing of memory netlists or layouts through multi-threading, thereby reducing time consumption and improving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of memory design, and in particular to a multi-threaded splicing method, system, medium and device for a memory netlist or layout. Background Art

[0002] Memory design is a professional field in the development process of integrated circuit chips. In order to enable the memory to be used in multiple chips, the memory is generally divided into multiple low-level units, represented by Cell, and then the cells are spliced ​​into a memory of a specified size according to certain splicing rules.

[0003] In the current memory design process, it is necessary to perform unit circuit splicing, layout splicing, and write TCL language logic rules. The memory netlist and layout automatic splicing tool can complete unit circuit splicing and layout splicing, and generate circuit netlists and layout files. However, in the language logic rules of the TCL file, since there is a hierarchical structure between cells, there is a child-parent connection relationship between cells in the hierarchy, that is, there are parent cells and child cells. The parent cell needs to use the internal elements of the child cell and depends on the child cell to be built first. This dependency relationship causes the memory netlist and layout automatic splicing tool to only be executed in a single thread in sequence. In scenarios where the circuit and layout are large in scale, there are a large number of cells that need to be spliced, which will cause the process of generating the memory netlist or layout splicing to be time-consuming and inefficient. Summary of the invention

[0004] To this end, the technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a multi-threaded splicing method, system, medium and device for a memory netlist or layout, which can quickly complete the splicing of the memory netlist or layout through multi-threading, thereby reducing time consumption and improving efficiency.

[0005] In order to solve the above technical problems, the present invention provides a multi-threaded splicing method of a memory netlist or layout, comprising:

[0006] Read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. The deep embedding needs to ensure that the corresponding child cell has been successfully built when the parent cell is built, and the surface association does not require the corresponding child cell to be successfully built when the parent cell is built;

[0007] When obtaining the hierarchical structure of a Cell, if the relationship between the parent Cell and the child Cell is only the above-mentioned superficial association, the layer where the child Cell is located is not included in the hierarchical structure of the Cell, and only a pointer from the parent Cell to the child Cell is created;

[0008] Multiple threads in the thread pool execute layer construction except the top-level Cell from the bottom layer according to the hierarchical structure of the Cell, wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell;

[0009] When multiple threads in the thread pool complete the construction of the layers except the top-level Cell, the main thread constructs the top-level Cell and generates a spliced ​​layout or netlist based on the top-level Cell.

[0010] Furthermore, if the relationship between the parent Cell and the child Cell is the surface association, when obtaining the hierarchical structure of the Cell, the parent Cell uses the name of the child Cell to add an instance without calling the internal elements of the child Cell.

[0011] Furthermore, the layer construction except the top layer Cell is performed layer by layer from the bottom layer, including:

[0012] Starting from the bottom layer, all cells of each layer are pushed into the task queue of the thread pool layer by layer, and a thread pool counter is set. The initial value of the thread pool counter is the number of cells in the current layer;

[0013] Cells are constructed by threads in the thread pool. Each time a Cell is constructed, the value of the thread pool counter is reduced by 1. When the value of the thread pool counter is 0, all cells in the current layer have been constructed.

[0014] Furthermore, when constructing the layers except the top layer Cell from the bottom layer,

[0015] Set a level counter, where the initial value of the level counter is the number of levels in the hierarchical structure of the Cell;

[0016] Until the value of the thread pool counter of the current thread pool is 0, the value of the level counter is reduced by 1, all cells of the previous layer are pushed into the task queue of the thread pool, and the value of the thread pool counter is reset to construct the previous layer.

[0017] Furthermore, when the value of the layer counter is 1 and the value of the thread pool counter is 0, it means that all layers of cells except the top layer cell have been constructed and return to the main thread.

[0018] Furthermore, when the thread execution layer corresponding to the layer where the parent Cell is located is constructed, a temporary thread is created and the construction of the child Cell is executed, and the corresponding pointer routing points to the constructed child Cell, specifically:

[0019] When the thread execution layer corresponding to the layer where the parent Cell is located is constructed, a temporary thread is created. The temporary thread constructs the actual content of the child Cell. The background startup process automatically synchronizes the content of the pointer routing to point to the actual result of constructing the child Cell.

[0020] Furthermore, while the content of the pointer route automatically synchronized by the background startup process points to the result of actually constructing the sub-Cell, the number of actual pointer routes that are successfully synchronized is recorded;

[0021] After all cells in all layers except the top-level cell have been constructed and returned to the main thread, the main thread compares the number of actual pointer routes that have been successfully synchronized with the number of pointer routes created. If the numbers are the same, it means that all pointer routes correctly point to the corresponding actual construction results of the sub-cells.

[0022] After all layers of cells except the top-level cell have been constructed and returned to the main thread, the main thread executes the construction of the top-level cell and generates a spliced ​​layout or netlist based on the top-level cell.

[0023] The present invention also provides a multi-threaded splicing system for a memory netlist or layout, comprising:

[0024] A memory structure acquisition module is used to read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. When the deep embedding is constructed for the parent cell, it is necessary to ensure that the corresponding child cell has been successfully constructed. When the surface association is constructed for the parent cell, it is not necessary that the corresponding child cell has been successfully constructed. When obtaining the hierarchical structure of the cell, if the relationship between the parent cell and the child cell is only the surface association, the layer where the child cell is located is not included in the hierarchical structure of the cell, and only a pointer from the parent cell to the child cell is created;

[0025] A memory structure splicing module includes a main thread, a thread pool and a temporary thread; multiple threads in the thread pool execute layer construction except the top-level Cell layer by layer from the bottom layer according to the hierarchical structure of the Cell, wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell; when multiple threads in the thread pool complete the construction of the layer except the top-level Cell, the main thread constructs the top-level Cell, and generates a spliced ​​layout or netlist according to the top-level Cell.

[0026] The present invention also provides a computer-readable storage medium, and when the computer program is executed by a processor, the multi-threaded splicing method of the memory netlist or layout is implemented.

[0027] The present invention also provides a multi-threaded splicing device for a memory netlist or layout, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the multi-threaded splicing method for the memory netlist or layout when executing the computer program.

[0028] The above technical solution of the present invention has the following beneficial effects compared with the prior art:

[0029] The present invention divides the inclusion relationship between Cells into deep embedding and surface association according to the attribute characteristics of Cell. When obtaining the hierarchical structure of Cell, the layer where the sub-Cell with only surface association is located is not included in the hierarchical structure of Cell, but a pointer route is created to automatically synchronize the content of the sub-Cell, thereby reducing the number of levels of Cell; and when constructing the memory netlist structure, the layer construction except the top-level Cell is executed by multi-threads in the thread pool, the layer construction of the layer where the sub-Cell with only surface association is located is performed by a temporary thread, and the top-level Cell is constructed by the main thread, thereby realizing the simultaneous construction of multiple threads, improving the concurrency by giving full play to the advantages of multi-threading, quickly completing the layout splicing or netlist splicing, generating a layout file or a netlist file, and solving the problems of long time consumption and low efficiency in large-scale Cell scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to make the content of the present invention more clearly understood, the present invention is further described in detail below according to specific embodiments of the present invention in conjunction with the accompanying drawings, wherein:

[0031] Figure 1 It is a flow chart of the method in the preferred embodiment of the present invention.

[0032] Figure 2 It is an example diagram of the hierarchical structure of all cells and cells of the memory obtained through the TCL file in the preferred embodiment of the present invention, in which the inclusion relationship between cells is only deeply embedded.

[0033] Figure 3 is based on Figure 2 An example diagram of the process of constructing the hierarchical structure of the Cell in the example.

[0034] Figure 4 It is an example diagram of the hierarchical structure of all cells and cells in the preferred embodiment of the present invention, wherein the inclusion relationship between cells includes deep embedding and surface association.

[0035] Figure 5 is based on Figure 4 An example diagram of the process of constructing the hierarchical structure of the Cell in the example. DETAILED DESCRIPTION

[0036] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention. Embodiment 1

[0037] Reference Figure 1 As shown, the present invention discloses a multi-threaded splicing method for a memory netlist or layout, comprising the following steps:

[0038] S1: Read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. When the deep embedding is constructed for the parent cell, it is necessary to ensure that the corresponding child cell has been successfully constructed. When the surface association is constructed for the parent cell, it is not necessary for the corresponding child cell to have been successfully constructed.

[0039] The memory file can be a TCL file. The TCL file is loaded and parsed by the software, and the file content is divided into two parts: the preprocessing part and the cell construction part. The preprocessing part sets the environment parameters, mainly setting the value of the global environment variables in the file. The cell construction part obtains the inclusion relationship between cells and the hierarchical structure of cells according to the attribute content recorded in each cell in the file.

[0040] According to the attribute content recorded in each cell in the file, the relationship between cells is divided into deep embedding and surface association. When the relationship between the parent cell and the child cell is deep embedding, since the parent cell needs to call the elements inside the child cell (the internal elements include various attributes and content), it must wait for the child cell to be built before the parent cell can start to build.

[0041] When obtaining the hierarchical structure of the Cell, if the relationship between the parent Cell and the child Cell is only the surface association, the layer where the child Cell is located is not included in the hierarchical structure of the Cell, and only a pointer from the parent Cell to the child Cell is created. When the relationship between the parent Cell and the child Cell is the surface association, when constructing the parent Cell, only the child Cell is instantiated without operating the elements and structures inside the child Cell. The parent Cell only uses the name of the child Cell to add the instance, and there is no need to call the internal elements of the child Cell. Therefore, only a pointer needs to be created in the parent Cell to point to the child Cell. The parent Cell creates a pointer route pointing to the child Cell where the child Cell name needs to be called. The background startup process automatically synchronizes the content of the child Cell's final construction with the pointer route. From the meaning of the surface association, it can be known that the child Cell can be constructed at the same time as the parent Cell under the surface association. When constructing the parent Cell, since the parent Cell does not know whether the child Cell has been constructed, a pointer route is first created to replace the child Cell to reference the parent Cell to ensure that the construction of the parent Cell can proceed normally.

[0042] Create a pointer from the parent Cell to the child Cell, that is, create a pointer route to automatically synchronize the child Cell content, and then fill the actually created content into the level where the child Cell associated with the actual surface is located, that is, while reducing the actual number of layers, the level construction of the surface-associated child Cell is realized through the pointer.

[0043] like Figure 2 The following is an example diagram of the hierarchical structure of all cells and cells of the memory obtained through the TCL file, including 7 cells and a three-layer structure. The top-level Cell and Cell1, Cell2, Cell3, Cell2 and Cell4, Cell5, and Cell3 and Cell6 are deeply embedded.

[0044] like Figure 4 The figure shows another example of the hierarchical structure of all cells and cells in the memory obtained through the TCL file, including 7 cells, the top-level Cell and Cell1, Cell2, Cell2, Cell3, Cell4 are deeply embedded; Cell3 and Cell5, Cell4 and Cell6 are surface associated. The actual hierarchical structure of cells is a four-layer structure. In this example, the fourth layer only has the surface association, so the fourth layer is not included in the hierarchical structure of cells.

[0045] S2: Multiple threads in the thread pool execute layer construction except the top-level Cell from the bottom layer according to the hierarchical structure of the Cell. Wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell.

[0046] When the multi-threaded execution layer in the thread pool is constructed, all cells are pushed into the task queue of the thread pool, and the thread pool counter is set. The initial value of the thread pool counter is the number of cells in the current layer. Each time a cell is constructed, the value of the thread pool counter is reduced by 1. When the value of the thread pool counter is 0, it means that all cells in the current layer have been constructed. The function of the thread pool counter is to ensure that the construction of the cells in the previous layer is started only after the construction of each layer of cells is completed. Set a level counter, and the initial value of the level counter is the number of layers in the hierarchical structure of the cells, that is, the number of all layers in the hierarchical structure that do not contain layers that are only superficially related. Until the value of the thread pool counter of the current thread pool is 0, that is, after all the cells in one layer have been constructed, the value of the level counter is reduced by 1, all cells in the previous layer are pushed into the task queue of the thread pool, and the value of the thread pool counter is reset to construct the previous layer.

[0047] When the thread corresponding to the layer where the parent Cell is located is executing the layer construction, a temporary thread is created. The temporary thread builds the actual content of the child Cell, and the background startup process automatically synchronizes the content of the pointer route to point to the actual result of building the child Cell. The process of building the actual content of the child Cell is carried out simultaneously with the construction of the parent Cell. After the child Cell is actually built, the background startup process synchronizes the construction result of the child Cell with the pointer route, so that the specific content of the child Cell can be found through the pointer route called in the parent Cell. Figure 4 For example, Cell5 and Cell6 in the fourth layer can be understood as two empty shell cells with pointer routing inside to ensure the normal construction of Cell3 and Cell4. Cell5 and Cell6 drawn by dotted lines in the third layer are their actual execution results. These results are synchronized to the fourth layer by pointer routing, which is equivalent to filling the actual execution results into Cell5 and Cell6 in the fourth layer.

[0048] The temporary thread is used to construct the sub-Cell associated with the surface. The temporary thread is destroyed after constructing the actual content of the sub-Cell. Figure 4For example, the construction of Cell5 and Cell6 is carried out simultaneously with Cell3 and Cell4 of the third layer. The construction of Cell5 and Cell6 is executed by their own temporary threads, and there is no need to use threads in the thread pool. The initial value of the thread pool counter of the third layer is 2 (i.e., two cells, Cell3 and Cell4). In other words, the thread pool does not need to wait for the construction of Cell5 and Cell6 to be completed. As long as the construction of Cell3 and Cell4 of the third layer is completed, the construction of the second layer can continue. The temporary threads of Cell5 and Cell6 are destroyed after completing their tasks.

[0049] Using pointer routing for synchronization can reduce the number of Cell levels as much as possible in large-scale scenarios. The actual execution process of the lower-level Cell is placed in the upper level, giving full play to the advantages of multi-threading, improving concurrency and reducing execution time.

[0050] S3: When multiple threads in the thread pool complete the construction of the layers except the top-level Cell, the main thread constructs the top-level Cell and generates a spliced ​​layout or netlist based on the top-level Cell.

[0051] When the process is started in the background to automatically synchronize the content of the pointer route to point to the actual result of constructing the sub-Cell, the number of actual pointer routes that are successfully synchronized is recorded. When the value of the layer counter is 1 and the value of the thread pool counter is 0, it means that all cells of all layers except the top-level Cell have been constructed and return to the main thread. The main thread compares the number of actual pointer routes that are successfully synchronized with the number of pointer routes created. If the number is the same, it means that all pointer routes correctly point to the corresponding results of actually constructing the sub-Cell, that is, all cells constructed by temporary threads are successfully synchronized to the corresponding pointer routes. Before constructing the top-level Cell, it is necessary to ensure that all other Cells are constructed, and it is also necessary to ensure that all pointer routes correctly point to the corresponding results of actually constructing the sub-Cell; by comparing the number of actual pointer routes that are successfully synchronized with the number of pointer routes created, this verification process is added to ensure that all pointer routes correctly point to the corresponding results of actually constructing the sub-Cell. If the actual number of pointer routes that are successfully synchronized is consistent with the number of pointer routes created, it means that all pointer routes are correctly synchronized to the corresponding Cell; if the actual number of pointer routes that are successfully synchronized is inconsistent with the number of pointer routes created, it means that a child Cell has been built, but the pointer route in the corresponding parent Cell has not been synchronized to this child Cell, resulting in missing content, which may cause errors in the construction process. The erroneous pointer route can be found through this verification process.

[0052] The main thread executes to build the top-level Cell and generates a spliced ​​layout or netlist based on the top-level Cell. When the memory file obtained in S1 is a layout structure, this embodiment implements layout splicing and outputs a layout file based on the spliced ​​layout; when the memory file obtained in S1 is a netlist structure, this embodiment implements netlist splicing and outputs a netlist based on the spliced ​​netlist. The final output layout file or netlist file can be a lef file, a gds file, etc.

[0053] Figure 3 is based on Figure 2 The corresponding Cell hierarchy is constructed layer by layer. Starting from the third layer, the main thread maintains a level counter that records the level number. The initial value is 3, indicating that the Cell level to be constructed is the third layer; the construction tasks of all Cells in the third layer are pushed into the task queue of the thread pool and assigned to all current threads of the thread pool for processing. A thread pool counter is maintained in the thread pool. Whenever a task is submitted to the thread pool, the thread pool counter value is increased by 1; whenever a thread completes a task (i.e., a Cell is constructed), the thread pool counter value is reduced by 1. When the thread pool has completed the construction of all the third-layer Cells, the thread pool counter value is reset to zero, and the level counter value is 2, indicating that the next Cell level to be put into the thread pool is the second layer; when the thread pool counter is reset to zero and the level counter value is 1, it means that all Cells except the top-level Cell have been constructed, and the main thread is returned to construct the top-level Cell. After the top-level Cell is constructed, a spliced ​​layout or netlist is generated based on the top-level Cell.

[0054] Figure 5 is based on Figure 4 The diagram shows an example of the process of executing and building the hierarchical structure of the corresponding Cell layer by layer. There is a surface association between Cell3 and Cell5, and a surface association between Cell4 and Cell6. The number of pointer routes that need to be created is 2, namely, the pointer route from Cell3 to Cell5 and the pointer route from Cell4 to Cell6. For the case of surface association, the actual construction process of Cell5 and Cell6 on the fourth layer is carried out at the same time as Cell3 and Cell4 on the third layer, and is executed by a temporary thread. This is equivalent to not needing to build the Cell on the fourth layer in this case, and the actual Cell level executed becomes three layers, thereby reducing the number of levels, and the thread concurrency of building the Cell is higher and more efficient. Under the same conditions, the fewer the number of Cell levels, the more time is saved. Therefore, using pointer routing technology for surface-associated Cells can reduce program execution time.

[0055] like Figure 5As shown, first set the level counter value to 3, then start pushing the third-level Cell into the thread pool task queue to wait for multi-threaded execution. Cell3 and Cell4 need to be superficially associated with Cell5 and Cell6, and only create pointer routes pointing to Cell5 and Cell6. While the threads in the thread pool execute the third-level construction, create temporary threads to build Cell5 and Cell6, and the pointer routes point to the constructed Cell5 and Cell6. The temporary threads are automatically released after execution, and the background starts the process to automatically synchronize the pointer route content with Cell5 and Cell6 in the memory. After the pointer route content is successfully synchronized, the actual number of pointer routes is recorded as 2. After Cell3 and Cell4 are built, the thread pool counter returns to zero, and the level counter value decreases by 1. At this time, the second-level Cell is pushed into the thread pool task queue. After the second-level Cell is built, return to the main thread, and first compare the number of created pointer routes with the actual number of pointer routes. If they are consistent, it means that all superficially associated Cells are successfully built and successfully synchronized to the corresponding pointer routes. The main thread continues to build the top-level Cell. After the top-level Cell is built, a spliced ​​layout or netlist is generated based on the top-level Cell. Embodiment 2

[0056] The present invention also discloses a multi-threaded splicing system for a memory netlist or layout, comprising:

[0057] A memory structure acquisition module is used to read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. When the deep embedding is constructed for the parent cell, it is necessary to ensure that the corresponding child cell has been successfully constructed. When the surface association is constructed for the parent cell, it is not necessary that the corresponding child cell has been successfully constructed. When obtaining the hierarchical structure of the cell, if the relationship between the parent cell and the child cell is only the surface association, the layer where the child cell is located is not included in the hierarchical structure of the cell, and only a pointer from the parent cell to the child cell is created;

[0058] A memory structure splicing module includes a main thread, a thread pool and a temporary thread; multiple threads in the thread pool execute layer construction except the top-level Cell layer by layer from the bottom layer according to the hierarchical structure of the Cell, wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell; when multiple threads in the thread pool complete the construction of the layer except the top-level Cell, the main thread constructs the top-level Cell, and generates a spliced ​​layout or netlist according to the top-level Cell. Embodiment 3

[0059] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the multi-threaded splicing method of the memory netlist or layout in the first embodiment is implemented. Embodiment 4

[0060] The present invention also discloses a multi-threaded splicing device for a memory netlist or layout, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the multi-threaded splicing method for the memory netlist or layout in the first embodiment is implemented.

[0061] The present invention divides the inclusion relationship between Cells into deep embedding and surface association according to the attribute characteristics of Cell. When obtaining the hierarchical structure of Cell, the layer where the sub-Cell with only surface association is located is not included in the hierarchical structure of Cell, but a pointer route is created to automatically synchronize the content of the sub-Cell, thereby reducing the number of levels of Cell; and when constructing the memory netlist structure, the layer construction except the top-level Cell is executed by multi-threads in the thread pool, the layer construction of the layer where the sub-Cell with only surface association is located is performed by a temporary thread, and the top-level Cell is constructed by the main thread, thereby realizing the simultaneous construction of multiple threads, improving the concurrency by giving full play to the advantages of multi-threading, quickly completing the layout splicing or netlist splicing, generating a layout file or a netlist file, and solving the problems of long time consumption and low efficiency in large-scale Cell scenarios.

[0062] The present invention adopts hierarchical decoupling, unit preprocessing and multi-threaded concurrency technology to improve the running speed of memory netlist and layout splicing, shorten the memory design cycle, reduce development costs, and improve overall design efficiency to meet the needs of large-scale and ultra-large-scale scenarios.

[0063] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0064] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0065] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0066] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0067] Obviously, the above embodiments are merely examples for clear explanation and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived from these are still within the protection scope of the invention.

Claims

1. A multi-threaded splicing method for a memory netlist or layout, characterized in that: include: Read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. The deep embedding needs to ensure that the corresponding child cell has been successfully built when the parent cell is built, and the surface association does not require the corresponding child cell to be successfully built when the parent cell is built; When obtaining the hierarchical structure of a Cell, if the relationship between the parent Cell and the child Cell is only the above-mentioned superficial association, the layer where the child Cell is located is not included in the hierarchical structure of the Cell, and only a pointer from the parent Cell to the child Cell is created; The multiple threads in the thread pool execute layer construction except the top-level Cell layer by layer from the bottom layer according to the hierarchical structure of the Cell, wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell; and the layer construction except the top-level Cell is executed layer by layer from the bottom layer, including: starting from the bottom layer, all the Cells of each layer are pushed into the task queue of the thread pool layer by layer, and the thread pool counter is set, and the initial value of the thread pool counter is the number of cells in the current layer. The number of cells; the cells are constructed by the threads in the thread pool, and the value of the thread pool counter is reduced by 1 each time a cell is constructed; when the value of the thread pool counter is 0, all cells in the current layer are constructed; when the layer construction except the top layer cell is executed layer by layer from the bottom layer, a layer counter is set, and the initial value of the layer counter is the number of layers in the cell hierarchy; until the value of the thread pool counter of the current thread pool is 0, the value of the layer counter is reduced by 1, all cells in the previous layer are pushed into the task queue of the thread pool, and the value of the thread pool counter is reset to construct the previous layer; When multiple threads in the thread pool complete the construction of the layers except the top-level Cell, the main thread constructs the top-level Cell and generates a spliced ​​layout or netlist based on the top-level Cell.

2. The multi-threaded splicing method of a memory netlist or layout according to claim 1, characterized in that: If the relationship between the parent Cell and the child Cell is the surface association, when obtaining the hierarchical structure of the Cell, the parent Cell uses the name of the child Cell to add an instance without calling the internal elements of the child Cell.

3. The multi-threaded splicing method of a memory netlist or layout according to claim 1, characterized in that: When the value of the layer counter is 1 and the value of the thread pool counter is 0, it means that all layers of cells except the top layer cell have been constructed and return to the main thread.

4. The multi-threaded splicing method of a memory netlist or layout according to claim 3, characterized in that: When the thread execution layer corresponding to the layer where the parent Cell is located is constructed, a temporary thread is created and the construction of the child Cell is executed. The corresponding pointer routing points to the constructed child Cell, specifically: When the thread execution layer corresponding to the layer where the parent Cell is located is constructed, a temporary thread is created. The temporary thread constructs the actual content of the child Cell. The background startup process automatically synchronizes the content of the pointer routing to point to the actual result of constructing the child Cell.

5. The multi-threaded splicing method of a memory netlist or layout according to claim 4, characterized in that: When the background startup process automatically synchronizes the content of the pointer route to point to the result of actually building the sub-Cell, the number of actual pointer routes that are successfully synchronized is recorded; After all cells in all layers except the top-level cell have been constructed and returned to the main thread, the main thread compares the number of actual pointer routes that have been successfully synchronized with the number of pointer routes created. If the numbers are the same, it means that all pointer routes correctly point to the corresponding actual construction results of the sub-cells. After all cells of all layers except the top-level cell have been constructed and returned to the main thread, the main thread executes the construction of the top-level cell and generates a spliced ​​layout or netlist based on the top-level cell.

6. A multi-threaded splicing system for a memory netlist or layout, characterized in that: include: A memory structure acquisition module is used to read the memory file to obtain the hierarchical structure of all cells and cells in the memory, and divide the relationship between the parent cell and the child cell into deep embedding and surface association. When the deep embedding is constructed for the parent cell, it is necessary to ensure that the corresponding child cell has been successfully constructed. When the surface association is constructed for the parent cell, it is not necessary that the corresponding child cell has been successfully constructed. When obtaining the hierarchical structure of the cell, if the relationship between the parent cell and the child cell is only the surface association, the layer where the child cell is located is not included in the hierarchical structure of the cell, and only a pointer from the parent cell to the child cell is created; The memory structure splicing module includes a main thread, a thread pool and a temporary thread; multiple threads in the thread pool execute layer construction except the top-level Cell from the bottom layer according to the hierarchical structure of the Cell, wherein: when the relationship between the parent Cell and the child Cell is the surface association, a temporary thread is created and the child Cell is constructed when the thread corresponding to the layer where the parent Cell is located executes the layer construction, and the corresponding pointer routing points to the constructed child Cell; when multiple threads in the thread pool complete the construction of the layer except the top-level Cell, the main thread constructs the top-level Cell, and generates a spliced ​​layout or netlist according to the top-level Cell; and the layer construction except the top-level Cell is executed layer by layer from the bottom layer, including: starting from the bottom layer, all C Cell is pushed into the task queue of the thread pool, and a thread pool counter is set, wherein the initial value of the thread pool counter is the number of cells in the current layer; the threads in the thread pool construct cells, and the value of the thread pool counter is reduced by 1 each time a cell is constructed; when the value of the thread pool counter is 0, all cells in the current layer are constructed; when the layer construction except the top-level cell is executed layer by layer from the bottom layer, a level counter is set, wherein the initial value of the level counter is the number of layers in the hierarchical structure of the cell; until the value of the thread pool counter of the current thread pool is 0, the value of the level counter is reduced by 1, all cells of the previous layer are pushed into the task queue of the thread pool, and the value of the thread pool counter is reset to construct the previous layer.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the multi-threaded splicing method of the memory netlist or layout as described in any one of claims 1 to 5 is implemented.

8. A multi-threaded splicing device for a memory netlist or layout, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the multi-threaded splicing method of the memory netlist or layout as described in any one of claims 1 to 5 is implemented.