CN-122021500-A - Test case file generation method, device, equipment, storage medium and program product
Abstract
The application relates to a test case file generation method, a device, equipment, a storage medium and a program product, and relates to the technical field of chips. The application can improve the test case generation efficiency. The method comprises the steps of obtaining a test element configuration file of a chip system, wherein the configuration file is obtained according to a test element configuration template file containing target test element information, the target test element information is test element information configured for target test elements of the chip system, the configuration template file contains a plurality of configurable test elements of the chip system, obtaining a test code template file of the chip system, the code template file contains code position identifiers of the test elements to be configured and is used for indicating positions, to be configured, of the test element information of the test elements to be configured in the code template file, and obtaining a test case file according to the target test element information of the target test elements in the configuration file and the code position identifiers of the test elements to be configured in the code template file.
Inventors
- Request for anonymity
- Request for anonymity
Assignees
- 上海壁仞科技股份有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260113
Claims (10)
- 1. A test case file generation method, the method comprising: The method comprises the steps of obtaining a test element configuration file of a chip system, wherein the test element configuration file is obtained according to a test element configuration template file containing target test element information, and the target test element information is test element information configured for target test elements of the chip system; The method comprises the steps of obtaining a test code template file of the chip system, wherein the test code template file contains code position identifiers of test elements to be configured, and the code position identifiers are used for indicating positions, to be configured in the test code template file, of the test element information of the test elements to be configured; And obtaining the test case file of the chip system according to the target test element information of the target test element in the test element configuration file and the code position identification of the test element to be configured in the test code template file.
- 2. The method according to claim 1, wherein the obtaining the test case file of the chip system according to the target test element information of the target test element in the test element configuration file and the code location identifier of the test element to be configured in the test code template file includes: Analyzing the target test element and the target test element information from the test element configuration file; And configuring the target test element information to the position indicated by the corresponding code position mark according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system.
- 3. The method of claim 2, wherein the code location identifier is a placeholder, and the configuring the target test element information to the location indicated by the corresponding code location identifier according to the correspondence between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system includes: And replacing the corresponding placeholder with the target test element information according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system.
- 4. The method of claim 2, wherein the step of determining the position of the substrate comprises, The analyzing the target test element and the target test element information from the test element configuration file includes: analyzing the test element configuration file to obtain the target test element and the target test element information, and loading the target test element and the target test element information into a memory; The step of configuring the target test element information to the position indicated by the corresponding code position identifier according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system, including: According to the to-be-configured test elements in the test code template file, acquiring target test element information of a corresponding target test element from a memory; and configuring the target test element information to a position indicated by the corresponding code position identifier to obtain a test case file of the chip system.
- 5. The method of claim 1, wherein the obtaining a test element profile of a chip system comprises: acquiring a test element configuration template file containing target test element information, wherein the test element configuration template file corresponds to a target test requirement; If the test element configuration template file containing the target test element information lacks the test element information of the designated test element, sending out the missing prompt information of the designated test element, and re-acquiring the test element configuration template file containing the target test element information, wherein the missing prompt information is used for prompting the configuration of the test element information for the missing designated test element; And if the test element configuration template file containing the target test element information does not lack the test element information of the designated test element, determining the test element configuration template file containing the target test element information as the test element configuration file of the chip system.
- 6. The method of any one of claims 1 to 5, wherein the test case file is a file for configuring to a directory specified by a test environment and for modifying a compiled file sequence of a simulation tool.
- 7. A test case generating device, the device comprising: The system comprises a configuration file acquisition module, a configuration file acquisition module and a configuration file acquisition module, wherein the configuration file of test elements of a chip system is acquired according to a configuration template file of the test elements, wherein the configuration file of the test elements comprises target test element information, and the target test element information is the test element information configured for the target test elements of the chip system; The system comprises a code file acquisition module, a code file acquisition module and a test module, wherein the code file acquisition module is used for acquiring a test code template file of the chip system, wherein the test code template file comprises a code position identifier of a to-be-configured test element, and the code position identifier is used for indicating the position of the to-be-configured test element, which is required to be configured in the test code template file, of the test element information of the to-be-configured test element; And the case file generating module is used for obtaining the test case file of the chip system according to the target test element information of the target test element in the test element configuration file and the code position identification of the test element to be configured in the test code template file.
- 8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
- 9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
Description
Test case file generation method, device, equipment, storage medium and program product Technical Field The present application relates to the field of chip technologies, and in particular, to a method, an apparatus, a device, a storage medium, and a program product for generating a test case file. Background In the field of integrated circuit front-end verification, for example, a complex system on a chip, a chip system comprising a multi-request access initiator (master) and a multi-request access receiver (slave) and the like can be verified by means of software simulation and the like. These chip systems may include artificial intelligence chip systems specifically designed and optimized for artificial intelligence tasks, including but not limited to GPUs (Graphics Processing Unit, graphics processors), NPUs (Neural Network Processing Unit, neural network processors), GPGPUs (General-Purpose computing on Graphics Processing Unit, general-purpose graphics processors). In the related art, a test case for verifying a chip system mainly depends on manual development of a verification engineer, and has a technical problem of low efficiency. Disclosure of Invention In view of the foregoing, it is desirable to provide a test case file generating method, apparatus, device, storage medium, and program product. In a first aspect, the present application provides a test case file generating method, including: The method comprises the steps of obtaining a test element configuration file of a chip system, wherein the test element configuration file is obtained according to a test element configuration template file containing target test element information, and the target test element information is test element information configured for target test elements of the chip system; The method comprises the steps of obtaining a test code template file of the chip system, wherein the test code template file contains code position identifiers of test elements to be configured, and the code position identifiers are used for indicating positions, to be configured in the test code template file, of the test element information of the test elements to be configured; And obtaining the test case file of the chip system according to the target test element information of the target test element in the test element configuration file and the code position identification of the test element to be configured in the test code template file. In one embodiment, the obtaining the test case file of the chip system according to the target test element information of the target test element in the test element configuration file and the code position identification of the to-be-configured test element in the test code template file includes analyzing the target test element and the target test element information from the test element configuration file, and configuring the target test element information to the position indicated by the corresponding code position identification according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system. In one embodiment, the code position mark is a placeholder, the configuring the target test element information to the position indicated by the corresponding code position mark according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system comprises replacing the corresponding placeholder with the target test element information according to the corresponding relation between the to-be-configured test element and the target test element in the test code template file to obtain the test case file of the chip system. In one embodiment, the analyzing the target test element and the target test element information from the test element configuration file includes analyzing the test element configuration file to obtain the target test element and the target test element information, loading the target test element and the target test element information into a memory, and configuring the target test element information to a position indicated by a corresponding code position identifier according to a corresponding relation between a to-be-configured test element in the test code template file and the target test element to obtain a test case file of the chip system. In one embodiment, the method comprises the steps of obtaining a test element configuration template file containing target test element information, wherein the test element configuration template file corresponds to target test requirements, sending out missing prompt information of a specified test element if the test element information of the specified test element is missing in the test element configuration template file containing the target test element information, and re-obtaining th