Method, device, electronic device, storage medium and computer program product for obtaining fan-in / fan-out path

The fan-in/fan-out path is filtered through two traversal methods, which solves the problem of excessive redundant information in the EDA tool, provides highly targeted path information, helps designers optimize logic gate design and improve design efficiency.

CN118886396BActive Publication Date: 2024-12-20INNODA (CHENGDU) ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411388185.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-08
Publication Date
2024-12-20
Estimated Expiration
2044-10-08

AI Technical Summary

Technical Problem

Existing EDA tools return a lot of redundant information when obtaining fan-in/fan-out paths, making it difficult for designers to obtain the critical information they need, especially when dealing with large-scale designs.

Method used

Through the method of two traversals, the first traversal of the record object and the specified attribute is traversed, and the second traversal determines whether the object is on the target path based on the record result, thereby filtering out the fan-in/fan-out path containing the user-specified attributes.

Benefits of technology

It effectively reduces the impact of redundant information, provides a highly targeted fan-in/fan-out path, helps designers better optimize the design of logic gates, and improves design efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118886396B_ABST
    Figure CN118886396B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device, storage medium and computer program product for obtaining a fan-in / fan-out path, and relates to the field of integrated circuit technology. The method for obtaining a fan-in / fan-out path includes: performing a first traversal and recording the attribute judgment result of whether each traversed object is associated with a specified attribute; performing a second traversal and determining whether each traversed object is on a target path based on the recorded attribute judgment result; recording the objects on the target path to obtain the target path; wherein the traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, traverse all objects that can be reached from the target object along the target direction; the target path is: the fan-in / fan-out path for the target object that contains objects with specified attributes. According to the present application, the impact of redundant information on users can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application generally relates to the field of integrated circuit technology, and more specifically, to a method, device, electronic device, storage medium and computer program product for obtaining a fan-in / fan-out path. Background Art

[0002] With the advancement of manufacturing technology and design technology, the design methods of electronic systems have undergone profound changes, from computer-aided design (CAD), computer-aided engineering (CAE) to electronic design automation (EDA), the degree of design automation is getting higher and higher, and the complexity of design is getting stronger and stronger.

[0003] Integrated circuit EDA refers to the design method that uses computer-aided design software to complete the functional design, synthesis, verification, physical design (including layout, wiring, layout, design rule checking, etc.) of ultra-large-scale integrated circuit chips. At present, EDA technology has become a powerful tool for modern electronic design. Without the support of EDA technology, it is unimaginable to complete the design and manufacture of ultra-large-scale integrated circuits. Integrated circuit designers need to use EDA tools to design complex integrated circuits with hundreds of thousands to tens of billions of transistors to reduce design deviations, improve the success rate of tape-out and save tape-out costs.

[0004] In chip design, fan-in and fan-out are two important concepts used to describe the number of input connections and output connections of a logic gate or circuit. Fan-in refers to the number of signal lines connected to the input of a logic gate or circuit, while fan-out refers to the number of signal lines leading out from the output of a logic gate or circuit.

[0005] Too much fan-in may lead to increased latency and power consumption, while too much fan-out may lead to signal attenuation and increased transmission delay. Therefore, designers usually optimize the fan-in and fan-out of logic gates according to the design requirements and goals to ensure that the circuit can achieve the best balance in terms of performance, power consumption and area. In order to optimize it, it is first necessary to obtain the corresponding fan-in / fan-out path. Existing EDA tools usually directly obtain all fan-in / fan-out paths for a given starting point / end point. This approach will have the problem of too much redundant information when dealing with large-scale designs. For example, the designer only cares about part of the fan-in / fan-out path required. If the full amount of fan-in / fan-out paths are still returned at this time, the designer will not be able to obtain the key information they want. Summary of the invention

[0006] An exemplary embodiment of the present application is to provide a method, device, electronic device, storage medium and computer program product for obtaining a fan-in / fan-out path, which can provide a filtered fan-in / fan-out path containing objects with user-specified attributes, thereby reducing the impact of redundant information on users.

[0007] According to a first aspect of an embodiment of the present application, a method for obtaining a fan-in / fan-out path is provided, comprising: performing a first traversal and recording an attribute judgment result of whether each traversed object is associated with a specified attribute; performing a second traversal and determining whether each traversed object is on a target path based on the recorded attribute judgment result; recording objects on the target path to obtain the target path; wherein the traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, traversing all objects that can be reached along the target direction starting from the target object; wherein the target path is: a fan-in / fan-out path for the target object that contains objects with the specified attribute.

[0008] According to a second aspect of an embodiment of the present application, a device for acquiring a fan-in / fan-out path is provided, comprising: an attribute judgment unit, configured to perform a first traversal, and record an attribute judgment result of whether each traversed object is associated with a specified attribute; an object judgment unit, configured to perform a second traversal, and determine whether each traversed object is on a target path based on the recorded attribute judgment result; a path determination unit, configured to record objects on the target path to obtain the target path; wherein the traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, all objects that can be reached along the target direction starting from the target object are traversed; wherein the target path is: a fan-in / fan-out path for the target object that contains objects with the specified attribute.

