Multi-core consistency test method and device, electronic equipment and storage medium

By analyzing and controlling the multi-core consistency testing method of processing core execution test process, the problems of low test efficiency and inaccurate results in the existing technology are solved, and efficient and flexible multi-core consistency testing is achieved.

CN119597658AActive Publication Date: 2025-03-11PHYTIUM TECH CO LTD +1
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411675862.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-21
Publication Date
2025-03-11
Estimated Expiration
2044-11-21

AI Technical Summary

Technical Problem

The existing multi-core consistency testing methods rely on the simulation platform, resulting in low test efficiency and inaccurate results, which cannot effectively ensure that the CPU runs stably and efficiently in complex heterogeneous multi-core applications.

Method used

Provide a multi-core consistency testing method. By obtaining the test parameter combination, analyzing and determining the tester processing core, the inspector processing core and the test model, controlling the processing core to execute the test process, and analyzing the consistency test results between the processing cores.

Benefits of technology

It improves the efficiency of multi-core consistency testing, reduces implementation costs, and realizes multi-core consistency testing based on software programs. It can be flexibly configured according to test needs and conducts more comprehensive testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597658A_ABST
    Figure CN119597658A_ABST
Patent Text Reader

Abstract

The invention provides a multi-core consistency testing method and device, electronic equipment and a storage medium, and relates to the technical field of chip testing. The method comprises the following steps: acquiring at least one test parameter combination, wherein the test parameter combination is used for indicating the identity of a processing core participating in a test, a to-be-used test model and attribute information required by the test; analyzing the test parameter combination, and respectively determining a tester processing core, an inspector processing core and a test model; according to the test model and the test parameter combination, respectively controlling the tester processing core and the inspector processing core to execute corresponding test processes to obtain a test result corresponding to the test parameter combination; and according to the test result corresponding to each test parameter combination, analyzing to obtain a consistency test result between the processing cores. According to the method, the processing cores participating in the test can be controlled to execute the consistency test according to the test process of the test model indicated in the test parameter combination, the multi-core consistency test based on the software program is realized, and the test efficiency is relatively high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of chip testing technology, and in particular to a multi-core consistency testing method, device, electronic device and storage medium. Background Art

[0002] With the development of CPU (Central Processing Unit) technology and the increasingly complex and diversified computing needs, traditional single-core processors can no longer meet the needs of all application scenarios. In this context, heterogeneous multi-core applications are increasingly attracting attention from R&D and production. However, with the increase in the number of CPUs and the increase in the internal complexity of the CPU, how to ensure the stable and efficient operation of the CPU in complex heterogeneous multi-core applications has become a topic that must be considered and requires long-term attention.

[0003] At present, the test of multi-core consistency is often implemented based on pre-silicon design simulation. This method is usually used in the early stage of SOC (System on Chip) design, mainly involving the design of cluster, cache and bus-level cache controller. The simulation platform is used to verify whether the design complies with the predetermined CPU architecture rules and to perform consistency path testing.

[0004] However, the existing methods rely on the real-time simulation capabilities of the simulation platform, resulting in low test efficiency. In addition, due to the differences between the simulation platform and the actual hardware, some consistency indicators may not match the actual hardware, affecting the accuracy of the test results. Summary of the invention

[0005] The purpose of the present application is to provide a multi-core consistency test method, device, electronic device and storage medium to address the deficiencies in the above-mentioned prior art, so as to improve the efficiency of multi-core consistency testing and reduce implementation costs.

[0006] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a multi-core consistency test method, comprising: obtaining at least one set of test parameter combinations, wherein the test parameter combinations are used to indicate the identity of a processing core participating in the test, a test model to be used, and attribute information required for the test;

[0008] parsing the test parameter combination to respectively determine a tester processing core, an inspector processing core, and a test model; the tester processing core and the inspector processing core are different processing cores in a processing device;

[0009] According to the test model and the test parameter combination, the tester processing core and the checker processing core are respectively controlled to execute the corresponding test process to obtain the test result corresponding to the test parameter combination, wherein the test model comprises: a first model or a second model, when testing based on the first model, the tester processing core and the checker processing core read and write the test address indicated by the attribute information, and when testing based on the second model, the test address indicated by the attribute information is divided into a plurality of address intervals, and the tester processing core and the checker processing core respectively read and write each address interval;

[0010] According to the test results corresponding to each test parameter combination, the consistency test results between each processing core are analyzed and obtained.

[0011] Optionally, before controlling the tester processing core and the checker processing core to execute corresponding test processes according to the test model and the test parameter combination, the method further comprises:

[0012] Based on the parameter conversion function, the test parameter combination is converted into a data format recognizable by each processing core participating in the test, so as to obtain a converted test parameter combination corresponding to each processing core;

[0013] Initialization instructions are sent to each processing core participating in the test through the shared memory to control the test parameter combination after initialization conversion of each processing core.

[0014] Optionally, the controlling the tester processing core and the checker processing core to execute corresponding test processes according to the test model and the test parameter combination to obtain a test result corresponding to the test parameter combination includes:

[0015] Determine the address range used in the test and whether to perform a consistency operation based on the relevant attribute information required by the test;

[0016] If a consistency operation is performed, the tester processing core and the checker processing core are controlled to perform data read and write operations according to the test flow of the test model and the address range used by the test;

[0017] At least one test result corresponding to the test parameter combination is generated according to the result of the data read and write operation.

[0018] Optionally, controlling the tester processing core and the checker processing core to perform data read and write operations according to the test flow of the test model and the address range used by the test includes:

[0019] If the test model is the first model, control the tester processing core to write the test data into the address range used by the test; and after the tester processing core completes writing, control the checker processing core to read the test data from the address range used by the test;

[0020] Determining a consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core;

[0021] According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

[0022] Optionally, the controlling the tester processing core to write the test data into the address range used by the test; and after the tester processing core completes writing, controlling the checker processing core to read the test data from the address range used by the test, comprises:

[0023] Step A1, controlling the current tester processing core to write test data into the address range used by the test, and after the current tester processing core completes writing, controlling the current checker processing core to read the test data from the address range used by the test;

[0024] Step B1, after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read the test data from the address range used for the test, until all checker processing cores have finished reading data, and then the next tester processing core is controlled to write the test data into the address range used for the test;

[0025] Step C1, looping through step A1 to step B1 until all tester processing cores and all checker processing cores finish reading and writing data.

[0026] Optionally, determining the consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core includes:

[0027] Determine the consistency verification result of each checker processing core corresponding to the current tester processing core according to the test data written by the current tester processing core and the test data read by each checker processing core under the current tester processing core;

[0028] According to the consistency verification results when each inspector's processing core corresponds to each tester's processing core, the consistency verification result under the test parameter combination is obtained.

[0029] Optionally, controlling the tester processing core and the checker processing core to perform data read and write operations according to the test flow of the test model and the address range used by the test includes:

[0030] If the test model is the second model, dividing the address range used in the test into a plurality of address intervals;

[0031] Controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read the test data from each address interval in sequence;

[0032] Determine the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval;

[0033] According to the consistency verification results corresponding to each address interval, a test result corresponding to the test parameter combination is generated.

[0034] Optionally, controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read the test data from each address interval in sequence includes:

[0035] Step A2, controlling the current tester processing core to write test data into the current address interval, and after the writing is completed, controlling the current checker processing core to read the test data from the current address interval;

[0036] Step B2: after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read test data from the current address interval, until all checker processing cores have read the data results, and then the next tester processing core is controlled to write test data to the current address interval;

[0037] Step C2, looping through Step A2 to Step B2 until all tester processing cores and all checker processing cores finish reading and writing data in the current address range, and then continuing to Step D;

[0038] Step D, controlling the current tester processing core to write test data to the next address interval;

[0039] Step E: cyclically execute step A2 to step D until all tester processing cores and all checker processing cores complete the reading and writing of data in all address intervals.

[0040] Optionally, determining the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval includes:

[0041] According to the test data written by the current tester processing core and the test data read by each checker processing core in the current address interval, respectively determine the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval;

[0042] Determine the consistency verification result in the current address interval according to the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval;

[0043] Determine the consistency verification result under the test parameter combination according to the consistency verification result under each address interval;

[0044] According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

[0045] Optionally, obtaining at least one set of test parameter combinations includes:

[0046] Determine multiple test parameters according to test requirements;

[0047] According to each test parameter and each processing core involved in the test, multi-dimensional iteration of the parameters is performed to generate at least one set of test parameter combinations.

[0048] Optionally, analyzing and obtaining consistency test results between processing cores according to test results corresponding to each test parameter combination includes:

[0049] According to the test results corresponding to each test parameter combination, the test result data is cleaned from at least one dimension to obtain a test result set under each dimension;

[0050] Perform data fusion analysis based on the test result sets in each dimension to obtain consistency test results from different analysis angles;

[0051] According to the consistency test results under different analysis angles, the consistency test results between the processing cores are obtained.

[0052] In a second aspect, an embodiment of the present application further provides a multi-core consistency testing device, including: an acquisition module, a determination module, a testing module, and an analysis module;

[0053] The acquisition module is used to acquire at least one set of test parameter combinations, where the test parameter combinations are used to indicate the identity of the processing cores involved in the test, the test model to be used, and the attribute information required for the test;

[0054] The determination module is used to parse the test parameter combination and respectively determine the tester processing core, the checker processing core and the test model; the tester processing core and the checker processing core are different processing cores in the processing device;

[0055] The test module is used to control the tester processing core and the checker processing core to execute the corresponding test process according to the test model and the test parameter combination, and obtain the test result corresponding to the test parameter combination. The test model includes: a first model or a second model. When testing based on the first model, the tester processing core and the checker processing core read and write the test address indicated by the attribute information. When testing based on the second model, the test address indicated by the attribute information is divided into multiple address intervals, and the tester processing core and the checker processing core read and write each address interval respectively.

[0056] The analysis module is used to analyze and obtain consistency test results between the processing cores according to the test results corresponding to each test parameter combination.

[0057] Optionally, it also includes: an initialization module;

[0058] The initialization module is used to convert the test parameter combination into a data format recognizable by each processing core participating in the test based on a parameter conversion function, so as to obtain a converted test parameter combination corresponding to each processing core;

[0059] Initialization instructions are sent to each processing core participating in the test through the shared memory to control the test parameter combination after initialization conversion of each processing core.

[0060] Optionally, the test module is specifically used to determine the address range used in the test and whether to perform a consistency operation according to relevant attribute information required by the test;

[0061] If a consistency operation is performed, the tester processing core and the checker processing core are controlled to perform data read and write operations according to the test flow of the test model and the address range used by the test;

[0062] At least one test result corresponding to the test parameter combination is generated according to the result of the data read and write operation.

[0063] Optionally, the test module is specifically configured to control the tester processing core to write the test data into the address range used by the test if the test model is the first model; and control the checker processing core to read the test data from the address range used by the test after the tester processing core completes writing;

[0064] Determining a consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core;

[0065] According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

[0066] Optionally, the test module is specifically used for step A1, controlling the current tester processing core to write test data into the address range used by the test, and after the current tester processing core completes writing, controlling the current checker processing core to read the test data from the address range used by the test; step B1, after detecting that the current checker processing core has finished reading data, controlling the next checker processing core to read the test data from the address range used by the test, until all checker processing cores have finished reading data, then controlling the next tester processing core to write test data into the address range used by the test; step C1, looping through steps A1-B1 until all tester processing cores and all checker processing cores have finished reading and writing data.

[0067] Optionally, the test module is specifically used to determine the consistency verification results of each checker processing core when it corresponds to the current tester processing core based on the test data written by the current tester processing core and the test data read by each checker processing core under the current tester processing core; and obtain the consistency verification results under the test parameter combination based on the consistency verification results of each checker processing core when it corresponds to each tester processing core.

[0068] Optionally, the test module is specifically configured to divide the address range used in the test into a plurality of address intervals if the test model is the second model;

[0069] Controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read the test data from each address interval in sequence;

[0070] Determine the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval;

[0071] According to the consistency verification results corresponding to each address interval, a test result corresponding to the test parameter combination is generated.

[0072] Optionally, the test module is specifically used for step A2, controlling the current tester processing core to write test data to the current address interval, and after writing is completed, controlling the current checker processing core to read test data from the current address interval; step B2, after detecting that the current checker processing core has finished reading data, controlling the next checker processing core to read test data from the current address interval, until all checker processing cores read the data results, then controlling the next tester processing core to write test data to the current address interval; step C2, looping step A2-step B2 until all tester processing cores and all checker processing cores finish reading and writing data in the current address interval, and continuing to execute step D; step D, controlling the current tester processing core to write test data to the next address interval; step E, looping step A2-step D until all tester processing cores and all checker processing cores finish reading and writing data in all address intervals.

[0073] Optionally, the test module is specifically used to determine the consistency verification results of each checker processing core corresponding to the current tester processing core in the current address interval according to the test data written by the current tester processing core in the current address interval and the test data read by each checker processing core;

[0074] Determine the consistency verification result in the current address interval according to the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval;

[0075] Determine the consistency verification result under the test parameter combination according to the consistency verification result under each address interval;

[0076] According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

[0077] Optionally, the acquisition module is specifically used to determine multiple test parameters according to test requirements;

[0078] According to each test parameter and each processing core involved in the test, multi-dimensional iteration of the parameters is performed to generate at least one set of test parameter combinations.

[0079] Optionally, the analysis module is specifically used to clean the test result data from at least one dimension according to the test results corresponding to each test parameter combination to obtain a test result set under each dimension;

[0080] Perform data fusion analysis based on the test result sets in each dimension to obtain consistency test results from different analysis angles;

[0081] According to the consistency test results under different analysis angles, the consistency test results between the processing cores are obtained.

[0082] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to implement the multi-core consistency testing method provided in the first aspect.

[0083] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the multi-core consistency testing method provided in the first aspect is executed.

[0084] The beneficial effects of this application are:

[0085] The present application provides a multi-core consistency test method, device, electronic device and storage medium, including: obtaining at least one set of test parameter combinations, the test parameter combination is used to indicate the identity of the processing core participating in the test, the test model to be used and the attribute information required for the test; parsing the test parameter combination, respectively determining the tester processing core, the checker processing core and the test model; the tester processing core and the checker processing core are different processing cores in the processing device; according to the test model and the test parameter combination, respectively controlling the tester processing core and the checker processing core to execute the corresponding test process, and obtaining the test result corresponding to the test parameter combination; according to the test result corresponding to each test parameter combination, analyzing and obtaining the consistency test result between each processing core. The method can parse the test parameter combination based on multiple sets of test parameter combinations generated by the test requirements, so that the processing core participating in the test can be controlled to execute the consistency test according to the test process of the test model indicated in the test parameter combination, and realize the multi-core consistency test based on the software program, with high test efficiency, and can realize more comprehensive testing based on the flexible configuration of the test requirements, and the implementation cost of the implementation method based on the software program is relatively low.

[0086] In addition, based on the test parameters set by the test requirements, an iterative strategy is executed to traverse all values ​​of the processing core under different test parameters, generate multiple sets of test parameter combinations that can fully cover all test scenarios, and improve the accuracy of consistency testing.

[0087] Finally, by integrating the analysis and visualizing the test results, we can achieve a comprehensive analysis of memory consistency issues, quickly locate the causes of memory inconsistencies, and promote research on memory consistency issues. BRIEF DESCRIPTION OF THE DRAWINGS

[0088] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0089] Figure 1 A schematic diagram of a multi-core consistency test system architecture provided in an embodiment of the present application;

[0090] Figure 2 A flowchart of a multi-core consistency testing method provided in an embodiment of the present application;

[0091] Figure 3 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0092] Figure 4 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0093] Figure 5 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0094] Figure 6 A schematic diagram of a test architecture of a first model provided in an embodiment of the present application;

[0095] Figure 7 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0096] Figure 8 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0097] Fig. 9 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0098] Fig.10 A schematic diagram of the test architecture of the second model provided in an embodiment of the present application;

[0099] Fig.11 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0100] Fig.12 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0101] Fig.13 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0102] Fig.14 A flowchart of another multi-core consistency testing method provided in an embodiment of the present application;

[0103] Fig.15 A schematic diagram of a multi-core consistency testing device provided in an embodiment of the present application;

[0104] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0105] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0106] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0107] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0108] With the development of CPU (Central Processing Unit) technology and the increasingly complex and diversified computing needs, traditional single-core processors can no longer meet the needs of all application scenarios. In this context, heterogeneous multi-core applications are increasingly attracting attention from R&D and production. However, with the increase in the number of CPU cores and the increase in the internal complexity of the CPU, how to ensure the stable and efficient operation of the CPU in complex heterogeneous multi-core applications has become a topic that must be considered and requires long-term attention.

[0109] The current status of the stability evaluation method for multi-core consistency is as follows:

[0110] 1. Method based on pre-silicon design simulation: This method is usually used in the early stages of SOC (System on Chip) design, mainly involving the design of cluster, cache and bus-level cache controllers. In the pre-silicon design stage, a simulation platform is used to verify whether the design complies with the predetermined CPU architecture rules and to perform consistency path testing. However, the disadvantage of this solution is that it relies on the real-time simulation capability of the simulation platform, resulting in low verification efficiency. In addition, due to the differences between the simulation platform and the actual hardware, some consistency indicators may not match the actual hardware. Therefore, although this method has its application value in the early stages of design, its accuracy may be affected.

[0111] 2. Post-silicon test solution based on Linux operating system: This method usually has a relatively complete test case library and can design different experimental scenarios to comprehensively test multi-core consistency. Its advantage is that it can comprehensively cover the system level and effectively evaluate various combinations of multi-core consistency. However, the disadvantage of this solution is that the use of a complex operating system may affect the real-time evaluation of memory and cache. In addition, because there may be a variety of other processes running in the Linux system, these processes may interfere with the main test indicators when performing consistency testing, thereby affecting efficiency and accuracy.

[0112] 3. Hardware-accelerated test platform solution: It combines the advantages of pre-silicon design and post-silicon testing. It simulates the behavior of multi-core processors by using hardware accelerators such as FPGA (Field-Programmable Gate Array) or custom hardware, and performs consistency testing in an environment close to the actual hardware. This solution improves the test speed and efficiency, while more accurately reflecting the consistency performance of multi-core systems in actual applications. It allows more flexible test scenario configuration, can better simulate real-world application situations, and improves the practicality of testing. However, the main disadvantage of this method is that it has a high implementation cost, requires specialized hardware equipment and high technical knowledge, and the construction and maintenance of the hardware platform may also limit its application.

[0113] With the increase in the number of cores and the various customizations for CPU architectures, existing technologies have become more complex and inefficient in multi-core consistency analysis. Specifically, 1) Pre-silicon design simulation methods are inefficient in complex multi-core environments due to limited simulation capabilities and are different from actual hardware; 2) Linux-based post-silicon testing solutions may affect the real-time and accuracy of testing due to complex system environments and background processes; 3) Although hardware-accelerated testing platforms improve efficiency, they are costly and complex to build and maintain. These factors limit the effectiveness and efficiency of existing technologies in high-core count and customized CPU architectures.

[0114] Based on this, this solution provides a multi-core consistency testing method, which can generate multiple sets of test parameter combinations based on test requirements, and then by parsing the test parameter combinations, the processing cores participating in the test can be controlled to perform consistency testing according to the test flow of the test model indicated in the test parameter combination, thereby realizing multi-core consistency testing based on software programs, with high test efficiency, and more comprehensive testing can be achieved based on flexible configuration of test requirements. At the same time, the implementation cost of the implementation method based on software programs is relatively low.

[0115] Figure 1 A schematic diagram of a multi-core consistency test system architecture provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the system may include: a host device, an embedded development board; multiple processing cores are deployed in the embedded development board, and the tester can set the test parameters that need to be paid attention to and the value range of each test parameter according to the test requirements; the value range of each parameter is input into the host device, and the test program is compiled in the host device; the compiled test program is burned into the storage medium of the embedded development board through the burning tool, and the test program is loaded into each processing core participating in the test through the initialization instruction. The processing core in the embedded development board controls each processing core participating in the test to perform consistency testing based on the test program to obtain the test results.

[0116] Figure 2 A flowchart of a multi-core consistency testing method provided in an embodiment of the present application; Figure 2 As shown, the method may include:

[0117] S101. Obtain at least one set of test parameter combinations, where the test parameter combinations are used to indicate the identity of a processing core participating in a test, a test model to be used, and attribute information required for the test.

[0118] Developers can determine the test parameters to be concerned about during the test process and the value range of each test parameter according to the test requirements, and then execute the iteration strategy according to each test parameter and the value range of each test parameter to iteratively generate all test parameter combinations. Among them, the number of iterations of the iteration strategy can be determined according to the value range of each test parameter; each set of test parameter combinations generated includes each test parameter and a value of the test parameter. The values ​​of the test parameters in any two sets of test parameter combinations are not exactly the same, so multiple sets of test parameter combinations can completely cover all possible test scenarios.

[0119] Optionally, the test parameters and value ranges set in this scheme according to the test requirements may include but are not limited to: the value range of the number of cores, the iteration range of the memory shared domain attributes, whether to perform consistency operations before checking the data, whether to perform consistency operations after writing the data, variable combinations of memory attributes, the memory address used in the test and the length of the test, selection of core test objects, test model selection, etc.

[0120] It should be noted that the “core” mentioned in the following embodiments refers to a processing core.

[0121] Exemplarily, a set of test parameter combinations generated may be, for example:

[0122] 1. Number of cores: 2;

[0123] 2. Shared memory attribute: internal sharing (shared between core A and core B);

[0124] 3. Check whether consistency operation is performed before data: both core A and core B require consistency operation;

[0125] 4. Whether to perform consistency operation before writing data: Both core A and core B require consistency operation;

[0126] 5. Memory attributes: cacheable, internally shared;

[0127] 6. The memory address length used in the test: address range 0x1000-0x1FFF, a total of 4KB;

[0128] 7. Confirm that the CPU acts as a tester or checker: core A acts as a tester and core B acts as a checker;

[0129] 8. Test model selection: tiled model or hybrid model.

[0130] Another set of test parameter combinations generated may be, for example:

[0131] 1. Number of cores: 4;

[0132] 2. Shared memory attributes: external sharing (core A, B, C, D sharing);

[0133] 3. Check whether consistency operation is performed before data: Core A and core B need consistency operation;

[0134] 4. Whether to perform consistency operation before writing data: Core C and core D need consistency operation;

[0135] 5. Memory attributes: non-cacheable, externally shared;

[0136] 6. Memory address length used in the test: address range 0x2000-0x3FFF, totaling 8KB;

[0137] 7. Confirm that the CPU acts as a tester or checker: core A and core C act as testers, and core B and core D act as checkers;

[0138] 8. Test model selection: tiled model or hybrid model.

[0139] S102, analyzing the test parameter combination, and determining the tester processing core, the checker processing core and the test model respectively.

[0140] The tester processing core and the checker processing core are different processing cores in a processing device, wherein the processing device may be, for example, the aforementioned embedded development board.

[0141] Optionally, each of the above test parameter combinations will indicate which processing cores in the development board are used as tester processing cores and which processing cores are used as checker processing cores. Accordingly, by parsing the test parameter combination, the cores in the development board that are used as testers, i.e., the tester processing cores, and the cores in the development board that are used as checkers, i.e., the checker processing cores, can be determined. In addition, the test model used for the test can also be determined.

[0142] Among them, during the process of executing the test, the tester processing core needs to write test data to the memory address used for the test according to the memory address indicated in the test parameter combination, and the checker processing core needs to read the test data from the memory address, so as to obtain the test result based on the consistency of the test data written by the tester processing core and the test data read by the checker processing core.

