Method and device for realizing chain operation, equipment, storage medium and program product

By using predetermined rules in EDA scripts to determine modes and operations based on chain information, the existing chain programming problem of inconvenient method definition in EDA scripts is solved, efficient and flexible expression of chain operations is achieved, and chip design is improved. efficiency.

CN118642689APending Publication Date: 2024-09-13HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310261224.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-13
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

Existing chain programming requires defining specific methods for each chain in EDA scripts, resulting in inconvenience at the implementation level, lack of flexibility and simplicity, and difficulty in efficiently expressing complex operations in chip design.

Method used

By receiving chain programming statements and using predetermined rules to determine modes and operations based on chain information, there is no need to define corresponding methods for each chain, achieving flexible and efficient expression of chain operations.

Benefits of technology

It improves the execution efficiency of EDA scripts and chip design, simplifies the expression of EDA scripts, enhances flexibility and simplicity, and reduces redundant method definitions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118642689A
    Figure CN118642689A
Patent Text Reader

Abstract

The embodiment of the invention provides a method and device for realizing chain operation, equipment, a storage medium and a program product. The method includes receiving a chain-programmed statement, the statement including a chain for a set of objects. The method further includes determining a mode and operation for the chain using predetermined rules based on the chain information of the chain; and performing the operation in the mode for the set of objects. In this manner, by determining the mode and operation for the chain based on the chain information and the predetermined rules, it is not necessary to define a corresponding method for each chain, so that the efficiency of chain programming can be improved. Furthermore, in the field of chip design tools, flexible and effective expression of chain operation in an electronic design automation (EDA) script can be realized by utilizing the chain programming scheme disclosed by the invention, so that the execution efficiency of the EDA script is improved, and the efficiency of chip design is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure mainly relate to the field of chip design tools. More specifically, the embodiments of the present disclosure relate to methods, devices, equipment, computer-readable storage media, and computer program products for implementing chain operations. Background Art

[0002] Electronic design automation (EDA) software is widely used in chip functional design, synthesis, verification, simulation and other processes. By using EDA software to execute user-written EDA scripts, the chip design process can be easily carried out, such as architecture design and register transfer level (RTL) code design, logic synthesis, design for test (DFT), physical development and signoff.

[0003] Currently, chain programming is widely used due to its concise and efficient expression. Therefore, it is expected to use chain programming in EDA scripts to implement chain operations, thereby improving the execution efficiency of EDA scripts and further improving the efficiency of chip design. Summary of the invention

[0004] The embodiments of the present disclosure provide a solution for implementing chain operations.

[0005] In a first aspect of the present disclosure, a method for implementing chain operations is provided. The method includes receiving a statement of chain programming, the statement including a chain for a set of objects. The method also includes determining a mode and an operation for the chain based on chain information of the chain using a predetermined rule; and performing the operation in the mode for the set of objects. In this way, by determining the mode and the operation for the chain based on the chain information and the predetermined rule, it is not necessary to define a corresponding method for each chain, thereby improving the efficiency of chain programming.

[0006] In some embodiments of the first aspect, the mode is selected from a group including one or more of the following: filter mode, set mode, delete mode, add mode, get mode, call method mode. In some embodiments of the first aspect, determining the mode and operation for the chain includes determining the mode for the chain based on at least one of the following: a keyword in the chain information, a context of the chain, or configuration information of a class in which the object collection is located.

[0007] In this way, the mode and operation for the chain can be determined based on the predetermined rules and chain information, without defining multiple methods to implement the corresponding operation. As a non-limiting example, considering the business characteristics of the chip design field, a set of modes can be pre-set for a specific type of object set. In this way, a limited set of modes and a combination of chain information can be used to indicate rich and varied operations, thereby improving the flexibility and simplicity of EDA scripts.

[0008] In some embodiments of the first aspect, the chain information includes a chain name of the chain, the chain name is a property name of the object collection, a custom word, or is empty. In some embodiments of the first aspect, the chain information includes an auxiliary modifier, the auxiliary modifier indicates at least a part of the operation of the chain. In some embodiments of the first aspect, the chain information includes a keyword, the keyword indicates the mode of the chain.

[0009] In this way, since the chain information may include one or more of the chain name, auxiliary modifiers, and keywords, the flexibility and simplicity of the expression of chain programming statements may be improved. For example, the chain information may not include the chain name, or different chains implementing different operations may use the same chain name.

[0010] In some embodiments of the first aspect, determining the mode and operation for the chain includes: based on determining that the mode for the chain is a filtering mode, identifying at least one of an auxiliary modifier and a chain name in the chain information; and determining the operation for the chain in the filtering mode based on the at least one of the auxiliary modifier and the chain name. In some embodiments of the first aspect, determining the operation for the chain in the filtering mode also includes: identifying a parameter value in the chain information for determining the operation for the chain.

[0011] In some embodiments of the first aspect, determining the mode and operation for the chain includes: based on determining that the mode for the chain is a delete mode, determining that the operation for the chain is an operation for deleting the set of objects. In some embodiments of the first aspect, determining the mode and operation for the chain includes: based on determining that the mode for the chain is an add mode or a set mode, identifying a parameter value in the chain information; and determining the operation for the chain in the mode based on the identified parameter value. In some embodiments of the first aspect, determining the mode and operation for the chain also includes: identifying a parameter name in the chain information for determining the operation for the chain.