[0009] According to a third aspect of an embodiment of the present application, a computer-readable storage medium storing instructions is provided, and when the instructions are executed by a processor of an electronic device, the electronic device can execute the method for acquiring fan-in / fan-out paths as described above.

[0010] According to a fourth aspect of an embodiment of the present application, an electronic device is provided, comprising: at least one processor; and at least one memory storing computer executable instructions, wherein the computer executable instructions, when executed by the at least one processor, cause the at least one processor to execute the method for obtaining a fan-in / fan-out path as described above.

[0011] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer executable instructions, which, when executed by at least one processor, implement the method for acquiring a fan-in / fan-out path as described above.

[0012] According to the fan-in / fan-out path acquisition method, device, electronic device, storage medium and computer program product of the exemplary embodiment of the present application, it is possible to provide filtered fan-in / fan-out paths containing objects with user-specified attributes according to user needs, thereby reducing the impact of redundant information on users.

[0013] Other aspects and / or advantages of the general inventive concept of the present application will be set forth in part in the following description, and some will be clear from the description or may be learned through practice of the general inventive concept of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other objects and features of the exemplary embodiments of the present application will become more apparent through the following description in conjunction with the accompanying drawings which exemplarily illustrate the embodiments, wherein:

[0015] Figure 1 A flowchart showing a method for acquiring a fan-in / fan-out path according to an exemplary embodiment of the present application;

[0016] Figure 2 A flowchart showing a method for performing a first traversal and recording attribute judgment results of each traversed object according to an exemplary embodiment of the present application;

[0017] Figure 3 An example of the traversal order of the first traversal and the second traversal according to an exemplary embodiment of the present application is shown;

[0018] Figure 4 An example of performing a first traversal and recording the attribute judgment results of each traversed object according to an exemplary embodiment of the present application is shown;

[0019] Figure 5 A flowchart showing a method for performing a second traversal and determining whether each traversed object is on a target path according to an exemplary embodiment of the present application;

[0020] Figure 6 An example of performing a second traversal and determining whether each traversed object is on a target path according to an exemplary embodiment of the present application is shown;

[0021] Figure 7 An example of the printing result of the existing full path is shown;

[0022] Figure 8A first example of a printing result of a target path according to an exemplary embodiment of the present application is shown;

[0023] Fig. 9 A second example of a printing result of a target path according to an exemplary embodiment of the present application is shown;

[0024] Fig.10 A structural block diagram showing a device for acquiring a fan-in / fan-out path according to an exemplary embodiment of the present application;

[0025] Fig.11 A structural block diagram of an electronic device according to an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0026] Reference will now be made in detail to embodiments of the present application, examples of which are shown in the accompanying drawings, wherein like reference numerals refer to like parts throughout. The embodiments will be described below with reference to the accompanying drawings in order to explain the present application.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.

[0028] It should be noted that the phrase "at least one of the items" in this application includes three types of parallel situations: "any one of the items", "a combination of any number of the items", and "all of the items". For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "executing at least one of step 1 and step 2" which means the following three parallel situations: (1) executing step 1; (2) executing step 2; (3) executing step 1 and step 2.

[0029] For ease of understanding, the terms involved in the exemplary embodiments of the present application are explained below.

[0030] Design file: A file that describes a digital circuit design, which contains information such as the design's logical structure, functions, and electrical characteristics. It is written in a hardware description language (HDL), such as Verilog HDL, VHDL (Very High Speed ​​Integrated Circuit HDL), and System Verilog HDL.

[0031] Start point / end point: The start point or end point can be specified as any object in the design file, and its type is not limited. For example, a net, pin, port, instance, etc. can all be used as a start point or end point.

[0032] Fan-in / fan-out path: After reading the design file, if you start from the starting point and traverse along the signal propagation direction, you will get the fan-out path; if you start from the end point and traverse along the reverse signal propagation direction, you will get the fan-in path. It can be seen that the starting point and the end point are actually relative.

[0033] unordered_map container: An associative container in C++ that provides a key-value pair mapping relationship with high efficiency in search, insertion, and deletion operations.

[0034] The traditional method of obtaining fan-in / fan-out paths is to traverse backward / forward from a given starting point / end point, and then record and print all the traversed objects. However, this method can only print the full fan-in / fan-out paths, which will result in too much redundant information and make it difficult for designers to obtain the required key information. In response to this problem, this application proposes to filter out the fan-in / fan-out paths containing objects with user-specified attributes from the full fan-in / fan-out paths, thereby reducing the generation of redundant information. Figures 1 to 10 Provide detailed explanation.

[0035] Figure 1 A flow chart of a method for obtaining a fan-in / fan-out path according to an exemplary embodiment of the present application is shown. The method for obtaining a fan-in / fan-out path can be implemented by a computer program, and as an example, the method for obtaining a fan-in / fan-out path can be executed by application software (e.g., an EDA tool) installed in an electronic device.

[0036] Reference Figure 1 In step S100, the first traversal is performed, and the attribute judgment result of whether each traversed object is associated with the specified attribute is recorded.

[0037] The traversal order of the first traversal is: according to the connection relationship between objects in the target integrated circuit, all objects that can be reached from the target object along the target direction are traversed.

