CN118193543B - Method for searching node tree based on EDA, electronic equipment and storage medium - Google Patents

Method for searching node tree based on EDA, electronic equipment and storage medium Download PDF

Info

Publication number
CN118193543B
CN118193543B CN202410599997.0A CN202410599997A CN118193543B CN 118193543 B CN118193543 B CN 118193543B CN 202410599997 A CN202410599997 A CN 202410599997A CN 118193543 B CN118193543 B CN 118193543B
Authority
CN
China
Prior art keywords
tree
index
node
name
single character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410599997.0A
Other languages
Chinese (zh)
Other versions
CN118193543A (en
Inventor
沈凯
冯通
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Rongjian Software Technology Co ltd
Shanghai Hejian Industrial Software Group Co Ltd
Original Assignee
Chengdu Rongjian Software Technology Co ltd
Shanghai Hejian Industrial Software Group Co Ltd
Filing date
Publication date
Application filed by Chengdu Rongjian Software Technology Co ltd, Shanghai Hejian Industrial Software Group Co Ltd filed Critical Chengdu Rongjian Software Technology Co ltd
Priority to CN202410599997.0A priority Critical patent/CN118193543B/en
Publication of CN118193543A publication Critical patent/CN118193543A/en
Application granted granted Critical
Publication of CN118193543B publication Critical patent/CN118193543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention relates to the technical field of EDA (electronic design automation), in particular to a node tree searching method, electronic equipment and a storage medium based on EDA, which are used for acquiring an element name and an index address of each element node of a node tree species by acquiring the node tree and the index tree associated with the node tree, wherein each index node in the index tree is bound with a single character and index addresses of all element names taking the current single character as an ending character in the node tree, and acquiring the index addresses of all element names taking the ending character of the appointed element name as the ending in the node tree by searching the element names appointed by a user in the index tree so as to acquire a target element name. Compared with a mode of directly searching the node tree, the searching efficiency is greatly improved.

Description

Method for searching node tree based on EDA, electronic equipment and storage medium
Technical Field
The present invention relates to the field of EDA technologies, and in particular, to a method for searching a node tree based on EDA, an electronic device, and a storage medium.
Background
Most of the existing EDA software displays data by adopting a node tree structure, and the node tree structure can well display the hierarchical relationship among the data. The Node tree structure is a data structure which simulates the tree form in the natural world and is formed by organizing a series of nodes according to a specific relation. In a node tree, each node may contain several child nodes, but each child node has only one parent node, except the root node of the tree, which is the starting point of the entire tree, with no parent node. In a node tree, nodes form a hierarchical relationship through branch connection, and can be depicted as a structure extending downwards from a root node to leaf nodes. There are typically hundreds of thousands or more nodes in a node tree structure in a chip design. The EDA tool provides a lookup function to facilitate a user in locating a target node.
Current searches for node trees typically rely on tree traversal algorithms, such as depth-first traversal or breadth-first traversal algorithms. The tree traversal algorithm generally needs to sequentially traverse each node in the node tree from top to bottom when searching for a node. However, in the chip design, the tree structure generally has a huge number of nodes, and the nodes still need to be searched according to the conventional tree traversal algorithm, so that huge time cost is required to be consumed. Therefore, a method capable of quickly searching for nodes is needed.
Disclosure of Invention
Aiming at the technical problems, the invention adopts the following technical scheme: a method of searching a node tree based on EDA, the method comprising the steps of:
S100, obtaining M node trees, wherein the mth node Tree comprises N element nodes, the element name in the design of the ith element node binding chip and the index address of the current element node, the value range of i is 1 to N, and the value range of M is 1 to M.
S300, obtaining an index Tree of a Tree, wherein the index Tree comprises index nodes of R single characters, and an R index node innode r is bound with an R single character ch r and a candidate index address set endaddr r of all element names taking ch r as ending characters in the Tree; wherein ch r is a single character in the element name of Tree, and the value range of R is 1 to R.
S500, searching an index tree according to the last single character ch q of the element name 0 designated by the user, and acquiring an index node innode q of ch q, wherein the value range of q is 1 to R; wherein innode q binds ch q to index address set endaddr q for all element names in Tree ending with ch q.
S700, extracting innode q the index address set endaddr q.
S900, searching Tree according to each index address in endaddr q to obtain the target element name.
The present invention also provides a non-transitory computer readable storage medium having stored therein at least one instruction or at least one program loaded and executed by a processor to implement the above-described method.
Furthermore, the invention also provides an electronic device comprising a processor and the non-transitory computer readable storage medium.
The invention has at least the following beneficial effects:
The invention provides a node tree searching method, electronic equipment and storage medium based on EDA, which are used for searching element names appointed by a user in an index tree to obtain index addresses of all element names ending with ending characters of the appointed element names in the node tree so as to obtain target element names. Compared with a mode of directly searching the node tree, the searching efficiency is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for searching a node tree based on EDA according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an index tree according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Referring to fig. 1, there is shown a flowchart of a method for searching a node tree based on EDA, the method comprising the steps of:
S100, obtaining M node trees, wherein the mth node Tree comprises N element nodes, the element name in the design of the ith element node binding chip and the index address of the current element node, the value range of i is 1 to N, and the value range of M is 1 to M.
Optionally, the element name is one or more of a top-level module name, a function module name, a component name, a network name, or a pin name in the chip design. In the prior art, other element names fall within the protection scope of the invention.
Wherein a node tree is a data structure that constitutes a hierarchy between all element names in a chip design. The node tree includes a root node, child nodes, and leaf nodes, each node in the node tree having its own name and index address. Both the child node and the leaf node have only one parent node, and the root node has no parent node. It should be noted that, no matter whether the element node is a root node, or a child node of the child node, or a leaf node, that is, no matter which layer of the tree the element node is located, each element node binds an element name and an index address. An element node has its own element name, and a plurality of child nodes of the element node also have respective element names, and there is no dependency between the element names.
Wherein each node in the node tree binds the index address of the current node to support efficient navigation and operation in the tree structure.
S300, obtaining an index Tree of the Tree, wherein the index Tree comprises index nodes of R single characters, and an R index node innode r is bound with an R single character ch r and a candidate index address set endaddr r of all element names taking ch r as ending characters in the Tree. Wherein ch r is a single character in the element name of Tree, and the value range of R is 1 to R.
Specifically ,endaddrr={endaddrr,1,endaddrr,2,…,endaddrr,t,…,endaddrr,T},endaddrr,t is a candidate index address of the T-th element name of the Tree with ch r as an ending character, the value range of T is 1 to T, and T is the number of element names of the ch r as the ending character.
Note that, each candidate index address in endaddr r points to the index address of the element node where the element name using ch r as the end character is located in Tree. In the hierarchy in the Tree, element names ending with the same single character may be bound to different element nodes at different levels of the Tree. However, for each index node, all index nodes in the Tree are equal, the hierarchical structure in the Tree is not distinguished, the index address bound by each index node is directly bound to the index node no matter in the layer of the Tree, the corresponding element name is directly obtained through the index address, and the Tree does not need to be recursively traversed from the root node.
Wherein, R single characters are different single characters included in the element names of Tree, each single character corresponds to an index node. That is, all element names of the Tree are broken down into different single characters, and the number of single characters is limited, so that R single characters are included in all element names of the Tree. For example, when an element name is defined as a combination of english characters, then the number of single characters is equal to 26 uppercase letters plus 26 lowercase letters. When the element name is defined as a combination of english characters plus special symbols, then the number of single characters is equal to 52 lower case english letters plus the number of specified special symbols.
It should be noted that, there are a plurality of element names ending with each single character, for example, when one element name is pkGaa and the other element name is acvba, both of the element names belong to candidate index addresses of two element names, pkGaa and acvba, which are included in the index node including the single character a as the ending character.
As a preferred embodiment, innode r in S300 is also bound: jump address set inaddr r for the inode of the next unicode of ch r in all element names in the Tree. Specifically ,inaddrr={inaddrr,1,inaddrr,2,…,inaddrr,d,…,inaddrr,D},inaddrr,d is the jump address of the index node of the next single character of ch r in the D-th element name of Tree, the value range of D is 1 to D, and D is the number of the next single characters of ch r in the element name of Tree. Note that the next single character of ch r may be the same or different in different element names. For example, when the element names are acvb, ADcd, and dtcd, respectively, at this time, for the single character c, the next single character of c is v and d, respectively; wherein, the next character of c in the element name acvb is v, which is different from the next single character of the other two element names; the next single character of c in ADcd and dtcd is d.
S500, searching an index tree according to the last single character ch q of the element name 0 designated by the user, and acquiring an index node innode q of ch q, wherein the value range of q is 1 to R. Wherein innode q binds ch q to index address set endaddr q for all element names in Tree ending with ch q.
S700, extracting innode q the index address set endaddr q.
S900, searching Tree according to each index address in endaddr q to obtain the target element name.
It should be noted that, the index Tree provides index nodes classified by each single character, and each index node binds index addresses of all element names in Tree by using the current single character as an end character. When searching the index tree according to the element name 0 specified by the user, index addresses of all element names using the last single character of the name 0 as an end character can be obtained, and at this time, it is not known which element name in the index addresses is the target element name, so that text matching needs to be performed on the element names in all the index addresses according to the name 0, and the matching is successful. Compared with the prior art, the complexity of recursive traversal searching from the root node is greatly reduced, and the searching efficiency is greatly improved.
As a preferred embodiment, the method further comprises: s400, searching the index tree according to each single character in the name 0 in turn, when the jth single character ch j in the name 0 searches the p-th index node innode p in the index tree and p is not equal to q, The innode p binds the p-th single character ch p to the jump address set inaddr p of the inode of the next single character of ch p in all element names of Tree, and searching inaddr p according to the j+1st single character in the name 0 to obtain the jump address of the next index node. the method can enable each time when searching for the element name 0 appointed by the user, according to the combination sequence of single characters in the name 0, traversing the index tree from front to back in sequence to find out whether the next single character of the name 0 exists in the index tree, If the index Tree does not have the next single character of name 0, it indicates that the Tree does not have such an element name, and the traversal is terminated. if related element names are directly searched through the ending character of name 0, a large number of element names meeting the conditions may be obtained, which may result in a large amount of cache space and calculation time being consumed to match name 0 with the searched large number of element names. The element names are generally short, so that the number of hops for searching the next index node in the index tree is small, and the element names are searched and positioned by combining the mode of searching the next index node and the mode of searching and extracting the index node binding index address set of the last single character of name 0, so that compared with the mode of directly searching the related element names, the searching efficiency is greatly improved. The method has the advantages that the node searching time of almost constant magnitude is exchanged with less space consumption, the searching speed is accelerated, and the corresponding time is shortened.
As a preferred embodiment, S400 further includes: when the 1 st single character ch 1 in name 0 does not find the inode of binding ch 1 in the index tree, the query fails.
As a preferred embodiment, S400 further includes: when the jth single character ch j in the name 0 finds the p-th index node innode p in the index Tree and p is not equal to q, innode p binds the p-th single character ch p and the jump address set inaddr p of the index node of the next single character of ch p in all element names of the Tree, inaddr p is found according to the j+1th single character in the name 0, and the jump address of the next index node of the j+1th single character is not found in inaddr p, so that the query fails.
Optionally, the query failure returns a flag bit of the query failure, where the flag bit is used to trigger a preset action for visually displaying the query failure. Optionally, the preset action is to display inquiry failure prompt information or highlight a search bar. Other preset actions and other zone bits in the prior art all fall within the protection scope of the invention.
In the prior art, other methods for searching for the next single character of the name 0 fall within the scope of the present invention.
As a preferred embodiment, S900 further includes:
S910, searching Tree according to each index address in endaddr q to obtain a binary group set formed by the candidate element node and the candidate element name.
And S1000, matching the name 0 with all element names in the binary group, wherein the candidate element names successfully matched are the searched target element names.
In the prior art, other methods for matching the target element names fall within the protection scope of the present invention.
Referring to fig. 2, a schematic structure of an index tree is shown, in which three index nodes are exemplified as three index nodes, innode 1、innode2 and innode 3 respectively. Wherein, the single character bound by innode 1 is a, the single character bound by the candidate index address set endaddr 1 of all element names taking a as the end character in the Tree and the jump address set inaddr1,endaddr1={endaddr1,1,endaddr1,2},inaddr1={inaddr1,1}.innode2 of the index node of the next single character of a in all element names of the Tree is b, The single character bound by the candidate index address set endaddr 2 for all element names with b as the end character in the Tree and the skip address set inaddr2,endaddr2={endaddr2,1,endaddr2,2},inaddr2={inaddr2,1,inaddr2,2}.Innode3 for the inode of the next single character of b in all element names of the Tree is c, the candidate index address set endaddr 3 for all element names with c as the end character in the Tree and the skip address set inaddr 3,endaddr3={endaddr3,1},inaddr2={inaddr3,1 for the inode of the next single character of c in all element names of the Tree. Wherein inaddr 1,1 is innode 2, inaddr 2,1 is innode 1, inaddr 2,2 is innode 3 and endaddr 3,1 is innode 1. each address in endaddr 1、endaddr2 and endaddr 3 points to an element node in the Tree, respectively, which binds the element name ending with the corresponding single character. If the user specifies that the searched element name is abc, searching the index tree according to the first single character in the element name to obtain innode 1, searching the inaddr 1 of innode 1 according to the second single character b of the element name to obtain innode 2, jump to innode 2; at innode 2, the address of innode 3 is found in inaddr 2 of innode 2 based on the third single character c of the element name, Jump to innode 3; At innode 3, extracting endaddr 3 of innode 3 gives endaddr 3,1; Obtaining an element name abc 'in the Tree according to endaddr 3,1, and matching the abc with the abc', wherein if the matching is successful, the searching is successful; otherwise, the search fails. If the user designates the searched element name as abcd, at innode 3, the jump address of the next index node can not be obtained is searched in inaddr 2 of innode 2 according to the fourth single character d of the element name, Thus the search fails. If the user specifies that the element name of the search is ebc, the search fails because the first single character does not exist in the index tree. If the user name searched by the user is adc, at innode 2, the jump address of the next index node cannot be searched and obtained in inaddr 2 of innode 2 according to the second single character d of the element name, Thus the search fails.
In summary, the present invention provides a method for searching a node tree based on EDA, which obtains an index address of all element names ending with an ending character of a specified element name in a node tree by searching the element name specified by a user in the index tree, by obtaining the node tree and an index tree associated with the node tree, wherein each element node of the node tree species binds an element name and an index address, each index node in the index tree binds a single character and index addresses of all element names ending with the current single character in the node tree, thereby obtaining a target element name. Compared with a mode of directly searching the node tree, the searching efficiency is greatly improved.
Embodiments of the present invention also provide a non-transitory computer readable storage medium that may be disposed in an electronic device to store at least one instruction or at least one program for implementing one of the methods embodiments, the at least one instruction or the at least one program being loaded and executed by the processor to implement the methods provided by the embodiments described above.
Embodiments of the present invention also provide an electronic device comprising a processor and the aforementioned non-transitory computer-readable storage medium.
Embodiments of the present invention also provide a computer program product comprising program code for causing an electronic device to carry out the steps of the method according to the various exemplary embodiments of the invention as described in the specification, when said program product is run on the electronic device.
While certain specific embodiments of the invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the invention. Those skilled in the art will also appreciate that many modifications may be made to the embodiments without departing from the scope and spirit of the invention. The scope of the present disclosure is defined by the appended claims.

Claims (10)

1. A method of searching a node tree based on EDA, the method comprising the steps of:
S100, obtaining M node trees, wherein the mth node Tree comprises N element nodes, the ith element node binds an element name in a chip design and an index address of the current element node, the value range of i is 1 to N, and the value range of M is 1 to M;
S300, obtaining an index Tree of a Tree, wherein the index Tree comprises index nodes of R single characters, and an R index node innode r is bound with an R single character ch r and a candidate index address set endaddr r of all element names taking ch r as ending characters in the Tree; wherein ch r is a single character in the element name of Tree, and the value range of R is 1 to R;
s500, searching an index tree according to the last single character ch q of the element name 0 designated by the user, and acquiring an index node innode q of ch q, wherein the value range of q is 1 to R; wherein innode q binds ch q with index address set endaddr q of all element names in Tree with ch q as end character;
s700, extracting innode q of an index address set endaddr q;
s900, searching Tree according to each index address in endaddr q to obtain the target element name.
2. The method of claim 1, wherein innode r in S300 is further bound to: jump address set inaddr r for the inode of the next unicode of ch r in all element names of Tree.
3. The method according to claim 2, wherein the method further comprises:
S400, searching an index Tree according to each single character in the name 0 in sequence, and when the jth single character ch j in the name 0 searches the p-th index node innode p and p is not equal to q in the index Tree, binding the p-th single character ch p and a jump address set inaddr p of the index node of the next single character of ch p in all element names in the Tree by innode p, and searching inaddr p according to the j+1th single character in the name 0 to obtain the jump address of the next index node.
4. A method according to claim 3, wherein S400 further comprises: when the jth single character ch j in the name 0 finds the p-th index node innode p in the index Tree and p is not equal to q, innode p binds the p-th single character ch p and the jump address set inaddr p of the index node of the next single character of ch p in all element names of the Tree, inaddr p is found according to the j+1th single character in the name 0, and the jump address of the next index node of the j+1th single character is not found in inaddr p, so that the query fails.
5. The method of claim 2, wherein S400 further comprises: the index tree is searched according to each single character in the name 0 in turn, and when the 1 st single character ch 1 in the name 0 does not find the index node of the binding ch 1 in the index tree, the query fails.
6. The method according to claim 4 or 5, wherein after the query fails, a flag bit for the query failure is returned, and the flag bit is used to trigger a preset action for visually displaying the query failure.
7. The method of claim 1, wherein S900 further comprises:
s910, searching Tree according to each index address in endaddr q to obtain a binary group set formed by candidate element nodes and candidate element names thereof;
And S1000, matching the name 0 with all element names in the binary group, wherein the candidate element names successfully matched are the searched target element names.
8. The method of claim 1, wherein the element name in S100 is a top-level module name, a function module name, a component name, a network name, or a pin name in the chip design.
9. A non-transitory computer readable storage medium having stored therein at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the method of any one of claims 1-8.
10. An electronic device comprising a processor and the non-transitory computer readable storage medium of claim 9.
CN202410599997.0A 2024-05-15 Method for searching node tree based on EDA, electronic equipment and storage medium Active CN118193543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410599997.0A CN118193543B (en) 2024-05-15 Method for searching node tree based on EDA, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410599997.0A CN118193543B (en) 2024-05-15 Method for searching node tree based on EDA, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN118193543A CN118193543A (en) 2024-06-14
CN118193543B true CN118193543B (en) 2024-07-12

Family

ID=

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1896954A (en) * 2006-04-27 2007-01-17 南京联创科技股份有限公司 Method for realizing structural dynamic compiler of complicated multi-service

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1896954A (en) * 2006-04-27 2007-01-17 南京联创科技股份有限公司 Method for realizing structural dynamic compiler of complicated multi-service

Similar Documents

Publication Publication Date Title
US7756859B2 (en) Multi-segment string search
US7882109B2 (en) Computer representation of a data tree structure and the associated encoding/decoding methods
US6606625B1 (en) Wrapper induction by hierarchical data analysis
Bocek et al. Fast similarity search in large dictionaries
CN103198079B (en) The implementation method of relevant search and device
US20100325136A1 (en) Error tolerant autocompletion
US20090037403A1 (en) Generalized location identification
WO2012174137A1 (en) Method and system of extracting web page information
Kopelowitz On-line indexing for general alphabets via predecessor queries on subsets of an ordered list
US8825665B2 (en) Database index and database for indexing text documents
US20080228750A1 (en) "Query-log match" relevance features
Navarro Document listing on repetitive collections with guaranteed performance
CN118193543B (en) Method for searching node tree based on EDA, electronic equipment and storage medium
CN116150093B (en) Method for realizing object storage enumeration of objects and electronic equipment
US8204887B2 (en) System and method for subsequence matching
CN112256821A (en) Method, device, equipment and storage medium for complementing Chinese address
CN118193543A (en) Method for searching node tree based on EDA, electronic equipment and storage medium
CN112650791B (en) Method, device, computer equipment and storage medium for processing field
CN112115125B (en) Database access object name resolution method and device and electronic equipment
CN113536058A (en) Spatial index modification method, device, equipment and storage medium
Álvarez et al. A Task-specific Approach for Crawling the Deep Web.
Ehrenfeucht et al. String searching
Kucherov et al. Full-fledged real-time indexing for constant size alphabets
JP2005309498A (en) Information extraction system, information extraction method and computer program
CN114201525B (en) Method and device for querying data

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant