A detection method, device, storage medium and electronic device
By acquiring and parsing the configuration information and test logs of the chip's functional units, functional test records are generated, solving the problem of not being able to detect the coverage of individual functional units in existing technologies. This enables accurate location of untested functional units and updating of test cases, thereby improving the chip's integration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN JIANGYUAN TECHNOLOGY CO LTD
- Filing Date
- 2026-04-30
- Publication Date
- 2026-06-02
AI Technical Summary
Existing technologies can only obtain the overall coverage of test cases for IP modules, but cannot detect the coverage of test cases for individual functional units. This makes it impossible to efficiently and quickly identify functional units that are not covered by test cases, affecting chip integration and normal use.
By acquiring the configuration information and target test cases of multiple functional units in the chip under test, parsing the test log information, generating functional test records, detecting the coverage of each functional unit, and updating the target test cases to cover untested functional units.
It enables accurate detection of the coverage status of individual functional units, improves the efficiency of test case coverage detection, and ensures the normal integration and use of chips.
Smart Images

Figure CN122133574A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of chip technology, and in particular to a detection method, apparatus, storage medium and electronic device. Background Technology
[0002] In the chip design and verification process, it is necessary to check the coverage of test cases with the internal functional units of the IP. Checking the coverage of functional units is an important step to ensure the normal integration and operation of the chip.
[0003] Currently, the coverage of functional units is tested by obtaining overall coverage data of the IP module through Electronic Design Automation (EDA) tools. Staff then analyze the overall coverage data to check whether the test cases cover the functional units inside the IP.
[0004] However, this method can only obtain the overall coverage of the IP module by the test cases, and cannot detect the coverage of individual functional units by the test cases. This makes it impossible to efficiently and quickly identify functional units that are not covered by the test cases, resulting in low efficiency in detecting test case coverage, which in turn affects the integration and normal use of the chip. Summary of the Invention
[0005] In view of this, this application provides a detection method, apparatus, storage medium, and electronic device. The main purpose is to improve the existing technology, which can only obtain the overall coverage of test cases on IP modules, but cannot detect the coverage of test cases on individual functional units. This results in the inability to efficiently and quickly identify functional units not covered by test cases, and the detection efficiency of test case coverage is low, which in turn affects the integration and normal use of the chip.
[0006] Firstly, this application provides a detection method, including: Obtain the configuration information of multiple functional units in the chip under test and the target test cases for functional testing of the chip under test; Determine the test log information of the target test case for functional testing of the chip under test; The test log information is parsed to obtain the functional test record corresponding to the identification information of each functional unit in the plurality of functional units. Based on the functional test record, the number of functional test records corresponding to each functional unit is obtained, and it is detected whether each functional unit in the plurality of functional units can be functionally tested by the target test case. Based on the configuration information and detection results, the target functional units that have not been functionally tested by the target test case are identified among the multiple functional units, so as to update the target test case.
[0007] Optionally, parsing the test log information to obtain functional test records for the plurality of functional units, and based on the functional test records, detecting whether each of the plurality of functional units can be functionally tested by the target test case, includes: Extract test behavior data from the test log information, and generate a set of functional test records for the multiple functional units based on the test behavior data; The identification information of the plurality of functional units in the configuration information is matched with the functional test records in the functional test record set to obtain the functional test record corresponding to the identification information of each of the plurality of functional units; The functional test record corresponding to the identifier information of each functional unit obtained by matching is determined as the functional test record corresponding to each functional unit; Based on the functional test records corresponding to each functional unit, the number of functional test records corresponding to each functional unit is obtained. It is then determined whether each functional unit among the multiple functional units can be functionally tested by the target test case, and the functional units among each functional unit that are tested by the target test case are identified as tested functional units.
[0008] Optionally, the step of detecting whether each functional unit among the plurality of functional units can be functionally tested by the target test case based on the functional test record corresponding to each functional unit, and determining the functional units among the functional units that have been functionally tested by the target test case as tested functional units, includes: The test behavior statistics are performed on the functional test records corresponding to each functional unit to obtain the number of functional test records corresponding to each functional unit; Based on the number of records, the number of times each functional unit is tested is determined, and the functional units whose number of tests meets the threshold are determined as the tested functional units; Generate test information for the tested functional units, and determine the test information as the detection results of the multiple functional units.
[0009] Optionally, after generating the test information of the tested functional units and determining the test information as the detection results of the plurality of functional units, the method further includes: If there are test cases that fail the test in the target test cases, the functional unit corresponding to the test cases that fail the test is determined based on the detection results of the multiple functional units.
[0010] Optionally, the step of determining the target functional unit among the plurality of functional units that has not been functionally tested by the target test case based on the configuration information and the detection results, so as to update the target test case, includes: A first set of identification information corresponding to the plurality of functional units is determined from the configuration information, and a second set of identification information corresponding to the tested functional unit is determined from the detection result; The identifiers in the first identifier information set are compared and analyzed with the identifiers in the second identifier information set. At least one target identifier that is not included in the second identifier information set is selected from the first identifier information set. The at least one target identifier constitutes a target identifier set. Determine the functional unit corresponding to each target identifier in the target identifier set, and identify the determined functional unit as the target functional unit that has not undergone functional testing.
[0011] Optionally, after determining the functional unit corresponding to each target identifier in the target identifier set and identifying the determined functional unit as the target functional unit that has not undergone functional testing, the method further includes: The target configuration information of the target functional unit is determined from the configuration information; Based on the target configuration information, test cases capable of testing the target functional unit are added to the target test cases, so that the updated target test cases can test the target functional unit.
[0012] Optionally, the method further includes: If the target test case is a single test case, duplicate detection is performed on the added test cases and the target test case, and the detected duplicate test cases are deleted. When there are multiple target test cases, the number of functional units tested in each test case is determined based on the functional test records, and high-quality test cases are selected from the multiple test cases based on the number of functional units.
[0013] Optionally, obtaining the configuration information of multiple functional units in the chip under test and the target test cases for functional testing of the chip under test includes: Insert a target program into the source code of the chip to be tested, and obtain the configuration information of the plurality of functional units through the target program. The configuration information includes at least one of the identification information, running attribute information and hierarchical relationship information of the plurality of functional units. Select at least one test case from the test case set that matches the function of the chip to be tested, and determine the at least one matched test case as the target test case.
[0014] Secondly, this application provides a detection device, comprising: The acquisition module is configured to acquire configuration information of multiple functional units in the chip under test and target test cases for performing functional tests on the chip under test. The determination module is configured to determine the test log information of the target test case for functional testing of the chip under test; The detection module is configured to parse the test log information to obtain the functional test record corresponding to the identification information of each functional unit in the plurality of functional units, and based on the functional test record, obtain the number of functional test records corresponding to each functional unit, and detect whether each functional unit in the plurality of functional units can be functionally tested by the target test case. The determination module is also configured to determine, based on the configuration information and the detection results, the target functional unit among the plurality of functional units that has not been functionally tested by the target test case, so as to update the target test case.
[0015] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the detection method described in the first aspect.
[0016] Fourthly, this application provides an electronic device, including a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, wherein the processor executes the computer program to implement the detection method described in the first aspect.
[0017] By means of the above technical solution, this application provides a testing method, apparatus, storage medium, and electronic device, comprising: acquiring configuration information of multiple functional units in a chip under test and target test cases for functional testing of the chip under test; determining test log information of the target test cases for functional testing of the chip under test; parsing the test log information to obtain functional test records corresponding to the identification information of each functional unit in the multiple functional units, and based on the functional test records, obtaining the number of functional test records corresponding to each functional unit; detecting whether each functional unit in the multiple functional units can be functionally tested by the target test cases; and, based on the configuration information and the test results, determining the target functional units in the multiple functional units that have not been functionally tested by the target test cases, so as to update the target test cases. Compared with existing technologies, this application provides basic data support for functional unit coverage testing by acquiring configuration information and target test cases of multiple functional units in the chip under test; it provides a data source for functional test record parsing by determining the test log information of the target test cases; it obtains functional test records by parsing the test logs and detects the test coverage of each functional unit, thereby achieving accurate detection of the coverage status of a single functional unit; and it accurately locates untested target functional units by determining untested target functional units based on configuration information and test results and updating target test cases, thereby improving the efficiency of test case coverage testing and ensuring the normal integration and use of the chip. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic flowchart of a detection method provided in an embodiment of this application is shown; Figure 2 A schematic flowchart of a detection method provided in an embodiment of this application is shown; Figure 3 This illustration shows a schematic diagram of the structure of a detection device provided in an embodiment of this application; Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0021] The embodiments of this application will now be described in more detail with reference to the accompanying drawings. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0022] To address the shortcomings of current technologies that only provide overall test case coverage of IP modules but fail to detect coverage of individual functional units, thus hindering the rapid and efficient identification of uncovered functional units and impacting chip integration and normal operation, this embodiment provides a detection method. Figure 1 As shown, the method includes: Step 101: Obtain the configuration information of multiple functional units in the chip under test and the target test cases for functional testing of the chip under test.
[0023] In this embodiment, the chip under test can be a chip that requires functional coverage verification and integration replacement testing. The chip under test can be used to conduct IP functional testing and coverage completeness testing to adapt to verification requirements in scenarios such as chip IP integration, IP update iteration, and functional unit replacement. For example, the chip under test in this embodiment can specifically be a chip including self-developed IP or third-party IP, or a chip that requires functional unit replacement due to process iteration or functional upgrades. The IPs and functional units within the chip can have a many-to-many correspondence.
[0024] In this application embodiment, the functional unit can be a general functional unit that is needed for overlay detection when the IP module of the chip under test is updated or replaced, and this application does not specifically limit it. For example, the functional unit in this application embodiment can specifically be a memory containing the keyword "memwrapper".
[0025] In the embodiments of this application, the test case coverage of multiple functional units in the chip under test can be detected using automated tools. These automated tools can be software programs that automate the entire process of functional coverage verification, functional unit replacement detection, test log parsing, and test case updates, eliminating the need for manual analysis using EDA tools. For example, the automated tool in this embodiment can specifically be a MEMORY coverage verification software program adapted to IP integration and replacement scenarios.
[0026] In the embodiments of this application, the configuration information can be information used to describe the basic attributes and structural relationships of functional units. The configuration information can be used to provide a basis for matching functional test records and screening untested functional units. For example, the configuration information in the embodiments of this application may specifically include at least one of the identification information, operation attribute information, and hierarchical relationship information of functional units, and may also include related attribute information such as chip select signals, read / write signals, and interaction signals of functional units.
[0027] In the embodiments of this application, the target test case can be a test script used to perform functional tests on the chip under test. For example, the target test case in the embodiments of this application can specifically be a test case selected from the test case set that matches the IP function of the chip under test, or it can be a customer-provided IP-related test case or a verification test case of self-developed IP.
[0028] Step 102: Determine the test log information for functional testing of the target test case for the chip under test.
[0029] In this embodiment, the test log information can be simulation run log data generated after the target test case is run. The test log information can be used to record the test behavior and status of the functional unit during functional testing. For example, the test log information in this embodiment can specifically be the run.vcs.log log file generated after the target test case is run.
[0030] In the embodiments of this application, the target test cases can be run by an automated tool software program to perform functional tests on the chip under test. During the test execution, corresponding test log information can be automatically generated. The automated tool can traverse all log files generated by the execution of test cases in the current working directory and determine the obtained log file content as the test log information of the target test cases for functional testing of the chip under test.
[0031] Step 103: Parse the test log information to obtain the functional test record corresponding to the identification information of each functional unit in multiple functional units, and based on the functional test record, obtain the number of functional test records corresponding to each functional unit, and check whether each functional unit in multiple functional units can be functionally tested by the target test case.
[0032] In this embodiment, the functional test record can be information used to record the testing status of a single functional unit. The functional test record can be used to count the number of times a functional unit is tested and to determine whether the functional unit has completed the functional test. For example, the functional test record in this embodiment can specifically include record information such as the functional unit identifier, the number of test triggers, the test execution status, and the number of functional units covered by each test case.
[0033] Step 104: Based on the configuration information and test results, identify the target functional units among multiple functional units that have not been functionally tested by the target test cases, and update the target test cases.
[0034] In this embodiment, the target functional unit may be a functional unit that has not been functionally tested by the target test case. For example, in this embodiment, the target functional unit may specifically be a memory module in the chip under test that has not been accessed or covered.
[0035] In the embodiments of this application, the tested functional units that are functionally tested by the target test case can be determined based on the configuration information, the untested functional units can be determined based on the detection results, and the target test case can be updated according to the untested functional units so that all functional units can be covered by the target test case.
[0036] Compared with existing technologies, this application provides basic data support for functional unit coverage testing by acquiring configuration information and target test cases of multiple functional units in the chip under test; it provides a data source for functional test record parsing by determining the test log information of the target test cases; it obtains functional test records by parsing the test logs and detects the test coverage of each functional unit, thereby achieving accurate detection of the coverage status of a single functional unit; and it accurately locates untested target functional units by determining untested target functional units based on configuration information and test results and updating target test cases, thereby improving the efficiency of test case coverage testing and ensuring the normal integration and use of the chip.
[0037] As an optional approach, when performing the task of "parseting test log information to obtain the functional test record corresponding to the identifier information of each functional unit in multiple functional units, and based on the functional test record, obtaining the number of functional test records corresponding to each functional unit, and detecting whether each functional unit in multiple functional units can be functionally tested by the target test case," the following methods can be used, but are not limited to these: Figure 2 As shown, it includes: Step 201: Extract test behavior data from the test log information, and generate a set of functional test records for multiple functional units based on the test behavior data.
[0038] In the embodiments of this application, test behavior data can be data extracted from test log information that characterizes the test status of a functional unit. This test behavior data can be used to generate functional test records. For example, the test behavior data in the embodiments of this application may include toggle data of the functional unit's chip select signal, toggle data of the interaction signal, and function trigger data. When the functional unit is a memory, the test behavior data may include toggle data of the read / write signal and load statistics.
[0039] In the embodiments of this application, the contents of the test log information can be extracted by an automated tool software program to obtain test behavior data such as the chip select signal toggle, the interaction signal toggle, and the functional load statistics of the functional units. The test behavior data corresponding to all functional units are integrated to generate a functional test record set. The functional test record set may include test-related records of all functional units in the chip under test.
[0040] Step 202: Match the identification information of multiple functional units in the configuration information with the functional test records in the functional test record set to obtain the functional test record corresponding to the identification information of each functional unit in the multiple functional units.
[0041] In this embodiment of the application, the identification information of each functional unit in the configuration information can be compared and matched one by one with each functional test record in the functional test record set. According to the correspondence of the identification information, the functional test record that matches the identification information of each functional unit is selected, and the association and binding of the identification and the test record is completed.
[0042] Step 203: Determine the functional test record corresponding to the identification information of each functional unit obtained by matching, and determine the functional test record corresponding to each functional unit.
[0043] In this embodiment of the application, the test records after matching and association can be assigned to the functional units pointed to by the corresponding identification information, so as to ensure that the test status of each functional unit can be reflected through the functional test records.
[0044] Step 204: Based on the functional test records corresponding to each functional unit, obtain the number of functional test records corresponding to each functional unit, detect whether each functional unit in multiple functional units can be functionally tested by the target test case, and determine the functional units in each functional unit that are tested by the target test case as tested functional units.
[0045] In the embodiments of this application, the test log information can be parsed and processed by an automated tool software program to extract the test behavior data, and generate functional test records for multiple functional units based on the test behavior data; the functional unit identification information in the configuration information is matched with the functional test records to determine the functional test record corresponding to each functional unit; based on the functional test records, it is detected whether each functional unit is tested by the target test case, and the functional unit that is actually tested is determined as the tested functional unit.
[0046] As an optional approach, when performing the task of "obtaining the number of functional test records for each functional unit based on the functional test records corresponding to each functional unit, detecting whether each functional unit among multiple functional units can be functionally tested by the target test case, and determining the functional units among each functional unit that have been tested by the target test case as tested functional units," the following method can be used, but is not limited to: performing test behavior statistics on the functional test records corresponding to each functional unit to obtain the number of functional test records for each functional unit; determining the number of times each functional unit is tested based on the number of records, and determining the functional units whose number of tests meets the threshold as tested functional units; generating test information for the tested functional units, and determining the test information as the detection results for multiple functional units.
[0047] In this embodiment, the tested functional unit can be a functional unit that is actually functionally tested by the target test case. The tested functional unit can be used to construct the test results as a comparison basis for filtering untested functional units. For example, the tested functional unit can be a functional unit whose number of tests meets a preset threshold. In this embodiment, the tested functional unit can specifically be a MEMORY module that completes effective read / write and interaction triggering.
[0048] In this embodiment of the application, the test behavior statistics of the functional test records can be to count the number of test records corresponding to each functional unit and convert the number of records into the number of times the functional unit is tested; the preset number of times threshold can be flexibly adjusted according to the IP verification requirements, and the functional unit can be identified as having been tested if the threshold requirement is met; the detection results can include the identification information, number of times tested, test status and other contents of the tested functional unit.
[0049] As an optional approach, after executing "generating test information for tested functional units and determining the test information as the detection results of multiple functional units", the following method can be used, but is not limited to: when there are test cases that have failed the test in the target test cases, the functional units corresponding to the test cases that have failed the test are determined based on the detection results of multiple functional units.
[0050] In the embodiments of this application, when the functional units in the chip under test are replaced or updated due to process changes or project evolution, the target test cases can be used to test the updated chip under test. If there are test cases that fail the test in the target test cases, the multiple or one functional units covered by the test cases can be determined by the test results of multiple functional units covered by the test cases, thereby determining the problematic functional unit that caused the test to fail.
[0051] As an optional approach, when performing the action of "determining the target functional units that have not been functionally tested by the target test cases among multiple functional units based on configuration information and test results, so as to update the target test cases", the following method can be used, but is not limited to: determining a first set of identifier information corresponding to multiple functional units from the configuration information, and determining a second set of identifier information corresponding to the tested functional units from the test results; comparing and analyzing the identifiers in the first set of identifier information with the identifiers in the second set of identifier information, filtering out at least one target identifier that is not included in the second set of identifier information from the first set of identifier information, and forming a target identifier set from the at least one target identifier; determining the functional unit corresponding to each target identifier in the target identifier set, and determining the determined functional unit as the target functional unit that has not been functionally tested.
[0052] In this embodiment, the first identification information set may be a set composed of the identification information of all functional units in the chip to be tested. For example, in this embodiment, the first identification information set may specifically be a set of identification information of all memories in the configuration information.
[0053] In this embodiment, the second identification information set may be a set of identification information of tested functional units. The second identification information set can be compared with the first identification information set to filter out the identification information of functional units that have not been tested. For example, in this embodiment, the second identification information set may specifically be the set of MEMORY identification information that has been tested in the detection results.
[0054] In this embodiment of the application, a first set of identifier information for all functional units can be extracted from the configuration information, and a second set of identifier information for the tested functional units can be extracted from the detection results. The two sets of identifiers are compared and analyzed to filter out target identifiers that are not included in the second set of identifier information from the first set of identifier information. The corresponding target functional units are determined based on the target identifiers. The target test cases are updated based on the configuration information of the target functional units to supplement the test content for the target functional units. At the same time, a visual table can be generated by an automated tool software program to display the overall coverage of functional units, the interaction / read / write coverage, and the number of functional units covered by a single test case.
[0055] As an optional approach, after performing the step of "determining the functional unit corresponding to each target identifier in the target identifier set and identifying the determined functional units as target functional units that have not undergone functional testing", the following method can be used, but is not limited to: determining the target configuration information of the target functional unit from the configuration information; and adding test cases that can test the target functional unit to the target test cases based on the target configuration information, so that the updated target test cases can test the target functional unit.
[0056] In the embodiments of this application, the target configuration information may include the identification information, hierarchical relationship, and running attributes of the target functional unit. New test cases can be determined based on the target configuration information to ensure that the test of the target functional unit can be triggered. This method can quickly improve the coverage of test cases, increase the test coverage of the chip under test, and reduce the verification risk of chip IP integration and functional unit replacement.
[0057] As an alternative approach, but not limited to the following methods, the method includes: when the target test case is a single test case, performing duplicate detection on the added test cases and the target test case, and deleting the detected duplicate test cases; when the target test case is multiple test cases, determining the number of functional units tested by each test case, and selecting high-quality test cases from the multiple test cases based on the number of functional units.
[0058] In this embodiment of the application, when the target test case is a single test case, the newly added test content may overlap with the original test logic. Duplicate detection may include, but is not limited to, text matching, logical comparison, and other methods. By identifying and deleting duplicate test items, resource waste and test log redundancy can be avoided, the test case structure can be simplified, and test execution efficiency and verification accuracy can be improved.
[0059] In the embodiments of this application, when there are multiple target test cases, the number of functional units covered by each test case can be determined based on the functional unit records covered by each test case in the functional test record. Test cases can be selected from multiple test cases as high-quality test cases based on the number of functional units. For example, test cases with a large number of functional units can be selected as high-quality test cases, and the number of high-quality test cases can be one, two, etc. This application does not make specific limitations on this.
[0060] As an optional approach, when performing the "acquiring configuration information of multiple functional units in the chip under test and target test cases for functional testing of the chip under test", the following method can be used, but is not limited to: inserting a target program into the source code of the chip under test, and obtaining configuration information of multiple functional units through the target program, wherein the configuration information includes at least one of the identification information, running attribute information and hierarchical relationship information of multiple functional units; selecting at least one test case that matches the function of the chip under test from the test case set, and determining the at least one matched test case as the target test case.
[0061] In the embodiments of this application, the target program can be an information acquisition and monitoring program in an automated tool software program, which can be inserted into the functional unit of the IP source code of the chip to be tested, and automatically collect configuration information such as IP level, functional unit name, and signal attributes.
[0062] In this embodiment of the application, the selection of test cases can be matched with the IP function type and verification requirements of the chip under test, with a preference for test cases that have broad coverage and comprehensive business applications. This approach can be adapted to verification scenarios of self-developed IP and third-party IP, significantly shortening the verification cycle for IP integration and functional unit replacement. For example, in the scenario of MCU chip IP integration and memory replacement, the verification cycle can be shortened from several months to within one day.
[0063] In this embodiment, an automated verification working directory can be established first based on automated tools. The working directory may include the IP design source code of the chip under test, the verification environment, and the automated tool software program. The target program is inserted into the IP source code of the chip under test, and the configuration information of multiple functional units is collected through the target program. At the same time, at least one test case that matches the IP function of the chip under test can be selected from the test case set, and the matched test case is determined as the target test case.
[0064] As an optional approach, this application provides an example of a detection result table generated by functional testing of multiple functional units by test cases, as shown in Table 1. The target test cases may include test case 0, test case 1, test case 2, and test case 3. The multiple functional units may include functional unit 0, functional unit 1, functional unit 2, and functional unit 3. The table can detect whether each functional unit is functionally tested by each test case. 0 in the table can indicate that the functional unit has not been tested by a test case, and 1 in the table can indicate that the functional unit has been tested by a test case. The table can also count the total number of tests for each functional unit and the total number of functional units covered by a single test case.
[0065] Table 1
[0066] Compared with existing technologies, the embodiments of this application achieve the determination of the coverage status of a single functional unit by extracting test behavior data, matching identifiers and test records, and identifying the tested functional units; improve the accuracy of the determination of tested functional units by counting the number of test records, determining the number of times they were tested, and generating test results; achieve rapid location of problematic functional units by determining the functional units corresponding to test cases that failed the test based on the test results; achieve rapid location of untested functional units by comparing the identifier set and filtering the target identifiers; achieve targeted updates of target test cases by obtaining the configuration information of the target functional units and adding corresponding test cases; reduce test redundancy and improve test execution efficiency by detecting and deleting duplicate test cases in a single test case and filtering high-quality test cases based on the coverage of test cases; and achieve effective collection of configuration information and reasonable determination of target test cases by inserting the target program to obtain configuration information and selecting matching test cases.
[0067] Furthermore, as Figure 1 and Figure 2 To illustrate the specific implementation of the method shown, this embodiment provides a detection device, such as... Figure 3 As shown, the device includes: an acquisition module 31, a determination module 32, and a detection module 33.
[0068] The acquisition module 31 is configured to acquire configuration information of multiple functional units in the chip under test and target test cases for functional testing of the chip under test; Module 32 is configured to determine the test log information for functional testing of the chip under test by the target test cases; The detection module 33 is configured to parse the test log information to obtain the functional test record corresponding to the identification information of each functional unit in multiple functional units, and based on the functional test record, obtain the number of functional test records corresponding to each functional unit, and detect whether each functional unit in multiple functional units can be functionally tested by the target test case. The determination module 32 is also configured to determine, based on configuration information and test results, the target functional units among multiple functional units that have not been functionally tested by the target test cases, so as to update the target test cases.
[0069] In some examples of this embodiment, the detection module 33 is specifically configured to extract test behavior data from the test log information, generate a set of functional test records for multiple functional units based on the test behavior data; match the identification information of multiple functional units in the configuration information with the functional test records in the set of functional test records to obtain the functional test record corresponding to the identification information of each functional unit in the multiple functional units; determine the functional test record corresponding to the identification information of each functional unit obtained by matching as the functional test record corresponding to each functional unit; obtain the number of records of the functional test record corresponding to each functional unit based on the functional test record corresponding to each functional unit; detect whether each functional unit in the multiple functional units can be functionally tested by the target test case; and determine the functional unit in each functional unit that is tested by the target test case as the tested functional unit.
[0070] In some examples of this embodiment, the detection module 33 is further configured to perform test behavior statistics on the functional test records corresponding to each functional unit, and obtain the number of records of the functional test records corresponding to each functional unit; determine the number of times each functional unit is tested based on the number of records, and determine the functional units whose number of tests meets the number threshold as tested functional units; generate test information of the tested functional units, and determine the test information as the detection results of multiple functional units.
[0071] In some examples of this embodiment, the detection module 33 is further configured to determine the functional unit corresponding to the test case that failed the test based on the detection results of multiple functional units when there is a test case that failed the test in the target test case.
[0072] In some examples of this embodiment, the determining module 32 is specifically configured to: determine a first set of identifier information corresponding to multiple functional units from the configuration information; determine a second set of identifier information corresponding to the tested functional units from the detection results; compare and analyze the identifiers in the first set of identifier information with the identifiers in the second set of identifier information; filter out at least one target identifier not included in the second set of identifier information from the first set of identifier information; the at least one target identifier constitutes a target identifier set; determine the functional unit corresponding to each target identifier in the target identifier set; and determine the determined functional unit as the target functional unit that has not undergone functional testing.
[0073] In some examples of this embodiment, the determining module 32 is further configured to determine the target configuration information of the target functional unit from the configuration information; based on the target configuration information, add test cases that can test the target functional unit to the target test cases, so that the updated target test cases can test the target functional unit.
[0074] In some examples of this embodiment, the determining module 32 is further configured to perform duplicate detection on the added test cases and the target test cases when the target test case is a single test case, and delete the detected duplicate test cases; when the target test case is multiple test cases, the number of functional units tested for each test case is determined based on the functional test records, and high-quality test cases are selected from multiple test cases based on the number of functional units.
[0075] In some examples of this embodiment, the acquisition module 31 is further configured to insert a target program into the source code of the chip to be tested, and to acquire configuration information of multiple functional units through the target program. The configuration information includes at least one of the identification information, running attribute information and hierarchical relationship information of multiple functional units; to select at least one test case that matches the function of the chip to be tested from the test case set, and to determine the at least one matched test case as the target test case.
[0076] It should be noted that other corresponding descriptions of the functional units involved in the detection device provided in this embodiment can be found in [reference needed]. Figure 1 and Figure 2 The corresponding descriptions in [the document] will not be repeated here.
[0077] Based on the above, Figure 1 and Figure 2 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 and Figure 2 The method shown.
[0078] Based on this understanding, the technical solution of this application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as CD-ROM, USB flash drive, mobile hard drive, etc.) and includes several instructions to cause a computer device (such as personal computer, server, or network device, etc.) to execute the methods of various implementation scenarios of this application.
[0079] like Figure 4 The diagram shown is a hardware structure schematic of an electronic device according to the present invention, comprising: At least one processor 401; and, A memory 402 connected to the processing of at least one processor 401 terminal device; wherein, The memory 402 stores instructions that can be executed by at least one processor, which enables the at least one processor to perform the detection method as described above.
[0080] Figure 4Take a processor 401 as an example.
[0081] The electronic device may also include an input device 403 and an output device 404.
[0082] The processor 401, memory 402, input device 403, and output device 404 can be connected via a bus or other means. Figure 4 Taking the example of a connection between China and Israel via a bus.
[0083] Memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the detection method in the embodiments of this application, for example, Figure 1 and Figure 2 The method flow is shown. The processor 401 executes various functional applications and terminal device processing by running non-volatile software programs, instructions, and modules stored in the memory 402, thereby implementing the detection method in the above embodiments.
[0084] The memory 402 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the detection method. Furthermore, the memory 402 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 402 may optionally include memory remotely located relative to the processor 401, and these remote memories may be connected to the apparatus performing the detection method via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, processing networks of mobile terminal devices, and combinations thereof.
[0085] Input device 403 can receive user clicks and generate signal inputs related to user settings and function control of the detection method. Output device 404 may include display devices such as a display screen.
[0086] One or more modules are stored in memory 402, and when run by one or more processors 401, the detection method in any of the above method embodiments is executed.
[0087] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0088] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0089] The storage medium may also include an operating system and a processing module for network terminal devices. The operating system is a program that manages the hardware and software resources of the aforementioned physical devices, supporting the operation of information processing programs and other software and / or programs. The processing module for network terminal devices is used to enable terminal device processing between the various components within the storage medium, as well as terminal device processing with other hardware and software within the information processing physical device.
[0090] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms, or it can be implemented by hardware. By applying the solution of this embodiment, compared with the prior art, this application embodiment obtains the configuration information and target test cases of multiple functional units in the chip to be tested, providing basic data support for functional unit coverage testing; by determining the test log information of the target test cases, it provides a data source for functional test record parsing; by parsing the test logs to obtain functional test records and detecting the test coverage of each functional unit, it achieves accurate detection of the coverage status of a single functional unit; by determining the untested target functional units based on the configuration information and test results and updating the target test cases, it achieves accurate positioning of untested functional units, improves the efficiency of test case coverage testing, and ensures normal chip integration and use; by extracting test behavior data, matching identifiers and test records, and determining the tested functional units, it achieves single The system is designed to: determine the coverage status of functional units; improve the accuracy of testing by counting the number of test records, determining the number of times a test has been conducted, and generating test results; quickly locate problematic functional units by identifying the functional units corresponding to test cases that failed tests based on the test results; quickly locate untested functional units by comparing and filtering target identifiers; update target test cases by acquiring the configuration information of target functional units and adding corresponding test cases; reduce test redundancy and improve test execution efficiency by detecting and deleting duplicate test cases in individual test cases and selecting high-quality test cases based on test case coverage; and effectively collect configuration information and reasonably determine target test cases by inserting the target program to obtain configuration information and selecting matching test cases.
[0091] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0092] The above are merely specific embodiments of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A detection method, characterized in that, include: Obtain the configuration information of multiple functional units in the chip under test and the target test cases for functional testing of the chip under test; Determine the test log information of the target test case for functional testing of the chip under test; The test log information is parsed to obtain the functional test record corresponding to the identification information of each functional unit in the plurality of functional units. Based on the functional test record, the number of functional test records corresponding to each functional unit is obtained, and it is detected whether each functional unit in the plurality of functional units can be functionally tested by the target test case. Based on the configuration information and detection results, the target functional units that have not been functionally tested by the target test case are identified among the multiple functional units, so as to update the target test case.
2. The method according to claim 1, characterized in that, The process of parsing the test log information to obtain the functional test record corresponding to the identifier information of each of the plurality of functional units, and based on the functional test record, obtaining the number of functional test records corresponding to each functional unit, and detecting whether each of the plurality of functional units can be functionally tested by the target test case includes: Extract test behavior data from the test log information, and generate a set of functional test records for the multiple functional units based on the test behavior data; The identification information of the plurality of functional units in the configuration information is matched with the functional test records in the functional test record set to obtain the functional test record corresponding to the identification information of each of the plurality of functional units; The functional test record corresponding to the identifier information of each functional unit obtained by matching is determined as the functional test record corresponding to each functional unit; Based on the functional test records corresponding to each functional unit, the number of functional test records corresponding to each functional unit is obtained. It is then determined whether each functional unit among the multiple functional units can be functionally tested by the target test case, and the functional units among each functional unit that are tested by the target test case are identified as tested functional units.
3. The method according to claim 2, characterized in that, The process of obtaining the number of functional test records corresponding to each functional unit based on the functional test records corresponding to each functional unit, detecting whether each functional unit among the plurality of functional units can be functionally tested by the target test case, and determining the functional units among each functional unit that have been tested by the target test case as tested functional units includes: The test behavior statistics are performed on the functional test records corresponding to each functional unit to obtain the number of functional test records corresponding to each functional unit; Based on the number of records, the number of times each functional unit is tested is determined, and the functional units whose number of tests meets the threshold are determined as the tested functional units; Generate test information for the tested functional units, and determine the test information as the detection results of the multiple functional units.
4. The method according to claim 3, characterized in that, After generating test information for the tested functional units and determining the test information as the detection results of the plurality of functional units, the method further includes: If there are test cases that fail the test in the target test cases, the functional unit corresponding to the test cases that fail the test is determined based on the detection results of the multiple functional units.
5. The method according to claim 2, characterized in that, The step of determining, based on the configuration information and detection results, the target functional units among the plurality of functional units that have not been functionally tested by the target test case, and updating the target test case, includes: A first set of identification information corresponding to the plurality of functional units is determined from the configuration information, and a second set of identification information corresponding to the tested functional unit is determined from the detection result; The identifiers in the first identifier information set are compared and analyzed with the identifiers in the second identifier information set. At least one target identifier that is not included in the second identifier information set is selected from the first identifier information set. The at least one target identifier constitutes a target identifier set. Determine the functional unit corresponding to each target identifier in the target identifier set, and identify the determined functional unit as the target functional unit that has not undergone functional testing.
6. The method according to claim 5, characterized in that, After determining the functional unit corresponding to each target identifier in the target identifier set, and identifying the determined functional units as the target functional units that have not undergone functional testing, the method further includes: The target configuration information of the target functional unit is determined from the configuration information; Based on the target configuration information, test cases capable of testing the target functional unit are added to the target test cases, so that the updated target test cases can test the target functional unit.
7. The method according to claim 6, characterized in that, The method further includes: If the target test case is a single test case, duplicate detection is performed on the added test cases and the target test case, and the detected duplicate test cases are deleted. When there are multiple target test cases, the number of functional units tested in each test case is determined based on the functional test records, and high-quality test cases are selected from the multiple test cases based on the number of functional units.
8. The method according to claim 1, characterized in that, The process of acquiring configuration information of multiple functional units in the chip under test and target test cases for functional testing of the chip under test includes: Insert a target program into the source code of the chip to be tested, and obtain the configuration information of the plurality of functional units through the target program. The configuration information includes at least one of the identification information, running attribute information and hierarchical relationship information of the plurality of functional units. Select at least one test case from the test case set that matches the function of the chip to be tested, and determine the at least one matched test case as the target test case.
9. A detection device, characterized in that, include: The acquisition module is configured to acquire configuration information of multiple functional units in the chip under test and target test cases for performing functional tests on the chip under test. The determination module is configured to determine the test log information of the target test case for functional testing of the chip under test; The detection module is configured to parse the test log information to obtain the functional test record corresponding to the identification information of each functional unit in the plurality of functional units, and based on the functional test record, obtain the number of functional test records corresponding to each functional unit, and detect whether each functional unit in the plurality of functional units can be functionally tested by the target test case. The determination module is also configured to determine, based on the configuration information and the detection results, the target functional unit among the plurality of functional units that has not been functionally tested by the target test case, so as to update the target test case.
10. An electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.