[0038] As an exemplary embodiment, if the target object is designated as the starting point (ie, the target object is a given starting point), the target direction is the signal propagation direction, and the traversal order is to traverse all objects on the fan-out path starting from the given starting point.

[0039] As an exemplary embodiment, if the target object is designated as a termination point (ie, the target object is a given termination point), the target direction is the reverse signal propagation direction, and the traversal order is to traverse all objects on the fan-in path starting from the given termination point.

[0040] As an exemplary embodiment, the types of each object traversed may include but are not limited to at least one of the following items: a net, a pin, a port, and an instance. As an example, an instance refers to a specific implementation of a specific module or element, for example, it may include a specific implementation of a logic gate circuit. As an example, a port may specifically include: a primary input port or a primary output port on a top module.

[0041] As an exemplary embodiment, the target object may be specified by a user, and the type of the target object may include, but is not limited to, at least one of the following items: a net, a pin, a port, and an instance.

[0042] As an exemplary embodiment, a specified attribute is one or more object attributes specified by a user according to requirements, and an object attribute is an attribute of an object in an integrated circuit. Since different types of objects usually have different types of attributes, as an example, a user may first specify an object type (the specified object type is hereinafter referred to as the specified type) according to requirements, and then specify at least one attribute from multiple attributes of the object of the specified type. For example, in response to the user's operation of specifying an object type, multiple attributes corresponding to the object type may be provided to the user for selection.

[0043] As an example, the properties of a net may include, but are not limited to: name, type, signal type, bit width, hierarchy, and representative net.

[0044] As an example, the properties of a pin or a port may include, but are not limited to: name, type, direction, supply, communication, and control.

[0045] As an example, the attributes of an instance may include, but are not limited to: name, type, voltage, current, capacitance, power, latency, and load.

[0046] As an example, the attributes of other types of objects may include, but are not limited to: name (name), type (objecttype).

[0047] The following will be combined Figures 2 to 4 An exemplary embodiment of step S100 is described in detail, which will not be expanded here.

[0048] In addition, as an exemplary embodiment, the method for acquiring fan-in / fan-out paths according to the exemplary embodiment of the present application may further include: before step S100 , reading a design file (ie, a design file) of a target integrated circuit.

[0049] In step S200, a second traversal is performed, and based on the recorded attribute judgment result, it is determined whether each traversed object is on the target path.

[0050] The second pass traverses the same order as the first pass.

[0051] The target path is: a fan-in / fan-out path for a target object that includes an object with a specified attribute. For example, if the specified attribute is the name of a specific object, the target path is: a fan-in / fan-out path for a target object that includes the specific object. According to an exemplary embodiment of the present application, the target path obtained is highly targeted.

[0052] As an exemplary embodiment, if a target object is specified as a starting point, the target path is: a fan-out path for the target object that includes objects having specified attributes.

[0053] As an exemplary embodiment, if a target object is designated as a termination point, the target path is: a fan-in path for the target object that includes objects having designated attributes.

[0054] As an exemplary embodiment, regarding whether each object traversed during the first traversal is associated with a specified attribute, an object is considered to be associated with the specified attribute if it satisfies one of the following two conditions. The first condition is that the attribute of the object matches the specified attribute (that is, the object has the specified attribute and the attribute of the object is consistent with the specified attribute); the second condition is that the object and the object with the specified attribute are on the same fan-in / fan-out path for the target object. Specifically, if the target object is designated as the starting point, the second condition is that the object and the object with the specified attribute are on the same fan-out path for the target object; if the target object is designated as the ending point, the second condition is that the object and the object with the specified attribute are on the same fan-in path for the target object.

[0055] The following will be combined Figure 5 and Figure 6 An exemplary embodiment of step S200 is described in detail, which will not be expanded here.

[0056] In step S300, objects on the target path are recorded to obtain the target path.

[0057] It should be understood that the target path is not limited to one, and one or more target paths may be obtained.

[0058] As an exemplary embodiment, for each target path, according to the connection relationship between the objects on the target path, starting from the target object, the names of the objects on the target path are recorded in sequence to obtain a result representing the target path (hereinafter also referred to as a print result).

[0059] Figure 2 A flowchart of a method for performing a first traversal and recording attribute judgment results of each traversed object according to an exemplary embodiment of the present application is shown.

[0060] Reference Figure 2 , in step S101, the first traversal is performed.

[0061] As an exemplary embodiment, the traversal order of the first traversal may be a traversal order using a DFS (Depth First Search) method. Specifically, the traversal order is to start from a given starting point / ending point and traverse according to the connection relationship between each object. If a starting point is given, then starting from the starting point, traverse all objects on the fan-out path along the signal propagation direction, and finally return to the starting point; if an ending point is given, then starting from the ending point, traverse all objects on the fan-in path along the reverse signal propagation direction, and finally return to the ending point. It should be understood that the principle of DFS at the algorithm level determines that it will eventually return to the origin of the traversal. Specifically, in the traversal order, when traversing to the end point of each path, a backtracking traversal will be performed. Therefore, on the one hand, in the entire traversal process, there will be two traversal directions: forward (i.e., the same direction as the target direction) and backward (i.e., the opposite direction to the target direction). On the other hand, some objects may be traversed multiple times. The end point of the path is usually a main input port or a main output port. Specifically, for a fan-in path, the end point of the path is the main input port; for a fan-out path, the end point of the path is the main output port.