[0143] It is worth noting that each set of test parameter combinations obtained must be used for consistency testing. Since the values ​​of the test parameters in different test parameter combinations are different, the tester's processing core, the inspector's processing core, the test model used, and the attribute information required for the test may all be different. Therefore, each test parameter combination can obtain corresponding test results.

[0144] S103. According to the test model and the test parameter combination, the tester processing core and the checker processing core are respectively controlled to execute the corresponding test flow to obtain the test result corresponding to the test parameter combination.

[0145] Among them, the test model includes: a first model or a second model. When testing based on the first model, the tester processing core and the inspector processing core read and write the test address indicated by the attribute information. When testing based on the second model, the test address indicated by the attribute information is divided into multiple address intervals, and the tester processing core and the inspector processing core read and write each address interval respectively.

[0146] In some embodiments, based on the tester processing core, checker processing core, attribute parameters required for the test, and test model indicated in the test parameter combination, the tester processing core and the checker processing core can be controlled to execute the test process corresponding to the test model to obtain the test results corresponding to the test parameter combination.

[0147] This embodiment provides two test models, the first model can also be called a tiled model, and the second model can also be called a hybrid model. In practical applications, there can also be other test models, and the test processes of different test models are different. When the first model is used for testing, the memory address used for the test indicated in the test parameter combination can be used as a complete address. The tester processing core is responsible for writing data to the memory address used for the test, and the checker processing core is responsible for reading data from the memory address used for the test, so that the test result can be obtained based on the consistency of the written data and the read data.

[0148] When using the second model for testing, the memory address used in the test indicated in the test parameter combination can first be divided into intervals to obtain multiple address intervals. Data is read and written in each address interval according to the test method of the first model mentioned above. When data reading and writing in all address intervals are completed, the final test results are obtained.

[0149] It is worth noting that no matter whether the first model or the second model is used for testing, in one test, there is not only one tester processing core and one checker processing core. There may be multiple tester processing cores and multiple checker processing cores in one test. Which processing cores serve as tester processing cores and which processing cores serve as checker processing cores are determined based on the number of cores in the test parameter combination and the two parameters of confirming the CPU as a tester or checker.

[0150] S104 . Analyze and obtain consistency test results between the processing cores according to the test results corresponding to the test parameter combinations.

[0151] Optionally, the test results corresponding to each test parameter combination can be sent to an external device, such as to a host computer, where the test results are cleaned and fused to obtain consistency test results between the processing cores, and the consistency test results are visualized on the host computer.

[0152] In summary, the multi-core consistency test method provided by this embodiment includes: obtaining at least one set of test parameter combinations, the test parameter combination is used to indicate the identity of the processing core participating in the test, the test model to be used, and the attribute information required for the test; parsing the test parameter combination, respectively determining the tester processing core, the checker processing core, and the test model; the tester processing core and the checker processing core are different processing cores in the processing device; according to the test model and the test parameter combination, respectively controlling the tester processing core and the checker processing core to execute the corresponding test process, and obtaining the test result corresponding to the test parameter combination; according to the test result corresponding to each test parameter combination, analyzing and obtaining the consistency test result between each processing core. This method can parse the test parameter combination based on multiple sets of test parameter combinations generated by the test requirements, so that the processing core participating in the test can be controlled to execute the consistency test according to the test process of the test model indicated in the test parameter combination, and realizes the multi-core consistency test based on the software program, with high test efficiency, and can realize more comprehensive testing based on the flexible configuration of the test requirements, and at the same time, the implementation cost of the implementation method based on the software program is relatively low.

[0153] Figure 3 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S102, before respectively controlling the tester processing core and the checker processing core to execute the corresponding test process according to the test model and the test parameter combination, the method may further include:

[0154] S201. Based on a parameter conversion function, convert a test parameter combination into a data format recognizable by each processing core participating in the test, and obtain a converted test parameter combination corresponding to each processing core.

[0155] In some embodiments, the initially generated test parameter combinations are all general parameter combinations, which are not fully adapted to the processing architecture of each processing core. Therefore, a parameter conversion function may be used according to the architecture of each processing core to convert the data format of the generated test parameter combinations so that the generated test parameter combinations can be applicable to processing cores of different architectures, thereby obtaining the converted test parameter combinations corresponding to each processing core.

[0156] For example, shared domain parameters will be converted to inner / None / Outershareable in the ARM architecture processing core. For the X86 architecture processing core, the shared domain parameters will be converted to actual memory barrier avoidance methods.

[0157] S202 , issuing initialization instructions to each processing core participating in the test through the shared memory, and controlling each processing core to initialize the converted test parameter combination.

[0158] Optionally, a parameter initialization instruction may be issued to each processing core participating in the test through a shared memory, so that the converted test parameter combination corresponding to each processing core may be loaded into each processing core.

[0159] Figure 4 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S102, according to the test model and the test parameter combination, the tester processing core and the checker processing core are respectively controlled to execute the corresponding test process to obtain the test result corresponding to the test parameter combination, which may include:

[0160] S301. Determine the address range used in the test and whether to perform a consistency operation based on relevant attribute information required for the test.

[0161] Optionally, the entire consistency test phase can divide the processing core into three different objects: tester, checker and management scheduler; the tester processing core and the detector processing core perform initialization operations based on the test parameter combination; the management scheduling processing core controls the tester processing core and the detector processing core to complete the consistency test according to the test process of the test model based on the address range used in the test in the test parameter combination and whether to perform consistency operations. After the test is completed, the management scheduling processing core formats the test results corresponding to each test parameter combination, and sets timestamps and characteristic values ​​of the test model for the data, and saves it to a storage medium or directly sends it to the host computer.

[0162] The management scheduling processing core may be any processing core, and the other processing cores except the management scheduling processing core serve as response processing cores. During the test, part of the response processing core may serve as a tester processing core and part as an inspector processing core.

[0163] S302: If a consistency operation is performed, the tester processing core and the checker processing core are controlled to perform data read and write operations according to the test flow of the test model and the address range used in the test.

[0164] In some embodiments, when the test parameter combination indicates that a consistency operation is required, the tester processing core can be controlled to write data into the address range used for the test according to the test flow of the test model used as indicated in the test parameter combination and the address range used for the test, and after the tester processing core completes writing the data, the checker processing core can be controlled to read data from the address range used for the test, thereby completing the data reading and writing operations between the tester processing core and the checker processing core.

[0165] S303: Generate at least one test result corresponding to the test parameter combination according to the result of the data read and write operation.

[0166] Optionally, data analysis may be performed based on data written by the tester processing core into the address range used for testing and data read by the checker processing core from the address range used for testing to generate at least one test result corresponding to the test parameter combination.

[0167] Figure 5 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S302, according to the test flow of the test model and the address range used in the test, controlling the tester processing core and the checker processing core to perform data read and write operations may include:

[0168] S401. If the test model is the first model, control the tester processing core to write test data into the address range used for testing; and after the tester processing core completes writing, control the checker processing core to read test data from the address range used for testing.

[0169] Figure 6 A schematic diagram of the test architecture of the first model provided by an embodiment of the present application. In the first model, for a tester processing core, the tester processing core writes data into the address range used for the test, and all the checker processing cores read data from the address range used for the test; then the next tester processing core writes data into the address range used for the test, and all the checker processing cores read data from the address range used for the test; the loop is executed multiple times until all the tester processing cores finish writing data and all the checker processing cores finish reading data.

[0170] S402 : Determine a consistency verification result under a test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core.

[0171] Optionally, for a test parameter combination, it may indicate that there are multiple tester processing cores and multiple checker processing cores. For a tester processing core, the consistency verification result corresponding to the tester processing core may be determined according to the test data written by the tester processing core and the test data read by all the checker processing cores.

[0172] The consistency verification results corresponding to the processing cores of each tester may constitute the consistency verification results under the test parameter combination. For example, a possible consistency verification result under the test parameter combination may be: the memory data of the processing core a and the processing core b are inconsistent or the memory data are consistent.

[0173] S403: Generate a test result corresponding to the test parameter combination according to the consistency verification result under the test parameter combination.

