Object comparison method and device, storage medium, computer equipment and program product
By using custom comparison codes and functions to obtain object features in integrated circuit design, the problem of difficulty in distinguishing objects with the same name in TCL tools is solved, object feature comparison is realized, object name complexity and data volume are reduced, and design efficiency is improved.
Patent Information
- Application Number
- CN202411080659.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2044-08-08
AI Technical Summary
In integrated circuit design, since the TCL tool's support for data types is limited to string types, objects with the same name are confused when they are assigned to variables, causing related TCL script execution errors and the expected results cannot be obtained. In order to distinguish different objects, it is necessary to Using complex object names increases the amount of data and design complexity, and reduces design efficiency.
By adding custom comparison code in the command interpreter of the target tool, executing a custom comparison function to obtain object characteristics, comparisons are made based on object characteristics, avoiding direct comparison of object names, and distinction between different objects is achieved.
It effectively reduces the complexity of object names in integrated circuit design, reduces the amount of data, improves design efficiency, and ensures the accuracy and efficiency of object comparison.
Smart Images

Figure CN118627438A
Abstract
Description
Technical Field
[0001] The present application generally relates to the field of integrated circuit technology, and more particularly, to an object comparison method, apparatus, storage medium, computer device, and program product. Background Art
[0002] When using EDA (Electronic Design Automation) tools, developers interact with them by writing and executing TCL (Tool Command Language) scripts. After the EDA tool reads the design, it often uses TCL commands to retrieve objects within the design, such as using the get_port command to retrieve a port or the get_net command to retrieve a net. These objects are then used to trigger certain conditions to produce the desired result.
[0003] As integrated circuit design becomes increasingly complex, different objects often have the same name. However, TCL's data type support is limited to string types, meaning that all command parameters are treated as strings. Although these objects have different attributes, because their names are identical, when they are assigned to variables, the variable values simply represent the object names. Therefore, TCL can confuse variables pointing to these identically named objects, ultimately leading to execution errors in related TCL scripts and failure to achieve the desired results.
[0004] Currently, in order to obtain the desired results, different names are often used for different objects when naming them, which increases the complexity of object names and the amount of data, thereby reducing the design efficiency of integrated circuits. Summary of the Invention
[0005] The present application provides an object comparison method and an object comparison device, which are used to at least solve the problem of how to reduce the complexity of object names in integrated circuit design.
[0006] According to one aspect of the present application, an object comparison method is provided, which is applied to a command interpreter of a target tool, wherein the target tool includes integrated circuit electronic design automation software, and the object comparison method includes: in response to a code editing operation, adding a custom comparison code, wherein the custom comparison code indicates that an object comparison based on object features is achieved by executing a custom comparison function, and the object features are used to distinguish different objects; receiving an object comparison command, wherein the object comparison command includes an object to be compared; in response to the object comparison command, executing the custom comparison code to obtain the object features of the object to be compared by executing the custom comparison function, and comparing the object to be compared according to the object features to obtain a comparison result.
[0007] According to another aspect of the present application, an object comparison device is provided, which is applied to a command interpreter of a target tool, wherein the target tool includes integrated circuit electronic design automation software, and the object comparison device includes: an adding unit, configured to add a custom comparison code in response to a code editing operation, wherein the custom comparison code indicates that an object comparison based on object features is achieved by executing a custom comparison function, and the object features are used to distinguish different objects; a receiving unit, configured to receive an object comparison command, wherein the object comparison command includes an object to be compared; and a comparing unit, configured to execute the custom comparison code in response to the object comparison command, so as to obtain the object features of the object to be compared by executing the custom comparison function, and compare the object to be compared according to the object features to obtain a comparison result.
[0008] According to another aspect of the present application, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform the object comparison method as described above.
[0009] According to another aspect of the present application, a computer device is provided, comprising: at least one processor; and at least one memory storing computer-executable instructions, wherein when the computer-executable instructions are executed by the at least one processor, the at least one processor is prompted to execute the object comparison method described above.
[0010] According to another aspect of the present application, a computer program product is provided, comprising computer instructions. When the computer instructions are executed by at least one processor, the at least one processor is prompted to perform the object comparison method as described above.
[0011] According to the object comparison method, apparatus, storage medium, computer equipment and program product of the exemplary embodiments of the present application, by adding a custom comparison code that can realize object comparison based on object features, when an object comparison command is received, the object features of the object to be compared can be first obtained with the help of the custom comparison code, and then the comparison can be performed based on this. This avoids the command interpreter that only supports character-type data from directly comparing the names of the objects to be compared when performing object comparison, thereby bypassing the names to compare different objects themselves. There is no need to use complex object names to distinguish different objects in integrated circuit design, which can effectively reduce the complexity of object names in integrated circuit design, reduce the amount of data, and help improve the design efficiency of integrated circuits.
[0012] Additional aspects and / or advantages of the general inventive concept will be set forth in part in the following description and will be apparent from the description or may be learned through practice of the general inventive concept. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] These and / or other aspects and advantages of the present application will become clear and easier to understand from the following description of the embodiments in conjunction with the accompanying drawings.
[0014] Figure 1 is a flowchart illustrating an object comparison method according to an exemplary embodiment of the present application.
[0015] Figure 2 FIG. 1 is a schematic diagram illustrating a flow chart of executing script commands on the TCL side and the EDA side according to an exemplary embodiment of the present application.
[0016] Figure 3 is a block diagram illustrating an object comparison apparatus according to an exemplary embodiment of the present application.
[0017] Figure 4 is a block diagram illustrating a computer device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0018] The following description, with reference to the accompanying drawings, is provided to facilitate a comprehensive understanding of the embodiments of the present invention as defined by the claims and their equivalents. Various specific details are included to assist understanding, but these details are to be regarded as merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Furthermore, descriptions of well-known functions and structures are omitted for clarity and brevity.
[0019] It should be noted that the phrase "at least one of the several items" in this application includes three types of parallel situations: "any one of the several items", "a combination of any multiple of the several items", and "all of the several 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. For another example, "performing at least one of step 1 and step 2" means the following three parallel situations: (1) performing step 1; (2) performing step 2; and (3) performing step 1 and step 2.
[0020] TCL is an interpreted scripting language. It is a very important and practical tool in integrated circuit design and is widely compatible with EDA tools. Relevant personnel interact with EDA tools by writing and executing TCL scripts.
[0021] A TCL script can contain one or more commands, which must be separated by line breaks or semicolons. A valid TCL command line consists of a command followed by a string (with spaces as separators). Each command consists of one or more words, with the first word representing the command name and the remaining words being the command's arguments. Words must be separated by spaces or the tab key.
[0022] TCL script execution relies on the interpreter (line-by-line execution). When analyzing commands, the TCL interpreter treats all command parameters as strings. The reason is that TCL does not support data types such as int, double, char, etc. in other languages. The only supported type is string. For example, the name and value of a simple variable are both strings.
[0023] Take the commands set x 10 and set y x+100 as examples. The former defines the variable x and assigns it the value 10, while the latter defines the variable y and assigns it the value x+100, rather than the expected 110. In the command set y x+100, x is considered part of the string x+100. If you want to use the value '10' of x, you must use the substitution function provided by the Tcl language to tell the Tcl interpreter that the value of the variable x is expected here, rather than the character 'x'.
[0024] Tcl provides three forms of substitution: variable substitution, command substitution, and backslash substitution.
[0025] Variable substitution is done by a The symbol marker is used to insert the value of a variable into a word.
[0026] For example, set y x+100, the value of y is 10+100, here x is replaced by its value 10.
[0027] Command substitution is marked by square brackets [ ], which contain TCL commands and their parameters. It is used to replace all or part of the words in a command with the results of the command in the brackets.
[0028] For example, set y [expr x+100], the value of y is 110, that is, the command expr The result of x+100.
[0029] Backslash substitution is marked by a \ symbol and is used to replace newline, space, [, The characters treated as special symbols by the Tcl interpreter are replaced with their original appearance.
[0030] For example, set y \ The values of x,y are x, here\ Replace with ordinary characters.
[0031] In addition to backslashes, TCL also supports the use of double quotes " " and curly braces {} to make the interpreter treat special characters such as delimiters and substitution characters as ordinary characters without special processing. Among them, although the TCL interpreter will not treat the various delimiters in double quotes and curly braces specially, it will treat newline characters and and [ ] substitution operators are processed as usual.
[0032] When using EDA tools, people interact with them by writing and executing TCL scripts. After the EDA tool reads the design, it often uses TCL commands to retrieve objects within the design, such as using the get_port command to retrieve a port or the get_net command to retrieve a net. These objects are then used to trigger certain conditions to obtain the desired results.
[0033] As integrated circuit design becomes increasingly complex, different objects often have the same name. However, TCL's data type support is limited to string types, meaning that all command parameters are treated as strings. Although these objects have different attributes, because their names are identical, when they are assigned to variables, the variable values simply represent the object names. Therefore, TCL can confuse variables pointing to these identically named objects, ultimately leading to execution errors in related TCL scripts and failure to achieve the desired results.
[0034] For example, suppose a TCL script contains the following command: “set P1 [get_port n1] #Get port n1 and assign it to variable P1 set P2 [get_net n1] #Get net n1 and assign it to variable P2 if { P1 == P2} { #Compare the values of P1 and P2 to see if they are equal puts "XXX" #If the values of P1 and P2 are equal, print XXX }".
[0035] Due to the existing features of the TCL language, in the above example, the values of variables P1 and P2 are both string n1, resulting in the output of XXX being printed after executing the script. However, because port n1 and net n1 are essentially two different objects, the expected result of executing the script is that XXX is not printed.
[0036] At present, in order to solve the above problems and obtain the desired comparison results, related technologies can often only use different names for different objects when naming objects. For example, the port n1 in the above example is named portn1, and the line net n1 is named netn1. This increases the complexity of the object names and the amount of data, thereby reducing the design efficiency of the integrated circuit.
[0037] This application adds a custom comparison code that can realize object comparison based on object features. When an object comparison command is received, the custom comparison code can be used to first obtain the object features of the object to be compared, and then compare them based on this. This avoids the command interpreter that only supports character-type data from directly comparing the names of the objects to be compared when performing object comparison, thereby bypassing the names to compare different objects themselves. There is no need to use complex object names to distinguish different objects in integrated circuit design, which can effectively reduce the complexity of object names in integrated circuit design, reduce the amount of data, and help improve the design efficiency of integrated circuits.
[0038] Refer to the following Figures 1 to 4 The object comparison method, apparatus, storage medium, computer device, and program product according to exemplary embodiments of the present application are described in detail.
[0039] Figure 1is a flowchart illustrating an object comparison method according to an exemplary embodiment of the present application. The object comparison method according to the exemplary embodiment of the present application can be implemented in a computer device with sufficient computing power, and is specifically applied to a command interpreter of a target tool. The target tool includes integrated circuit electronic design automation software, and the command interpreter is specifically a command interpreter that only supports character-type data, such as the aforementioned TCL interpreter, or other command interpreters. As long as the command interpreter only supports character-type data, resulting in an inability to distinguish between variables pointing to objects with the same name, the object comparison method of the exemplary embodiment of the present application can be used.
[0040] Reference Figure 1 , in step S101, in response to a code editing operation, a custom comparison code is added.
[0041] Custom comparison code implements object comparison based on object characteristics, which are used to distinguish different objects, by executing a custom comparison function. By adding this custom comparison code, you can add feature-based object comparison capabilities to the command interpreter. Custom comparison code is described in more detail below and is not discussed here.
[0042] All information that can be used to distinguish different objects can be used as object features. For example, in integrated circuit design, this can include the type of object (such as a net, port), and the module instance to which the object is connected. These features can be combined with the object name to distinguish different objects. In addition, this information is stored centrally, and each object has a unique storage address. Therefore, the storage address is unique to each object. Optionally, the object feature includes the storage address of the corresponding object, which can not only reliably distinguish different objects, but also use a unified information acquisition method for different objects to obtain their storage addresses, which helps to improve the efficiency of obtaining object features.
[0043] In step S102 , an object comparison command is received, wherein the object comparison command includes an object to be compared.
[0044] The object comparison command is a command that involves comparing objects. It can be a command that is the same as the existing object comparison method, as long as it can indicate that the purpose of the command is to compare objects and specifies the objects to be compared. It should be understood that the number of objects to be compared is at least two to achieve the comparison. Still taking the TCL interpreter as an example, the object comparison command can include the if command in the aforementioned TCL script example, and can also include the string compare command, which is used to compare two strings and return the result according to the dictionary order: if the first string precedes the second string in the dictionary, -1 is returned; if the first string follows the second string in the dictionary, 1 is returned; if the two are the same, 0 is returned.
[0045] It's important to note that the object to be compared in an object comparison command can be a variable; you don't have to enter the object itself directly. In the TCL script example above, variable P1 points to port n1, and variable P2 points to net n1. The if command directly compares variables P1 and P2, effectively comparing port n1 and net n1. Therefore, the objects to be compared here are port n1 and net n1.
[0046] In step S103 , in response to the object comparison command, the custom comparison code is executed to obtain the object features of the objects to be compared by executing the custom comparison function, and the objects to be compared are compared according to the object features to obtain a comparison result.
[0047] When an object comparison command is received, by executing a custom comparison code, it is possible to first obtain the object characteristics of the object to be compared, and then perform a comparison based on this. This avoids the command interpreter that only supports character-type data from directly comparing the names of the objects to be compared when performing object comparison, thereby bypassing the names to compare different objects themselves. There is no need to use complex object names to distinguish different objects in integrated circuit design, which can effectively reduce the complexity of object names in integrated circuit design, reduce the amount of data, and help improve the design efficiency of integrated circuits.
[0048] As previously mentioned, the object to be compared in the object comparison command can appear in the form of a variable. Optionally, the object comparison command includes a pointer to be compared, which is used to point to the data to be compared. That is, the object to be compared specifically appears in the form of a pointer variable. Variables P1 and P2 in the above example are both pointer variables. It should be understood that pointers often have data types, and a pointer of a certain type can only point to data of that type. Object comparison commands, such as the if command and the string compare command, are more accurately described as comparison commands, capable of comparing not only object-type data but also other types of data. However, the problem of different data having the same name often only exists for object-type data. In this case, the operation of obtaining the object characteristics of the object to be compared includes: upon determining that the data type of the pointer to be compared is a specified data type, obtaining the object characteristics of the object to be compared pointed to by the pointer to be compared. By first verifying the quantity type of the pointer to be compared in the object comparison command and only obtaining its object characteristics if it is determined to be of the specified data type, it is possible to use object characteristic-based comparison methods only for required data, while existing string-based comparison methods can be used for data of other data types, significantly simplifying the comparison calculation. It should be understood that the specified data type includes, for example, object types, such as the list type in TCL, and may also include other data types that may have the problem of different data having the same name, and this application does not limit this. As an example, when determining whether the data type of the pointer to be compared is the specified data type, the judgment conditions may include whether the pointer variable is empty, whether the data type of the pointer variable is empty (that is, whether the data type is defined for the pointer variable), whether the name of the data type is empty, and whether the name of the data type is the specified data type, so that when it is determined that the data type of the pointer to be compared is not the specified data type, the reason can be specifically analyzed. In addition, still taking the list type as an example, since EDA tools often make adaptive modifications to the general list type data according to the needs of integrated circuit design, when the specified data type is the list type, the directly obtained storage address needs to be converted in order to parse the data, and then the obtained storage address is used as the object feature.
[0049] Next, we will further introduce the custom comparison code.
[0050] The command interpreter has pre-stored original comparison codes. As the name suggests, the original comparison codes are the codes originally used by the command interpreter to perform object comparisons. The codes implement comparisons based on the characters of the variables, so the comparison results may be different from those of the custom comparison codes.
[0051] In some embodiments, optionally, in step S101, when the custom comparison code is added, the original comparison code is deleted, which is equivalent to replacing the original comparison code with the custom comparison code, or rewriting the original comparison code into the custom comparison code.
[0052] In other embodiments, in order to achieve compatibility between the custom comparison code and the original comparison code, optionally, the comparison results of the custom comparison code and the original comparison code are selected and adopted, and the adoption priority of the comparison result of the custom comparison code is higher than the adoption priority of the comparison result of the original comparison code. By retaining the original comparison code and adding the custom comparison code, rather than directly rewriting the original comparison code into the custom comparison code, damage to the original comparison code can be avoided. On this basis, by selectively adopting the comparison results of the custom comparison code and the original comparison code, contradictions caused by different results of the two comparisons can be avoided, thereby ensuring the reliable implementation of object comparison. In addition, by making the comparison result of the custom comparison code have a higher adoption priority, the custom comparison code can be used first, that is, object comparison can be implemented based on object features first. On the one hand, the name can be bypassed as much as possible and different objects themselves can be compared. On the other hand, the original comparison code can be used as a backup when object comparison using object features fails, thereby ensuring the smooth progress of object comparison.
[0053] It should be noted that here, from the perspective of the code execution results, it is limited to only one code comparison result in the end, but there is no limitation on the code implementation process. This means that you can choose to execute one of the original comparison code and the custom comparison code, or you can execute both the original comparison code and the custom comparison code, but only adopt one of the comparison results.
[0054] Optionally, the execution priority of the custom comparison code is higher than the execution priority of the original comparison code, and the execution condition of the original comparison code is that no clear comparison result can be obtained by executing the custom comparison code. By specifically limiting the custom comparison code to have a higher execution priority, the custom comparison code can be executed with priority in the actual execution of the code to achieve object comparison based on object characteristics. In addition, the original comparison code is executed only when the custom comparison code that is executed with priority fails to obtain a clear comparison result. On the one hand, the original comparison code can be used as a backup to ensure the smooth progress of the object comparison. On the other hand, the original comparison code will no longer be executed when the custom comparison code obtains a clear comparison result, which can substantially reduce the amount of code executed and reduce the computational load.
[0055] As an example, you can place the additional custom comparison code before the original comparison code so that the custom comparison code is executed first, and use the return value and break command at the same time. If a clear comparison result (for example, equality or inequality) is obtained when executing the custom comparison code, the comparison result is used as the return value of the object comparison, and the subsequent original comparison code is no longer executed. If a clear comparison result is not obtained when executing the custom comparison code (for example, the object feature of at least one object to be compared cannot be obtained), the break command is executed to jump out of the custom comparison code, and the original comparison code is executed, and the comparison result of the original comparison code is used as the return value of the object comparison.
[0056] Regarding the editing and execution of the custom comparison code, optionally, the custom comparison function is pre-written into the target tool, and step S101 includes: in response to the code editing operation, adding a custom comparison code containing a custom function pointer, wherein the custom function pointer is used to point to the custom comparison function. Since the custom comparison code needs to be executed by the command interpreter, it is necessary to perform a code editing operation on the command interpreter side to write the custom comparison code so that the command interpreter has the function of implementing object comparison based on object characteristics. On this basis, by writing the custom comparison function that plays a core role in the custom comparison code into the target tool, the control right of the custom comparison function can be attributed to the target tool, which is convenient for managing and maintaining the custom comparison function on the target tool side. At the same time, using the custom function pointer pointing to the custom comparison function on the command interpreter side can realize the call of the custom comparison function and meet the implementation of the corresponding function. It should be understood that the custom function pointer needs to be defined and declared in the header file of the command interpreter to ensure its normal use.
[0057] Further optionally, when executing the custom comparison code, the object characteristics of the object to be compared are obtained by executing the custom comparison function, and the objects to be compared are compared based on the object characteristics, and the operation of obtaining the comparison result includes: when the custom function pointer is not null, the object characteristics of the object to be compared are obtained by executing the custom comparison function, and the objects to be compared are compared based on the object characteristics, to obtain the comparison result. By configuring the precondition that the custom function pointer is not null, the corresponding function can be executed only when the custom function pointer is clearly pointed to, thereby reducing the risk of being unable to successfully implement object comparison due to the unclear pointing of the custom function pointer and reducing unnecessary code execution.
[0058] Further optionally, the object comparison method according to the exemplary embodiment of the present application further includes: in response to a startup command of a custom comparison function (i.e., an object comparison function based on object features), assigning a custom function pointer to a custom comparison function, wherein the initial value of the custom function pointer is null. On the one hand, by configuring the initial value of the custom function pointer to be null, the risk of object comparison errors caused by pointing to other functions can be reduced; on the other hand, assigning a value to the custom function pointer when the custom comparison function is started can keep the custom function pointer as a null pointer when the custom comparison function is not started. In combination with the above, the custom comparison function will not be executed at this time, that is, no clear comparison result can be obtained, and the original comparison function will be executed, realizing the free selection of the comparison function.
[0059] As an example, for EDA tools, custom EDA commands can be used to configure the startup command for a custom comparison function. For example, configure the compare_obj command and configure the obj option for this command. In this case, the command compare_obj –objtrue means that the value of the obj option in the custom compare_obj command is true, and this command can be used as the startup command for the custom comparison function. Similarly, the command compare_obj –obj false means that the value of the obj option in the custom compare_obj command is false, and this command can be used as the shutdown command for the custom comparison function. In this case, the custom compare_obj command needs to be registered with the command interpreter. If the custom comparison function is pre-written in the target tool, the response logic of the command can be written into the target tool, and the target tool can assign the custom comparison function to the custom function pointer. In other words, this assignment operation can be specifically performed by the target tool. In actual execution, in addition to directly using the compare_obj command, you can also enter a system command (such as a Linux command) for calling and executing the target script, and the target script contains the compare_obj command. These are all implementation methods of this application and fall within the scope of protection of this application.
[0060] Optionally, when executing the custom comparison code, the object characteristics of the object to be compared are obtained by executing the custom comparison function, and the object to be compared is compared based on the object characteristics. The operation of obtaining the comparison result may also include: obtaining the object characteristics of the object to be compared by executing the custom comparison function when the custom comparison function is activated, and comparing the object to be compared based on the object characteristics to obtain the comparison result. By configuring the prerequisite for starting the custom comparison function (i.e., the object comparison function based on object characteristics), the core comparison operation in the custom comparison function (i.e., the operation of obtaining object characteristics and performing object comparison based on them) can be executed only when the function is activated, reducing the risk of the custom comparison function being mistakenly called and executed, and ensuring the reliable execution of object comparison. It should be understood that if the custom comparison function is not activated, even if the custom comparison function is called and executed, the core comparison operation will not be executed. Therefore, the custom comparison code will not be able to obtain a clear comparison result, and the original comparison code will continue to be executed, ensuring that the object comparison process is carried out reliably according to the specified function. Based on this, after assigning a value to the custom function pointer in response to the start command of the custom comparison function, if the custom comparison function is turned off, the value of the custom function pointer can be restored to empty or remain as it is, both of which can ensure the reliable implementation of the object comparison process, so this application does not impose any restrictions on this.
[0061] Further optionally, the object comparison method according to an exemplary embodiment of the present application further includes: creating a custom switch flag; and setting the custom switch flag to on in response to a command to activate the custom comparison function. Accordingly, the aforementioned operation of executing the custom comparison function to obtain object characteristics of the object to be compared and compare the object to be compared based on the object characteristics to obtain a comparison result when the custom comparison function is activated includes: executing the custom comparison function to obtain object characteristics of the object to be compared and compare the object to be compared based on the object characteristics to obtain a comparison result when the custom switch flag is determined to be on. Configuring the custom switch flag conveniently indicates the start and stop status of the custom comparison function, eliminating the need to repeatedly confirm the specific content of the start and stop commands for the custom comparison function, thereby simplifying operations and reducing the amount of computation required during code execution. As an example, in response to the aforementioned command to activate the custom comparison function, the target tool may set the custom switch flag to on (e.g., true) and assign a custom function pointer to the custom comparison function. The target tool may also set the custom switch flag to off (e.g., false) in response to a command to deactivate the custom comparison function. Accordingly, the custom comparison function can be configured to only perform the core comparison operation when the custom switch flag is on.
[0062] Regarding the execution of a custom comparison function, optionally, the objects to be compared include a first comparison object and a second comparison object, wherein the custom comparison function is configured to perform the following steps: determining a custom switch flag; when the custom switch flag is set to on, obtaining a first object feature of the first comparison object and a second object feature of the second comparison object; performing a first comparison between the first object feature and the second object feature; if the first object feature is equal to the second object feature, returning a first target value to a target variable in the custom comparison code; if the first object feature is not equal to the second object feature, returning a second target value to the target variable; and, when the custom switch flag is set to off, returning a third target value to the target variable. By first determining whether the custom switch flag is set to on when executing the custom comparison function, it is possible to ensure that the core comparison operation of the custom comparison function is only executed when the custom comparison function is turned on. By returning different target values to the target variable in the custom comparison code for different situations, the comparison result of the object comparison can be clarified based on the value of the target variable when executing the custom comparison code. As an example, referring to the aforementioned string compare command, the first target value can be 0, the second target value can include -1 and 1, respectively indicating that the first object feature is less than the second object feature, and the first object feature is greater than the second object feature. The third target value can be, for example, -2, and of course, can also be other values other than 0, -1, and 1, and this application does not limit this. As an example, when the object feature of at least one object to be compared cannot be obtained, the third target value can also be returned to the target variable.
[0063] Accordingly, the custom comparison code can be used to perform the following steps: determining a pre-set custom function pointer, wherein the custom function pointer is used to point to or not point to the custom comparison function; when the custom function pointer points to the custom comparison function, obtaining the value of the target variable through the custom comparison function; if the target variable is assigned a first target value or a second target value, using the first target value or the second target value as the comparison result, wherein the first target value indicates that the first comparison object and the second comparison object are equal, and the second target value indicates that the first comparison object and the second comparison object are not equal; if the target variable is assigned a third target value, or when the custom function pointer does not point to the custom function, terminating the first comparison and directly performing the second comparison on the first comparison object and the second comparison object. By first determining whether the custom function pointer points to the custom comparison function before executing the custom comparison function, the corresponding function can be executed only when the custom function pointer points to the custom comparison function, reducing the risk of the object comparison being affected by the incorrect pointing of the custom function pointer, thereby ensuring reliability and reducing unnecessary code execution. After confirming the execution of the custom comparison function, combined with the value of the target variable returned by the custom comparison function, the result of the object comparison can be clarified, or the execution of the custom comparison code can be promptly jumped out, that is, the first comparison corresponding to the custom comparison function is terminated, and the original comparison code is executed instead, and the original string-based second comparison is executed as a backup to ensure the smooth progress of the object comparison.
[0064] Next, we'll introduce an object comparison method in an exemplary embodiment of this application, using an EDA tool as the target tool and a TCL interpreter as the command interpreter. This method modifies the underlying TCL source code to add a custom comparison function to the EDA tool. This allows for comparison of two variables pointing to different objects in TCL, not just by comparing string-based object names, but also by comparing the objects pointed to by their respective pointers.
[0065] This embodiment involves an interaction end, an implementation end, and a function end, which correspond to the user side, the TCL side, and the EDA side, respectively. These three ends are executed on a terminal whose operating system is a Linux system. The implementation of this embodiment on the three ends is as follows.
[0066] 1. Interactive end: Enter the target command in the terminal of the Linux system.
[0067] Various tasks of EDA software are usually performed directly on the terminal tool of the Linux system. Relevant personnel enable or disable the custom comparison function by entering the target command in the terminal.
[0068] Specifically, the target command can be a Linux command for calling and executing the target TCL script (the script contains the compare_obj command as the start and stop command of the custom comparison function), or it can be the compare_obj command directly, so that the terminal tool can make tclsh (Simple shell containing TCL interpreter) read and evaluate the compare_obj command to enable or disable the custom comparison function.
[0069] For example, the Linux command ". / test.tcl" executes the test.tcl script. In the Linux command line, directories end with a forward slash ( / ), and "." indicates the current directory. While the combined symbol ". / " isn't a command itself, it allows the shell to run executable files directly from the terminal, eliminating the need to double-click the file in a graphical file manager. In the example above, "test.tcl" is the file name of the target TCL script, and ". / test.tcl" indicates the file path to the target TCL script.
[0070] The compare_obj command is, for example: compare_obj -obj true, which is the command to start the custom comparison function; another example is: compare_obj -obj false, which is the command to shut down the custom comparison function. Wherein, compare_obj is the command name, obj is the option in the command, and true or false is the option value. When the option value is true, the custom comparison function is enabled, and when the option value is false, the custom comparison function is disabled. It should be understood that the command name compare_obj and the option obj are only exemplary descriptions, and the present application is not limited thereto. The specific form of the command can be determined according to actual conditions. For example, the command can also be compare_tcl_obj -by_object, where the command name is compare_tcl_obj and the option is by_object.
[0071] 2. Implementation: After enabling the custom comparison function through compare_obj -obj true, when executing the if command or string compare command in the target TCL script to compare two variables, the comparison is performed based on the object characteristics of the objects pointed to by the variables.
[0072] Specifically, the if command and the string compare command are both native TCL commands that can be used to compare objects. An object characteristic can be, for example, the object's storage address. This is because different types of objects are typically stored in different storage areas, while objects of the same type are typically stored in the same storage area.
[0073] Still taking the target TCL script containing the following command as an example: "set P1 [get_port n1] set P2 [get_net n1] if { P1 == P2} { puts “XXX” }".
[0074] After turning on the target function, use the expression " P1 == When comparing variables P1 and P2, the original method of assigning the names of port n1 and net n1 (both are string n1) to P1 and P2 for comparison is adjusted to assigning the object characteristics of port n1 and net n1 to P1 and P2 for comparison. For example, the address of port n1 is 0X0060 and the address of net n1 is 0X0070. The two are assigned to P1 and P2 for comparison. At this time, the values of variables P1 and P2 are not equal, so the expression " P1 == P2" evaluates to 0, XXX will not be printed, and the expected result is achieved.
[0075] 3. Function side: In response to the compare_obj -obj true command, the EDA tool registers the pre-written custom compare function with TCL and points the custom function pointer in TCL to the newly registered custom compare function. When TCL executes the if command or the string compare command, it compares the two variables according to the logic in the custom compare function.
[0076] Specifically, EDA tools embed TCL into the tool by linking against tcl.so, allowing users to interact with the tool through TCL scripts. tcl.so is a dynamic link library (DLL) that allows the EDA tool's processes to call functions that are not part of its executable code, but rather the executable code of the function is located in the tcl.so file.
[0077] Script commands are generally divided into two types: one is TCL's own commands (such as if or string compare), and the other is custom commands registered to TCL by EDA tools (such as compare_obj). The execution process of the two commands is not exactly the same. Figure 2 The flow of executing script commands on the TCL side and the EDA side is shown.
[0078] Reference Figure 2 Generally speaking, the execution of script commands is divided into the EDA side and the TCL side. After the EDA tool starts running, when the TCL side obtains the script command provided by the user, it will first parse the command and determine whether the command is a custom command registered by the EDA tool in TCL. If so, the EDA tool obtains the parsing result of the command from the TCL side, and based on the parsing result, executes the command with the execution logic defined in the EDA tool, and returns the execution result to TCL, so that the TCL side displays the execution result to the user. If not, the TCL obtains the parsing result of the command, and based on the parsing result, executes the command with TCL's own execution logic, and displays the execution result to the user.
[0079] In the process of executing script commands line by line, after each command is executed, it will be confirmed whether the command is the last command. If it is, the process ends. If not, the TCL side will continue to parse the next script command. It should be noted that the operation of confirming whether the current command is the last command can be as follows Figure 2 The following is executed by TCL side, and can also be executed by EDA side. Figure 2 This is just an example.
[0080] Specifically, for the object comparison method in the exemplary embodiment of this application, after enabling the comparison function via compare_obj -obj true , the EDA tool registers the compare function with TCL, and the function pointer in TCL automatically points to the compare function. Therefore, although both the if command and the string compare command are native TCL commands, they are executed using the execution logic of the compare function defined in the EDA tool, resolving the issue where TCL treats all parameters as strings and cannot accurately compare objects.
[0081] To implement this function, first create the start and stop commands for the custom comparison function in the EDA tool, namely the compare_obj command, as well as a custom comparison function that implements the new comparison method. The compare_obj command is then registered in TCL. Then, when the EDA tool responds to the compare_obj command, it can modify the comparison logic of the TCL object through a specific function procedure.
[0082] For this function process, in the EDA tool, it specifically includes the response logic of the compare_obj command and the execution logic of the compare function.
[0083] First, create a custom switch flag and set its initial value to off. The compare_obj command's response logic determines whether the command contains the "obj" option and its value is true. If so, the custom switch flag is set to on and the custom function pointer is assigned to the custom comparison function. If not, the custom switch flag is set to off. Upon completion, the function returns a value of 1, confirming that the EDA tool has successfully executed the function and ensuring proper program operation.
[0084] The compare function's input parameters are passed in by TCL, such as variables P1 and P2, which are compared by the if command mentioned above. These two pointer variables each point to an object to be compared. The compare function's execution logic first determines whether the custom switch flag is on. If so, it creates two untyped pointers with an initial null value. It then uses a custom macro in the EDA tool to retrieve the storage addresses of the objects to be compared, pointed to by the two pointer variables in the object comparison command (e.g., the if command). It then obtains the object characteristics of the two objects to be compared and assigns them to the two untyped pointers. If both untyped pointers are not null, it determines the size relationship between the two untyped pointers and returns different values to indicate the determined size relationship. Specifically, if the two are equal, it returns a value of 0; if the first untyped pointer is greater than the second, it returns a value of 1; if the first untyped pointer is less than the second, it returns a value of -1. If the custom switch flag is off, or if at least one of the untyped pointers is null, it returns a value of -2, ending the comparison.
[0085] On the TCL side, this function process specifically consists of two parts. One part is the definition and declaration of the registration function in the tcl.h header file, which is the basis for interaction between EDA tools and TCL. The other part is the insertion of custom comparison code into the complete string comparison code TclStringCmp, before the original comparison code that performs the specific comparison function.
[0086] The execution logic of the custom comparison code first checks whether the custom function pointer is null. If so, subsequent code execution is discontinued and the original comparison code is executed directly. If not, a target variable is created and the function value of the custom function pointer is assigned to it. In other words, the compare function's return value is assigned to the target variable, and the conditional judgment is performed using the target variable as a reference value. If the target variable is -2, the comparison ends, subsequent code execution is discontinued, and the original comparison code is executed directly. Otherwise, the target variable's value is returned to TclStringCmp, and the original comparison code is not executed. Because the target variable's value evaluation logic corresponds to the return value evaluation logic of the original comparison code in TclStringCmp (i.e., TclStringCmp also uses 0 for equality, 1 for greater than, and -1 for less than), the target variable's value can be used directly as the comparison result. Therefore, the compare function's return values of 0, 1, and -1 are first returned to the custom comparison code and then to TclStringCmp itself. The compare function's return value of -2 is returned only to the custom comparison code.
[0087] In a specific embodiment, an object comparison command can be used to perform an object search task, that is, to search for the required object from the object library. When executing a task, a target object is first determined, and then all objects in the library file are traversed and compared with the target object in turn. If an object is determined to be equal to the target object, the search for the target object is achieved. According to experiments, for an open source object library containing 8.63 million objects, before the custom comparison function of the exemplary embodiment of the present application is enabled, it takes 62 seconds to complete the task. After enabling the custom comparison function of the exemplary embodiment of the present application, the new custom comparison takes only 6 seconds, which is more than 10 times faster.
[0088] The principle is that TCL's native comparison is essentially a string comparison, requiring the conversion of variables to ASCII (American Standard Code for Information Interchange). However, after enabling the custom comparison function, the new custom comparison process can directly use the underlying physical address (hexadecimal number) of the object for comparison, eliminating the need for ASCII conversion, thereby improving comparison efficiency. This shows that the object comparison method of the exemplary embodiment of the present application not only enables comparison between objects to obtain the desired comparison results, but also accelerates the comparison process, improving program execution efficiency.
[0089] Figure 3 FIG2 is a block diagram illustrating an object comparison device according to an exemplary embodiment of the present invention. The object comparison device is applied to a command interpreter of a target tool, wherein the target tool includes integrated circuit electronic design automation software.
[0090] Reference Figure 3 The object comparison device 300 includes an adding unit 301 , a receiving unit 302 , and a comparing unit 303 .
[0091] The adding unit 301 may add a custom comparison code in response to a code editing operation, wherein the custom comparison code indicates that object comparison based on object features is implemented by executing a custom comparison function, and the object features are used to distinguish different objects.
[0092] The receiving unit 302 may receive an object comparison command, wherein the object comparison command includes an object to be compared.
[0093] The comparison unit 303 may execute the custom comparison code in response to the object comparison command to obtain the object features of the objects to be compared by executing the custom comparison function, and compare the objects to be compared according to the object features to obtain a comparison result.
[0094] Optionally, the command interpreter pre-stores an original comparison code, and the comparison results of the custom comparison code and the original comparison code are selectively adopted, with the adoption priority of the comparison result of the custom comparison code being higher than the adoption priority of the comparison result of the original comparison code.
[0095] Optionally, the execution priority of the custom comparison code is higher than the execution priority of the original comparison code, and the execution condition of the original comparison code is that no clear comparison result can be obtained by executing the custom comparison code.
[0096] Optionally, the custom comparison function is pre-written into the target tool, and the adding unit 301 can also add a custom comparison code including a custom function pointer in response to a code editing operation, wherein the custom function pointer is used to point to the custom comparison function.
[0097] Optionally, when the custom function pointer is not empty, the comparison unit 303 may further obtain object features of the objects to be compared by executing the custom comparison function, and compare the objects to be compared according to the object features to obtain a comparison result.
[0098] Optionally, the object comparison device 300 further includes an assignment unit (not shown in the figure), which can assign the custom function pointer to a custom comparison function in response to a start command of the custom comparison function, wherein the initial value of the custom function pointer is empty.
[0099] Optionally, the comparison unit 303 may also execute a custom comparison function to obtain object features of the objects to be compared when the custom comparison function is activated, and compare the objects to be compared according to the object features to obtain a comparison result.
[0100] Optionally, the object comparison device 300 also includes a switch unit (not shown in the figure), which can create a custom switch flag and set the custom switch flag to on in response to a start command of the custom comparison function; the comparison unit 303 can also obtain the object characteristics of the object to be compared by executing the custom comparison function when it is determined that the custom switch flag is on, and compare the object to be compared based on the object characteristics to obtain a comparison result.
[0101] Optionally, the objects to be compared include a first comparison object and a second comparison object, wherein the custom comparison function is used to perform the following steps: determine a custom switch flag; when the custom switch flag is set to on, obtain a first object feature of the first comparison object and a second object feature of the second comparison object; perform a first comparison between the first object feature and the second object feature; if the first object feature is equal to the second object feature, return a first target value to a target variable in the custom comparison code; if the first object feature is not equal to the second object feature, return the second target value to the target variable; and, when the custom switch flag is set to off, return a third target value to the target variable.
[0102] Optionally, the custom comparison code is used to perform the following steps: determine a pre-set custom function pointer, wherein the custom function pointer is used to point to or not point to a custom comparison function; when the custom function pointer points to the custom comparison function, obtain the value of the target variable through the custom comparison function; if the target variable is assigned to a first target value or a second target value, use the first target value or the second target value as the comparison result, wherein the first target value indicates that the first comparison object is equal to the second comparison object, and the second target value indicates that the first comparison object is not equal to the second comparison object; if the target variable is assigned to a third target value, or when the custom function pointer does not point to the custom function, terminate the execution of the first comparison to directly perform a second comparison on the first comparison object and the second comparison object.
[0103] Optionally, the object comparison command includes a pointer to be compared, which is used to point to the data to be compared, wherein the operation of obtaining the object characteristics of the object to be compared includes: when it is determined that the data type of the pointer to be compared is a specified data type, obtaining the object characteristics of the object to be compared pointed to by the pointer to be compared.
[0104] Optionally, the object characteristics include a storage address.
[0105] Regarding the apparatus in the above embodiment, the specific manner in which each unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated on here.
[0106] Figure 4 1 is a block diagram showing a computer device according to an exemplary embodiment of the present application. Figure 4 As shown, the computer device 400 includes at least one processor 401 and at least one memory 402 storing computer executable instructions. Here, when the computer executable instructions are executed by the processor 401, the processor 401 is prompted to perform the object comparison method as described in the above exemplary embodiments.
[0107] As an example, computer device 400 does not necessarily need to be a single device, but may also be any collection of devices or circuits capable of executing the above-mentioned instructions (or instruction sets) individually or in combination. Computer device 400 may also be part of an integrated control system or system manager, or may be configured as a server interconnected with a local or remote (e.g., via wireless transmission) interface.
[0108] In computer device 400, processor 401 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. By way of example and not limitation, processor 401 may also include an analog processor, a digital processor, a microprocessor, a multi-core processor, a processor array, a network processor, etc.
[0109] The processor 401 can execute instructions or codes stored in the memory 402, wherein the memory 402 can also store data. Instructions and data can also be sent and received over a network via a network interface device, wherein the network interface device can use any known transmission protocol.
[0110] Memory 402 may be integrated with processor 401, for example, by placing RAM or flash memory within an integrated circuit design microprocessor or the like. Furthermore, memory 402 may comprise a separate device, such as an external disk drive, a storage array, or any other storage device usable by a database system. Memory 402 and processor 401 may be operatively coupled or may communicate with each other, for example, via an I / O port, a network connection, or the like, such that processor 401 can access files stored in memory 402.
[0111] In addition, the computer device 400 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 computer device 400 may be connected to each other via a bus and / or a network.
[0112] In an exemplary embodiment, a computer-readable storage medium may also be provided. When the instructions in the computer-readable storage medium are executed by a processor, the processor is enabled to perform the object comparison method as described in the above exemplary embodiment. The computer-readable storage medium may be, for example, a memory including instructions. Alternatively, the computer-readable storage medium may be: read-only memory (ROM), random access memory (RAM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), 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 a 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 configured to store a computer program and any associated data, data files and data structures in a non-transitory manner and provide the computer program 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 executed 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.
[0113] In an exemplary embodiment, a computer program product may also be provided, including computer instructions. When the computer instructions are executed by a processor, the processor is prompted to perform the object comparison method as described in the above exemplary embodiments.
[0114] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the claims.
[0115] In addition, it should be noted that although several examples of each step are described above with reference to specific drawings, it should be understood that the implementation methods of the present application are not limited to the combinations given in the examples, and the steps appearing in different drawings can be combined, and no exhaustive enumeration is made here.
[0116] It should be understood that the present application is not limited to the exact structures 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 claims.
Claims
1. An object comparison method, characterized in that: The object comparison method is applied to a command interpreter of a target tool, wherein the target tool includes integrated circuit electronic design automation software, and the object comparison method includes: In response to the code editing operation, a custom comparison code is added, wherein the custom comparison code indicates that object comparison based on object features is implemented by executing a custom comparison function, and the object features are used to distinguish different objects; receiving an object comparison command, wherein the object comparison command includes an object to be compared; In response to the object comparison command, the custom comparison code is executed to obtain the object characteristics of the object to be compared by executing the custom comparison function, and the objects to be compared are compared according to the object characteristics to obtain a comparison result.
2. The object comparison method according to claim 1, characterized in that: The command interpreter pre-stores an original comparison code, and the comparison results of the custom comparison code and the original comparison code are selectively adopted, and the adoption priority of the comparison result of the custom comparison code is higher than the adoption priority of the comparison result of the original comparison code.
3. The object comparison method according to claim 2, characterized in that: The execution priority of the custom comparison code is higher than the execution priority of the original comparison code, and the execution condition of the original comparison code is that no clear comparison result can be obtained by executing the custom comparison code.
4. The object comparison method according to claim 1, characterized in that: The custom comparison function is pre-written in the target tool, and the adding of the custom comparison code in response to the code editing operation includes: In response to the code editing operation, the custom comparison code including a custom function pointer is added, wherein the custom function pointer is used to point to the custom comparison function.
5. The object comparison method according to claim 4, characterized in that: The acquiring the object feature of the object to be compared by executing the custom comparison function, and comparing the object to be compared according to the object feature to obtain a comparison result, includes: In the case that the custom function pointer is not empty, the object characteristics of the object to be compared are obtained by executing the custom comparison function, and the objects to be compared are compared according to the object characteristics to obtain a comparison result.
6. The object comparison method according to claim 5, characterized in that: The object comparison method further comprises: In response to a start command of the custom comparison function, the custom function pointer is assigned to the custom comparison function, wherein an initial value of the custom function pointer is empty.
7. The object comparison method according to claim 1, characterized in that: The acquiring the object feature of the object to be compared by executing the custom comparison function, and comparing the object to be compared according to the object feature to obtain a comparison result, includes: By executing the custom comparison function, when the custom comparison function is started, the object characteristics of the object to be compared are obtained, and the objects to be compared are compared according to the object characteristics to obtain a comparison result.
8. The object comparison method according to claim 7, characterized in that: The object comparison method further comprises: Create custom switch flags; In response to a start command of the custom comparison function, setting the custom switch flag to on; The step of executing the custom comparison function to obtain the object characteristics of the object to be compared when the custom comparison function is started, and comparing the object to be compared according to the object characteristics to obtain a comparison result includes: By executing the custom comparison function, when it is determined that the custom switch flag is on, the object feature of the object to be compared is obtained, and the object to be compared is compared according to the object feature to obtain a comparison result.
9. The object comparison method according to claim 8, characterized in that: The objects to be compared include a first comparison object and a second comparison object, wherein the custom comparison function is used to perform the following steps: Determining the custom switch flag; When the custom switch flag is set to on, obtaining a first object feature of the first comparison object and a second object feature of the second comparison object; performing a first comparison between the first object feature and the second object feature; If the first object characteristic is equal to the second object characteristic, returning a first target value to a target variable in the custom comparison code; If the first object characteristic is not equal to the second object characteristic, returning a second target value to the target variable; and, When the custom switch flag is turned off, a third target value is returned to the target variable.
10. The object comparison method according to claim 9, characterized in that: The custom comparison code is used to perform the following steps: Determine a preset custom function pointer, wherein the custom function pointer is used to point to or not point to the custom comparison function; In the case where the custom function pointer points to the custom comparison function, obtaining the value of the target variable through the custom comparison function; If the target variable is assigned the first target value or the second target value, the first target value or the second target value is used as the comparison result, wherein the first target value indicates that the first comparison object is equal to the second comparison object, and the second target value indicates that the first comparison object is not equal to the second comparison object; If the target variable is assigned the third target value, or if the user-defined function pointer does not point to the user-defined function, the first comparison is terminated to directly perform a second comparison on the first comparison object and the second comparison object.
11. The object comparison method according to any one of claims 1 to 10, characterized in that: The object comparison command includes a pointer to be compared, and the pointer to be compared is used to point to the data to be compared, wherein obtaining the object feature of the object to be compared includes: When it is determined that the data type of the pointer to be compared is the specified data type, the object feature of the object to be compared pointed to by the pointer to be compared is obtained.
12. The object comparison method according to any one of claims 1 to 10, characterized in that: The object characteristics include a storage address.
13. An object comparison device, characterized in that: The object comparison device is applied to a command interpreter of a target tool, wherein the target tool includes integrated circuit electronic design automation software, and the object comparison device includes: an adding unit, configured to add a custom comparison code in response to a code editing operation, wherein the custom comparison code indicates that object comparison based on object features is implemented by executing a custom comparison function, and the object features are used to distinguish different objects; A receiving unit, configured to receive an object comparison command, wherein the object comparison command includes an object to be compared; The comparison unit is configured to execute the custom comparison code in response to the object comparison command, so as to obtain the object characteristics of the object to be compared by executing the custom comparison function, and compare the object to be compared according to the object characteristics to obtain a comparison result.
14. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by at least one processor, the at least one processor is prompted to perform the object comparison method according to any one of claims 1 to 12.
15. A computer device, characterized in that: include: at least one processor; at least one memory storing computer executable instructions, Wherein, when the computer executable instructions are executed by the at least one processor, the at least one processor is prompted to perform the object comparison method according to any one of claims 1 to 12.
16. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by at least one processor, the at least one processor is prompted to perform the object comparison method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Method and system for modifying order data objects in batches
CN107767204A
Object comparison method, device and equipment and computer readable medium
CN112925523A
Electromagnetic transient packaging modeling method and device of primary system model and medium
CN116933506A
Character string comparison method and device, terminal equipment and storage medium
CN117270968A
Task arrangement method and device based on chain of responsibility, equipment and medium
CN118052620A