[0062] In addition, in this traversal order, whenever a fork node object (usually a wire network, such as Figure 3 Specifically, during the traversal process, whenever a fork node object is encountered, since the fork node object must connect two or more branch node objects (such as Figure 3 n2 in the figure connects p7 and p8), so all child node objects on a branch node object (such as p7) (i.e., the branch path where the forked node object is located) will be traversed first, and then all child node objects on the brother node object of the branch node object (such as p8) will be traversed until all branch paths of the forked node object are traversed and then the forked node object is returned to. At the same time, when encountering the end point of each branch path, backtracking traversal will be performed.

[0063] In step S102, during the first traversal, each time an object is traversed, the attribute judgment result of the object is determined.

[0064] As an exemplary embodiment, the attribute judgment result of the object may be determined according to whether the attribute of the currently traversed object matches the specified attribute and / or the attribute judgment result of the neighboring object of the object. The neighboring object of the object is: the previous object of the object in the current traversal direction in the target integrated circuit. It should be understood that the number of the neighboring objects of the currently traversed object may be one or more.

[0065] As an exemplary embodiment, the property information of the currently traversed object may be acquired from a library file.

[0066] As an exemplary embodiment, the attribute judgment result may be represented in the form of a Boolean (bool) variable. If the attribute judgment result of the object is associated with a specified attribute, the Boolean value corresponding to the object may be set to true, otherwise it may be set to false.

[0067] As an exemplary embodiment, if the currently traversed object does not have an adjacent object and it is not the first time to traverse to the currently traversed object, the existing attribute judgment result of the currently traversed object is kept unchanged; if the currently traversed object does not have an adjacent object and it is the first time to traverse to the currently traversed object, it is determined whether the attribute of the currently traversed object matches the specified attribute; if the attribute of the currently traversed object matches the specified attribute, it is determined that the attribute judgment result of the currently traversed object is associated with the specified attribute; if the attribute of the currently traversed object does not match the specified attribute, it is determined that the attribute judgment result of the currently traversed object is not associated with the specified attribute.

[0068] As an exemplary embodiment, if the attribute judgment result of any adjacent object of the current traversal object is associated with the specified attribute, it is determined that the attribute judgment result of the object is associated with the specified attribute; if the attribute judgment results of all adjacent objects of the object are not associated with the specified attribute, it is determined whether the attribute of the object matches the specified attribute; if the attribute of the object matches the specified attribute, it is determined that the attribute judgment result of the object is associated with the specified attribute; if the attribute of the object does not match the specified attribute, it is determined that the attribute judgment result of the object is not associated with the specified attribute. That is, during the traversal process, the attribute judgment result needs to be transferred. The transfer method is to determine whether the attribute judgment result is to be transferred based on the current traversal direction and the attribute judgment result of the object adjacent to the current traversal object. In addition, the transfer action is executed before the attribute matching judgment (i.e., judging whether the attribute of the current traversal object matches the specified attribute). If the transfer is successful, the attribute matching judgment is no longer performed for the current traversal object, and the next object can be directly processed. Specifically, in the current traversal direction, if the Boolean value corresponding to the previous object adjacent to the current traversal object is true, the Boolean value of the current traversal object will be directly set to true. If the Boolean value corresponding to the previous object is false, the current traversal object needs to be attribute matched. It should be noted that the adjacent relationship of objects is determined by the connection relationship between the various objects in the design. This method can realize the transfer of Boolean values ​​between different objects, thereby ensuring that the final result contains the entire path rather than a single object.

[0069] As an example, the step of determining whether the property of the currently traversed object matches the specified property may include: determining whether the type of the currently traversed object conforms to the specified type (i.e., the specified object type); if the type of the currently traversed object does not conform to the specified type, directly determining that the property judgment result of the currently traversed object is not associated with the specified property; if the type of the currently traversed object conforms to the specified type, further determining whether the property of the object matches the specified property. By optimizing the judgment process, when processing massive data of integrated circuit design, the amount of data processing can be significantly reduced and the overall processing efficiency can be improved.

[0070] In step S103, the attribute determination result of the object is recorded.

[0071] Step S103 may include: if the object is traversed for the first time during the first traversal, the object and its attribute judgment result are stored; if the object is not traversed for the first time during the first traversal, and the attribute judgment result of the object determined this time is different from the stored attribute judgment result of the object, the stored attribute judgment result of the object is updated to the attribute judgment result of the object determined this time.

[0072] As an exemplary embodiment, the step of storing the object and its attribute judgment result may include: inserting the object and the Boolean value indicating its attribute judgment result into a pre-created unordered map container in the form of a key-value pair (i.e., "object-Boolean value" as a key-value pair).

[0073] Figure 3 An example of the traversal order of the first traversal and the second traversal according to an exemplary embodiment of the present application is shown.

[0074] like Figure 3 As shown in Figure 1, given the endpoint p1 (i.e., the target object is p1, the target object is designated as the endpoint, and the target direction is the reverse signal propagation direction), the traversal route is decomposed as follows:

[0075] (Forward traversal) forward traversal:

[0076] p1→i1→p2→p3→i2→p4→n1→p5→i3→p6→n2→P7→i4;

[0077] (Backward traversal) backward traversal: i4→p7→p8→i5→p8→n2→p6→i3→p5;

[0078] (Forward traversal) forward traversal: p5→p9→i6→p10→n3→p11→i7;

[0079] Backward traversal:

[0080] i7→p11→p12→i8→p12→n3→p10→i6→p9→n1→p4→i2→p3→p2→i1→p1.

[0081] It is worth noting that in the above backtracking traversal, there is both forward traversal (i.e., traversal along the reverse signal propagation direction, for example, p8→i5) and backward traversal (i.e., traversal along the signal propagation direction, for example, i5→p8), while in the forward traversal there is only forward traversal.

[0082] Figure 4 An example of performing the first traversal and recording the attribute judgment results of each traversed object according to an exemplary embodiment of the present application is shown. In order to simplify the description, this exemplary embodiment does not mention p9 / i6 / n3 / p10 / i7 / p11 / i8.

[0083] Assume that you want to obtain the path of the fan-in path of p1 that contains an object with a specified attribute, where object p7 has the specified attribute.

[0084] (Forward traversal) forward traversal:

[0085] p1→i1→p2→p3→i2→p4→n1→p5→i3→p6→n2→P7→i4;

[0086] Backward traversal:

[0087] i4→p7→p8→i5→p8→n2→p6→i3→p5→n1→p4→i2→p3→p2→i1→p1.

[0088] Reference Figure 4The state of the unordered map container shown on the left side of the figure, when performing forward traversal (i.e., p1→i1→p2→p3→i2→p4→n1→p5→i3→p6→n2→P7→i4), since the objects before reaching p7 do not have the specified attribute, the Boolean values ​​of the objects from p1 to n2 are all false. When traversing to p7, the Boolean value corresponding to p7 is determined to be true by judging the attributes of the object, and the forward traversal continues and the Boolean value true is passed to i4. At this time, the main input port is reached, the traversal of this path is completed, and the backtracking traversal begins. Backtracking traversal starts from i4 (i.e., i4→p7→p8→i5→p8→n2→p6→i3→p5→n1→p4→i2→p3→p2→i1→p1). Since i4 has no adjacent objects (i.e., there is no previous object of i4 in the current traversal direction) and it is not the first traversal to i4, the Boolean value of i4 remains unchanged. i4 passes the Boolean value to p7. However, since p8 has not been traversed at this time, p8 needs to be traversed forward before backtracking to n2. At this time, the Boolean value corresponding to n2 is still false, so the Boolean values ​​corresponding to p8 and i5 are false.

[0089] Reference Figure 4 The state of the unordered mapping container shown on the right side of the figure, after traversing the path p8→i5, it continues to traverse backwards, and the Boolean value corresponding to p8 is still false. Since all branch paths of n2 have completed the forward traversal at this time, it is possible to start traversing backwards on n2. At this time, the Boolean value corresponding to p7 can be passed to n2 (specifically, the previous object of n2 in the current traversal direction (backward direction) in the target integrated circuit (i.e., the adjacent object of n2) includes: P7 and P8, and any Boolean value true of P7 and P8 can be passed), so the Boolean value corresponding to n2 is updated to true. In the same principle, n2 continues to traverse backwards, and eventually the Boolean values ​​corresponding to objects such as p6 / i3 / p5 / n1 / p4 / i2 / p3 / p2 / i1 / p1 can be updated to true, thereby realizing the transfer of Boolean values.

[0090] Figure 5 A flowchart of a method for performing a second traversal and determining whether each traversed object is on a target path according to an exemplary embodiment of the present application is shown.

[0091] Reference Figure 5 , in step S201, a second traversal is performed.

[0092] In step S202, during the second traversal, each time an object is traversed, it is determined whether the object is on the target path based on the attribute judgment result of the object.

[0093] As an exemplary embodiment, step S202 may include: during the second traversal, for each object traversed in sequence along the target direction, determining whether the object is on the target path based on a result of a property judgment of the object.

[0094] In step S203, if the attribute judgment result of the object is associated with the specified attribute, it is determined that the object is on the target path, that is, the object needs to be output to the result.

[0095] Accordingly, as an exemplary embodiment, step S300 may include: recording objects on the target path in the order of being traversed in sequence along the target direction during the second traversal to obtain the target path.

[0096] The traversal order of the second traversal is exactly the same as that of the first traversal, but there is a difference in the specific processing process. In the second traversal, the corresponding processing is only performed during the forward traversal (that is, traversal along the target direction). The specific processing can be: get the corresponding Boolean value in the container according to the object traversed forward. For example, use the object itself as the key to query in the container. If the Boolean value obtained is true, the object is output to the result for printing, and then the judgment of the next object is continued; otherwise, the judgment of the next object is directly carried out.

[0097] Figure 6 An example of performing a second traversal and determining whether each traversed object is on the target path according to an exemplary embodiment of the present application is shown. In order to simplify the description, this exemplary embodiment does not mention p9 / i6 / n3 / p10 / i7 / p11 / i8.

[0098] like Figure 6 As shown, the second traversal is exactly the same as the first traversal, (forward traversal):

[0099] p1→i1→p2→p3→i2→p4→n1→p5→i3→p6→n2→P7→i4;

[0100] Backward traversal:

[0101] i4→p7→p8→i5→p8→n2→p6→i3→p5→n1→p4→i2→p3→p2→i1→p1.

[0102] But the corresponding processing is only performed when traversing forward. Specifically, when traversing forward to each object, the container is searched for the Boolean value corresponding to the object. If the Boolean value is true, the object is printed. Therefore, the objects printed in sequence are as follows:

[0103] p1→i1→p2→p3→i2→p4→n1→p5→i3→p6→n2→P7→i4.

[0104] Figure 7 An example of the existing printing result of the full path is shown, that is, the result of printing the full fan-in / fan-out path without path screening using the existing technology. Figure 8 and Fig. 9 An example of a print result of only printing the fan-in / fan-out path containing the specified attribute according to an embodiment of the present application is shown. It can be seen that the print result of the fan-in / fan-out path containing the object with the specified attribute obtained according to the exemplary embodiment of the present application effectively eliminates redundant information compared with the full fan-in / fan-out path print result, making the print result more intuitive and concise.

[0105] According to an exemplary embodiment of the present application, a new fan-in / fan-out path acquisition method is designed. The method realizes the screening of the path required by the user in the fan-in / fan-out path through two traversals. The user specifies a specific attribute, and traverses all objects on the fan-out / fan-in path from a given starting point / ending point. When traversing each object, the attribute judgment is performed on it. If it is associated with the specified attribute, its Boolean value is set to true (true), otherwise it is set to false (false), and then its object-Boolean key-value pair is inserted into the unordered_map container. After the first traversal is completed, the second traversal will begin. This traversal will take the corresponding Boolean value in the container when traversing each object. If the Boolean value is true, it means that the object is associated with the specified attribute, and the object will be recorded and output to the result. After the second traversal is completed, the fan-in / fan-out path containing objects with specified attributes can be obtained, reducing the impact of redundant information.

[0106] Fig.10 A structural block diagram showing a device for acquiring a fan-in / fan-out path according to an exemplary embodiment of the present application is shown.

[0107] like Fig.10 As shown, the apparatus for acquiring a fan-in / fan-out path according to an exemplary embodiment of the present application includes: a property judgment unit 100 , an object judgment unit 200 , and a path determination unit 300 .

[0108] Specifically, the attribute determination unit 100 is configured to perform a first traversal and record an attribute determination result of whether each traversed object is associated with a specified attribute.

[0109] The object determination unit 200 is configured to perform a second traversal and determine whether each traversed object is on the target path based on the recorded attribute determination result.

[0110] The path determination unit 300 is configured to record objects on the target path to obtain the target path.

[0111] The traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, traverse all objects that can be reached from the target object along the target direction.

[0112] The target path is a fan-in / fan-out path for the target object that includes an object having the specified attribute.

[0113] As an exemplary embodiment, if the target object is designated as a starting point, the target direction is a signal propagation direction, and the target path is: a fan-out path for the target object that includes an object having the specified attribute; if the target object is designated as an ending point, the target direction is a reverse signal propagation direction, and the target path is: a fan-in path for the target object that includes an object having the specified attribute.

[0114] As an exemplary embodiment, the attribute judgment unit 100 may be configured as follows: during the first traversal, each time an object is traversed, the attribute judgment result of the object is determined based on whether the attribute of the object matches the specified attribute and / or the attribute judgment result of the adjacent objects of the object; and the attribute judgment result of the object is recorded; wherein the adjacent objects of the object are: the previous object of the object in the current traversal direction in the target integrated circuit.

[0115] As an exemplary embodiment, the attribute judgment unit 100 may be configured as follows: if the object has no adjacent objects and this is not the first time the object is traversed, then the existing attribute judgment result of the object is kept unchanged; if the object has no adjacent objects and this is the first time the object is traversed, then whether the attribute of the object matches the specified attribute; if the attribute of the object matches the specified attribute, then the attribute judgment result of the object is determined to be associated with the specified attribute; if the attribute of the object does not match the specified attribute, then the attribute judgment result of the object is determined to be not associated with the specified attribute.

[0116] As an exemplary embodiment, the attribute judgment unit 100 may be configured as follows: if the attribute judgment result of any adjacent object of the object is associated with the specified attribute, then it is determined that the attribute judgment result of the object is associated with the specified attribute; if the attribute judgment results of all adjacent objects of the object are not associated with the specified attribute, then it is determined whether the attribute of the object matches the specified attribute; if the attribute of the object matches the specified attribute, then it is determined that the attribute judgment result of the object is associated with the specified attribute; if the attribute of the object does not match the specified attribute, then it is determined that the attribute judgment result of the object is not associated with the specified attribute.

[0117] As an exemplary embodiment, the specified attribute may be at least one attribute of an object of a specified type.

[0118] As an exemplary embodiment, the attribute judgment unit 100 can be configured to: determine whether the type of the object conforms to the specified type; if the type of the object does not conform to the specified type, directly determine that the attribute judgment result of the object is not associated with the specified attribute; if the type of the object conforms to the specified type, then determine whether the attribute of the object matches the specified attribute.

[0119] As an exemplary embodiment, in the traversal order, whenever a forked node object is traversed, each branch path of the forked node object is traversed in turn before returning to the forked node object; and when the end point of each path is traversed, a backtracking traversal is performed.

[0120] As an exemplary embodiment, the attribute judgment unit 100 may be configured as follows: if the object is traversed for the first time during the first traversal, the object and its attribute judgment result are stored; if the object is not traversed for the first time during the first traversal, and the attribute judgment result of the object determined this time is different from the attribute judgment result of the object that has been stored, the attribute judgment result of the object that has been stored is updated to the attribute judgment result of the object determined this time.

[0121] As an exemplary embodiment, the property determination unit 100 may be configured to insert the object and the Boolean value indicating the property determination result thereof into an unordered mapping container in the form of a key-value pair.

[0122] As an exemplary embodiment, the object judgment unit 200 may be configured to: during the second traversal, for each object traversed in sequence along the target direction, if the attribute judgment result of the object is associated with the specified attribute, determine that the object is on the target path.

[0123] As an exemplary embodiment, the path determination unit 300 may be configured to record the objects on the target path in the order in which they are traversed in sequence along the target direction during the second traversal to obtain the target path.

[0124] It should be understood that the specific processing performed by the fan-in / fan-out path acquisition device according to the exemplary embodiment of the present application has been referred to. Figures 1 to 8 The details have been described in detail and will not be repeated here.

[0125] It should be understood that each unit in the device for acquiring a fan-in / fan-out path according to the exemplary embodiment of the present application may be implemented as a hardware component and / or a software component.

[0126] Fig.11 A structural block diagram of an electronic device according to an exemplary embodiment of the present application is shown.

[0127] Reference Fig.11 The electronic device includes: at least one memory 600 and at least one processor 700, wherein the at least one memory 600 stores a set of computer executable instructions, and when the computer executable instruction set is executed by the at least one processor 700, the method for obtaining the fan-in / fan-out path as described in the above exemplary embodiment is executed.

[0128] As an example, the electronic device may be a PC, a tablet device, a personal digital assistant, a smart phone, or other device capable of executing the above instruction set. Here, the electronic device is not necessarily a single electronic device, but may also be any device or circuit collection capable of executing the above instructions (or instruction sets) individually or in combination. The electronic device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device interconnected with a local or remote (e.g., via wireless transmission) interface.

[0129] In an electronic device, the processor 700 may include a central processing unit (CPU), a graphics processing unit (GPU), a programmable logic device, a dedicated processor system, a microcontroller, or a microprocessor. As an example and not limitation, the processor 700 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.

[0130] The processor 700 may execute instructions or codes stored in the memory 600, wherein the memory 600 may also store data. Instructions and data may also be sent and received over a network via a network interface device, wherein the network interface device may employ any known transmission protocol.

[0131] The memory 600 may be integrated with the processor 700, for example, by placing RAM or flash memory within an integrated circuit microprocessor or the like. In addition, the memory 600 may include a separate device, such as an external disk drive, a storage array, or any other storage device that can be used by a database system. The memory 600 and the processor 700 may be operatively coupled, or may communicate with each other, such as through an I / O port, a network connection, etc., so that the processor 700 can read files stored in the memory.

[0132] In addition, the electronic device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, a mouse, a touch input device, etc.) All components of the electronic device may be connected to each other via a bus and / or a network.