[0174] Optionally, the consistency verification results under the test parameter combination are merged to obtain the test result corresponding to the test parameter combination. All consistency verification results under the test parameter combination may be counted to obtain the test result corresponding to the test parameter combination.

[0175] Figure 7 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S401, controlling the tester processing core to write test data into the address range used for the test; and after the tester processing core completes writing, controlling the checker processing core to read the test data from the address range used for the test, may include:

[0176] S401a, controlling the current tester processing core to write test data into the address range used for testing, and after the current tester processing core completes writing, controlling the current checker processing core to read test data from the address range used for testing.

[0177] Since there may be multiple tester processing cores and checker processing cores, when there are multiple tester processing cores, each tester processing core must complete the process of writing test data into the address range used for testing, and each checker processing core must read the test data written by each tester processing core from the address range used for testing.

[0178] Optionally, the current tester processing core may be the currently traversed tester processing core, and the current tester processing core may be controlled to write test data into the address range used for the test, where the test data may be a pre-agreed specific character array.

[0179] After the current tester processing core finishes writing the test data, the current checker processing core can be controlled to read the test data from the address range used for the test.

[0180] S401b, after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read test data from the address range used for the test.

[0181] S401c, determine whether all inspectors have finished processing the nuclear reading data. If so, execute step S401d; if not, execute step S401b.

[0182] S401d, controlling the next tester processing core to write test data into the address range used for testing.

[0183] After the current checker processing core finishes reading data, the next checker processing core is controlled to read test data from the address range used for testing, and the process is executed in sequence until all the checker processing cores have finished reading test data from the address range used for testing.

[0184] At this time, the next tester processing core can be used as the current new tester processing core, and the next tester processing core can be controlled to write test data into the address range used for testing. After the next tester processing core finishes writing test data, each checker processing core is controlled in turn to read test data from the address range used for testing.

[0185] S401e, determine whether all tester processing cores and all checker processing cores have finished reading and writing data; if so, stop executing; if not, execute step S401a.

[0186] The above steps S401a-S401d are executed in a loop until all tester processing cores have completed writing the test data and there are no new tester processing cores; and all checker processing cores have completed reading the test data for all tester processing cores, then the loop ends, and the consistency verification process for the current test parameter combination under the first model ends.

[0187] Figure 8 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S402, determining the consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core may include:

[0188] S501 , according to the test data written by the current tester processing core and the test data read by each checker processing core under the current tester processing core, respectively determine the consistency verification result of each checker processing core when corresponding to the current tester processing core.

[0189] In some embodiments, the consistency verification result may be determined based on whether the test data written by the tester processing core is consistent with the test data read by the checker processing core.

[0190] For a tester processing core, it can be determined whether the test data read by each checker processing core is consistent with the test data written by the tester processing core. If the test data read by the checker processing core is the same as the test data written by the tester processing core, that is, the data read by the checker processing core is also a specific character array, then the memory data of the checker processing core and the tester processing core are considered to be consistent. On the contrary, if the data read by the checker processing core is not a specific character array, then the memory data of the checker processing core and the tester processing core are considered to be consistent.

[0191] Based on this, a tester processing core can obtain multiple consistency verification results, each consistency verification result is a consistency verification result between the tester processing core and a checker processing core.

[0192] S502 , obtaining consistency verification results under the test parameter combination according to consistency verification results when each checker processing core corresponds to each tester processing core.

[0193] Then, the consistency verification results corresponding to all tester processing cores under a test parameter combination may constitute the consistency verification result under the test parameter combination.

[0194] Fig. 9 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S302, according to the test flow of the test model and the address range used in the test, controlling the tester processing core and the checker processing core to perform data read and write operations may include:

[0195] S601: If the test model is the second model, divide the address range used for the test into multiple address intervals.

[0196] Fig.10 A schematic diagram of the test architecture of the second model provided in the embodiment of the present application is shown in FIG. Fig.10 As shown, under the second model, the address range used for the test needs to be divided into multiple address intervals, wherein the address range used for the test can be divided into multiple equally divided intervals. Fig.10 The address range used in the test is schematically divided into three address intervals, including: address interval 1, address interval 2, and address interval 3. In practical applications, the number of divided address intervals is not limited to three.

[0197] S602 , controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read test data from each address interval in sequence.

[0198] In the second model, the data reading and writing in each address interval can be regarded as independent and completed in sequence. For each address interval, each tester processing core and each checker processing core can be controlled to read and write data according to the data reading and writing method in the first model. The process ends when the data reading in all address intervals is completed.

[0199] Optionally, the tester processing core can be controlled to write test data to each address interval in turn. After the tester processing core completes writing test data in an address interval, each checker processing core reads test data from the address interval in turn. After all checker processing cores finish reading test data from the address interval, the tester processing core writes test data to the next address interval until all tester processing cores complete writing test data to all address intervals and all checker processing cores complete reading test data for each tester processing core in each address interval.

[0200] Combination Fig.10 As shown, for a tester processing core, after the tester processing core writes test data to address interval 1, each checker processing core reads the test data from address interval 1 in turn; then the tester processing core writes test data to address interval 2, and each checker processing core reads the test data from address interval 2 in turn; finally, the tester processing core writes test data to address interval 3, and each checker processing core reads the test data from address interval 3 in turn. After this process is completed, the data reading and writing of the tester processing core is completed, and then the next tester processing core starts to execute the above steps until the data reading and writing process of all tester processing cores and checker processing cores is completed.

[0201] S603 , determining the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval.

[0202] Then, one tester processing core may correspond to multiple consistency verification results in one address interval, and the consistency verification results corresponding to each tester processing core in one address interval may constitute the consistency verification results in one address interval; and the consistency verification results corresponding to each address interval may constitute the consistency verification results corresponding to each address interval under the test parameter combination.

[0203] S604: Generate test results corresponding to the test parameter combinations according to the consistency verification results corresponding to each address interval.

[0204] The consistency verification results corresponding to each address interval can constitute the consistency verification results under the address range used in the test, that is, the test results corresponding to the test parameter combination are obtained.

[0205] Fig.11 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S602, controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read test data from each address interval in sequence may include:

[0206] S602a, control the current tester processing core to write test data into the current address interval, and after the writing is completed, control the current checker processing core to read the test data from the current address interval.

[0207] The current tester processing core can be any tester processing core, combined with Fig.10 , assuming that the current address interval is address interval 1, the current tester processing core can be controlled to write test data to address interval 1. After the writing is completed, the current checker processing core is controlled to read the test data from address interval 1.

[0208] S602b, after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read test data from the current address range.

[0209] S602c, determine whether all inspectors have finished processing and reading data; if so, execute step S602d; if not, execute step S602b;

[0210] S602d, controlling the next tester processing core to write test data into the current address interval.

[0211] After the current checker processing core finishes reading the test data from address interval 1, the next checker processing core is controlled to read the test data from address interval 1. This continues until all checker processing cores have finished reading the test data from address interval 1. Then, the next tester processing core is controlled to write the test data into address interval 1. Each checker processing core reads the test data from address interval 1 in turn.

[0212] S602e, determine whether the data reading and writing of all tester processing cores and all checker processing cores in the current address range are completed. If completed, execute step S602f; if not completed, execute step S602a.

[0213] Optionally, if the data reading and writing of all tester processing cores and all checker processing cores in the current address interval have not been completed, steps S602a-S602e are executed in a loop to control the tester processing cores and the checker processing cores to continue to perform data reading and writing operations in the current address interval until all tester processing cores have completed writing test data to address interval 1 and all checker processing cores have completed reading test data from the address interval under each tester processing core, then the reading and writing operations on address interval 1 are terminated.

[0214] S602f, control the current tester processing core to write test data to the next address interval.

[0215] Next, starting from the first tester processing core, control the current tester processing core to write test data to address interval 2, and each checker processing core reads test data from address interval 2. After each checker processing core finishes reading the data, control the next tester processing core to write test data to address interval 2, and each checker processing core reads test data from address interval 2.

[0216] S602g, determine whether the data reading and writing of all tester processing cores and all checker processing cores in all address intervals are completed; if completed, stop executing; if not completed, execute step S602a.