[0012] In some embodiments of the first aspect, determining the mode and operation for the chain includes: based on determining that the mode for the chain is a setting mode or a getting mode, identifying a chain name indicating the properties of the object collection in the chain information; and based on the properties and the mode, determining the operation for the chain in the mode.

[0013] In some embodiments of the first aspect, determining the mode and operation for the chain includes: based on determining that the mode for the chain is an acquisition mode, identifying a variable name in the chain information; or based on determining that the mode for the chain is a setting mode, identifying a parameter name in the chain information.

[0014] In some embodiments of the first aspect, the statement is part of a script written in Python, and the script is used to perform an electronic design automation (EDA) function. In some embodiments of the first aspect, the object set includes one of the following: a clock object, a pin object, or a port object. In this way, in the field of chip design tools, using the chain programming scheme disclosed in the present invention, a flexible and effective expression of chain operations can be implemented in an electronic design automation (EDA) script, thereby improving the execution efficiency of the EDA script, and then improving the efficiency of chip design.

[0015] In a second aspect of the present disclosure, a device for implementing chain operations is provided. The device includes a receiving unit configured to receive a statement of chain programming, wherein the statement includes a chain for a set of objects. The device also includes a determining unit configured to determine a mode and an operation for the chain based on chain information of the chain using a predetermined rule. The device also includes an operation execution unit configured to execute the operation in the mode for the set of objects.

[0016] In some embodiments of the second aspect, the mode is selected from a group including one or more of the following: filter mode, setting mode, deletion mode, addition mode, acquisition mode, and call method mode. In some embodiments of the second aspect, the determining unit is configured to determine the mode for the link based on at least one of the following: a keyword in the link information, a context of the link, or configuration information of a class in which the object set is located.

[0017] In some embodiments of the second aspect, the chain information includes a chain name of the chain, the chain name is a property name of the object collection, a custom word, or is empty. In some embodiments of the second aspect, the chain information includes an auxiliary modifier, the auxiliary modifier indicates at least a part of the operation of the chain. In some embodiments of the second aspect, the chain information includes a keyword, the keyword indicates the mode of the chain.

[0018] In some embodiments of the second aspect, the determining unit is configured to, based on determining that the mode for the chain is a filtering mode, identify at least one of an auxiliary modifier and a chain name in the chain information; and determine the operation for the chain in the filtering mode based on the at least one of the auxiliary modifier and the chain name. In some embodiments of the second aspect, the determining unit is further configured to: identify a parameter value in the chain information for determining the operation for the chain.

[0019] In some embodiments of the second aspect, the determining unit is configured to: determine that the operation for the chain is an operation for deleting the object set based on determining that the mode for the chain is a delete mode. In some embodiments of the second aspect, the determining unit is configured to: identify a parameter value in the chain information based on determining that the mode for the chain is an add mode or a set mode; and determine the operation for the chain in the mode based on the identified parameter value. In some embodiments of the second aspect, the determining unit is further configured to: identify a parameter name in the chain information for determining the operation for the chain.

[0020] In some embodiments of the second aspect, the determination unit is configured to: identify a chain name indicating the attributes of the object collection in the chain information based on determining that the mode for the chain is a setting mode or a get mode; and determine the operation for the chain in the mode based on the attributes and the mode.

[0021] In some embodiments of the second aspect, the determination unit is configured to: identify a variable name in the chain information based on determining that the mode for the chain is an acquisition mode; or identify a parameter name in the chain information based on determining that the mode for the chain is a setting mode.

[0022] In some embodiments of the second aspect, the statement is part of a script written in Python, and the script is used to perform an electronic design automation (EDA) function. In some embodiments of the second aspect, the object set includes one of the following: a clock object, a pin object, or a port object.

[0023] In a third aspect of the present disclosure, an electronic device is provided, comprising: at least one computing unit; and at least one memory, wherein the at least one memory is coupled to the at least one computing unit and stores instructions for execution by the at least one computing unit, and when the instructions are executed by the at least one computing unit, the device implements the method provided in the first aspect.

[0024] In a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is executed by a processor to implement the method provided in the first aspect.

[0025] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer executable instructions, which implement part or all of the steps of the method of the first aspect when the instructions are executed by a processor.

[0026] It can be understood that the electronic device of the third aspect, the computer storage medium of the fourth aspect, or the computer program product of the fifth aspect provided above are all used to execute the method provided in the first aspect. Therefore, the explanation or description of the first aspect is also applicable to the third aspect, the fourth aspect, and the fifth aspect. In addition, the beneficial effects that can be achieved in the third aspect, the fourth aspect, and the fifth aspect can refer to the beneficial effects in the corresponding method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. In the accompanying drawings, the same or similar reference numerals represent the same or similar elements, wherein:

[0028] Figure 1 A schematic diagram illustrating an example environment in which various embodiments of the present disclosure can be implemented;

[0029] Figure 2 A flowchart showing a process of an example method for chain programming according to some embodiments of the present disclosure;

[0030] Figure 3 A schematic diagram showing a mode of determining a chain according to some embodiments of the present disclosure;

[0031] Figures 4a to 4f A schematic diagram showing an example of a grammatical rule for a chain according to some embodiments of the present disclosure;

[0032] Figure 5 A schematic diagram showing an example of a collection of objects that perform chain operations according to some embodiments of the present disclosure;