[0133] According to an exemplary embodiment of the present application, a computer-readable storage medium storing instructions may also be provided, wherein when the instructions are executed by at least one processor, the at least one processor is prompted to execute the method for obtaining the fan-in / fan-out path as described in the above exemplary embodiment. Examples of computer-readable storage media here include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.

[0134] According to an exemplary embodiment of the present application, a computer program product may be provided. Instructions in the computer program product may be executed by at least one processor to implement the method for acquiring a fan-in / fan-out path as described in the above exemplary embodiment.

[0135] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the claims.

[0136] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A method for obtaining a fan-in / fan-out path, It is characterized in that include: Perform the first traversal and record the attribute judgment result of whether each traversed object is associated with the specified attribute; Perform a second traversal and determine whether each traversed object is on the target path based on the recorded attribute judgment result; Recording objects on the target path to obtain the target path; The traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, traverse all objects that can be reached from the target object along the target direction; Wherein, the target path is: a fan-in / fan-out path for the target object that includes an object having the specified attribute; The step of recording the result of attribute determination of whether each traversed object is associated with a specified attribute comprises: During the first traversal, each time an object is traversed, the attribute judgment result of the object is determined according to whether the attribute of the object matches the specified attribute and / or the attribute judgment result of the adjacent objects of the object; Record the attribute judgment result of the object; The adjacent object of the object is: the previous object of the object in the current traversal direction in the target integrated circuit.