[0217] The above steps S602a-S602g are executed in a loop until all the tester processing cores have completed writing the test data to address interval 1, address interval 2 and +address interval 3, and when each checker processing core corresponds to each tester processing core, the test data has been read from each address interval, then the data reading and writing operations are stopped.

[0218] Of course, in another achievable manner, the above-mentioned loop process may also be as follows: the current tester processing core may be controlled to write test data to address interval 1 first, and after each checker processing core finishes reading test data from address interval 1, the current tester processing core may continue to be controlled to write test data to address interval 2, and after each checker processing core finishes reading test data from address interval 2, the current tester processing core may continue to be controlled to write test data to address interval 3, and after each checker processing core finishes reading test data from address interval 3. After completing one loop, the next tester processing core may be controlled to write test data to each address interval in turn in the above manner, until all tester processing cores have finished writing test data to each address interval, and when each checker processing core corresponds to each tester processing core, the test data reading and writing operation is stopped.

[0219] As long as all the tester processing cores have completed writing the test data to each address interval, and all the checker processing cores have completed reading the test data from each address interval under each tester processing core, it will be sufficient.

[0220] Fig.12 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S603, according to the test data written by the tester processing core and the test data read by the checker processing core in each address interval, determining the consistency verification result corresponding to each address interval under the test parameter combination may include:

[0221] S701, according to the test data written by the current tester processing core and the test data read by each checker processing core in the current address interval, respectively determine the consistency verification results when each checker processing core corresponds to the current tester processing core in the current address interval.

[0222] For an address interval, multiple consistency verification results corresponding to the tester processing core in the address interval can be determined based on the test data written by a tester processing core in the address interval and the test data read from the address interval by all checker processing cores, wherein there is one consistency verification result corresponding to a tester processing core and a checker processing core, and the consistency verification result is similar to that in the first model mentioned above, which may be that the memory data is consistent or the memory data is inconsistent, etc.

[0223] S702 , determining a consistency verification result in the current address interval according to consistency verification results when each checker processing core corresponds to the current tester processing core in the current address interval.

[0224] Then, the consistency verification results corresponding to the processing cores of each tester in an address interval can constitute the consistency verification results in an address interval.

[0225] S703: Determine the consistency verification result under the test parameter combination according to the consistency verification result under each address interval.

[0226] The consistency verification results under each address range can constitute the consistency verification results under the test parameter combination.

[0227] S704: Generate a test result corresponding to the test parameter combination according to the consistency verification result under the test parameter combination.

[0228] Similarly, by performing statistical analysis on the consistency verification results under the test parameter combination, the test results corresponding to the test parameter combination can be obtained.

[0229] Exemplarily, the test result corresponding to a test parameter combination may be:

[0230] "write core:0,mem attr:NC|NON pa:0xc0000000,va:0xc0004000,length:0x4000,wm 0; check core:1,mem attr:NC|NON pa:0xc0000000,va:0xc0004000,length:0x4000,rm 0;|right|loop cnt:8|test_time_diff:24033|checker_time_diff:163686.

[0231] write core:0,mem attr:NC|NON pa:0xc0000000,va:0xc0000000,length:0x8000,wm 1; check core:1,mem attr:NC|NON pa:0xc0000000,va:0xc0000000,length:0x8000,rm 0;|right|test_time_diff:3916|checker_time_diff:20352".

[0232] Among them, write core is the processing core involved in the test; mem attr represents the memory attribute; pa represents the physical address; va represents the virtual address; length is the size of the test memory in bytes; wm represents whether to use write software consistency during the test; rm represents whether to use read software consistency during the check; check core is the checker processing core.

[0233] Fig.13 A flowchart of another multi-core consistency test method provided in an embodiment of the present application; Optionally, in step S101, obtaining at least one set of test parameter combinations may include:

[0234] S801. Determine multiple test parameters according to test requirements.

[0235] Optionally, during the test model construction phase, the tester can determine which test parameters are used to verify the consistency results between multiple cores based on the test requirements of this test, thereby determining the required test parameters and the value range of each test parameter.

[0236] In one implementable manner, the test parameters may include but are not limited to: 1. The value range of the number of cores; 2. The iteration range of the memory shared domain attributes; 3. Whether consistency operations are performed before checking the data; 4. Whether consistency operations are performed after writing the data; 5. Variable combinations of memory attributes; 6. The memory address used in the test and the length of the test; 7. Selection of the core test object; 8. Test model selection.

[0237] According to different test requirements or different indicators concerned by the test, the test parameters or the value range of the test parameters can be adaptively adjusted.

[0238] S802: Perform multi-dimensional parameter iteration according to each test parameter and each processing core involved in the test to generate at least one set of test parameter combinations.

[0239] Optionally, each test parameter may be input as an input parameter into an iteration strategy. The iteration purpose of the iteration strategy is to enable each set test parameter to fully and comprehensively cover all possible test parameter combinations in the consistency test phase.

[0240] Optionally, a processing core in management scheduling mode may instantiate a multidimensional iterator, which generates and combines a unique test parameter combination for subsequent consistency test verification based on the above-mentioned test parameters and the processing cores involved in the test.

[0241] For each processing core participating in the test, each test parameter can be used as an attribute of the test core. Then, a processing core can have multiple attributes. Through a recursive calculation mechanism, all possible combinations of the attributes of each processing core are traversed. For each attribute of each processing core, all possible values ​​are tried, thereby traversing each possible parameter combination to obtain multiple sets of test combination parameters.

[0242] Fig.14 A flowchart of another multi-core consistency test method provided by an embodiment of the present application; optionally, in step S104, analyzing and obtaining consistency test results between processing cores according to test results corresponding to each test parameter combination may include:

[0243] S901. Clean the test result data from at least one dimension according to the test results corresponding to each test parameter combination to obtain a test result set under each dimension.

[0244] In one feasible way, the test results can be cleaned and decomposed from the following dimensions: the first dimension: data cleaning based on the adopted test model; the second dimension: data cleaning based on the relationship between the tester and the inspector; the third dimension: data cleaning based on the results of the processing cores in the same cluster and the processing cores in different clusters.

[0245] Based on the different dimensions of data cleaning, the test result sets under each dimension can be obtained by filtering all the test results.

[0246] S902: Perform data fusion analysis based on the test result sets under each dimension to obtain consistency test results under different analysis angles.

[0247] Based on the obtained test result sets under various dimensions, the test result sets under various dimensions can be integrated from different focus points to obtain consistency test results under different analysis angles.

[0248] Optionally, the test result set under the first dimension can be combined with the test result set under the third dimension, and the results of the consistency test can be integrated as the focus to obtain the differences and commonalities of the consistency problems between the processing cores in the same cluster and those in different clusters; the test results under the first dimension can be combined with the test result set under the second dimension, and the impact of the test model on the consistency can be integrated as the focus to obtain under which test model the same tester processing core will have inconsistencies; the test result set under the second dimension can be combined with the test result set under the third dimension to obtain what kind of trend pattern the time spending of multiple different checker processing cores for the same consistency test model and different memory attribute parameters will show.

[0249] S903 . Obtain consistency test results between processing cores according to consistency test results at different analysis angles.

[0250] Optionally, based on the consistency test results under each analysis angle, quantitative processing is performed to obtain the relationship between the consistency data results and the test parameters between any two processing cores, and finally the consistency test results between the processing cores are displayed in a visual manner.

[0251] In summary, the multi-core consistency test method provided by this embodiment includes: obtaining at least one set of test parameter combinations, the test parameter combination is used to indicate the identity of the processing core participating in the test, the test model to be used, and the attribute information required for the test; parsing the test parameter combination, respectively determining the tester processing core, the checker processing core, and the test model; the tester processing core and the checker processing core are different processing cores in the processing device; according to the test model and the test parameter combination, respectively controlling the tester processing core and the checker processing core to execute the corresponding test process, and obtaining the test result corresponding to the test parameter combination; according to the test result corresponding to each test parameter combination, analyzing and obtaining the consistency test result between each processing core. This method can parse the test parameter combination based on multiple sets of test parameter combinations generated by the test requirements, so that the processing core participating in the test can be controlled to execute the consistency test according to the test process of the test model indicated in the test parameter combination, and realizes the multi-core consistency test based on the software program, with high test efficiency, and can realize more comprehensive testing based on the flexible configuration of the test requirements, and at the same time, the implementation cost of the implementation method based on the software program is relatively low.