[0033] Figure 6 A schematic block diagram showing an apparatus for implementing a chain operation according to some embodiments of the present disclosure; and

[0034] Figure 7 A block diagram of a computing device capable of implementing various embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0035] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0036] In the description of the embodiments of the present disclosure, the term "including" and similar terms should be understood as open inclusion, that is, "including but not limited to". The term "based on" should be understood as "based at least in part on". The term "one embodiment" or "the embodiment" should be understood as "at least one embodiment". The terms "first", "second", etc. may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0037] As briefly mentioned above, chain programming has been widely used due to its concise and efficient expression. The core of chain programming is to achieve the chain effect by returning a this object, that is, returning the object itself. An example of chain programming is shown below, that is, StringBuffer commonly used in Java language.

[0038] StringBuffer builder=new StringBuffer();

[0039] builder.append("Xiao Ming").append("Xiao Wang").append("Xiao Zhang");

[0040] As shown above, multiple appends can be used efficiently in chain programming to complete string addition. Here, each append is a chain, and the chain name is append. Therefore, by linking multiple operations together into a whole through the dot ".", chain programming can implement chain operations concisely and conveniently.

[0041] In addition, the inventors recognize that the use of chain programming in EDA scripts to implement chain operations can improve the flexibility and simplicity of EDA scripts. Specifically, the business characteristics of the chip design field can be considered to achieve flexible and effective expression of EDA scripts, thereby improving the execution efficiency of EDA scripts. For example, in the scenario of chip design, it may be necessary to perform multiple operations such as screening, setting attribute values, or obtaining attribute values ​​for a specific set of objects in the circuit system. In this case, the use of chain programming can simplify the expressions used to implement these operations. In an example, the chain programming statement port.find_name('SIG*').find_delay_gt(10).set_delay(5) can implement the operation of finding ports named "SIG*" in the circuit system and with a delay greater than 10 and setting their new delay to 5.

[0042] However, in conventional chain programming schemes, each chain needs to be implemented by a specific method, which brings inconvenience in the implementation level. For example, the append chain needs to be implemented by the corresponding append method. For another example, it is necessary to define the find_name method, find_delay_gt method, and set_delay method to respectively implement the operation of finding the port named "SIG*" in the circuit system, the operation of finding the port with a delay greater than 10 in the circuit system, and the operation of setting a new delay of 5.

[0043] In order to at least partially solve the above problems and other potential problems, various embodiments of the present disclosure provide a chain programming solution. According to various embodiments described herein, a method for implementing chain operations is provided. The method includes receiving a statement of chain programming, which includes a chain for a set of objects. The method also includes determining a mode and operation for the chain based on chain information of the chain using predetermined rules. The method also includes executing the operation in the mode for the set of objects.

[0044] In this way, by determining the mode and operation for the chain based on the chain information and predetermined rules, it is not necessary to define a corresponding method for each chain, thereby improving the efficiency of chain programming. Further, in the field of chip design tools, using the chain programming solution disclosed in the present invention, flexible and effective expression of chain operations can be achieved in EDA scripts, thereby improving the efficiency of chip design.

[0045] Various exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings. Figure 1A schematic diagram of an example environment 100 in which multiple embodiments of the present disclosure can be implemented is shown. Environment 100 describes a typical scenario in which the chain programming solution of the present disclosure can be implemented, that is, developing EDA scripts based on Python. At present, tool command language (TCL) scripts are commonly used in the EDA field. However, compared with TCL, Python language can express logic more efficiently because it has object-oriented commands and dynamic languages.

[0046] like Figure 1 As shown, a user (e.g., a chip design engineer) can write an EDA script 101 based on Python to pass design information to the EDA software. The EDA script 101 developed based on Python includes one or more statements using the chain programming scheme of the present disclosure. For the convenience of discussion, the chain in the chain programming scheme of the present disclosure is referred to as a virtual chain below to distinguish it from a conventional chain that uses a corresponding method to implement the operation of the chain. Unlike a conventional chain, a virtual chain does not need to be implemented by a specific method corresponding to the virtual chain. On the contrary, a virtual chain can represent any meaning you want to represent (i.e., implement any suitable operation), as long as the chain information of the virtual chain written by the user is consistent with the semantics defined in the system implementation.

[0047] like Figure 1 As shown, the environment 100 includes a chain programming implementation interface 110. When writing an EDA script 101, the user should follow the Figure 1 The chain programming implementation interface 110 shown in FIG. 1 represents a specification. The specification defines the operations that a user can perform according to the chain programming solution disclosed herein. For example, the specification can define operations of adding, deleting, modifying, checking, and / or calculating background data. A user can write chain programming statements in the EDA script 101 based on the specification to implement the desired operations. The details of the specification will be further described below.

[0048] In some embodiments, the background implementation system for implementing the EDA script 101 may include a Python interpreter 115 , a Python adaptation layer 118 , a C++ adaptation layer 120 , an interface layer 122 between the Python adaptation layer 118 and the C++ adaptation layer 120 , and a background database or computing engine 130 .

[0049] The Python adaptation layer 118 can receive the chain programming statements in the EDA script 101, and determine the operations corresponding to the chain programming statements according to the chain programming scheme of the present disclosure. The Python adaptation layer 118 can transmit the determined operations to the C++ adaptation layer 120 via the interface layer 122. The C++ adaptation layer 120 can transmit the determined operations to the background database or the computing engine 130. The background database or the computing engine 130 can execute the determined operations and return the results.

