EDA software test case reuse methods, electronic devices and media
By constructing a mapping relationship between simulation result database and test cases in EDA software and leveraging the compatibility of simulation software versions, the problem of wasted computing resources caused by repeated simulation of test cases was solved, and efficient operation of test cases was achieved.
Patent Information
- Application Number
- CN202511294748.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2045-09-11
AI Technical Summary
Existing EDA software test cases require repeated simulation operations in each iteration, resulting in wasted computing resources and reduced running speed.
By obtaining the mapping relationship between the simulation result database and the simulation instructions, a mapping relationship between test cases and the simulation result database is constructed. By leveraging the compatibility between simulation software versions, simulation result data can be reused to the greatest extent and the number of times the simulation software is executed can be reduced.
It improves the running speed of EDA software test cases, reduces the number of simulation operations, and enhances testing efficiency.
Smart Images

Figure CN120803960B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of EDA software technology, and in particular to an EDA software test case reuse method, electronic device, and medium. Background Technology
[0002] Electronic Design Automation (EDA) software toolchains include simulation software and debugging software. These two tools are inseparable, with the debugging software relying on the simulation results for debugging operations. The input to the simulation software is the original design code, and the output is the simulated data. The input to the debugging software is the data output by the simulation software, and the output is a visualization of the results under different user actions. In software development, to ensure that existing functionality is not affected by newly added code during iterative development, test cases are typically written for each new feature after its completion. In each iteration, it is ensured that the existing test cases function correctly, thus guaranteeing the correctness of the original functionality.
[0003] Simulation software and debugging software are typically developed in parallel, but they also work collaboratively. Since debugging software operates based on the output data of simulation software, it's crucial to ensure that test cases in the debugging software also function correctly under newer versions of the simulation software. Therefore, existing debugging software test cases generally use the original design code as input, first performing simulation based on the simulation software by inputting the corresponding simulation commands, and then verifying the functionality in the debugging software based on the simulation output. Different test cases within the debugging software can usually be based on the same design code and simulated using the same commands. Because simulation software is constantly iterating, in current technology, test cases must repeatedly perform the same simulation operation before each iteration of the debugging software's functionality, wasting significant computational resources and time, and reducing the execution speed of EDA software test cases. Therefore, improving the execution speed of EDA software test cases is a pressing technical problem that needs to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide an EDA software test case reuse method, electronic device, and medium, which improves the running speed of EDA software test cases.
[0005] According to a first aspect of the present invention, an EDA software test case reuse method is provided, comprising:
[0006] Step S1: Obtain the mapping relationship between the simulation result database and the simulation instructions, and set the simulation software version information that each simulation result database can be compatible with;
[0007] Step S2: Construct a set of test cases, obtain a set of simulation result database identifiers corresponding to each test case, and mark each simulation result database identifier in each set of simulation result database identifiers as untraversed. Each simulation result database identifier corresponds to a simulation result database.
[0008] Step S3: Obtain the current simulation software version information;
[0009] Step S4: Obtain an untraversed simulation result database identifier from the set of simulation result database identifiers corresponding to the test cases to be executed as the simulation result database identifier to be processed;
[0010] Step S5: If the current simulation software version information is the simulation software version information that the simulation result database corresponding to the database identifier of the simulation result database to be processed can be compatible with, then proceed to step S6; otherwise, proceed to step S7.
[0011] Step S6: Add the database identifier of the simulation result to be processed to the target simulation result database identifier set corresponding to the test case to be executed, and then proceed to step S8;
[0012] Step S7: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation result to be processed, input the simulation instruction to be processed and the design file into the current simulation software to perform simulation, generate the corresponding simulation result database, and add the newly generated corresponding simulation result database identifier to the target simulation result database identifier set corresponding to the test case to be executed;
[0013] Step S8: If there are still untraversed simulation result database identifiers in the simulation result database identifier set corresponding to the test case to be executed, then return to step S4; otherwise, execute step S9.
[0014] Step S9: Execute the test cases to be executed based on the test cases to be executed, the target simulation result database identifier set corresponding to the test cases to be executed, and the debugging software.
[0015] According to a second aspect of the present invention, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method described in the first aspect of the present invention.
[0016] According to a third aspect of the present invention, a computer-readable storage medium is provided, storing computer-executable instructions for performing the method described in the first aspect of the present invention.
[0017] Compared with existing technologies, this invention has significant advantages and beneficial effects. Through the above technical solution, the EDA software test case reuse method, electronic device, and medium provided by this invention achieve considerable technological advancement and practicality, and have broad industrial application value. It has at least the following beneficial effects:
[0018] This invention first obtains the mapping relationship between the simulation result database and the simulation instructions, and then constructs the mapping relationship between the test cases and the simulation result database. By utilizing the compatibility between simulation software versions, the simulation result data in the simulation result database is reused to the greatest extent possible during the execution of test cases in the debugging software, thereby reducing the number of times the simulation software is executed and improving the running speed of test cases in EDA software. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart of an EDA software test case reuse method provided in an embodiment of the present invention. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] This invention provides a method for reusing EDA software test cases, such as... Figure 1 As shown, it includes:
[0023] Step S1: Obtain the mapping relationship between the simulation result database and the simulation instructions, and set the simulation software version information that each simulation result database can be compatible with.
[0024] Each simulation command corresponds to a simulation result database.
[0025] Step S2: Construct a set of test cases, obtain a set of simulation result database identifiers corresponding to each test case, and mark each simulation result database identifier in each set of simulation result database identifiers as untraversed. Each simulation result database identifier corresponds to one simulation result database.
[0026] The simulation result database identifier can uniquely identify a simulation result data, which can be either the simulation result database name or the simulation result data path.
[0027] As an example, step S2 includes:
[0028] Step S21: Construct a test case set and obtain the simulation instruction set corresponding to each test case. The simulation instruction set includes at least one simulation instruction.
[0029] Step S22: Based on the simulation instructions in the simulation instruction set corresponding to the test case, obtain the corresponding simulation result database identifier and store it in the simulation result database identifier set corresponding to the test case.
[0030] Step S3: Obtain the current simulation software version information.
[0031] It should be noted that before executing the test cases, simulation software and debugging software will be prepared in advance, and the current simulation software version information will be obtained.
[0032] Step S4: Obtain an untraversed simulation result database identifier from the set of simulation result database identifiers corresponding to the test cases to be executed, and use it as the simulation result database identifier to be processed.
[0033] Step S5: If the current simulation software version information is the simulation software version information that the simulation result database corresponding to the database identifier to be processed can be compatible with, then proceed to step S6; otherwise, proceed to step S7.
[0034] It should be noted that if the current simulation software version information is compatible with the simulation result database corresponding to the identifier of the simulation result database to be processed, the data in the simulation result database corresponding to the identifier of the simulation result database to be processed can be directly reused, so step S6 can be executed directly. If the current simulation software version information is not compatible with the simulation result database corresponding to the identifier of the simulation result database to be processed, then step S8 needs to be executed to generate the corresponding simulation result data. This reduces the number of simulation executions and maximizes the reuse of simulation result data.
[0035] Step S6: Add the database identifier of the simulation result to be processed to the target simulation result database identifier set corresponding to the test case to be executed, and then execute step S8.
[0036] Step S7: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation result to be processed, input the simulation instruction to be processed and the design file into the current simulation software for simulation, generate the corresponding simulation result database, and add the newly generated corresponding simulation result database identifier to the target simulation result database identifier set corresponding to the test case to be executed.
[0037] Step S8: If there are still untraversed simulation result database identifiers in the simulation result database identifier set corresponding to the test case to be executed, then return to step S4; otherwise, execute step S9.
[0038] Step S9: Execute the test cases to be executed based on the test cases to be executed, the target simulation result database identifier set corresponding to the test cases to be executed, and the debugging software.
[0039] The present invention will be further illustrated by two specific embodiments below.
[0040] Example 1
[0041] The simulation software does not have development phases, and the compatibility condition of the simulation software version is that the new version is compatible with the old version. The simulation software version information includes the simulation software version.
[0042] As an example, step S1 includes:
[0043] Step S11: Input the design file and simulation instructions into the preset simulation software to perform simulation, generate simulation result data, and store the simulation result data in the corresponding simulation result database.
[0044] Specifically, the simulation results data may include the status and signal values output by the design components.
[0045] Step S12: Establish the mapping relationship between the simulation result database and the simulation commands.
[0046] Each simulation command corresponds to a simulation result database.
[0047] Step S13: Set the simulation software version information that the simulation result database can be compatible with according to the compatibility conditions of the simulation software version and the preset simulation software version.
[0048] Specifically, the simulation software version information that the simulation results database can be compatible with includes the preset simulation software version and versions lower than the preset simulation software version.
[0049] As an example, step S7 includes:
[0050] Step S71: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation results to be processed, input the simulation instruction to be processed and the design file into the current simulation software to perform simulation and generate the corresponding simulation result database.
[0051] Step S72: Overwrite the original simulation result database corresponding to the simulation instruction to be processed with the newly generated corresponding simulation result database, and set the simulation software version information that the newly generated corresponding simulation result database can be compatible with according to the compatibility conditions of the simulation software version.
[0052] Specifically, the simulation software version information that the newly generated corresponding simulation result database can be compatible with includes the current simulation software version and versions lower than the current simulation software version.
[0053] Step S73: Add the newly generated corresponding simulation result database identifier to the target simulation result database identifier set corresponding to the test case to be executed.
[0054] As an example, step S9 includes:
[0055] Step S91: Obtain the target simulation result data from the target simulation result database identifier in the target simulation result database identifier set corresponding to the test case to be executed.
[0056] Step S92: Input the target simulation data, target simulation result data, and test cases to be executed into the debugging software and execute the test cases to be executed.
[0057] Example 2
[0058] The simulation software is divided into development stages. The compatibility condition of the simulation software version is that the new version in the same development stage is compatible with the old version, while the versions in different development stages are incompatible with each other. Each simulation result database is divided into corresponding storage areas for each development stage. The simulation software version information includes the simulation software version and the development stage.
[0059] As an example, step S1 includes:
[0060] Step C11: Input the design file and simulation instructions into the preset simulation software to perform simulation, generate simulation result data, and store the simulation result data in the storage area of the development stage corresponding to the preset simulation software version in the corresponding simulation result database.
[0061] Specifically, the simulation results data may include the status and signal values output by the design components.
[0062] Step C12: Establish the mapping relationship between the simulation result database and the simulation commands.
[0063] Each simulation command corresponds to a simulation result database.
[0064] Step C13: Set the simulation software version information that the storage area of the development stage corresponding to the preset simulation software version in the simulation results database can be compatible with.
[0065] Specifically, the simulation software version information that the storage area corresponding to the development stage of the preset simulation software version in the simulation results database can be compatible with includes the preset simulation software version and the version of the development stage corresponding to the preset simulation software version that is lower than the preset simulation software version.
[0066] As an example, the current simulation software version information obtained in step S3 specifically includes the development stage corresponding to the current simulation software version and the current simulation software version.
[0067] As an example, step S5 includes:
[0068] Step C51: Determine whether the simulation result database corresponding to the current simulation software version and the corresponding development stage exists in the database corresponding to the simulation result database identifier. If not, proceed to step S7; if it exists, proceed to step C52.
[0069] Step C52: Determine whether the simulation software version information compatible with the storage area corresponding to the development stage of the current simulation software version in the simulation result database corresponding to the database identifier of the simulation result to be processed includes the current simulation software version. If it does, proceed to step S6; otherwise, proceed to step S7.
[0070] As an example, step S6 includes:
[0071] Step C61: Add the database identifier of the simulation result to be processed and the current simulation software version to the target simulation result database identifier set corresponding to the test case to be executed, and then execute step S8.
[0072] As an example, step S7 includes:
[0073] Step C71: Obtain the simulation command to be processed corresponding to the database identifier of the simulation results to be processed, input the simulation command to be processed and the design file into the current simulation software to perform simulation and generate the corresponding simulation result data.
[0074] Step C72: If the database corresponding to the simulation instruction to be processed currently contains a storage area for the development stage of the current simulation software, then proceed to step C73; otherwise, proceed to step C74.
[0075] Step C73: Overwrite the data in the storage area of the development stage of the current simulation software in the database corresponding to the simulation instruction to be processed with the newly generated corresponding simulation result data, update the simulation software version that is compatible with the development stage of the current simulation software in the database corresponding to the simulation instruction to be processed, and then execute step C75.
[0076] Among them, the database corresponding to the simulation instructions to be processed currently contains simulation software versions that are compatible with the current simulation software at the current development stage, specifically the current simulation software version and the version of the previous simulation software at the development stage that is lower than the current simulation software version.
[0077] Step C74: In the database corresponding to the simulation instruction to be processed, allocate a corresponding storage area for the development stage corresponding to the current simulation software, store the newly generated simulation result data in the newly allocated storage area, set the compatible simulation software version for the development stage corresponding to the current simulation software, and execute step C75.
[0078] Step C75: Add the database identifier and storage area identifier corresponding to the newly generated simulation result data to the target simulation result database identifier set corresponding to the test case to be executed.
[0079] As an example, step S9 includes:
[0080] Step C91: Obtain the target simulation result data of the corresponding target region in the target simulation result database based on the target simulation result database identifier and target storage region identifier in the target simulation result database identifier set corresponding to the test case to be executed.
[0081] Step C92: Input the target simulation data, target simulation result data, and test cases to be executed into the debugging software and execute the test cases to be executed.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items.
[0083] It should be noted that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe the steps as sequential processes, many of these steps can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the steps can be rearranged. A process can be terminated when its operation is complete, but it may also have additional steps not included in the figures. A process can correspond to a method, function, procedure, subroutine, subroutine, etc.
[0084] This invention also provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method described in this invention.
[0085] This invention also provides a computer-readable storage medium storing computer-executable instructions for performing the methods described in this invention.
[0086] In this embodiment of the invention, the mapping relationship between the simulation result database and the simulation instructions is first obtained, and then the mapping relationship between the test cases and the simulation result database is constructed. By utilizing the compatibility between simulation software versions, the simulation result data in the simulation result database is reused to the greatest extent during the execution of test cases in the debugging software, thereby reducing the number of times the simulation software is executed and improving the running speed of test cases in EDA software.
[0087] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes, and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A method for reusing test cases in EDA software, characterized in that, include: Step S1: Obtain the mapping relationship between the simulation result database and the simulation instructions, and set the simulation software version information that each simulation result database can be compatible with; Step S2: Construct a set of test cases, obtain a set of simulation result database identifiers corresponding to each test case, and mark each simulation result database identifier in each set of simulation result database identifiers as untraversed. Each simulation result database identifier corresponds to a simulation result database. Step S3: Obtain the current simulation software version information; Step S4: Obtain an untraversed simulation result database identifier from the set of simulation result database identifiers corresponding to the test cases to be executed as the simulation result database identifier to be processed; Step S5: If the current simulation software version information is the simulation software version information that the simulation result database corresponding to the database identifier of the simulation result database to be processed can be compatible with, then proceed to step S6; otherwise, proceed to step S7. Step S6: Add the database identifier of the simulation result to be processed to the target simulation result database identifier set corresponding to the test case to be executed, and then proceed to step S8; Step S7: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation result to be processed, input the simulation instruction to be processed and the design file into the current simulation software to perform simulation, generate the corresponding simulation result database, and add the newly generated corresponding simulation result database identifier to the target simulation result database identifier set corresponding to the test case to be executed; Step S8: If there are still untraversed simulation result database identifiers in the simulation result database identifier set corresponding to the test case to be executed, then return to step S4; otherwise, execute step S9. Step S9: Execute the test cases to be executed based on the test cases to be executed, the target simulation result database identifier set corresponding to the test cases to be executed, and the debugging software.
2. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that the new version is compatible with the old version. The simulation software version information includes the simulation software version. Step S1 includes: Step S11: Input the design file and simulation instructions into the preset simulation software to perform simulation, generate simulation result data, and store the simulation result data into the corresponding simulation result database. Step S12: Establish the mapping relationship between the simulation result database and simulation commands; Step S13: Set the simulation software version information that the simulation result database can be compatible with according to the compatibility conditions of the simulation software version and the preset simulation software version.
3. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that the new version is compatible with the old version. The simulation software version information includes the simulation software version. Step S7 includes: Step S71: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation results to be processed, input the simulation instruction to be processed and the design file into the current simulation software to perform simulation and generate the corresponding simulation result database. Step S72: Overwrite the original simulation result database corresponding to the simulation instruction to be processed with the newly generated corresponding simulation result database, and set the simulation software version information that the newly generated corresponding simulation result database can be compatible with according to the compatibility conditions of the simulation software version; Step S73: Add the newly generated corresponding simulation result database identifier to the target simulation result database identifier set corresponding to the test case to be executed.
4. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that the new version is compatible with the old version. The simulation software version information includes the simulation software version. Step S9 includes: Step S91: Obtain the target simulation result data in the target simulation result database based on the target simulation result database identifier in the target simulation result database identifier set corresponding to the test case to be executed; Step S92: Input the target simulation data, target simulation result data, and test cases to be executed into the debugging software and execute the test cases to be executed.
5. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that new versions are compatible with old versions within the same development stage, while versions from different development stages are incompatible with each other. Each simulation result database is allocated a corresponding storage area for each development stage. The simulation software version information includes the simulation software version and the development stage. Step S1 includes: Step C11: Input the design file and simulation instructions into the preset simulation software to perform simulation, generate simulation result data, and store the simulation result data in the storage area of the development stage corresponding to the preset simulation software version in the corresponding simulation result database. Step C12: Establish the mapping relationship between the simulation result database and simulation commands; Step C13: Set the simulation software version information that the storage area of the development stage corresponding to the preset simulation software version in the simulation results database can be compatible with.
6. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that new versions are compatible with old versions within the same development stage, while versions from different development stages are incompatible with each other. Each simulation result database is allocated a corresponding storage area for each development stage. The simulation software version information includes the simulation software version and the development stage. Step S6 includes: Step C61: Add the database identifier of the simulation result to be processed and the current simulation software version to the target simulation result database identifier set corresponding to the test case to be executed, and then execute step S8.
7. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that new versions are compatible with old versions within the same development stage, while versions from different development stages are incompatible with each other. Each simulation result database is allocated a corresponding storage area for each development stage. The simulation software version information includes the simulation software version and the development stage. Step S7 includes: Step C71: Obtain the simulation instruction to be processed corresponding to the database identifier of the simulation result to be processed, input the simulation instruction to be processed and the design file into the current simulation software to perform simulation and generate the corresponding simulation result data; Step C72: If the database corresponding to the simulation instruction to be processed currently contains a storage area for the development stage of the current simulation software, then proceed to step C73; otherwise, proceed to step C74. Step C73: Overwrite the data in the storage area of the development stage of the current simulation software in the database corresponding to the simulation instruction to be processed with the newly generated corresponding simulation result data, update the simulation software version that is compatible with the development stage of the current simulation software in the database corresponding to the simulation instruction to be processed, and execute step C75. Step C74: In the database corresponding to the simulation instruction to be processed, allocate a corresponding storage area for the development stage corresponding to the current simulation software, store the newly generated simulation result data in the newly allocated storage area, set the compatible simulation software version for the development stage corresponding to the current simulation software, and execute step C75. Step C75: Add the database identifier and storage area identifier corresponding to the newly generated simulation result data to the target simulation result database identifier set corresponding to the test case to be executed.
8. The method according to claim 1, characterized in that, The compatibility condition of the simulation software version is that new versions in the same development stage are compatible with old versions, while versions in different development stages are incompatible with each other. Each simulation result database is allocated a corresponding storage area for each development stage. The simulation software version information includes the simulation software version and the development stage. Step S9 includes: Step C91: Obtain the target simulation result data of the corresponding target region in the target simulation result database based on the target simulation result database identifier and target storage region identifier in the target simulation result database identifier set corresponding to the test case to be executed; Step C92: Input the target simulation data, target simulation result data, and test cases to be executed into the debugging software and execute the test cases to be executed.
9. An electronic device, characterized in that, include: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that are executed by the at least one processor, the instructions being configured to perform the method of any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions for performing the method of any one of claims 1-8.
Citation Information
Patent Citations
Simulation method and system
CN102855278A
Universal software testing method
CN115525544A