[0252] In addition, based on the test parameters set by the test requirements, an iterative strategy is executed to traverse all values ​​of the processing core under different test parameters, generate multiple sets of test parameter combinations that can fully cover all test scenarios, and improve the accuracy of consistency testing.

[0253] Finally, by integrating the analysis and visualizing the test results, we can achieve a comprehensive analysis of memory consistency issues, quickly locate the causes of memory inconsistencies, and promote research on memory consistency issues.

[0254] The following describes the apparatus, device, storage medium, etc. used to execute the multi-core consistency test method provided in this application. The specific implementation process and technical effects are described above and will not be repeated below.

[0255] Fig.15 The schematic diagram of a multi-core consistency test device provided in an embodiment of the present application, the functions implemented by the multi-core consistency test device correspond to the steps performed by the above method. The device can be understood as the above-mentioned embedded development board, or a processing core deployed on the embedded development board. Fig.15 As shown, the device may include: an acquisition module 150, a determination module 151, a test module 152 and an analysis module 153;

[0256] An acquisition module 150, used to acquire at least one set of test parameter combinations, where the test parameter combinations are used to indicate the identity of the processing cores involved in the test, the test model to be used, and the attribute information required for the test;

[0257] The determination module 151 is used to analyze the test parameter combination and determine the tester processing core, the checker processing core and the test model respectively; the tester processing core and the checker processing core are different processing cores in the processing device.

[0258] The test module 152 is used to control the tester processing core and the checker processing core to execute the corresponding test process according to the test model and the test parameter combination, and obtain the test result corresponding to the test parameter combination. The test model includes: a first model or a second model. When testing based on the first model, the tester processing core and the checker processing core read and write the test address indicated by the attribute information. When testing based on the second model, the test address indicated by the attribute information is divided into multiple address intervals, and the tester processing core and the checker processing core read and write each address interval respectively.

[0259] The analysis module 153 is used to analyze and obtain the consistency test results between the processing cores according to the test results corresponding to each test parameter combination.

[0260] Optionally, it also includes: an initialization module;

[0261] An initialization module, used to convert the test parameter combination into a data format recognizable by each processing core participating in the test based on a parameter conversion function, and obtain a converted test parameter combination corresponding to each processing core;

[0262] Initialization instructions are sent to each processing core participating in the test through the shared memory to control the test parameter combination after initialization conversion of each processing core.

[0263] Optionally, the test module 152 is specifically used to determine the address range used in the test and whether to perform a consistency operation according to relevant attribute information required for the test;

[0264] If a consistency operation is performed, the tester processing core and the checker processing core are controlled to perform data read and write operations according to the test flow of the test model and the address range used in the test;

[0265] At least one test result corresponding to the test parameter combination is generated according to the result of the data read and write operation.

[0266] Optionally, the test module 152 is specifically configured to control the tester processing core to write the test data into the address range used for the test if the test model is the first model; and control the checker processing core to read the test data from the address range used for the test after the tester processing core completes the writing;

[0267] Determine the consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core;

[0268] According to the consistency verification result under the test parameter combination, the test result corresponding to the test parameter combination is generated.

[0269] Optionally, the test module 152 is specifically used for step A1, controlling the current tester processing core to write test data into the address range used for testing, and after the current tester processing core completes writing, controlling the current checker processing core to read test data from the address range used for testing; step B1, after detecting that the current checker processing core has finished reading data, controlling the next checker processing core to read test data from the address range used for testing, until all checker processing cores have finished reading data, then controlling the next tester processing core to write test data into the address range used for testing; step C1, looping through steps A1-B1 until all tester processing cores and all checker processing cores have finished reading and writing data.

[0270] Optionally, the test module 152 is specifically used to determine the consistency verification results of each checker processing core when it corresponds to the current tester processing core based on the test data written by the current tester processing core and the test data read by each checker processing core under the current tester processing core; and obtain the consistency verification results under the test parameter combination based on the consistency verification results of each checker processing core when it corresponds to each tester processing core.

[0271] Optionally, the testing module 152 is specifically configured to divide the address range used in the test into a plurality of address intervals if the test model is the second model;

[0272] Controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read test data from each address interval in sequence;

[0273] Determine the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval;

[0274] According to the consistency verification results corresponding to each address interval, a test result corresponding to the test parameter combination is generated.

[0275] Optionally, the test module 152 is specifically used for step A2, controlling the current tester processing core to write test data to the current address interval, and after writing is completed, controlling the current checker processing core to read test data from the current address interval; step B2, after detecting that the current checker processing core has finished reading data, controlling the next checker processing core to read test data from the current address interval, until all checker processing cores read the data results, then controlling the next tester processing core to write test data to the current address interval; step C1, looping step A2-step B2, until all tester processing cores and all checker processing cores complete data reading and writing in the current address interval, and continuing to execute step D; step D, controlling the current tester processing core to write test data to the next address interval; step E, looping step A2-step D, until all tester processing cores and all checker processing cores complete data reading and writing in all address intervals.

[0276] Optionally, the testing module 152 is specifically configured to determine the consistency verification result of each checker processing core corresponding to the current tester processing core in the current address interval according to the test data written by the current tester processing core and the test data read by each checker processing core in the current address interval;

[0277] Determine the consistency verification result in the current address interval according to the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval;

[0278] According to the consistency verification results under each address interval, determine the consistency verification results under the test parameter combination;

[0279] According to the consistency verification result under the test parameter combination, the test result corresponding to the test parameter combination is generated.

[0280] Optionally, the acquisition module 150 is specifically used to determine a plurality of test parameters according to the test requirements;

[0281] According to each test parameter and each processing core involved in the test, multi-dimensional iteration of the parameters is performed to generate at least one set of test parameter combinations.

[0282] Optionally, the analysis module 153 is specifically configured to clean the test result data from at least one dimension according to the test results corresponding to each test parameter combination, so as to obtain a test result set under each dimension;

[0283] Perform data fusion analysis based on the test result sets in each dimension to obtain consistency test results from different analysis angles;

[0284] According to the consistency test results under different analysis angles, the consistency test results between the processing cores are obtained.

[0285] The above-mentioned device is used to execute the method provided by the aforementioned embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0286] The above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital singnal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0287] The above modules can be connected or communicated with each other via a wired connection or a wireless connection. The wired connection may include a metal cable, an optical cable, a hybrid cable, etc., or any combination thereof. The wireless connection may include a connection in the form of a LAN, a WAN, Bluetooth, a ZigBee, or NFC, or any combination thereof. Two or more modules may be combined into a single module, and any one module may be divided into two or more units. Those skilled in the art will clearly understand that for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application.

[0288] Fig.16 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, on which an embedded development board may be deployed, and on which multiple processors may be deployed.

[0289] The electronic device may include: a processor 801 and a storage medium 802 .

[0290] The storage medium 802 is used to store programs, and the processor 801 calls the programs stored in the storage medium 802 to execute the above method embodiment. The specific implementation method and technical effect are similar and will not be repeated here.

[0291] Among them, the storage medium 802 stores program code, and when the program code is executed by the processor 801, the processor 801 executes various steps in the multi-core consistency testing method according to various exemplary embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0292] Processor 801 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor (DigitalSignal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as a hardware processor to be executed, or a combination of hardware and software modules in the processor can be executed.

[0293] Storage medium 802, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules. Storage medium may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type storage medium, random access storage medium (Random Access Memory, RAM), static random access storage medium (Static Random Access Memory, SRAM), programmable read-only storage medium (Programmable Read Only Memory, PROM), read-only storage medium (Read Only Memory, ROM), electrically erasable programmable read-only storage medium (Electrically Erasable Programmable Read-Only Memory, EEPROM), magnetic storage medium, disk, optical disk, etc. Storage medium is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The storage medium 802 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.

[0294] Optionally, the present application also provides a program product, such as a computer-readable storage medium, including a program, which is used to execute the above method embodiment when executed by a processor.

[0295] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0296] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0297] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0298] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only storage medium (English: Read-Only Memory, referred to as: ROM), random access storage medium (English: Random Access Memory, referred to as: RAM), disk or optical disk and other media that can store program code.