[0050] It should be understood that Figure 1 The examples and corresponding descriptions shown in are illustrative only and not restrictive. For example, the chain programming scheme according to the present disclosure can also be applied to any suitable programming language other than Python, and can be applied to any suitable application scenario other than EDA. The scope of the present disclosure is not limited in terms of programming languages ​​and specific uses.

[0051] Figure 2 A flowchart of a process 200 of an example method for implementing a chain operation according to some embodiments of the present disclosure is shown. Process 200 can be implemented by any suitable computing unit. For example, it can be executed by a computer or other electronic device with computing or circuit design capabilities. Specifically, for example, a processor of a computer that implements the functions of EDA software can execute process 200 according to data and / or instructions stored in a memory. Figure 1 An example process 200 for implementing a chain operation is described below.

[0052] In block 210, the processor receives a statement of chain programming, the statement comprising a chain for a collection of objects. In some embodiments, the statement of chain programming may be part of a script (e.g., EDA script 101) for performing EDA functions. In some embodiments, the statement of chain programming may be part of a script written in Python. Alternatively, the statement of chain programming may be written in other programming languages.

[0053] In some embodiments, the statement may include one or more chains for a set of objects. The one or more chains may be concatenated together by ".". Alternatively, the one or more chains may be concatenated together by other symbols. In one example, the received statement may be clock.name('newclk') including a single chain. In another example, the received statement may be clock.name('clk*').get(n='$.name', p='$.period') including multiple chains.

[0054] In some embodiments, an object set may include one or more objects, i.e., a single object or a set of objects. In the field of chip design, examples of objects may include clock objects, pin objects, or port objects, etc. Objects may be instantiated from corresponding classes. For example, a single clock object may be obtained from an instantiation of the Clock class, and a single pin object may be obtained from an instantiation of the Pin class.

[0055] In some embodiments, the object set may be all clock objects, pin objects, or port objects in the circuit system. The object set may be instantiated by a corresponding class. For example, the clock object set may be obtained by instantiating a ClockQuery class that is different from the Clock class. In one example, the received statement may be clock.clr, which indicates deleting the clock object set. In another example, the received statement may be clock.add(name='CLK', period=10), which indicates adding a new clock object to the clock object set.

[0056] In box 220, the processor determines the mode and operation for the chain based on the chain information of the chain using predetermined rules. The chain information may include at least one of the text and semantic information of the expression of the chain. For example, in the example of the above statement, the chain information may include "name", "get", "add", "(name = 'CLK', period = 10)", "period", etc. The chain information may indicate at least one of the modes and operations corresponding to the chain. In other words, different from the conventional chain programming scheme, in the chain programming scheme of the present disclosure, the chain information of the virtual chain can be analyzed based on predetermined rules to determine the mode and / or operation corresponding to the chain, without defining a method for each chain to indicate (and implement) the operation corresponding to the chain.

[0057] In some embodiments, the predetermined rule may be part of the configuration information of the class in which the object set is located. In other words, the rules for parsing the chain information may be defined in the configuration information of the class. For example, the rule may include a mapping relationship between specific chain information and a mode and / or operation.

[0058] In some embodiments, the chain information may include a chain name. For example, the chain names "name" and "period" may be at least a part of the chain information. In some embodiments, the chain name may be an attribute name of an object or a collection of objects. For example, "name" and "period" may be attribute names of the object clock. Alternatively, the chain name may be empty. In other words, the chain information may not include a chain name. In some cases, since an object has only a single attribute, its attribute name is not important, that is, the corresponding chain name may be empty and represent a default value. For example, a delay object may have only one attribute, the delay value, so delay.set(5) may be used instead of delay.set.value(5) to represent the operation of setting the delay value to 5.

[0059] In some embodiments, the chain name may include a main chain name and an auxiliary modifier for modifying the main chain name. The auxiliary modifier may indicate at least a portion of the operation corresponding to the chain. In some embodiments, the auxiliary modifier may indicate the operation to be performed together with the main chain name. For example, in the statement clock.lt.period(5), "lt" may be an auxiliary modifier, meaning less than. The auxiliary modifier, together with the main chain name period, may indicate an operation on a clock object with a period less than 5. Alternatively, the main chain name may be empty and only the auxiliary modifier may be used to indicate the corresponding operation. For example, delay.lt(5) may be used instead of delay.lt.value(5) to indicate an operation on a delay object with a delay value less than 5.

[0060] Alternatively or additionally, the chain information may include a keyword. The keyword may indicate a mode for the chain. In some embodiments, the mode may be switched based on the keyword. Examples of modes may include one or more of a filter mode, a set mode, a delete mode, an add mode, a get mode, and a call mode. Examples of corresponding keywords may be filter, set, clr, add, get, and call.

[0061] In filtering mode, operations of filtering one or more objects may be performed. In setting mode, operations of setting the property value of an object may be performed. In deleting mode, operations of deleting one or more objects may be performed. In adding mode, operations of adding one or more objects may be performed. In acquiring mode, operations of acquiring the property value of an object may be performed. In calling method mode, operations of calling a method may be performed. In some embodiments, a chain for a single object may have one or more of a setting mode, an acquiring mode, and a calling method mode. A chain for a collection of objects may have one or more of an adding mode, a deleting mode, and a filtering mode. It should be understood that the above modes are merely exemplary and do not constitute a limitation on the scope of the present disclosure. For example, a chain for a single object may also have a deleting mode.