2. The acquisition method according to claim 1, It is characterized in that If the target object is designated as the starting point, the target direction is the signal propagation direction, and the target path is: a fan-out path for the target object that includes an object having the designated attribute; If the target object is designated as a termination point, the target direction is a reverse signal propagation direction, and the target path is: a fan-in path for the target object that includes an object having the designated attribute.

3. The acquisition method according to claim 1, It is characterized in that The step of determining the attribute judgment result of the object according to whether the attribute of the object matches the specified attribute and / or the attribute judgment result of the neighboring object of the object comprises: If the attribute judgment result of any adjacent object of the object is associated with the specified attribute, determining that the attribute judgment result of the object is associated with the specified attribute; If the attribute judgment results of all the neighboring objects of the object are not associated with the specified attribute, determining whether the attribute of the object matches the specified attribute; If the attribute of the object matches the specified attribute, determining that the attribute judgment result of the object is associated with the specified attribute; If the attribute of the object does not match the specified attribute, it is determined that the attribute judgment result of the object is not associated with the specified attribute.

4. The acquisition method according to claim 1, It is characterized in that The step of determining the attribute judgment result of the object according to whether the attribute of the object matches the specified attribute and / or the attribute judgment result of the neighboring object of the object further includes: If the object has no adjacent objects and this is not the first time the object is traversed, the existing attribute judgment results of the object remain unchanged; If the object has no adjacent objects and the object is traversed to for the first time, determining whether the attribute of the object matches the specified attribute; If the attribute of the object matches the specified attribute, determining that the attribute judgment result of the object is associated with the specified attribute; If the attribute of the object does not match the specified attribute, it is determined that the attribute judgment result of the object is not associated with the specified attribute.

