Attribute manager optimization method of integrated circuit database
By dividing attributes into sparse and dense categories in the EDA software database and using appropriate data structures for management, the problem of attribute management performance bottlenecks in the existing technology is solved, and efficient attribute management of ultra-large-scale integrated circuit databases is achieved.
Patent Information
- Application Number
- CN202411645559.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2044-11-18
AI Technical Summary
When existing EDA software databases deal with hyperscale integrated circuit databases, there are performance bottlenecks in attribute management, especially in the case of huge data volume, the conflicts and persistence of hash tables lead to poor time performance.
By dividing attributes into sparse attributes and dense attributes, and using different data structures for storage and management, including the use of hash tables and arrays. Sparse attributes are stored using hash tables, dense attributes are stored using arrays, and property states are converted when necessary to optimize memory usage and runtime.
It significantly improves the access speed of element attributes, avoids multi-threaded data access conflicts, solves the problem of multi-threaded concurrency, and optimizes time performance and storage performance in hyper-large-scale databases.
Smart Images

Figure CN119538815A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic design automation (EDA), and in particular to a property manager optimization method for an integrated circuit database. Background Art
[0002] With the rapid development of the semiconductor industry, the characteristic size of chips is getting smaller and smaller, and the number of transistors embedded in chips is also growing exponentially. Correspondingly, the size of the database for EDA tools is also growing exponentially. For the elements in the netlist of the database of VLSI, such as wires and ports of unit instances, the number of elements is in the millions or even hundreds of millions. Therefore, adding an attribute to it will have a certain impact on the memory. Moreover, with the integration of various point tools (various software and hardware tools used to design and verify integrated circuits), the attributes will gradually accumulate until they have a greater impact on the memory. At the same time, due to the large scale, when accessing a certain attribute of a specific element, the amount of calculation required for the search is extremely large. Once the access operation is too frequent, the time performance becomes a bottleneck. As the database scale in the EDA field increases and the design process becomes more complex, the attribute management of the database needs to be refined. It is necessary to meet the functional requirements and reasonably configure a variety of basic data structures to achieve the best time performance and storage performance.
[0003] The prior art takes into account that EDA software involves different attribute requirements, and due to the huge scale of the database, customized management of attributes is required. However, the EDA software database uses a single management mode for attribute management, so there is still a performance bottleneck. Specifically, the attribute management used in the current EDA software database modeling generally uses a key-value pair container based on a hash table. When the amount of data is not large, the performance of such containers is acceptable, but once the data entries reach the tens of millions level, the possibility of conflict in the hash table increases, resulting in a bottleneck in the time performance of accessing the attributes; and due to too much data, the persistence process will take a long time. Therefore, for the management of attributes, how to ensure time performance while supporting ultra-large data volumes requires in-depth research. How to optimize the design of attribute management in the database of ultra-large-scale integrated circuits is a problem that has great value in improving the performance of the entire process. Summary of the invention
[0004] In order to address the defects of the prior art, the purpose of the present invention is to provide a method for optimizing the attribute manager of an integrated circuit database, solve the performance problems encountered in the attribute management of the database used in EDA design, and provide a user-friendly and performance-accelerated attribute manager optimization method, especially to optimize the attribute management design in the database of very large-scale integrated circuits, so that the performance of the entire process is significantly improved.
[0005] In order to achieve the above object, the present invention provides a method for optimizing an attribute manager of an integrated circuit database, comprising the following steps:
[0006] Read the EDA database into memory;
[0007] According to the definition of the attribute, register the attributes one by one and record them in a definition data structure; the definition data structure uses the attribute serial number as a key and the meta definition of the attribute as a value;
[0008] Create value data structures and arrays to store the values of sparse attributes and dense attributes respectively;
[0009] Access the attributes of database elements;
[0010] Before exiting the program, the database is persisted and the attribute values currently in the memory are saved.
[0011] Furthermore, it also includes:
[0012] According to the ratio of the number of database elements in the attribute scope to the total number of database elements, attributes are divided into sparse attributes and dense attributes;
[0013] The value of the sparse attribute is stored in the value data structure, and the combination of the element identifier and the attribute serial number is used as the key of the value data structure, and the attribute value is used as the value of the value data structure;
[0014] Store the values of dense attributes in the array.
[0015] Furthermore, the step of accessing the attributes of the database element further includes:
[0016] Get the value of an attribute by its name and database element;
[0017] Query whether the definition of the attribute is registered through the definition data structure, if yes, retrieve the definition of the attribute and confirm whether it is a sparse attribute or a dense attribute, otherwise return "attribute not defined";
[0018] For a sparse attribute, its key value is calculated according to the element identifier and the attribute index, and it is determined whether there is a corresponding key-value pair in the value data structure. If so, the key-value pair is returned from the value data structure to obtain the corresponding attribute value;
[0019] For dense attributes, find the array pointer of the dense attribute, find the attribute value in the corresponding dense attribute value array according to the element identifier, and return it.
[0020] Furthermore, the step of calculating the key value of the sparse attribute according to the element identifier and the attribute index further includes:
[0021] Get two 32-bit integer values from the element identifier and attribute index value respectively;
[0022] Using the DJB hash algorithm, starting from an initial hash value of 5381, the hash value is shifted left by 5 bits and the value of the element identifier is added to update the resulting value to the new hash value.
[0023] Shift the new hash value left by 5 bits and add the attribute index value to get the final Key value.
[0024] Further, it also includes: converting sparse attributes into dense attributes or converting dense attributes into sparse attributes;
[0025] The step of converting the sparse attribute into the dense attribute comprises: when setting the attribute value of an element, adding a record of the attribute value in the value data structure; adding 1 to the counter of the corresponding attribute; comparing the count value of the counter with the set upper threshold of the sparse attribute; if the count value of the counter exceeds the upper threshold, converting the sparse attribute into the dense attribute;
[0026] The step of converting the dense attribute into the sparse attribute includes: when resetting the attribute value of an element, modifying the corresponding record in the corresponding dense attribute array; reducing the counter of the corresponding attribute by 1; comparing the count value of the counter with the set lower limit threshold of the dense attribute; if the count value of the counter is lower than the lower limit threshold, converting the dense attribute into the sparse attribute.
[0027] Furthermore, the step of persisting the database and saving the attribute values currently in the memory before exiting the program further includes: persisting the attribute manager; in the process of persisting the attribute manager, serializing the metadata of the attribute manager itself, and then persisting the corresponding data structures and arrays respectively.
[0028] On the other hand, the present invention also provides an attribute manager of an integrated circuit database, which adopts the attribute manager optimization method of an integrated circuit database described in any one of claims 1-5.
[0029] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor is used to execute the computer program stored in the memory to implement the property manager optimization method of the integrated circuit database as described above.
[0030] On the other hand, the present invention also provides a computer-readable storage medium, in which a computer program is stored. The computer program is loaded and executed by a processor to implement the property manager optimization method of the integrated circuit database as described above.
[0031] Compared with the prior art, the integrated circuit database property manager optimization method provided by the present invention has the following advantages:
[0032] Beneficial effects:
[0033] By selecting different containers and using targeted data structures, the access speed to element attributes is greatly improved, and multi-threaded data access conflicts in most scenarios can be avoided, solving the problem of multi-threaded concurrency.
[0034] Other features and advantages of the present invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0036] Figure 1 A flow chart of a property manager optimization method for an integrated circuit database according to an embodiment of the present invention;
[0037] Figure 2 A schematic diagram of the structure of an attribute manager of an integrated circuit database according to an embodiment of the present invention;
[0038] Figure 3 A schematic diagram of a process of reading a database element according to an embodiment of the present invention;
[0039] Figure 4 A flow chart of a method for converting sparse attributes into dense attributes according to an embodiment of the present invention;
[0040] Figure 5A flow chart of a method for converting dense attributes into sparse attributes according to an embodiment of the present invention;
[0041] Figure 6 FIG. 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.
[0043] Embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present invention. It should be understood that the drawings and embodiments of the present invention are only for exemplary purposes and are not intended to limit the scope of protection of the present invention.
[0044] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0045] It should be noted that the modifications of "one" and "plurality" mentioned in the present invention are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more". "Plurality" should be understood as two or more.
[0046] In order to make the objectives, technical solutions and advantages of the present invention more clear, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0047] The present invention is directed to a design method for an attribute manager of a very large scale integrated circuit database, and provides an optimization method for an attribute manager of an integrated circuit database, the optimization method comprising the following steps: reading an EDA database into a memory; registering attributes one by one and recording them in a definition data structure according to the definition of the attributes; the definition data structure uses an attribute serial number as a key and a meta-definition of the attribute as a value; creating a value data structure and an array, which are respectively used to store the values of sparse attributes and dense attributes; accessing the attributes of database elements; and before exiting the program, making the database persistent and saving the attribute values currently in the memory.
[0048] Persistence is the process of saving data (such as objects in memory) to a permanent storage device (such as a disk).
[0049] Figure 1 This is a flow chart of a property manager optimization method for an integrated circuit database according to an embodiment of the present invention. Figure 2 FIG. 1 is a schematic diagram of the structure of the attribute manager of the integrated circuit database according to an embodiment of the present invention. Figure 1 and Figure 2 The specific embodiments of the present invention are described in detail.
[0050] In step 101, the EDA database is read into the memory.
[0051] In an embodiment of the present invention, first, the EDA tool will read its database into the memory; next, according to the needs of the tool, the definition of the attribute will be registered one by one; after the attribute is defined, there will be settings for the attributes of specific database elements in the optimization process, and there will also be frequent operations of reading attribute values; finally, when the program needs to exit, the database will be persistently written to the disk, and the attribute manager will also save the attribute values currently in the memory (store data information on the disk).
[0052] In step 102, the attribute is registered according to the definition of the attribute.
[0053] In the embodiment of the present invention, Figure 2 As shown, the attribute manager (AttrManager) maintains multiple data structures (Map, including DefinitionMap201 and ValueMap202) and arrays (Array). The registration of the attribute definition will be recorded in the definition data structure (DefinitionMap) 201. We use the attribute serial number as the key (Key) of this DefinitionMap201, which is a character or a group of characters used to uniquely identify a data item), and the meta definition of the attribute (the attribute definition is the original definition information, and the meta definition is the information that describes and explains the original definition information) as the value (Value) of DefinitionMap201. Each attribute will have a unique serial number to represent it, and this serial number has a mapping relationship with the name of the attribute. The application layer can quickly get the corresponding serial number through the name of the attribute.
[0054] According to the different density of the data elements on which the attribute acts, the embodiment of the present invention divides the attributes into two categories: sparse attributes and dense attributes. A more specific definition is that when the database elements in the attribute scope do not exceed 20% of the total, we consider it to be a sparse state, and thus it is classified as a sparse attribute; if it reaches 70% or more of the total database elements, it is a dense state, and thus it is classified as a dense attribute. For those in between, further refinement is made according to the use of upper-level applications and specific scenarios.
[0055] like Figure 2 As shown, if the value belongs to a sparse attribute, it is stored in a value data structure (ValueMap) 202. This ValueMap 202 needs to take into account factors such as security and performance in a multi-threaded scenario. A combination of an element identifier and an attribute sequence number is used as the Key of ValueMap 202, and the attribute value is used as the Value of ValueMap 202, thereby reducing conflicts and accurately locating the position of the sparse attribute value corresponding to ValueMap 202.
[0056] If it is a value of a dense attribute, it is stored in Figure 2 In Array 203. The dense attribute will create a corresponding attribute record for each database element of this type. If it has not been set, it will maintain an initial state. The rest will modify its value according to the state set for the specific element.
[0057] By dividing the attributes into sparse attributes and dense attributes according to their value setting status in the element, and designing containers suitable for managing them for the sparse and dense states respectively. Sparse attributes require less memory and have fast access speed; while dense attributes occupy more memory, but they have faster access speed and are easier to manage, which greatly improves the access speed of element attributes.
[0058] By selecting different containers and using the Map key (data structure key) algorithm in a targeted manner, multi-threaded data access conflicts in most scenarios are avoided and the problem of multi-threaded concurrency is solved.
[0059] In step 103, a specific database element is accessed.
[0060] In the embodiment of the present invention, accessing a specific database element is an operation that is repeatedly used in a large number of processes. The process of reading a specific attribute on a data element is as follows: Figure 3 As shown, further comprising:
[0061] In step 301, the value of the attribute is obtained through the name of the attribute and the database element.
[0062] In step 302, it is checked through DefinitionMap201 whether there is a registered definition of the corresponding attribute. If so, it goes to step 303, otherwise it returns "attribute is not defined".
[0063] In step 303, the definition of the attribute is retrieved and it is confirmed whether it is a sparse attribute or a dense attribute. For sparse attributes, the Key value (key value) in ValueMap202 is calculated according to the element identifier and the attribute index to determine whether there is a corresponding key-value pair (consisting of a unique key (Key) and an associated value (Value)). If there is, the key-value pair is returned from ValueMap202 to obtain the corresponding attribute value; for dense attributes, the array pointer of the dense attribute is found, and the attribute value is found in the corresponding dense attribute value array according to the element identifier and returned.
[0064] In an embodiment of the present invention, for sparse attributes, the Key value in ValueMap202 is calculated based on the element identifier and the attribute index, including: obtaining two 32-bit integer values from the element identifier and the attribute index value; using the DJB hash algorithm, that is, starting from an initial hash value of 5381, shifting the hash value left by 5 bits, and adding the value of the element identifier, the obtained value is updated to a new hash value; the new hash value is further shifted left by 5 bits and the attribute index value is added to obtain the final Key value. The above-mentioned Key value algorithm can further improve the access speed to element attributes due to its fast operation speed, easy implementation, and few hash conflicts, and can avoid multi-threaded data access conflicts in most scenarios, which is very suitable for the optimization of the attribute manager of the VLSI database.
[0065] In an embodiment of the present invention, the sparse or non-sparse state of an attribute value may be converted during the setting process, that is, as the number of operations for setting the attribute increases, the attribute may change from an originally sparse state to a dense state. On the contrary, if some operations for resetting the attribute value are performed, the state of the attribute may change from dense to sparse. For this scenario, the present invention provides a mechanism for converting sparse attributes and dense attributes to each other, so as to achieve performance optimization of memory usage and runtime.
[0066] Corresponding to the above step 303, for sparse attributes, the Key value is calculated according to the element identifier and the attribute index and the key-value pair is returned from ValueMap202, the value in ValueMap202 is modified, and the count is incremented according to the attribute index and the element type, and the count value is compared to see whether it exceeds the upper threshold of the set sparse attribute to determine whether to convert the sparse attribute to the dense attribute. For dense attributes, the corresponding address of the dense attribute in Array203 is obtained according to the element identifier and the attribute index, and the content in the address is modified. If the modification method is to reset the value of the dense attribute, the count is decremented, and the count value is compared to see whether it is lower than the lower threshold of the set dense attribute to determine whether to convert the dense attribute to the sparse attribute.
[0067] For example, Figure 4 Flowchart of a method for converting sparse attributes into dense attributes according to an embodiment of the present invention. Figure 4 As shown, the steps to convert sparse attributes into dense attributes are as follows:
[0068] In step 401, a certain attribute value of a certain element is set, and a record of the attribute value is added to ValueMap 202;
[0069] In step 402, the counter corresponding to the attribute is incremented by 1;
[0070] In step 403, the number of the counter is compared with the upper threshold of the sparse attribute;
[0071] In step 404, if the number of counters exceeds the upper threshold, the sparse attribute is converted into a dense attribute.
[0072] Figure 5 A flow chart of a method for converting dense attributes into sparse attributes according to an embodiment of the present invention is shown as follows: Figure 5 As shown, the steps to convert dense attributes into sparse attributes are as follows:
[0073] In step 501, a certain attribute value of an element is reset, and a corresponding record in the corresponding dense attribute array is modified;
[0074] In step 502, the counter corresponding to the attribute is reduced by 1;
[0075] In step 503, the number of the counter is compared with the lower threshold of the dense attribute;
[0076] At step 504, if the number of the counter is below the lower threshold, the dense attribute is converted into a sparse attribute.
[0077] In a concise way, it provides a mechanism for converting between the sparse and dense states of attributes, which can make better use of the characteristics of the container, maximize its strengths and minimize its weaknesses, and improve memory utilization.
[0078] Continue to refer Figure 1 and Figure 2 In step 104, before exiting the program, the attribute manager is persisted. In the process of persisting the attribute manager, the metadata of the attribute manager itself (data describing and explaining the original data information) is serialized, and then persisted for the corresponding Map and Array respectively.
[0079] The integrated circuit database attribute manager optimization method provided by the present invention supports the different requirements of various point tools in the EDA process for the attributes of elements in the database. Aiming at the scenario where the EDA database uses attributes, the attribute manager is designed, taking into account the basic characteristics of the integrated circuit database and the different data volumes of different attributes, integrating two completely different container management methods, namely linear arrays and hash key-value tables, and using different containers in a way that maximizes their strengths and minimizes their weaknesses; providing a mechanism for converting sparse attributes and dense attributes, under which the management of attributes can be improved to a better state for memory usage and runtime performance.
[0080] In an embodiment of the present invention, an electronic device is also provided. Figure 6 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 6 As shown, the electronic device of the present invention includes a processor 601 and a memory 602, wherein:
[0081] The memory 602 stores a computer program. When the computer program is read and executed by the processor 601, the computer program executes the steps in the embodiment of the integrated circuit database property manager optimization method as described above.
[0082] In an embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of the above-mentioned integrated circuit database property manager optimization method embodiment when running.
[0083] In this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0084] Those skilled in the art can understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions recorded in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for optimizing an attribute manager of an integrated circuit database, characterized in that: The following steps are involved: Read the EDA database into memory; According to the definition of the attribute, register the attributes one by one and record them in a definition data structure; the definition data structure uses the attribute serial number as a key and the meta definition of the attribute as a value; Create value data structures and arrays to store the values of sparse attributes and dense attributes respectively; Access the attributes of database elements; Before exiting the program, the database is persisted and the attribute values currently in the memory are saved.
2. The integrated circuit database property manager optimization method according to claim 1, characterized in that: Also includes: According to the ratio of the number of database elements in the attribute scope to the total number of database elements, attributes are divided into sparse attributes and dense attributes; The value of the sparse attribute is stored in the value data structure, and the combination of the element identifier and the attribute serial number is used as the key of the value data structure, and the attribute value is used as the value of the value data structure; Store the values of dense attributes in the array.
3. The integrated circuit database property manager optimization method according to claim 1, characterized in that: The step of accessing the attributes of the database element further comprises: Get the value of an attribute by its name and database element; Query whether the definition of the attribute is registered through the definition data structure, if yes, retrieve the definition of the attribute and confirm whether it is a sparse attribute or a dense attribute, otherwise return "attribute undefined"; For a sparse attribute, its key value is calculated according to the element identifier and the attribute index, and it is determined whether there is a corresponding key-value pair in the value data structure. If so, the key-value pair is returned from the value data structure to obtain the corresponding attribute value; For dense attributes, find the array pointer of the dense attribute, find the attribute value in the corresponding dense attribute value array according to the element identifier, and return it.
4. The integrated circuit database property manager optimization method according to claim 3, characterized in that: The step of calculating the key value of the sparse attribute according to the element identifier and the attribute index further includes: Get two 32-bit integer values from the element identifier and attribute index value respectively; Using the DJB hash algorithm, starting from an initial hash value of 5381, the hash value is shifted left by 5 bits and the value of the element identifier is added to update the resulting value to the new hash value. Shift the new hash value left by 5 bits and add the attribute index value to get the final Key value.
5. The integrated circuit database property manager optimization method according to claim 1, characterized in that: Also included: converting sparse attributes into dense attributes or converting dense attributes into sparse attributes; The step of converting the sparse attribute into the dense attribute comprises: when setting the attribute value of an element, adding a record of the attribute value in the value data structure; adding 1 to the counter of the corresponding attribute; comparing the count value of the counter with the set upper threshold of the sparse attribute; if the count value of the counter exceeds the upper threshold, converting the sparse attribute into the dense attribute; The step of converting the dense attribute into the sparse attribute includes: when resetting the attribute value of an element, modifying the corresponding record in the corresponding dense attribute array; reducing the counter of the corresponding attribute by 1; comparing the count value of the counter with the set lower limit threshold of the dense attribute; if the count value of the counter is lower than the lower limit threshold, converting the dense attribute into the sparse attribute.
6. The integrated circuit database property manager optimization method according to claim 1, characterized in that: The step of persisting the database and saving the attribute values currently in the memory before exiting the program further includes: persisting the attribute manager; in the process of persisting the attribute manager, serializing the metadata of the attribute manager itself, and then persisting the corresponding data structures and arrays respectively.
7. An attribute manager for an integrated circuit database, characterized in that: A property manager optimization method for an integrated circuit database according to any one of claims 1 to 6.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: The processor is used to execute the computer program stored in the memory to implement the integrated circuit database property manager optimization method described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which is loaded and executed by a processor to implement the property manager optimization method of an integrated circuit database as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Transaction data processing method and device based on block chain, equipment and storage medium
CN112148734A
Interconnection line management and design method in database modeling
CN117454833A
Attribute information storage method and device, terminal equipment and storage medium
CN118484405A
Persistent memory key value system and operation method therefor
WO2022095685A1