[0062] In some embodiments, a keyword may indicate an operation corresponding to a chain. A keyword may indicate an operation corresponding to a chain alone or together with a chain name and / or auxiliary modifiers. For example, delay.set(5) may be used to indicate an operation that sets the delay value of a delay object to 5. In different modes, the same chain name (or auxiliary modifier) ​​may indicate different operations. For example, set.name('CLK') may indicate an operation that sets the name of an object to "CLK", while filter.name('CLK') may indicate an operation that finds an object named "CLK".

[0063] In some embodiments, the chain information may include a custom word to indicate at least a portion of a mode and / or operation corresponding to the chain. The custom word may be determined based on business needs. As long as the semantics of the custom word is defined in a predetermined rule, any suitable custom word may be used as at least a portion of the chain information. For example, in filter mode, a custom word may be used to represent a filtering dimension. For example, the custom word "rise" in the statement delay.rise may be used to represent an operation of finding a delay object for a rising edge of a signal.

[0064] In this way, by using chain information and predetermined rules, the operation corresponding to the chain can be efficiently determined without defining a corresponding method for each chain to indicate the operation for the chain. In addition, in conventional chain programming schemes, since the methods implementing different operations will have different method names, and the chain name is usually the corresponding method name, redundancy in the description of the chain name may be brought about at the description level.

[0065] For example, in the conventional chain programming statement Port.find_name('SIG*').find_delay_gt(10).set_delay(5), different operations for the same delay attribute may require setting multiple chains with different chain names (e.g., find_delay_gt, set_delay). In contrast, in the chain programming scheme of the present disclosure, the chain information of the virtual chain may not include the chain name, or different chains that implement different operations may use the same chain name, thereby improving the flexibility and simplicity of expression. For example, set.name('CLK') may represent the operation of setting the name of an object to "CLK", while filter.name('CLK') may represent the operation of searching for an object named "CLK".

[0066] As discussed above, in some embodiments, the mode and operation for the chain can be determined based on chain information (e.g., keywords, chain names, and / or auxiliary modifiers). Additionally or alternatively, the mode and / or operation for the chain can be determined based on the context of the chain. In one example, a default mode and / or operation can be determined as the mode and / or operation for the chain. For example, the filtering mode can be set as the default mode. In another example, the mode and / or operation corresponding to the previous chain of the chain can be determined as the mode and / or operation for the chain. Additionally or alternatively, the mode and / or operation for the chain of the object or set of objects can be determined based on the configuration information of the class to which the object or set of objects belongs. For example, the mode and / or operation for the chain of the object or set of objects can be pre-set in the configuration information.

[0067] At block 230, the processor performs the operations in the pattern on the collection of objects. Figure 1 For example, the backend database or computing engine 130 may execute the operations in the determined mode for the object set. In some embodiments, the execution result may be returned to the chain together with the object set itself for subsequent chain calls.

[0068] By using process 200, by determining the mode and operation for the chain based on the chain information and predetermined rules, it is not necessary to define a corresponding method for each chain, thereby improving the efficiency of chain programming. Further, in the field of chip design tools, using the chain programming solution disclosed in the present invention, flexible and effective expression of chain operations can be achieved in EDA scripts, thereby improving the efficiency of chip design.

[0069] Figure 3 A schematic diagram showing a mode of determining a chain according to some embodiments of the present disclosure is shown. Figure 3 FIG. 2 shows a syntax diagram associated with a chain mode in the chain programming scheme of the present disclosure. Figure 3 As shown, an initial set query may be performed first to determine the type of the object set involved in the statement. For example, it may be first determined whether the object set in the statement is a clock object set, a pin object set, a delay object set, or a port object set. It should be understood that an initial object query may also be performed first to determine the type of a single object involved in the statement. For example, it may be first determined whether the object in the statement is a clock object, a pin object, a delay object, or a port object.

[0070] For the type of the determined object or object set, the mode corresponding to the chain of the object or object set can be further determined. In some embodiments, different objects (or object sets) may have different modes. That is, for different objects (or object sets), a corresponding set of modes can be predefined. For example, for a clock object, it can be determined whether the mode currently corresponding to the chain is filter mode, clr mode, add mode, set mode, get mode or call mode. If the corresponding mode cannot be identified in a predefined set of modes for a specific object (or object set), it can be considered that the parsing has failed.

[0071] Figures 4a to 4f A schematic diagram showing an example of a grammatical rule for a chain according to some embodiments of the present disclosure is shown. Figures 4a to 4f As shown, grammar rules can be described using grammar diagrams. Figure 1 As described above, when writing chain programming statements (such as EDA script 101) according to the present disclosure, the user should follow the Figure 1 The chain programming implementation interface 110 shown is a specification. The specification defines the operations that a user can perform according to the chain programming scheme of the present disclosure. Specifically, the specification defines the grammatical rules that a user should follow when writing statements of the chain programming according to the present disclosure. In other words, the statements written by the user need to be parsed according to the defined grammatical rules for subsequent execution.