5. The acquisition method according to claim 3 or 4, It is characterized in that The specified attribute is at least one attribute of an object of a specified type; The step of determining whether the attribute of the object matches the specified attribute includes: Determine whether the type of the object conforms to the specified type; If the type of the object does not conform to the specified type, directly determining that the attribute judgment result of the object is not associated with the specified attribute; If the type of the object matches the specified type, then it is determined whether the attribute of the object matches the specified attribute.

6. The acquisition method according to claim 1, It is characterized in that In the traversal sequence, whenever a forked node object is traversed, each branch path of the forked node object is traversed in turn before returning to the forked node object; and when the end point of each path is traversed, a backtracking traversal is performed.

7. The acquisition method according to claim 6, It is characterized in that The step of recording the attribute judgment result of the object comprises: If the object is traversed for the first time during the first traversal, the object and the result of determining its attributes are stored; If the object is not traversed for the first time during the first traversal, and the attribute judgment result of the object determined this time is different from the attribute judgment result of the object stored, the attribute judgment result of the object stored is updated to the attribute judgment result of the object determined this time.

8. The acquisition method according to claim 7, It is characterized in that The step of storing the object and the result of determining its attributes comprises: Insert the object and the Boolean value indicating the result of its property judgment into the unordered map container in the form of a key-value pair.