Claims

1. A multi-core consistency testing method, characterized in that: include: Acquire at least one set of test parameter combinations, where the test parameter combinations are used to indicate the identity of a processing core involved in the test, a test model to be used, and attribute information required for the test; parsing the test parameter combination to respectively determine a tester processing core, an inspector processing core, and a test model; the tester processing core and the inspector processing core are different processing cores in a processing device; According to the test model and the test parameter combination, the tester processing core and the checker processing core are respectively controlled to execute the corresponding test process to obtain the test result corresponding to the test parameter combination, wherein the test model comprises: a first model or a second model, when testing based on the first model, the tester processing core and the checker processing core read and write the test address indicated by the attribute information, and when testing based on the second model, the test address indicated by the attribute information is divided into a plurality of address intervals, and the tester processing core and the checker processing core respectively read and write each address interval; According to the test results corresponding to each test parameter combination, the consistency test results between the processing cores are analyzed and obtained.

2. The method according to claim 1, characterized in that Before the tester processing core and the checker processing core are controlled to execute the corresponding test flow according to the test model and the test parameter combination, the method includes: Based on the parameter conversion function, the test parameter combination is converted into a data format recognizable by each processing core participating in the test, so as to obtain a converted test parameter combination corresponding to each processing core; Initialization instructions are sent to each processing core participating in the test through the shared memory to control the test parameter combination after initialization conversion of each processing core.

3. The method according to claim 1, characterized in that According to the test model and the test parameter combination, respectively controlling the tester processing core and the checker processing core to execute the corresponding test process to obtain the test result corresponding to the test parameter combination includes: Determine the address range used in the test and whether to perform a consistency operation based on the relevant attribute information required by the test; If a consistency operation is performed, the tester processing core and the checker processing core are controlled to perform data read and write operations according to the test flow of the test model and the address range used by the test; At least one test result corresponding to the test parameter combination is generated according to the result of the data read and write operation.

4. The method according to claim 3, characterized in that The controlling the tester processing core and the checker processing core to perform data read and write operations according to the test flow of the test model and the address range used by the test includes: If the test model is the first model, control the tester processing core to write the test data into the address range used by the test; and after the tester processing core completes writing, control the checker processing core to read the test data from the address range used by the test; Determining a consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core; According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

5. The method according to claim 4, characterized in that Controlling the tester processing core to write test data into the address range used by the test; After the tester processing core completes writing, controlling the checker processing core to read the test data from the address range used by the test includes: Step A1, controlling the current tester processing core to write test data into the address range used by the test, and after the current tester processing core completes writing, controlling the current checker processing core to read the test data from the address range used by the test; Step B1, after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read the test data from the address range used for the test, until all checker processing cores have finished reading data, and then the next tester processing core is controlled to write the test data into the address range used for the test; Step C1, looping through step A1 to step B1 until all tester processing cores and all checker processing cores finish reading and writing data.

6. The method according to claim 4, characterized in that The step of determining the consistency verification result under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core includes: Determine the consistency verification result of each checker processing core corresponding to the current tester processing core according to the test data written by the current tester processing core and the test data read by each checker processing core under the current tester processing core; According to the consistency verification results when each inspector's processing core corresponds to each tester's processing core, the consistency verification result under the test parameter combination is obtained.

7. The method according to claim 3, characterized in that The controlling the tester processing core and the checker processing core to perform data read and write operations according to the test flow of the test model and the address range used by the test includes: If the test model is the second model, dividing the address range used in the test into a plurality of address intervals; Controlling the tester processing core to write test data into each address interval in sequence and controlling the checker processing core to read the test data from each address interval in sequence; Determine the consistency verification result corresponding to each address interval under the test parameter combination according to the test data written by the tester processing core and the test data read by the checker processing core under each address interval; According to the consistency verification results corresponding to each address interval, a test result corresponding to the test parameter combination is generated.

8. The method according to claim 7, characterized in that The controlling the tester processing core to sequentially write test data into each address interval and controlling the checker processing core to sequentially read the test data from each address interval includes: Step A2, controlling the current tester processing core to write test data into the current address interval, and after the writing is completed, controlling the current checker processing core to read the test data from the current address interval; Step B2: after detecting that the current checker processing core has finished reading data, the next checker processing core is controlled to read test data from the current address interval, until all checker processing cores have read the data results, and then the next tester processing core is controlled to write test data to the current address interval; Step C2, looping through Step A2 to Step B2 until all tester processing cores and all checker processing cores finish reading and writing data in the current address range, and then continuing to Step D; Step D, controlling the current tester processing core to write test data to the next address interval; Step E: cyclically execute step A2 to step D until all tester processing cores and all checker processing cores complete the reading and writing of data in all address intervals.

9. The method according to claim 7, characterized in that: The determining, according to the test data written by the tester processing core and the test data read by the checker processing core in each address interval, the consistency verification result corresponding to each address interval under the test parameter combination includes: According to the test data written by the current tester processing core and the test data read by each checker processing core in the current address interval, respectively determine the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval; Determine the consistency verification result in the current address interval according to the consistency verification result when each checker processing core corresponds to the current tester processing core in the current address interval; Determine the consistency verification result under the test parameter combination according to the consistency verification result under each address interval; According to the consistency verification result under the test parameter combination, a test result corresponding to the test parameter combination is generated.

10. The method according to any one of claims 1 to 9, characterized in that: The obtaining of at least one set of test parameter combinations includes: Determine multiple test parameters according to test requirements; According to each test parameter and each processing core involved in the test, multi-dimensional iteration of the parameters is performed to generate at least one set of test parameter combinations.

11. The method according to any one of claims 1 to 9, characterized in that: The analysis of the consistency test results between the processing cores according to the test results corresponding to the test parameter combinations includes: According to the test results corresponding to each test parameter combination, the test result data is cleaned from at least one dimension to obtain a test result set under each dimension; Perform data fusion analysis based on the test result sets in each dimension to obtain consistency test results from different analysis angles; According to the consistency test results under different analysis angles, the consistency test results between the processing cores are obtained.

12. A multi-core consistency testing device, characterized in that: include: Acquisition module, determination module, testing module and analysis module; The acquisition module is used to acquire at least one set of test parameter combinations, where the test parameter combinations are used to indicate the identity of the processing cores involved in the test, the test model to be used, and the attribute information required for the test; The determination module is used to parse the test parameter combination and respectively determine the tester processing core, the checker processing core and the test model; the tester processing core and the checker processing core are different processing cores in the processing device; The test module is used to control the tester processing core and the checker processing core to execute the corresponding test process according to the test model and the test parameter combination, and obtain the test result corresponding to the test parameter combination. The test model includes: a first model or a second model. When testing based on the first model, the tester processing core and the checker processing core read and write the test address indicated by the attribute information. When testing based on the second model, the test address indicated by the attribute information is divided into multiple address intervals, and the tester processing core and the checker processing core read and write each address interval respectively. The analysis module is used to analyze and obtain consistency test results between the processing cores according to the test results corresponding to each test parameter combination.

13. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores program instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to implement the multi-core consistency testing method as described in any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the multi-core consistency testing method according to any one of claims 1 to 11 is implemented.

Citation Information

Patent Citations

  • Multi-core Cache consistency maintenance method and device based on fence and lock

    CN105095144A

  • Cache consistency protocol verification method and system for on-chip multi-core processor, and medium

    CN111611120A

  • Test method, device, system, equipment and medium

    CN112214366A

  • Verification method and verification device for data consistency and processor

    CN116069687A

  • Test method and device of storage chip, storage medium and electronic equipment

    CN116779015A