[0072] Figure 4a A syntax diagram 410 for parsing a chain of filter patterns and some associated statement examples are shown. Figure 4a As shown, it can be determined that the chain is in filtering mode based on the keyword filter in the chain information. Based on determining that the mode for the chain is filtering mode, auxiliary modifiers indicating auxiliary conditions can be further identified in the chain information. Alternatively or additionally, based on determining that the mode for the chain is filtering mode, a chain name indicating a filtering operation can be further identified in the chain information. Based on the determined auxiliary modifiers and / or chain name, the operation for the chain can be determined. Additionally, parameter values ​​can be further identified in the chain information for further determining the operation for the chain.

[0073] In some embodiments, the keyword filter can be omitted. In one example, clock.name('clock') can represent a search for a clock object whose name is clock. In another example, the statement clock.not.name('clock') can use the auxiliary modifier "not" to further modify the main chain name "name". This statement can represent a search for a clock object whose name is not clock. In another example, the statement delay.lt(5) can use the auxiliary modifier "lt" to represent a search for a delay object whose delay is less than 5.

[0074] Figure 4b A syntax diagram 420 for parsing a chain of delete (clr) patterns and some associated statement examples are shown. Figure 4b As shown, it can be determined that the chain is in delete mode based on the keyword clr in the chain information. Based on determining that the mode for the chain is delete mode, it can be determined that the operation for the chain is an operation for deleting the object set. For example, the statement clock.clr can represent an operation for deleting the clock object.

[0075] Figure 4c The syntax diagram 430 for parsing a chain of add mode and some associated statement examples are shown. Figure 4c As shown, it can be determined that the chain is in the addition mode based on the keyword add in the chain information. Based on determining that the mode for the chain is the addition mode, the parameter value can be further identified in the chain information. Based on the identified parameter value, the operation for the chain in the addition mode can be determined. For example, although not shown, the statement delay.add(5) can represent an operation of increasing the delay of a delay object by 5. Additionally, based on determining that the mode for the chain is the addition mode, the parameter name can be further identified in the chain information for determining the operation for the chain. For example, the statement clock.add(name='CLK', period=10, waveform=[0,5]) can represent an operation of adding a clock object, the name of the clock object is CLK, the period (period) is 10, and the waveform (waveform) is in [0,5].

[0076] Figure 4d A syntax diagram 440 for parsing a chain of set modes and some associated statement examples are shown. Figure 4dAs shown, it can be determined that the chain is in the setting mode based on the keyword set in the chain information. Based on determining that the mode for the chain is the setting mode, the parameter value can be further identified in the chain information. Based on the identified parameter value, the operation for the chain in the setting mode can be determined. For example, the statement delay.set(5) can represent the operation of setting the delay value of the delay object to 5. Additionally, based on determining that the mode for the chain is the setting mode, the parameter name can be further identified in the chain information to determine the operation for the chain. For example, the statement oc.set(analysis="abc", min="a", max="b") can represent the operation of setting the analysis parameter of the target object (oc) to "abc", the parameter minimum value (min) is set to "a" and the maximum value (max) is "b".

[0077] Alternatively, based on determining that the mode for the chain is the setup mode, a chain name indicating the attributes of a set of objects may be further identified in the chain information. For example, the attribute name of a set of objects may be identified in the chain information. Based on the determined attributes and the mode, the operation for the chain in the mode may be determined. Additionally, parameter values ​​may be further identified in the chain information. Based on the determined attributes and parameter values, the operation for the chain in the mode may be determined. For example, when parsing the statement clock.name('oldclk').set.name('newclk'), it may be determined based on the keyword set that the chain switches to the setup mode. Based on further identifying the attribute name "name" and the parameter value "newclk" in the chain information, the operation of setting the name of the clock object to "newclk" may be determined.

[0078] Figure 4e A syntax diagram 450 for parsing a chain of get patterns and some associated statement examples are shown. Figure 4e As shown, it can be determined that the link is in the acquisition mode based on the keyword get in the link information. Based on determining that the mode for the link is the acquisition mode, a link name indicating the attribute of the object set can be further identified in the link information. For example, the attribute name of the object set can be identified in the link information. Based on the determined attribute and the mode, the operation for the link in the mode can be determined.

[0079] Alternatively or additionally, based on determining that the mode for the chain is the acquisition mode, the variable name can be further identified in the chain information. Based on the determined attributes and variables, the operation for the chain in the mode can be determined. For example, when parsing the statement delay.get('d'), it can be determined based on the keyword get that the chain switches to the acquisition mode. Based on the variable name "d" further identified in the chain information, it can be determined that the corresponding operation is to obtain the value of the unique attribute "delay" of the delay object to assign it to the variable "d". Additionally, the parameter value for the variable name can be further identified in the chain information. For example, when parsing the statement clock.name('clk*').get(n='$.name',p='$.period'), based on the keyword get in the chain information, the acquisition mode can be determined. Based on the variable name and the corresponding parameter value in the chain information, it can be determined that the corresponding operation is to obtain the value of the attribute name of the clock object to assign it to the variable "n" and to obtain the value of the attribute period of the clock object to assign it to the variable "p".

[0080] Figure 4f A syntax diagram 460 for parsing a chain of call patterns and some associated statement examples are shown. Figure 4f As shown, it can be determined that the chain is in the call method mode based on the keyword call in the chain information. Based on the determination that the mode for the chain is the call mode, the method name can be further identified in the chain information. Additionally, the parameter name and parameter value can be further identified in the chain information. Based on the determined method (and the parameter name and parameter value), the operation for the chain in the call method mode can be determined. For example, Figure 4f The statement shown may represent an operation of calling a compile method. In this way, the chain programming scheme according to the present disclosure may implement the function of a conventional chain programming scheme similarly, that is, the chain operation is implemented by defining a specific method.