9. The acquisition method according to claim 1, It is characterized in that The step of determining whether each traversed object is on the target path based on the recorded attribute judgment result includes: During the second traversal, for each object traversed in sequence along the target direction, if the attribute judgment result of the object is associated with the specified attribute, it is determined that the object is on the target path.

10. The acquisition method according to claim 9, It is characterized in that The step of recording the objects on the target path to obtain the target path includes: The objects on the target path are recorded in the order in which they are traversed in sequence along the target direction during the second traversal to obtain the target path.

11. A device for acquiring a fan-in / fan-out path, It is characterized in that include: The attribute judgment unit is configured to perform a first traversal and record an attribute judgment result of whether each traversed object is associated with a specified attribute; An object judgment unit is configured to perform a second traversal and determine whether each traversed object is on the target path based on the recorded attribute judgment result; a path determination unit, configured to record objects on the target path to obtain the target path; The traversal order of the first traversal and the second traversal is the same, and the traversal order is: according to the connection relationship between objects in the target integrated circuit, traverse all objects that can be reached from the target object along the target direction; Wherein, the target path is: a fan-in / fan-out path for the target object that includes an object having the specified attribute; Wherein, the attribute judgment unit is specifically configured as follows: During the first traversal, each time an object is traversed, the attribute judgment result of the object is determined according to whether the attribute of the object matches the specified attribute and / or the attribute judgment result of the adjacent objects of the object; Record the attribute judgment result of the object; The adjacent object of the object is: the previous object of the object in the current traversal direction in the target integrated circuit.

12. A computer-readable storage medium storing instructions, It is characterized in that When the instructions are executed by a processor of an electronic device, the electronic device is enabled to execute the method for acquiring a fan-in / fan-out path as claimed in any one of claims 1 to 10.

13. An electronic device, It is characterized in that The electronic device comprises: at least one processor; at least one memory storing computer executable instructions, When the computer executable instructions are executed by the at least one processor, the at least one processor is prompted to execute the method for obtaining the fan-in / fan-out path according to any one of claims 1 to 10.

14. A computer program product comprising computer executable instructions, It is characterized in that When the computer executable instructions are executed by at least one processor, the method for obtaining the fan-in / fan-out path according to any one of claims 1 to 10 is implemented.