[0081] References Figures 4a to 4f The grammatical rules of chains according to some embodiments of the present disclosure are described. It should be understood that the above grammatical rules and corresponding grammatical diagrams are only exemplary and do not constitute a limitation on the scope of the present disclosure. For example, any suitable pattern and corresponding grammatical rules can be defined for the type of object.

[0082] Figure 5 FIG. 5 is a schematic diagram showing an example 500 of an object set that performs a chain operation according to some embodiments of the present disclosure. Figure 5As shown, in some embodiments, various classes inherited from the Query class can be defined in the system implementation to generate a specific type of object collection. The Query class can be a class that performs search queries, which can encapsulate query conditions, sorting, fields and other functions. The Query class can derive classes for different types, such as the ClockQuery class for a clock object collection, the PinQuery class for a pin object collection, and the PortQuery class for a port object collection. The ClockQuery class for the clock object collection, the PinQuery class for the pin object collection, and the PortQuery class for the port object collection can instantiate the clock object collection, the pin object collection, and the port object collection accordingly. Alternatively, only classes for object collections of various types can be defined without defining a Query class. Alternatively or additionally, classes for single objects of various types can be defined in the system implementation, such as the Clock class for a single clock object, and multiple clock objects can be aggregated into a clock object collection.

[0083] As described above, the configuration information of the class may include at least a portion of the predetermined rules. In some embodiments, the Query class may include unified configuration information for each derived class (e.g., ClockQuery class, PinQuery class). In some embodiments, a unified chain entry may be defined in the class for reading chain information. For example, in Python, the _getattr_ function may be used as a unified chain entry to conveniently obtain chain information, such as the attribute value of an object. In this way, the current mode and operation for the chain can be efficiently determined based on the class configuration information and the chain information without the need for a specific method implementation behind the chain.

[0084] References Figures 1 to 5 The principles and details of the chain programming scheme according to the embodiment of the present disclosure are described. It should be understood that the above process 200 is only exemplary and does not constitute a limitation on the scope of the present disclosure. According to the chain programming scheme of the present disclosure, it is not necessary to define a corresponding method for each chain to implement the corresponding operation. Instead, the mode and operation corresponding to the chain can be determined based on the chain information and predetermined rules, thereby improving the efficiency of implementing the chain operation.

[0085] Specifically, users can simply implement more general operations through flexible combinations without being limited to specific implementation methods. For example, it is convenient to implement serial operations in the same mode. At the same time, by switching keywords, it is also possible to implement serial operations in different modes. In addition, the expression of logic can be simplified to reduce the redundancy of description. For example, the same attribute name can be reused in combination with the mode to represent different operations.

[0086] Example devices and equipment

[0087] Figure 6 600 is a block diagram of a device 600 for implementing chain operations according to an embodiment of the present disclosure. Specifically, the device 600 may be an EDA software device. The device 600 may include multiple modules for performing the following operations: Figure 2 The corresponding steps in the process 200 discussed in Figure 6 As shown, the apparatus 600 includes a receiving unit 610, which is configured to receive a statement of chain programming, wherein the statement includes a chain for a set of objects. The apparatus 600 also includes a determining unit 620, which is configured to determine a mode and an operation for the chain based on the chain information of the chain using a predetermined rule. The apparatus 600 also includes an operation executing unit 630, which is configured to execute the operation in the mode for the set of objects.

[0088] In some embodiments, the mode may be selected from a group including one or more of the following: filter mode, setting mode, deletion mode, addition mode, acquisition mode, and call method mode. In some embodiments, the determining unit 620 may be configured to determine the mode for the chain based on at least one of the following: a keyword in the chain information, a context of the chain, or configuration information of a class in which the object set is located.

[0089] In some embodiments, the chain information may include a chain name of the chain, the chain name being a property name of the object set, a custom word, or being empty. In some embodiments, the chain information may include an auxiliary modifier, the auxiliary modifier indicating at least a portion of the operation of the chain. In some embodiments, the chain information may include a keyword, the keyword indicating the mode of the chain.

[0090] In some embodiments, the determining unit 620 may be configured to, based on determining that the mode for the chain is a filtering mode, identify at least one of an auxiliary modifier and a chain name in the chain information; and determine the operation for the chain in the filtering mode based on the at least one of the auxiliary modifier and the chain name. In some embodiments, the determining unit 620 may be further configured to: identify a parameter value in the chain information for determining the operation for the chain.

[0091] In some embodiments, the determination unit 620 may be configured to: determine that the operation for the chain is an operation for deleting the object set based on determining that the mode for the chain is a delete mode. In some embodiments, the determination unit 620 may be configured to: identify a parameter value in the chain information based on determining that the mode for the chain is an add mode or a set mode; and determine the operation for the chain in the mode based on the identified parameter value. In some embodiments, the determination unit 620 may be further configured to: identify a parameter name in the chain information for determining the operation for the chain.

[0092] In some embodiments, the determining unit 620 may be configured to: based on determining that the mode for the chain is a setting mode or a getting mode, identify a chain name indicating the property of the object set in the chain information; and based on the property and the mode, determine the operation for the chain in the mode. In some embodiments, the determining unit 620 may be configured to: based on determining that the mode for the chain is an getting mode, identify a variable name in the chain information; or based on determining that the mode for the chain is a setting mode, identify a parameter name in the chain information.

[0093] In some embodiments, the statement may be part of a script written in Python, and the script may be used to perform an electronic design automation (EDA) function. In some embodiments, the object collection may include one of the following: a clock object, a pin object, or a port object.

[0094] Figure 7 A schematic block diagram of an example device 700 that can be used to implement an embodiment of the present disclosure is shown. As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to computer program instructions stored in a random access memory (RAM) 703 and / or a read-only memory (ROM) 702 or computer program instructions loaded from a storage unit 708 into the RAM 703 and / or the ROM 702. In the RAM 703 and / or the ROM 702, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701 and the RAM 703 and / or the ROM 702 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0095] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0096] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as process 200. For example, in some embodiments, process 200 may be implemented as a computer software program, specifically an EDA program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via RAM and / or ROM and / or a communication unit 709. When the computer program is loaded into RAM and / or ROM and executed by the computing unit 701, one or more steps of the process 200 described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform process 200 in any other appropriate manner (e.g., by means of firmware).

[0097] In the above embodiments, the method flow can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a server or terminal, the process or function described in the embodiment of the present application is generated in whole or in part. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a server or terminal or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (such as a floppy disk, a hard disk and a tape, etc.), an optical medium (such as a digital video disk (digital video disk, DVD), etc.), or a semiconductor medium (such as a solid-state hard disk, etc.).

[0098] In addition, although each operation is described in a specific order, this should be understood as requiring such operation to be performed in the specific order shown or in a sequential order, or requiring that all illustrated operations should be performed to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation can also be implemented in multiple implementations individually or in any suitable sub-combination mode.

[0099] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A method for implementing a chain operation, comprising: receiving a chain programming statement, the statement comprising a chain for a collection of objects; Based on the chain information of the chain, determine the mode and operation for the chain using predetermined rules; as well as The operations in the schema are performed on the set of objects. 2 . The method according to claim 1 , wherein the mode is selected from the group consisting of one or more of the following: filter mode, set mode, delete mode, add mode, get mode, call method mode.

3. The method of any one of claims 1 to 2, wherein determining a mode and an operation for the chain comprises determining the mode for the chain based on at least one of: Keywords in the link information, the context of the link, or configuration information of the class to which the object set belongs. 4 . The method according to claim 1 , wherein the chain information comprises a chain name of the chain, and the chain name is a property name of the object set, a user-defined word, or is empty. 5 . The method according to claim 1 , wherein the chain information includes auxiliary modifiers indicating at least a portion of the operation of the chain. 6 . The method according to claim 1 , wherein the chain information comprises a keyword indicating the mode of the chain.

7. The method of any one of claims 1 to 6, wherein determining a mode and an operation for the chain comprises: Based on determining that the mode for the chain is a filtering mode, identifying at least one of an auxiliary modifier and a chain name in the chain information; as well as The operation for the chain in the filtering mode is determined based on the at least one of the auxiliary modifier and the chain name.

8. The method of claim 7, wherein determining the operation for the chain in the filtering mode further comprises: A parameter value is identified in the chain information for use in determining the operation for the chain.

9. The method of any one of claims 1 to 6, wherein determining a mode and an operation for the chain comprises: Based on determining that the mode for the chain is a delete mode, determining that the operation for the chain is an operation for deleting the object set.

10. The method of any one of claims 1 to 6, wherein determining a mode and an operation for the chain comprises: Based on determining that the mode for the chain is an add mode or a set mode, identifying a parameter value in the chain information; as well as The operation for the chain in the mode is determined based on the identified parameter value.

11. The method of claim 10, wherein determining a mode and an operation for the chain further comprises: A parameter name is identified in the chain information to be used for determining the operation for the chain.

12. The method of any one of claims 1 to 6, wherein determining a mode and an operation for the chain comprises: Based on determining that the mode for the chain is a set mode or a get mode, identifying a chain name indicating a property of the object set in the chain information; as well as Based on the attributes and the mode, the operation for the chain in the mode is determined.

13. The method of any one of claims 1 to 6, wherein determining a mode and an operation for the chain comprises: Based on determining that the mode for the chain is a get mode, identifying a variable name in the chain information; or Based on determining that the mode for the chain is a setup mode, a parameter name is identified in the chain information.

14. The method according to any one of claims 1 to 13, wherein the statement is part of a script written in Python, and the script is used to perform an Electronic Design Automation (EDA) function.

15. The method according to any one of claims 1 to 14, wherein the set of objects comprises one of the following: a clock object, a pin object or a port object.

16. A device for implementing chain operation, comprising: A receiving unit configured to receive a statement of chain programming, wherein the statement includes a chain for an object set; a determining unit configured to determine a mode and an operation for the chain using a predetermined rule based on the chain information of the chain; as well as An operation execution unit is configured to execute the operation in the mode for the object set.

17. An electronic device comprising: at least one computing unit; At least one memory, the at least one memory is coupled to the at least one computing unit and stores instructions for execution by the at least one computing unit, the instructions, when executed by the at least one computing unit, causing the electronic device to perform the method according to any one of claims 1-15.

18. A computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method according to any one of claims 1 to 15.

19. A computer program product comprising computer executable instructions, wherein the computer executable instructions, when executed by a processor, implement the method according to any one of claims 1 to 15.