On-chip system test methods, apparatus, electronic devices and readable storage media

By selecting the target test scenario and constraints in SoC testing and using fuzz testing algorithms to generate test instructions that conform to the bus protocol, the problem of low efficiency in SoC testing is solved, and fast and comprehensive testing results are achieved.

CN122111863BActive Publication Date: 2026-11-17BEIJING INSTITUTE OF OPEN SOURCE CHIP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610327654.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-03-17
Publication Date
2026-11-17
Estimated Expiration
2046-03-17

AI Technical Summary

Technical Problem

In existing technologies, SoC testing methods cannot quickly and comprehensively cover its complex interconnect bus architecture, resulting in low testing efficiency. Manually written test instructions are time-consuming and difficult to cover comprehensively, while randomly generated test instructions produce a large number of invalid or duplicate instructions, affecting testing efficiency.

Method used

By selecting a target test scenario from a preset test scenario and obtaining the corresponding constraints, a test instruction sequence is generated using a fuzzy testing algorithm to ensure that the instructions comply with the bus protocol requirements of the device nodes, and the test is carried out in conjunction with the system topology dependency graph.

Benefits of technology

It improves the efficiency of test instruction sequence generation, avoids duplicate and invalid instructions, enables fast and comprehensive testing of SoC, and improves test efficiency and coverage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122111863B_ABST
    Figure CN122111863B_ABST
Patent Text Reader

Abstract

This application provides a system-on-chip (SoC) testing method, apparatus, electronic device, and readable storage medium, relating to the field of computer technology. The method includes: selecting a target test scenario from a preset set of test scenarios, and obtaining the constraint conditions corresponding to the target test scenario from the constraint conditions corresponding to each test scenario as target constraint conditions; the constraint conditions corresponding to the test scenario include: the node identifier of the device node corresponding to the test scenario, and the bus protocol supported by the device node corresponding to the test scenario; generating a test instruction sequence based on the target test scenario and the target constraint conditions; the test instructions in the test instruction sequence are used to test the target device node in the target constraint conditions, and the test instructions meet the requirements of the target bus protocol supported by the target device node; and testing the SoC according to the test instruction sequence. This application allows for rapid and comprehensive testing of SoCs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a system-on-a-chip testing method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the development of System on Chip (SoC) technology, the number of Intellectual Property (IP) cores in SoC has also increased, and the interconnect bus architecture inside SoC has become increasingly complex.

[0003] In related technologies, specific test instructions can be written manually or randomly generated to test the performance and / or functionality of the SoC.

[0004] However, manually writing specific test instructions is time-consuming and cannot fully cover all test scenarios. Randomly generating test instructions, on the other hand, easily produces a large number of invalid and repetitive instructions that do not meet test requirements, impacting testing efficiency. Currently, there is a lack of methods in related technologies for rapidly generating valid test instructions to perform fast and comprehensive testing of SoCs. Summary of the Invention

[0005] This application provides a system-on-chip (SoC) testing method, apparatus, electronic device, and readable storage medium to address the problem that prior art cannot quickly and comprehensively test SoCs.

[0006] In a first aspect, embodiments of this application provide a system-on-chip (SoC) testing method, wherein the SoC includes multiple interconnected device nodes; the method includes: selecting a target test scenario from a preset test scenario, and obtaining, from the constraints corresponding to each test scenario, a constraint corresponding to the target test scenario as a target constraint; the constraint corresponding to the test scenario includes: a node identifier of the device node corresponding to the test scenario, and a bus protocol supported by the device node corresponding to the test scenario; generating a test instruction sequence according to the target test scenario and the target constraint; the test instructions in the test instruction sequence are used to test the target device node in the target constraint, and the test instructions satisfy the requirements of the target bus protocol supported by the target device node; and testing the SoC according to the test instruction sequence.

[0007] In some embodiments of this application, the target test scenario includes at least one target transaction; generating a test instruction sequence based on the target test scenario and the target constraints includes: using the target constraints and the target test scenario as input to a fuzzy testing algorithm to obtain a test instruction sequence output by the fuzzy testing algorithm; wherein, the test instructions in the test instruction sequence correspond one-to-one with the target transaction, and the test instruction corresponding to the target transaction is used to implement the target transaction.

[0008] In some embodiments of this application, the device nodes related to the scene under test include at least one master device node and at least one slave device node; the target device nodes include at least one target master device node and at least one target slave device node; the step of using the target constraints and the target scene under test as input to a fuzzing algorithm to obtain a sequence of test instructions output by the fuzzing algorithm includes: using the fuzzing algorithm to obtain a source node corresponding to the target transaction from at least one target master device node, and to obtain a destination node corresponding to the target transaction from at least one target slave device node; generating test instructions corresponding to the target transaction based on the source node and the destination node; and constructing the sequence of test instructions based on at least one of the test instructions.

[0009] In some embodiments of this application, the target constraint further includes: a target address range allocated to the target device node; the step of generating a test instruction corresponding to the target transaction based on the source node and the destination node includes: obtaining the opcode corresponding to the target transaction through the fuzzing algorithm, obtaining the access address of the target transaction within the address range of the destination node, obtaining the final target bus protocol and the attribute information of the final target bus protocol from multiple target bus protocols supported by the source node and the destination node; and generating a test instruction corresponding to the target transaction based on the opcode, the source node, the destination node, the access address, and the attribute information.

[0010] In some embodiments of this application, the target constraint further includes data, which includes write data or read data; the step of generating a test instruction corresponding to the target transaction based on the opcode, the source node, the destination node, the access address, and the attribute information includes: obtaining target data corresponding to the opcode of the target transaction from the data using the fuzzing algorithm; and generating a test instruction corresponding to the target transaction based on the opcode, the source node, the destination node, the access address, the data, the attribute information, and the target data.

[0011] In some embodiments of this application, the target test scenario includes at least one target transaction, and the step of testing the on-chip system according to the test instructions includes: translating the test instruction sequence into a transaction sequence that meets the syntactic requirements of a general verification methodology; and executing the transaction sequence in the general verification methodology environment to test the on-chip system.

[0012] In some embodiments of this application, after executing the transaction sequence in the general verification methodology environment to test the on-chip system, the method further includes: obtaining the coverage rate output by the general verification methodology environment, and the uncovered points corresponding to the coverage rate; the coverage rate includes at least one of the following: row coverage rate, state machine coverage rate, inversion coverage rate, and functional coverage rate; if the coverage rate is lower than a preset coverage rate, then the target constraint condition is updated according to the uncovered points, and the step of generating a test instruction sequence according to the target test scenario and the target constraint condition is returned.

[0013] Secondly, embodiments of this application also provide a system-on-chip (SoC) testing apparatus, comprising: a constraint acquisition module, configured to select a target test scenario from a preset test scenario, and acquire, from the constraint conditions corresponding to each test scenario, a constraint condition corresponding to the target test scenario as a target constraint condition; the constraint condition corresponding to the test scenario includes: a node identifier of a device node corresponding to the test scenario, and a bus protocol supported by the device node corresponding to the test scenario; an instruction generation module, configured to generate a test instruction sequence based on the target test scenario and the target constraint condition; the test instructions in the test instruction sequence are used to test the target device node in the target constraint condition, and the test instructions satisfy the requirements of the target bus protocol supported by the target device node; and a testing module, configured to test the SoC based on the test instruction sequence.

[0014] Thirdly, embodiments of this application also provide an electronic device, including a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of the first aspect.

[0015] Fourthly, embodiments of this application also provide a computer-readable storage medium that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method of the first aspect.

[0016] In this embodiment, a target test scenario is selected from a preset set of test scenarios, and the constraint conditions corresponding to the target test scenario are obtained from the constraint conditions corresponding to each test scenario as target constraint conditions. The constraint conditions corresponding to the test scenario include: the node identifier of the device node corresponding to the test scenario, and the bus protocol supported by the device node corresponding to the test scenario. A test instruction sequence is generated based on the target test scenario and the target constraint conditions. The test instructions in the test instruction sequence are used to test the target device node in the target constraint conditions, and the test instructions meet the requirements of the target bus protocol supported by the target device node. This embodiment automatically generates the test instruction sequence within the constraint range of the target constraint conditions. Compared with the method of manually writing targeted test instructions in related technologies, this embodiment improves the generation efficiency of the test instruction sequence and avoids the problem that manually written targeted test instructions cannot fully cover the testing situation of the on-chip system. Compared with the unconstrained random verification method in related technologies, this embodiment avoids the problem of generating a large number of repetitive or invalid test instructions due to the lack of constraints, thus improving the generation efficiency of the test instruction sequence. Based on the test instruction sequence, the on-chip system can be tested quickly and comprehensively. In addition, when testing the target test scenario, the target constraints corresponding to the target test scenario can be quickly obtained based on the preset test scenario and the corresponding constraints, thereby further improving the generation efficiency of test instruction sequences and thus improving the testing efficiency of the on-chip system.

[0017] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is a schematic diagram illustrating an application scenario of a system-on-a-chip testing method provided in an embodiment of this application; Figure 2 This is a flowchart of a system-on-chip testing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a test scenario and corresponding constraints provided in an embodiment of this application; Figure 4 This is a flowchart of another on-chip system testing method provided in the embodiments of this application; Figure 5 This is a schematic diagram of another three-dimensional dependency map provided in an embodiment of this application; Figure 6 This is a flowchart of another on-chip system testing method provided in the embodiments of this application; Figure 7 This is a schematic diagram of the structure of a system-on-a-chip test system provided in an embodiment of this application; Figure 8 This is a block diagram of a system-on-a-chip test device provided in an embodiment of this application; Figure 9 This is a block diagram of an electronic device provided in an embodiment of this application; Figure 10 This is a block diagram of another electronic device according to another embodiment of this application. Detailed Implementation

[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0021] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and are not limited in number; for example, a first object can be one or more. Furthermore, the term "and / or" in the specification and claims is used to describe the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. In the embodiments of this application, the term "multiple" refers to two or more, and other quantifiers are similar.

[0022] Figure 1 This is a schematic diagram illustrating an application scenario of a system-on-a-chip testing method provided in an embodiment of this application. (Refer to...) Figure 1The system-on-a-chip (SoC) includes multiple interconnect device nodes. These device nodes may include a Central Processing Unit (CPU) cluster, such as CPU1, CPU2 through CPU7; they may also include a Peripheral Component Interconnect Express (PCIe) bus, such as PCIe0 and PCIe1; they may also include a Universal Serial Bus (USB) and a system core; they may further include a Graphics Processing Unit (GPU), a Power Management Unit (PMU), a Direct Memory Access Controller (DMAC), and a Gigabit Media Access Controller (GMAC); they may also include Low Power Double Data Rate (LPDDR) memory and a DDR Controller Memory (DDRC) memory, for example, DDRC may include multiple LPDDR5 modules; and they may also include a Universal Asynchronous Receiver / Transmitter (UART) and a General Purpose Input / Output (GPIO) port. Input / Output (GPIO), High Definition Multimedia Interface (HDMI), Watchdog Timer (WDT), etc.

[0023] The various device nodes are interconnected. For example, refer to... Figure 1 They can be connected via a cachecoherent network interconnection or a non-coherent interconnection.

[0024] Each device node supports its own bus protocol. For example, refer to... Figure 1The CPU supports the Coherent Hub Interface (CHI) protocol, the PCIe supports the Advanced deXtensible Interface Coherency Extension (ACE) protocol, USB and the system core support the ACE protocol, the GPU, PMU, DMAC, and GMAC support the Advanced eXtensible Interface (AXI) protocol, DDRC supports the CHI protocol, and UART, GPIO, HDMI, and WDT support the AXI protocol, Advanced High-performance Bus (AHB) protocol, and APB protocol, etc. In practical applications, functional testing or performance testing of the SoC is usually required.

[0025] In related technologies, specific test instructions can be manually written to perform targeted testing on the SoC. However, when an SoC typically has many device nodes and supports complex protocols, the combination of device nodes and bus protocols generates a large state space. Targeted testing methods struggle to cover deep and hidden corner cases in this state space, such as bus deadlocks, protocol conflicts, cache consistency errors, and memory mapping anomalies. This results in incomplete SoC testing using targeted testing methods, and manually writing specific test instructions is time-consuming.

[0026] In related technologies, SoC can also be tested using random testing methods. However, while random testing methods can provide a high probability of state space exploration, the large number of device nodes in an SoC constitutes a huge state space. Random testing methods are inefficient at generating random stimuli within this large state space and produce a large number of invalid or duplicate test instructions. This results in slow SoC verification convergence speed and difficulty in improving coverage, leading to incomplete SoC testing.

[0027] Based on the foregoing analysis, the methods of related technologies cannot quickly and comprehensively test a System-on-Chip (SoC). To address this problem, this application provides a system-on-chip (SoC) testing method, apparatus, electronic device, and readable storage medium. The method includes: selecting a target test scenario from a preset set of test scenarios, and obtaining, from the constraints corresponding to each test scenario, the constraints corresponding to the target test scenario as target constraints; the constraints corresponding to the test scenario include: a node identifier of a device node corresponding to the test scenario, and the bus protocol supported by the device node corresponding to the test scenario; generating a test instruction sequence based on the target test scenario and the target constraints; the test instructions in the test instruction sequence are used to test the target device node in the target constraints, and the test instructions satisfy the requirements of the target bus protocol supported by the target device node; and testing the SoC based on the test instruction sequence.

[0028] It should be noted that the above application scenarios are only used to illustrate the embodiments of this application and do not imply that this application is only applicable to... Figure 1 The application scenarios shown are as follows. For example, in this application, the types of device nodes in the on-chip system, the communication connection methods between device nodes, and the bus protocols supported by the device nodes are not limited to... Figure 1 Description of the illustrated embodiment.

[0029] The on-chip system testing method provided in this application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0030] Figure 2 This is a flowchart illustrating the steps of an on-chip system testing method provided in an embodiment of this application, as follows: Figure 2 As shown, the method may include: Step 101: Select the target test scenario from the preset test scenarios, and obtain the constraint conditions corresponding to the target test scenario from the constraint conditions corresponding to each test scenario as the target constraint conditions.

[0031] The constraints corresponding to the scenario under test include: the node identifier of the device node corresponding to the scenario under test, and the bus protocol supported by the device node corresponding to the scenario under test.

[0032] The system-on-a-chip includes multiple interconnected device nodes.

[0033] For example, at least one preset test scenario and the corresponding constraints for each test scenario are obtained. The constraints include: the device nodes associated with the test scenario among multiple device nodes, and the bus protocols supported by the device nodes.

[0034] For example, refer to Figure 1 Device nodes can include CPUs, GPUs, PCIe, etc., but the specific types of device nodes are not limited here.

[0035] For example, the scenarios to be tested may include processor cores executing instruction fetching, maintaining cache consistency between processor cores, and processor cores transferring data to the GPU via DMA.

[0036] For example, the device nodes through which the data flow or test instructions pass during the implementation of the scenario under test are identified as device nodes related to the scenario under test.

[0037] For example, refer to Figure 3 The example set of constraints shown, and Figure 1 The illustrated on-chip system has preset test scenarios including test scenario 0 and test scenarios 1 through 1n. Test scenario 0 tests the cache coherency of CPUs 0 through 7. Therefore, the device nodes associated with this test scenario include at least CPUs (e.g., CPUs 0 through 7) and DDRCs (e.g., DDRC 0 through DDRC n); where the CPU is the effective master node and the DDRC is the effective slave node. Additionally, the device nodes associated with test scenario 0 may also include configuration nodes, which can be system configuration modules (sys cfg). For example, in... Figure 3 In the illustrated embodiment, scenario 1 under test is a read / write test of dual PCIe. The device nodes related to scenario 1 under test include the configuration node (sys cfg), the effective master node (including PCIe0 and PCIe1), and the effective slave node (e.g., DDRC0).

[0038] In this process, at least one preset test scenario and the corresponding constraints for each test scenario are obtained in advance. This information is then stored for reuse when performing the following operations: selecting a target test scenario from the preset test scenarios, and obtaining the constraints corresponding to the target test scenario from the constraints corresponding to each test scenario as the target constraints.

[0039] The target constraints include: the target device nodes related to the target test scenario, and the target bus protocols supported by the target device nodes; For example, the target test scenario is the scenario to be tested, and the target test scenario belongs to the preset test scenarios. For instance, the target test scenario can be the currently active test scenario.

[0040] Based on user needs, a target test scenario can be selected from at least one preset test scenario; alternatively, a traversal method can be used to traverse at least one preset test scenario and determine the currently traversed test scenario as the target test scenario.

[0041] According to step 101, each test scenario has a corresponding set of constraints. In this step, the constraints corresponding to the target test scenario are determined as target constraints, the device nodes in the target constraints are determined as target device nodes, and the bus protocols supported by the target device nodes are determined as target bus protocols.

[0042] Step 102: Generate a test instruction sequence based on the target test scenario and target constraints.

[0043] The test instructions in the test instruction sequence are used to test the target device node in the target constraints, and the test instructions meet the requirements of the target bus protocol supported by the target device node.

[0044] For example, the target test scenario includes multiple target transactions. For each target transaction, test instructions corresponding to the target transaction are generated according to the target transaction and target constraints. The test instructions corresponding to the multiple target transactions constitute the test instruction sequence in this step.

[0045] Furthermore, for each target transaction, the target device nodes associated with the target transaction and the target bus protocols supported by these target device nodes are obtained; based on these target device nodes and their supported target bus protocols, test instructions that satisfy these target bus protocols are generated.

[0046] For example, if the target transaction includes CPU0 writing data to DDRC0, and the bus protocol supported by CPU0 and DDRC0 is the CHI protocol, then the target device nodes related to the target transaction must include at least CPU0 and DDRC0, the test instruction is a write operation instruction, and the test instruction meets the requirements of the CHI protocol.

[0047] Step 103: Perform tests on the on-chip system according to the test instruction sequence.

[0048] For example, the test instruction sequence is translated into a sequence of transactions that can be executed by the Universal Verification Methodology (UVM) verification framework for SoC verification. The transaction sequence is executed in the UVM environment to drive the VIP of the on-chip system to apply stimuli to perform functional or performance tests on the on-chip system.

[0049] As SoC design scales up dramatically, the number of integrated intellectual property (IP) cores increases accordingly, and their internal interconnect bus architectures (such as mesh NoCs and crossbars) become exceptionally complex. Interconnect bus architectures can include mesh NoCs and crossbars. The combination of numerous master and slave devices within the SoC, along with complex bus protocols (such as AXI, ACE, and CHI), creates a complex state space. Directed testing methods for related technologies cannot cover this complex state space, resulting in test instructions that cannot comprehensively test the on-chip system. Furthermore, directed test cases require manually written test instructions, which are not only time-consuming but also difficult to cover deep, hidden situations, further hindering comprehensive on-chip system testing.

[0050] While stochastic verification methods in related technologies can provide a higher probability of state space exploration, purely random stimuli are extremely inefficient in large design spaces, generating a large number of invalid or duplicate test vectors, resulting in slow verification convergence and difficulty in improving coverage. How to effectively guide the randomness of test instruction generation so that it can quickly and accurately cover the valid verification state space has become an urgent problem to be solved in SoC testing.

[0051] In this embodiment, a test instruction sequence is automatically generated within the constraints of the target constraints. Compared to the method of manually writing targeted test instructions in related technologies, this embodiment improves the generation efficiency of the test instruction sequence and avoids the problem that manually written targeted test instructions cannot fully cover the testing situation of the on-chip system. Compared to the unconstrained random verification method in related technologies, this embodiment avoids the problem of generating a large number of repetitive or invalid test instructions due to the lack of constraints, thus improving the generation efficiency of the test instruction sequence. Based on the test instruction sequence, the on-chip system can be tested quickly and comprehensively. In addition, when testing the target test scenario, the target constraints corresponding to the target test scenario can be quickly obtained based on the preset test scenario and the constraints corresponding to the test scenario, thereby further improving the generation efficiency of the test instruction sequence and thus improving the testing efficiency of the on-chip system. Figure 4 This is a flowchart illustrating the specific steps of a system-on-chip testing method provided in an embodiment of this application, as follows: Figure 4 As shown, the method may include: Step 201: Select the target test scenario from the preset test scenarios, and obtain the constraint conditions corresponding to the target test scenario from the constraint conditions corresponding to each test scenario as the target constraint conditions.

[0052] The constraints corresponding to the scenario under test include: the node identifier of the device node corresponding to the scenario under test, and the bus protocol supported by the device node corresponding to the scenario under test.

[0053] For example, the target test scenario includes at least one target transaction.

[0054] Step 202: Take the target constraints and the target test scene as inputs to the fuzzy testing algorithm and obtain the test instruction sequence output by the fuzzy testing algorithm.

[0055] In this sequence of test instructions, each test instruction corresponds one-to-one with a target transaction, and the test instruction corresponding to the target transaction is used to implement the target transaction.

[0056] For example, various parameters for generating test instructions can be extracted from the target constraints and the target test scenario. These parameters may include the master device node, slave device node, the target bus protocol supported by the master device node, and the target bus protocol supported by the slave device node. For instance, there may be multiple master device nodes (e.g., eight CPU cores from CPU0 to CPU7), and multiple slave device nodes (e.g., eight DDRCs from DDRC0 to DDRC7).

[0057] Each parameter can have one or more. Using a fuzzy testing algorithm, for each parameter, a target parameter is selected from multiple parameters, and these target parameters are combined to generate multiple test instructions. A test instruction sequence is then constructed from these multiple test instructions. For example, CPU0 is selected as the source node from the master device node, DDRC0 is selected as the destination node from the slave device nodes, and the CHI protocol is selected as the target bus protocol from the protocols supported by the source and destination devices. Then, test instructions are generated with CPU0 as the source node, DDRC0 as the destination node, and the CHI protocol is satisfied. As another example, CPU1 is selected as the source device from the master device node, DDRC0 is selected as the destination device from the slave device nodes, and the CHI protocol is selected as the target bus protocol from the protocols supported by the source and destination devices. Test instructions are then generated with CPU1 as the source node, DDRC0 as the destination node, and the CHI protocol is satisfied.

[0058] For example, the fuzzing algorithm in this embodiment may include: a mutation-based fuzzing algorithm, specifically, starting from one or more seed inputs and generating new inputs through random modification; a coverage feedback-driven fuzzing algorithm, specifically, modifying constraints based on the coverage and uncovered points of the aforementioned embodiments, and then regenerating the test instruction sequence based on the fuzzing algorithm until the coverage reaches a preset coverage; a symbolic execution-assisted fuzzing algorithm, specifically, combining symbolic execution with the fuzzing algorithm. When the fuzzing algorithm gets stuck on a certain conditional branch, symbolic execution is used to solve for the input that satisfies the branch condition, breaking through the path bottleneck; a syntax model-based intelligent fuzzing algorithm, specifically, using context-free grammar (CFG), abstract syntax tree (AST), or machine learning models to understand the input structure and generate more usable test cases; and a directed fuzzing algorithm, which guides the random processing of the fuzzing algorithm for specific code locations (such as known vulnerable functions), prioritizing the generation of inputs that can reach the target point. This typically occurs in regression testing; parallel or distributed fuzzing algorithms distribute the fuzzing task to multiple cores or machines, sharing a seed pool or path information.

[0059] In this embodiment, using the target constraints and the target test scenario as input to the fuzzy testing algorithm strictly limits the randomness of the fuzzy testing algorithm to the state space constrained by the target test scenario and the target constraints. Based on the target constraints, a sequence of test instructions for realizing the target test scenario can be automatically generated, avoiding the problem of generating a large number of duplicate or invalid test instructions in unconstrained random verification methods in related technologies. In addition, this embodiment can also solve the problems of low efficiency and poor comprehensiveness in the generation of test instructions by directional verification methods in related technologies. In other words, this embodiment improves the effectiveness and comprehensiveness of the generated test instructions.

[0060] In some embodiments of this application, the device nodes associated with the scenario under test include at least one master device node and at least one slave device node; the target device node includes at least one target master device node and at least one target slave device node.

[0061] Correspondingly, step 202 may include sub-steps A1 to A3: Sub-step A1: Using a fuzzy testing algorithm, obtain the source node corresponding to the target transaction from at least one target master device node, and obtain the destination node corresponding to the target transaction from at least one target slave device node.

[0062] For example, multiple device nodes in an on-chip system can include at least one master device node and at least one slave device node. The system can be structured with the master device node as the X-axis, the slave device node as the Y-axis, and the scenario under test as the Z-axis, as shown below. Figure 5 The diagram shows a 3D dependency graph. In the 3D dependency graph, each test scenario has at least one master device node and at least one slave device node. Further, the master device node corresponding to the target test scenario is the target master device node, and the slave device node corresponding to the target test scenario is the target slave device node.

[0063] For each scenario under test, the device nodes related to it are considered active or valid, while the device nodes unrelated to it are considered inactive or invalid.

[0064] For example, the location of the target test scene in the 3D dependency graph is obtained, and the target constraints corresponding to the target test scene are obtained based on its location. The target constraints include at least one master device node and at least one slave device node corresponding to the target test scene. The master device node has its supported target bus protocol, and the slave device node also has its supported target bus protocol.

[0065] Sub-step A2 generates test instructions corresponding to the target transaction based on the source node and the destination node.

[0066] The test instruction includes a field for writing the node identifier of the source node and a field for writing the node identifier of the destination node; based on the source node and the destination node, a test instruction containing the node identifiers of the source node and the destination node is generated.

[0067] Sub-step A3: Construct a sequence of test instructions based on at least one test instruction.

[0068] For example, when there are dependencies between target transactions, the test instructions corresponding to each target transaction are sorted according to the dependencies to obtain a test instruction sequence.

[0069] In this embodiment, the device nodes related to the scene under test include at least one master device node and at least one slave device node; the target device nodes include at least one target master device node and at least one target slave device node. The scene under test and the corresponding master and slave device nodes can form a three-dimensional dependency graph. Based on the three-dimensional dependency graph and the bus protocols supported by the master and slave device nodes, the randomness of generating test instruction sequences through the fuzzing algorithm can be constrained. This allows the fuzzing algorithm to perform random processing within the state space defined by the scene under test and the constraints, within the range of combinations of device nodes that actually exist on the on-chip system and have the possibility of interaction. For example, through the fuzzing algorithm, a source node corresponding to the target transaction is obtained from at least one target master device node, and a destination node corresponding to the target transaction is obtained from at least one target slave device node; then, test instructions corresponding to the target transaction are generated based on the source and destination nodes; and a test instruction sequence is constructed based on at least one test instruction. Compared to the unconstrained random generation of test instructions in related technologies, this embodiment can avoid obtaining duplicate and invalid test instruction sequences. On-chip system testing based on the test instruction sequences of this embodiment can improve testing efficiency.

[0070] This embodiment achieves rapid and comprehensive testing of the system-on-chip (SoC) based on a multi-level modeling method using system topology dependency graphs and protocol constraint sets. The system topology dependency graph, a key innovation, constructs a three-dimensional dynamic scene model (i.e., a three-dimensional dependency graph). In this graph, the X-axis represents the master device node, the Y-axis identifies the slave device node, and the Z-axis represents the scene under test. By constructing the system topology dependency graph, the generation of test stimuli can accurately reflect the actual interconnect behavior of the SoC under different configuration modes. This embodiment achieves comprehensive coverage of deep scenarios by introducing a three-dimensional dependency graph. Specifically, by combining control node and scene dimensions, it can systematically model and verify bus behavior under dynamic system configurations. Compared with random verification methods in related technologies, this embodiment can effectively discover deep-seated defects related to system mode switching and configuration.

[0071] Based on this embodiment, a closed loop can be formed to achieve automated convergence of on-chip system testing. This embodiment achieves efficient state space exploration. Specifically, by relying on the graph and protocol constraint set, the complex random space is significantly pruned, allowing the fuzzing algorithm to focus on the actual, interactive state combinations that exist on the SoC, avoiding a large number of invalid tests and greatly improving verification efficiency.

[0072] For example, the target constraint also includes: the target address range allocated to the target device node; correspondingly, sub-step A2 may include: Sub-step A21: Obtain the opcode corresponding to the target transaction through a fuzzy testing algorithm, obtain the access address of the target transaction within the address range of the destination node, and obtain the final target bus protocol and its attribute information from the multiple target bus protocols supported by the source node and the destination node.

[0073] For example, if the target transaction includes CPU0 reading data from DDR0, then the opcode corresponding to the target transaction is a read transaction.

[0074] For example, a fuzzing algorithm can be used to obtain the access address of the target transaction from the address range of the target node, and select the final target bus protocol from multiple target bus protocols, as well as the attribute information of the final target bus protocol.

[0075] Sub-step A22 generates a test instruction corresponding to the target transaction based on the opcode, source node, destination node, access address, and attribute information.

[0076] For example, the test instruction includes fields for writing the opcode, the node identifier of the source node, the node identifier of the destination node, the access address, and attribute information, respectively. The corresponding data is written into each field to obtain a test instruction that includes the opcode, the node identifier of the source node, the node identifier of the destination node, the access address, and the attribute information.

[0077] In this embodiment, the opcode in the test instruction is obtained through a fuzzy testing algorithm and corresponds to the target transaction. The access address in the test instruction is obtained from the address range of the destination node through a fuzzy testing algorithm. The final target bus protocol in the test instruction is obtained from the target bus protocols supported by the source node and the destination node through a fuzzy testing algorithm. Based on the opcode, source node, destination node, access address, and attribute information, a test instruction corresponding to the target transaction is generated. These parameters for generating the test instruction are obtained within the corresponding constraint range, which avoids the problem of unconstrained random verification methods in related technologies that are prone to generating invalid test instructions.

[0078] For example, the target constraint also includes data, which includes write data or read data; sub-step A22 may include: Sub-step A221: Using a fuzzy testing algorithm, obtain the target data corresponding to the opcode of the target transaction from the data.

[0079] For example, you can also directly set the target data corresponding to the opcode of the target transaction.

[0080] Sub-step A222 generates a test instruction corresponding to the target transaction based on the opcode, source node, destination node, access address, attribute information, and target data.

[0081] For example, the fields included in the test instruction are shown in Table 1.

[0082]

[0083] In this embodiment, the test instruction generated by the fuzzing algorithm is a fuzzing instruction. A fuzzing instruction is a hierarchical, structured data object that serves as a key abstract interface between the connection constraint-driven test instruction intelligent generator and the standard UVM execution environment. The test instruction generated according to the instruction format shown in Table 1 encapsulates the core semantics of a complete bus transaction. Furthermore, the test instruction includes an extension information field for writing extended information about user requirements. Based on this extension information field, the test instruction maintains sufficient flexibility and scalability to support multiple bus protocols and complex scenarios.

[0084] By writing the corresponding data into the fields shown in Table 1, you can obtain test commands that include the operation code, the node identifier of the source node, the node identifier of the destination node, the access address, the data, and attribute information.

[0085] In Table 1, the opcodes define the basic types of test instructions and serve as the fundamental identifiers for the stimulus behavior. For example, opcodes can include read transactions, write transactions, and atomic operations, such as swap algorithms and add operations. Opcodes can also include cache maintenance operations, such as clean and invalidate operations. The opcode directly determines which underlying sequence method the Verification Intellectual Property (VIP) will invoke.

[0086] In Table 1, the source node ID specifies the master device node initiating the current bus transaction. The source node ID value can be mapped to a specific master device defined in the system topology dependency graph, such as CPU0, GPU, or DMA. The source node ID is crucial for the translator to select the correct Master VIP for driving the process.

[0087] In Table 1, the Destination Node ID specifies the target slave node for the target transaction. The value of the Destination Node ID maps to a specific slave device or address region defined in the system topology dependency graph, such as DDRC0 or PERI_BUS.

[0088] In Table 1, the address is the target address for the transaction access. Combined with the address field, the translator and the slave device VIP can use this information for routing and response.

[0089] Furthermore, the address in this embodiment is subject to multiple constraints. These constraints may include: the address must be within the legal address mapping range of the destination node. Here, the destination nodes are all slave devices. In a computer system, all instructions and execution are essentially the movement of data from one address to another. Therefore, slave devices have an address range, which is the legal address range of the slave device. This address range needs to be defined according to the actual scenario. For example, the entire Double Data Rate (DDR) memory range might be 16GB, or the DDR configuration interface range might only be 64KB.

[0090] Address constraints can also include: alignment constraints or misalignment constraints, depending on the scenario requirements, to test abnormal paths. Alignment constraints can be used to test the normal functionality of the on-chip system, while misalignment constraints can test the system's exception handling capabilities.

[0091] Address constraints can also include combinations with data fields to test boundary conditions or cross-functional scenarios for specific addresses. A transmission consists of an address and data, which can be abstracted into a two-dimensional case where the address and data naturally combine. For example, different devices have different legal address ranges; in other words, different address ranges can represent different devices. For instance, if the data is write data, the combination of address and data can represent writing write data at that address, such as writing write data 0x5A5A5A5A at address 0x8000_000.

[0092] The data in Table 1 includes data to be written by write transactions or expected return data of read transactions. The expected return data of read transactions is used to compare with the data actually read by the read operation to determine whether the operation result is correct. Data fields support randomization, fixed patterns (e.g., all 0s, all 1s, and moving to 1), or generation based on related data from previous transactions to test data paths and consistency.

[0093] The attribute field in Table 1 is a composite field used to carry protocol-related control and attribute information. Its specific subfields change dynamically based on the opcode and node protocol type.

[0094] For example, attribute fields can include typical subfields. Typical subfields can include burst attributes, such as burst length, burst size, and burst type. Typical subfields can also include cache and memory attributes, such as cacheability, buffering, and read / write allocation policies. Typical subfields can also include protection attributes, such as security level and access permissions. Typical subfields can also include quality of service (QoS) levels, used for priority and bandwidth testing. Typical subfields can also include atomic operation types, specifying concrete atomic operations; atomic operation types can include atomic reads, atomic writes, and atomic swaps, which are important attributes for memory operations in modern processors.

[0095] The Extend Field in Table 1 is a reserved, customizable field used to carry protocol extensions or user-defined testing requirements. For example, it can contain data such as delay injection information, error injection flags, or dependency IDs between transactions. Based on the Extend Field, more complex timing and concurrency defects in the on-chip system can be tested.

[0096] Furthermore, users can insert specific function behaviors into extended fields without intrusively modifying the verification system to achieve more complex custom command inputs.

[0097] Based on this embodiment, test instructions that satisfy the instruction structure shown in Table 1 can be obtained. In other words, test instructions can include opcodes, source nodes, destination nodes, access addresses, attribute information, and target data. These test instructions can accurately carry the semantically rich test intent defined by the constraint model and scenario graph. Based on this embodiment, test instructions including the standardized fields in Table 1 can be obtained. The translator can perform deterministic parsing and conversion of the test instructions based on this embodiment. In the UVM environment, the test instruction sequence has been restored to precise bus signal activities. Obtaining the test instruction sequence based on this embodiment can demonstrate the decoupling and efficient mapping between the high-level abstraction of the verification intent and the reliable execution of the underlying signal stimuli.

[0098] This embodiment provides a model-driven method for generating SoC transaction semantic instructions and defines the format of test instructions. Test instructions are randomly generated under composite constraints consisting of static protocol rules, dynamic scene relationships, and coverage feedback. Compared to unconstrained random verification methods in related technologies, this embodiment ensures that the generated random stimuli are both exploratory and highly effective.

[0099] For example, when there are enough input constraints, these constraints can form an effective state space. Based on the fuzzing algorithm, test instructions are randomly generated within this effective state space, and all randomly generated test instructions are valid. For instance, a slave device node might have a fixed address space, a master device node might only issue specific request types, and the connection between the slave and master device nodes might support all transmissions of a specific bus protocol. Related random verification methods, due to a lack of constraints, result in a large number of invalid verifications. However, this embodiment uses a double constraint based on the test scenario and its corresponding constraints. The target constraints and the target test scenario are used as input to the fuzzing algorithm, which is equivalent to randomization under restrictions on address and behavior type, rather than completely unconstrained randomization. Therefore, based on this embodiment, accurate and efficient generation of test instruction sequences can be achieved, thereby enabling accurate and efficient testing of the on-chip system.

[0100] In some embodiments, the target scenario to be tested includes at least one target transaction. Furthermore, the method may also include the following steps: Step 203: Translate the test instruction sequence into a transaction sequence that meets the syntactic requirements of the general verification methodology.

[0101] For example, for each test instruction in the test instruction sequence, key information is extracted; for example, key information includes one or more of the following: opcode, source node, destination node, access address, data, and attribute information. Then, based on the key information in the test instructions and the execution order of the test instructions in the test instruction sequence, the test instruction sequence is translated into a transaction sequence that meets the syntax requirements of a general verification methodology. The transaction sequence and the test instruction sequence perform the same function; the transaction sequence is used to implement the target test scenario.

[0102] Step 204: Execute a sequence of transactions in a general verification methodology environment to test the on-chip system.

[0103] For example, a sequence of transactions is executed in a UVM environment to drive the verification IP of the on-chip system to apply stimuli and test the on-chip system.

[0104] In this embodiment, the test instruction sequence generated by the fuzzing algorithm is translated into a transaction sequence required by UVM syntax, and then executed in a general verification methodology environment to test the system-on-chip (SoC). This embodiment realizes the conversion of the test instruction sequence generated by the fuzzing algorithm into a UVM-executable transaction sequence. Therefore, users can perform SoC testing on the existing verification IP and UVM verification environment of the SoC, reducing technology migration costs.

[0105] Step 205: Obtain the coverage output by the general verification methodology environment, and the uncovered points corresponding to the coverage.

[0106] For example, coverage includes at least one of the following: row coverage, state machine coverage, inversion coverage, and functional coverage.

[0107] Line coverage includes the percentage of executed lines of code out of the total lines of code. Uncovered points corresponding to line coverage can include lines of code that were not executed. State machine coverage includes the percentage of executed states and transitions in the state machine out of the total states and transitions. Uncovered points corresponding to state machine coverage can include states that were not entered and / or transitions that were not executed; for example, it can include uncovered states and uncovered state transitions. Inversion coverage includes the percentage of inverted signals out of the total signals. Uncovered points corresponding to inversion coverage can include information that was not inverted, such as always being 0 without a signal changing from 0 to 1, or always being 1 without a signal changing from 1 to 0. Functional coverage includes the percentage of tested functions out of the total functions under test. Uncovered points corresponding to functional coverage can include functions that were not tested. For example, if the target scenario under test includes read and write transactions, and during testing only read transactions were executed, then write transactions would be the uncovered point corresponding to functional coverage.

[0108] Step 206: If the coverage rate is lower than the preset coverage rate, update the target constraints based on the uncovered points, and return to the step of generating a test instruction sequence based on the target test scenario and target constraints.

[0109] If the coverage rate is greater than or equal to the preset coverage rate, it means that the test meets the test requirements of the on-chip system and the test can be terminated.

[0110] If the coverage is lower than the preset coverage, the target constraints are updated based on the uncovered points, and the process returns to the step of generating a test instruction sequence based on the target test scenario and target constraints to generate a new test instruction sequence. The on-chip system is then tested based on the newly generated test instruction sequence. Steps 202 to 206 are executed repeatedly until the coverage is greater than or equal to the preset coverage. For example, the target constraints and the target test scenario are used as inputs to the fuzzing algorithm. During the process of obtaining the test instruction sequence output by the fuzzing algorithm, test instructions are generated according to the weights of each condition in the target constraints (e.g., target bus protocol, source node, destination node). The weights are related to the number of test instructions generated for the conditions corresponding to the weights (e.g., positively correlated). If the coverage is lower than the preset coverage, the weights corresponding to the uncovered points are increased, and the process of generating the test instruction sequence based on the target test scenario and target constraints is returned.

[0111] For example, the target test scenario includes testing the memory access function of the CPU (including CPU0 to CPU7) to DDRC (including DDRC0 to DDRC7). Uncovered points include the untested memory access function of CPU0 to DDRC0. In such cases, the weight of this untested function is increased so that when generating the test instruction sequence based on the target test scenario and constraints, test instructions for testing the memory access function of CPU0 to DDRC0 are generated. For instance, if the preset total number of test instructions generated for this target test scenario is 1000, before adjustment, there are 0 test instructions for testing the memory access function of CPU0 to DDRC0. Increasing its corresponding weight (e.g., adjusting it to 10%) will result in 100 test instructions for testing the memory access function of CPU0 to DDRC0 after adjustment.

[0112] For example, the steps involve using uncovered points as constraint guides, adding the constraint guides to the target constraints, and returning the steps to generate a sequence of test instructions based on the target test scenario and the target constraints.

[0113] In this embodiment, the coverage rate output by the general verification methodology and the corresponding uncovered points are obtained. If the coverage rate is lower than the preset coverage rate, the target constraints are updated based on the uncovered points, and the process returns to the step of generating a test instruction sequence based on the target test scenario and target constraints. This embodiment implements a cyclical operation of dynamically adjusting the test instruction sequence based on the coverage rate. In each loop, the target constraints are adjusted based on the coverage rate, and test instructions that cover the uncovered points are generated based on the adjusted target constraints. Thus, a test instruction sequence that meets the coverage requirements can be generated, and the on-chip system can be comprehensively tested based on the test instruction sequence that meets the coverage requirements. In addition, by directly applying the coverage rate fed back by UVM to the test instruction sequence generation process, an adaptive and goal-oriented on-chip system testing system is formed. This can effectively reduce the steps of manually analyzing the coverage rate to obtain uncovered points and writing test cases for the uncovered points, thereby accelerating the testing efficiency of the on-chip system.

[0114] This embodiment combines an innovative intelligent stimulus generation method with the UVM verification framework through an abstraction layer design of fuzz test instructions and a UVM translator. This protects existing code on the VIP and verification environment, reducing technology migration costs. This embodiment directly applies coverage feedback to the front-end stimulus generation, forming an adaptive, goal-oriented verification closed-loop system. This significantly reduces the time spent manually analyzing coverage and writing targeted test cases, accelerating the overall convergence of the verification project and achieving automated convergence closed-loop testing of the system-on-chip. This embodiment, combined with constraint sets, optimizes the fuzz instruction generation algorithm in related technologies, effectively improving the overall testing performance of the system-on-chip.

[0115] In related technologies, hardware verification can be performed using fuzz testing techniques. Specifically, silicon fuzz testing can be used in hardware verification. Its core concept is to adapt a mature software fuzzing framework (such as the ClusterFuzz testing framework) to the hardware environment to be tested. Then, through a large-scale distributed computing cluster, massive amounts of random test input are applied to the processor instruction set or interface protocol to generate and execute test instructions. This method emphasizes scalable computing power and automated anomaly detection.

[0116] Fuzzing techniques in related technologies are generalized and require computationally driven verification paths. Their implementation relies on robust infrastructure and automation capabilities. However, when faced with complex SoC verification systems and complex test scenarios, these methods suffer from insufficient accuracy and efficiency. This application proposes a specialized, intelligently driven testing path. Through innovative modeling methods and abstract interfaces, it achieves precise guidance of the SoC verification space, demonstrating significant improvements in the effectiveness, convergence speed, and integration with industry standards of on-chip system verification.

[0117] Furthermore, this application relates to the field of integrated circuit verification technology, specifically to a method for automated verification of bus interconnect architecture in complex on-chip systems. This embodiment combines fuzz testing algorithms and UVM to accurately, comprehensively, and quickly verify on-chip systems.

[0118] This application provides a structured framework that combines the stochastic exploration capabilities of fuzzing algorithms with the UVM verification method, and an efficient on-chip system verification scheme that integrates intelligent constraints for SoC topologies. By constructing multi-level constraint models and scenario dependency graphs, the stochasticity of fuzzing is precisely guided, thereby rapidly generating high-value and highly effective test stimuli in a vast state space. This enables higher defect detection rates, higher functional coverage, and faster convergence speeds during on-chip system testing.

[0119] This application provides a constraint-driven fuzz test instruction generation method and execution system. Instead of simply injecting random data into the bus, the system first abstractly models the static constraints (e.g., protocol parameters) and dynamic scenarios (e.g., inter-device interactions) of the SoC interconnect. Based on this model, the system can generate controlled, semantically rich fuzz test instructions, and then seamlessly transform these fuzzy test instructions into executable test sequences in the UVM environment, thereby achieving deep and intelligent exploration of the on-chip system bus behavior.

[0120] The following is based on Figure 1 Taking the computing subsystem of the system-on-chip shown as an example, the system-on-chip testing method of this application will be further illustrated by example.

[0121] like Figure 1 As shown, the CPU cluster includes 8 independent processor cores (CPU0 to CPU7), and a corresponding L2 cache for each processor core. The CPU cluster also includes a shared L3 cache, and the processor cores support the CHI coherence protocol.

[0122] Reference Figure 1 The system bus of a system-on-a-chip is quite complex. It includes both buses that follow cache coherence protocols and interconnect buses that do not support cache coherence protocols. In addition, the computing subsystem also includes complex input / output devices, and the system-on-a-chip can support multiple bus protocols.

[0123] Reference Figure 1 The system-on-a-chip (SoC) may include two PCIe slots (PCIe0 and PCIe1), with the PCIe slots supporting the ACE protocol. The SoC may also include a USB port, supporting the ACE protocol. The SoC may further include a System Control Core (Sys core), supporting the ACE protocol. The SoC may also include a Direct Memory Access Controller (DMAC), supporting the AXI4 protocol. The SoC may also include a Network Controller (GMAC), supporting the AXI4 protocol. The SoC may also include an integrated GPU, supporting the AXI4 protocol. The SoC may also include a Power Management Unit (PMU), a single-ended power management unit supporting the AXI4 protocol. The SoC may also include a memory subsystem, which may include multiple DDR5 controllers supporting multi-channel access and the CHI protocol. The SoC may also include peripheral devices, such as UART, GPIO, HDMI, and WDT slave devices, supporting protocols such as AXI, AHB, and APB.

[0124] The system-on-a-chip (SoC) may also include a cache-coherent interconnect network, which is based on a NoC (Network-on-Chip) interconnect architecture and supports multiple parallel transmissions. The SoC may also include a non-cache-coherent interconnect network, which can implement non-coherent interconnects based on the AXI protocol.

[0125] exist Figure 1 In the illustrated embodiment, the DUT (Device Under Test) is the remaining system-level bus interconnects after removing the actual master and slave devices. Of these interconnect devices, 95% are generated from commercial IP, but approximately 5% are non-commercial. For master devices (e.g., CPU, GPU, and PCIe), they can be verified individually. The method in this embodiment is applicable to verifying the on-chip system interconnects. For example, by removing the actual master and slave devices and retaining only the internal interconnect structure (e.g., bus bridges), the interconnect structure can be verified. Furthermore, while each interconnect IP of the on-chip system is independently verified by the manufacturer, the interconnection status and protocol configuration data between IPs have not been fully verified. The on-chip system has a complex interconnect structure and non-commercial IP class code added for specific devices; therefore, it is necessary to verify the on-chip system.

[0126] Reference Figure 6 The on-chip system testing method of this embodiment may include the following processing stages: Stage 1, modeling and initialization; Stage 2, intelligent generation of test instructions; Stage 3, UVM standard environment testing; Stage 4, feedback and iteration; Stage 5, report generation. The processing steps of each stage are illustrated below: Phase 1: Modeling and Initialization.

[0127] The method in this embodiment can be run on a computing device that includes a processor, memory, and a verification environment. This step involves modeling and initializing nodes.

[0128] In this step, a configurable verification model is established for the target SoC. By defining static bus protocol constraints, dynamic system topology dependency graphs, and verification scenarios, the state-exploding SoC verification space is narrowed down to a set of effective verification ranges.

[0129] For example, the process in Phase One may include the following steps: Step F11: Define the constraint set of the bus protocol, obtain the system topology of the on-chip system, and obtain the scenario configuration data of the scenario under test.

[0130] For example, various bus protocol types supported by the SoC and their configurable attributes can be defined in the form of a configuration file. For instance, bus protocols can be AXI4, AHB, APB, ACE, CHI, TileLink, etc. For example, configurable attributes of the AXI4 protocol include, but are not limited to: address width, data width, ID range, burst type, cache attributes, quality of service, atomic operations, etc.

[0131] The constraint set in this step constitutes the protocol-level basic rule base for generating test stimuli.

[0132] Step F12: Parse the scene configuration data and construct a 3D dependency graph.

[0133] For example, a configuration file is used to register three types of nodes in the SoC interconnect architecture: master nodes, slave nodes, and control nodes. Registering master nodes involves registering each master node and its supported bus protocol types and modes; master nodes can include CPU nodes, GPU nodes, and DMA nodes, etc. Registering slave nodes involves registering each slave node and its supported protocols; slave nodes can include DDR controllers, SRAM, and peripherals, etc. Registering control nodes involves registering configuration nodes and their protocols that can dynamically configure the bus or SoC global behavior to generate different system scenarios.

[0134] Based on the registration information above, a three-dimensional dependency graph can be constructed. For example, referring to... Figure 5 In the 3D graph, the X and Y axes represent the master and slave nodes, respectively, and the master and slave nodes constitute the basic access mapping plane. The Z axis in the 3D graph represents the configuration data of different test scenarios defined by the control node configuration. For example, the configuration data may include low power mode, cache coherency enable, specific address domain locking, etc.

[0135] In this embodiment, each test scene along the Z-axis in the 3D map dynamically changes the effective connection relationship, priority, or protocol behavior between master and slave devices on the XY plane of the 3D map. Based on the 3D map, the interactive space in that scene can be precisely defined.

[0136] By constructing a 3D dependency graph, a constraint set can be formed that is simple enough for use at the upper layer and for calling the UVM at the lower layer. In the 3D dependency graph, invalid nodes corresponding to the test scene along the Z-axis are removed, and test instructions are generated only based on the remaining valid nodes. Based on this embodiment, the generation of invalid test instructions can be reduced, thereby reducing redundant and meaningless tests.

[0137] Step F13: Define or select the verification scenario target.

[0138] For example, the target test scenario is determined from the test scenarios shown on the Z-axis of the 3D atlas, using methods specified by the user or the verification plan. For instance, the target test scenario could include CPU0 executing instruction fetching, maintaining cache coherence between CPU0 and CPU1, or the CPU transferring data to the GPU via DMA. The verification scenario target defined in this step serves as the target guide for subsequent stimulus generation.

[0139] Phase Two: Intelligent Generation of Test Instructions. This phase is used to generate SoC transaction semantic instructions.

[0140] This step belongs to the intelligent test instruction generation stage, used to transform the abstract model into concrete test instructions. For example, this node may include the following steps: Step F21: Based on the composite constraints, generate a constrained random fuzz test instruction sequence.

[0141] The composite constraints include the constraint model constructed in step F1, the scenario to be tested, and the uncovered point data fed back through coverage.

[0142] For example, the set of constraints of the bus protocol defined in step F11 above, the position of the currently active test scene in the three-dimensional dependency graph, and the target test scene defined in sub-step F13 above, together constitute a composite constraint condition.

[0143] During processing, the program reads the composite constraint file and then, under these constraints, uses the fuzzing algorithm in the fuzzing engine to randomly generate fuzz test instructions that meet the semantic and scenario requirements. These fuzz test instructions are also called fuzz commands. Each fuzz test instruction is a structured data object, specifically including: opcode, source node, destination node, address, data, attribute fields, and extended fields.

[0144] Furthermore, the fuzzing engine is a set of programs that form part of the on-chip system testing system. By inputting a constraint file into the fuzzing engine, a fixed set of programs within the engine, used to implement the fuzzing algorithm, can generate different fuzz instructions based on different constraints.

[0145] Based on this embodiment, the randomness in generating Fuzz instructions is strictly limited to the effective state space defined by the actual SoC configuration and the target test scenario. This avoids the situation where invalid instructions are randomly generated when there are no constraints, thus improving the effectiveness of the generated stimuli. The effective state space refers to the state space constituted by the aforementioned composite constraints.

[0146] Step F22 translates the Fuzz instructions into a UVM executable transaction sequence.

[0147] In this step, the Fuzz instruction sequence generated in step F21 is converted into a standard transaction object and transaction sequence that can be recognized by the corresponding bus VIP in the UVM verification environment through the instruction translator, so that UVM can call and execute it.

[0148] Phase 3 involves the integration and testing of UVM.

[0149] This step operates at the execution layer. Through instruction translation, short fuzz instructions can be translated into a UVM executable transaction sequence. This step allows the generated intelligent instructions to be injected into a standard UVM verification environment for testing.

[0150] For example, phase three may include the following steps: Step F31: Execute the transaction sequence in the UVM environment to drive the VIP to apply the stimulus.

[0151] Specifically, incentives will be applied to Figure 1 The DUT is used to monitor the DUT's response and obtain the DUT's output test results, coverage, and uncovered point data.

[0152] Running the translated sequence in the UVM environment can drive the corresponding master device (VIP) to generate bus activity. Furthermore, the response of the DUT (Design Under Test) can be monitored through the slave device (VIP) and the reference model. The reference model refers to a reference design, which can be written in languages ​​such as C, SystemVerilog, or Verilog. The DUT is a component of the system-on-a-chip, comprising the parts of the system-on-a-chip after removing the actual master and slave devices.

[0153] Step F32: Obtain the response of the DUT and compare the test results output by the DUT with the expected test results in the reference model.

[0154] Phase four involves feedback-driven iterative convergence. Phase four may include the following steps: Sub-step F41: Based on the comparison results, determine whether an error has been found. If so, proceed to step F51; otherwise, proceed to sub-step F42.

[0155] By comparing the DUT output with the expected results of the reference model, if any anomalies such as protocol violation, data error, or test timeout are found during the test, the error context can be recorded and an error report can be generated.

[0156] Step F42: Collect coverage; coverage may include functional coverage and code coverage.

[0157] For example, coverage data triggered during testing can be collected. This coverage could include code coverage, functional coverage, etc. For instance, functional coverage could include cross-coverage related to bus interactions and specific scenarios.

[0158] Step F43: Determine if the coverage rate meets the standard. If yes, proceed to step F52; otherwise, return to sub-step F21.

[0159] This step allows for enhanced feedback and testing instructions.

[0160] For example, the coverage report is analyzed to identify uncovered void nodes, which are the uncovered points corresponding to the coverage rate. These uncovered points are used as the coverage target, and the coverage target is used as a new additional constraint. The new additional constraint is added to the constraint set in step F2 to update the constraint set in step F2, or to increase the weight corresponding to the coverage target, and then fed back to the SoC transaction semantic fuzzy synthesizer in step F2.

[0161] For example, steps F2 to F4 are repeated until the coverage is greater than or equal to the preset coverage; that is, steps F2 to F4 are repeated until the predetermined coverage target is reached. During each iteration, the SoC transaction semantic fuzzy synthesizer dynamically adjusts the strategy for randomly generating test instructions based on the coverage, thereby generating targeted stimuli to fill coverage gaps and comprehensively test the on-chip system.

[0162] Phase five involves reviewing the test results and generating a review report. Phase five may include the following steps: Step F51: Log the error and report the error.

[0163] Step F52: Output the on-chip system verification report.

[0164] Once the coverage target is achieved, the final verification report is output, summarizing all test results and coverage data.

[0165] The following provides a further exemplary description of the on-chip system testing of this application. The method of this embodiment may include the following steps: Step S1: Define constraints and input constraints.

[0166] Step S11: Define protocol constraints. Protocols include CHI, ACE, AXI, APB, AHB, etc. For example, defined protocol constraints can be stored in YAML format. These constraints generally remain unchanged and are stored in the software database.

[0167] Step S12: Define the SoC topology, register all master and slave nodes, declare the system core node as a configuration node (cfg), and store it in YAML format.

[0168] In step S12, during the declaration process of each node, the protocol constraints are invoked, and parameters such as address bit width, data bit width, and caching capacity are input to override the parameters specific to the node.

[0169] In step S12, a two-dimensional SoC data flow topology is constructed based on the master device node and the slave device node. After the cfg node and scene configuration are determined, a three-dimensional map is generated based on the two-dimensional SoC data flow topology and the cfg node and scene configuration.

[0170] Step S13: Declare the scenario to be tested and store it in YAML format.

[0171] For example, in Figure 1 In the illustrated embodiment, the computing subsystem includes eight CPU cores, CPU0 to CPU7. Cache coherence testing is performed on these eight CPU cores. For example, dual PCIe read / write tests are conducted. Another example is a DMAC data migration test. Furthermore, this embodiment is also applicable to other test scenarios.

[0172] In one embodiment, the Fuzz constraint set constructed based on the method of this application is as follows: Figure 3 As shown in the embodiments, refer to Figure 3 The test scenarios can include scenario 0, scenario 1 to scenario n. For example, scenario 0 is a consistency protocol test for CPU0 to CPU7. The effective master nodes corresponding to scenario 0 include CPU0 to CPU7, and the effective slave nodes include DDRC0 to DDRC7. The configuration node is the system configuration module (sys cfg). The configuration node configures scenario 0. The configuration data includes the protocol type of the bus protocol for communication between target device nodes (e.g., ACE protocol), address width (e.g., 48), data width (e.g., 256 bits), support for cache consistency, and the software interface configured for scenario 0, etc.

[0173] The data related to each registered valid master node, valid slave node, and configuration node can be stored in YAML format; the data related to the target device node can include the target bus protocol, address width, data width, and cache capacity corresponding to the target device node. For example, in Figure 3In the illustrated embodiment, the configuration node's related file is syscfg.ymal; the related data for CPU0, CPU1 to CPU7 are CPU0.ymal, CPU1.ymal, and CPU7.ymal, respectively; and the related files for DDRC0, DDRC1 to DDRC7 are DDRC0 cfg.ymal, DDRC1 cfg.ymal, and DDRC7 cfg.ymal.

[0174] For example, scenario 1 is a dual PCIe read / write test. The effective master nodes corresponding to scenario 1 include PCIe0 and PCIe1, and the effective slave nodes include DDRC0. The configuration node is the system configuration module (sys cfg). The configuration node configures scenario 1. The configuration data includes the protocol type of the bus protocol for communication between the target device nodes (e.g., it can be the ACE protocol), the address width (e.g., it can be 48), the data width (e.g., it can be 256 bits), support for cache consistency, and the software interface configured in scenario 0, etc.

[0175] The data related to each registered valid master node, valid slave node, and configuration node can be stored in YAML format; the data related to the target device node can include the target bus protocol, address width, data width, and cache capacity corresponding to the target device node. For example, in Figure 3 In the illustrated embodiment, the configuration node's related file is syscfg.ymal; the related data for PCIE 0 and PCIE1 are PCIE 0.ymal and PCIE1.ymal, respectively; and the related files for DDRC0 are DDRC0 cfg.ymal and DDRC1 cfg.ymal.

[0176] This embodiment only describes the constraints corresponding to scenario 0 and scenario 1. The constraints corresponding to other scenarios (such as scenario n) will not be described in detail.

[0177] Step S2: Generate SoC transaction semantic instructions.

[0178] Step S21: Based on the test scenario in step S13 and the topology in step S12, a three-dimensional dependency graph is jointly generated, and combined with the specific protocol constraints of each node in step S11, a final constraint set with very high effectiveness is generated.

[0179] Step S211, input constraints.

[0180] In this step, constraints include protocol constraints, graph constraints, scenario constraints, and extended constraints. For example, constraints are applied based on the protocol type and data width of different nodes, constraining opcodes, data, and addresses, thus achieving protocol constraints. For example, constraints are applied based on the valid master and slave nodes in the specific test scenario, constraining source and destination nodes, thus achieving graph constraints. For example, valid graph nodes are determined based on the specific test scenario, constraining instruction attribute categories and instruction execution order, thus achieving scenario constraints. For example, based on the specific test scenario, users can additionally configure extended instruction structures to form custom constraints, thus achieving extended constraints.

[0181] Step S212, feedback constraints.

[0182] Based on the feedback results after the test, the weights generated by fuzz are dynamically adjusted to bring the coverage convergence.

[0183] Step S22: Translate the fuzz instructions into UVM executable sequences. The SoC system has various adjustable VIPs and function libraries. Through intelligent generation and calling methods, agents that connect to and call VIPs are registered in batches.

[0184] By generating standardized sequences, it is easy to connect with fuzz commands, and the command content is sent to the VIP via the sequence.

[0185] For example, in Figure 3 In the embodiment shown, the CPU interface protocol of scenario 0 is the CHI protocol, so CHIVIP is required for CPU format data transmission and reception.

[0186] Step S3: Perform UVM standard environmental testing.

[0187] Step S31: The VIP simulates the master device to send or receive data.

[0188] Step S32: Compare the behavior of the reference model with that of the DUT. If the comparison result is a test error, output the error log.

[0189] Step S4: Feedback-driven iterative convergence.

[0190] Step S41: Perform coverage collection.

[0191] For example, the coverage collected includes one or more of row coverage, state machine coverage, inversion coverage, and functional coverage, and may also include other coverages.

[0192] Step S42: Compare the collected coverage with the coverage threshold; if the comparison result meets the requirements, the simulation test ends; otherwise, a coverage vulnerability is found and the coverage vulnerability is fed back to the SoC transaction semantic fuzzy synthesizer.

[0193] Step S43: After the SoC transaction semantic fuzzy synthesizer makes a decision and generates a targeted instruction sequence, a new coverage is performed, and multiple regressions are performed until convergence meets the index, and then the test ends.

[0194] This embodiment provides a complete method, system, and core components for applying fuzzy testing intelligence to the verification of complex system-on-a-chip (SoC) buses. This mechanism effectively resolves the fundamental contradiction between state space explosion and low efficiency of random testing in SoC verification.

[0195] This embodiment connects the innovation incentive generation layer and the industry standard verification layer with a UVM instruction translator and its translation mechanism, achieving a seamless integration of intelligent fuzz testing and UVM verification methodology.

[0196] This embodiment provides a complete verification system including all the above components, and its implemented coverage-guided feedback closed-loop workflow. The system can automatically analyze coverage holes and dynamically adjust the stimulus generation strategy, thereby achieving adaptive and rapid convergence of the verification process.

[0197] This embodiment provides a complete SoC bus verification solution, from abstract modeling and intelligent stimulus generation to standard environment execution and feedback optimization. The system architecture diagram of this embodiment is as follows: Figure 7 As shown, refer to Figure 7 The system architecture includes a user configuration layer, an intelligent generator and translator, and an execution layer.

[0198] The user configuration layer includes the set of configured protocol constraints, system topology, and scenario configuration.

[0199] The intelligent generator and translator includes a constraint and scenario configuration parsing module, a SoC transaction semantic fuzzy synthesizer, and a UVM instruction translator.

[0200] For example, refer to Figure 7The execution layer includes a standard UVM verification environment, specifically comprising a DUT interconnected with the system-on-chip and a reference model. Master nodes may include a CPU, PCIe, and DMAC; the CPU may include verification IPs supporting the CHI protocol (CHI VIP) and AXI protocol (AXI VIP); the PCIe may include verification IPs supporting the ACE protocol (ACEVIP) and AXI protocol (AXI VIP); the DMAC may include verification IPs supporting the AXI protocol (AXI IP). Slave nodes may include DDRC and peripheral devices; the DDRC may include verification IPs supporting the CHI protocol (CHI VIP) and AXI protocol (AXI VIP); peripheral devices may include verification IPs supporting the APB protocol (APB VIP) and AXI protocol (AXI VIP). Furthermore, the constraint and scenario configuration parsing module is used to store and parse bus protocol constraint sets, system topology dependency graphs, and user-defined verification scenario targets; it also provides an interface that allows users to flexibly configure different SoCs and test scenarios without modifying the code.

[0201] The SoC transaction semantic fuzzy synthesizer, connected to the constraint and scene configuration parsing module, accepts composite constraints and generates random fuzz instruction sequences within the constraint range based on a fuzz testing algorithm. The SoC transaction semantic fuzzy synthesizer has a built-in strategy that can receive feedback on coverage and adjust the fuzz instruction sequence generation strategy accordingly.

[0202] The UVM instruction translator is connected to the SoC transaction semantic fuzz synthesizer to translate abstract fuzz instructions into UVM sequences and transactions required by a specific bus VIP.

[0203] The standard UVM test environment includes various bus VIPs that interface with UVM, a reference model, a scoreboard, and a coverage collector. The standard UVM test environment receives sequences from the translator, executes tests, and performs result comparisons and coverage collection.

[0204] The coverage feedback analyzer is used to monitor coverage data collected in the UVM test environment, analyze uncovered points, and convert them into guiding constraints or weight parameters that can be understood by the SoC transaction semantic fuzzy synthesizer to form a closed-loop feedback.

[0205] refer to Figure 8This document illustrates a system-on-chip (SoC) testing apparatus provided in an embodiment of this application. The SoC includes multiple interconnected device node devices 30, comprising: a first acquisition module 301, configured to acquire at least one preset test scenario and constraints corresponding to each test scenario; the constraints include: among the multiple device nodes, the device node associated with the test scenario and the bus protocol supported by the device node; a second acquisition module 302, configured to acquire target constraints corresponding to the target test scenario from at least one set of constraints; the target constraints include: the target device node associated with the target test scenario and the target bus protocol supported by the target device node; a generation module 303, configured to generate a test instruction sequence based on the target test scenario and the target constraints; the test instructions in the test instruction sequence satisfy the requirements of the target bus protocol; and a test module 304, configured to test the SoC based on the test instruction sequence.

[0206] Optionally, the target test scenario includes at least one target transaction; the generation module 303 is further configured to: take the target constraints and the target test scenario as input to the fuzzing algorithm, and obtain the test instruction sequence output by the fuzzing algorithm; wherein, the test instructions in the test instruction sequence correspond one-to-one with the target transaction, and the test instructions corresponding to the target transaction are used to implement the target transaction.

[0207] Optionally, the device nodes related to the scenario under test include at least one master device node and at least one slave device node; the target device nodes include at least one target master device node and at least one target slave device node; the generation module 303 is further configured to: obtain the source node corresponding to the target transaction from at least one target master device node using a fuzzing algorithm, and obtain the destination node corresponding to the target transaction from at least one target slave device node; generate test instructions corresponding to the target transaction based on the source node and destination node; and construct a test instruction sequence based on at least one test instruction.

[0208] Optionally, the target constraints also include: the target address range allocated to the target device node; the generation module 303 is further configured to: obtain the opcode corresponding to the target transaction through a fuzzy testing algorithm, obtain the access address of the target transaction within the address range of the destination node, obtain the final target bus protocol and the attribute information of the final target bus protocol from multiple target bus protocols supported by the source node and the destination node; and generate a test instruction corresponding to the target transaction based on the opcode, source node, destination node, access address, and attribute information.

[0209] Optionally, the target constraint also includes data, which includes write data or read data; the generation module 303 is also used to: obtain target data corresponding to the opcode of the target transaction from the data through a fuzzy testing algorithm; and generate test instructions corresponding to the target transaction based on the opcode, source node, destination node, access address, data, attribute information, and target data.

[0210] Optionally, the target test scenario includes at least one target transaction, and the test module 304 is used to: translate the test instruction sequence into a transaction sequence that meets the syntactic requirements of the general verification methodology; and execute the transaction sequence in the general verification methodology environment to test the on-chip system.

[0211] Optionally, the device 30 further includes: a third acquisition module, used to acquire the coverage output of the general verification methodology and the uncovered points corresponding to the coverage after testing the on-chip system by executing a transaction sequence in the general verification methodology framework; the coverage includes at least one of the following: row coverage, state machine coverage, inversion coverage and functional coverage; and a feedback processing module, used to update the target constraints according to the uncovered points if the coverage is lower than the preset coverage, and return the step of generating a test instruction sequence according to the target test scenario and the target constraints.

[0212] In summary, this embodiment automatically generates test instruction sequences within the constraints of the target constraints. Compared to the method of manually writing targeted test instructions in related technologies, this embodiment improves the efficiency of test instruction sequence generation and avoids the problem that manually written targeted test instructions cannot fully cover the testing situation of the on-chip system. Compared to the unconstrained random verification method in related technologies, this embodiment avoids the problem of generating a large number of repetitive or invalid test instructions due to the lack of constraints, thus improving the efficiency of test instruction sequence generation. Based on the test instruction sequence, the on-chip system can be tested quickly and comprehensively. In addition, when testing the target test scenario, the target constraints corresponding to the target test scenario can be quickly obtained based on the preset test scenario and the constraints corresponding to the test scenario, thereby further improving the efficiency of test instruction sequence generation and thus improving the testing efficiency of the on-chip system.

[0213] Reference Figure 9 The electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.

[0214] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0215] Memory 404 is used to store various types of data to support the operation of electronic device 400. Examples of such data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, multimedia, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0216] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.

[0217] Multimedia component 408 includes an interface that provides an output interface between electronic device 400 and a user. In some embodiments, the interface may include a liquid crystal display (LCD) and a touch panel (TP). If the interface includes a touch panel, the interface may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When electronic device 400 is in an operating mode, such as a shooting mode or a multimedia mode, the front-facing camera and / or rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0218] Audio component 410 is used to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) used to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0219] Input / output (I / O) interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0220] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0221] Communication component 416 facilitates wired or wireless communication between electronic device 400 and other devices. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, carrier networks (such as 2G, 3G, 4G, or 5G), or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0222] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to implement a system-on-a-chip testing method provided in the embodiments of this application.

[0223] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the above-described method. For example, the non-transitory storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0224] Figure 10 This is a block diagram of an electronic device 500 according to another embodiment of this application. For example, the electronic device 500 may be provided as a server. (See also...) Figure 10 The electronic device 500 includes a processing component 522, which further includes one or more processors, and memory resources represented by memory 532 for storing instructions, such as application programs, that can be executed by the processing component 522. The application programs stored in memory 532 may include one or more modules, each corresponding to a set of instructions. Furthermore, the processing component 522 is configured to execute instructions to perform a system-on-chip testing method provided in embodiments of this application.

[0225] Electronic device 500 may also include a power supply component 526 configured to perform power management of electronic device 500, a wired or wireless network interface 550 configured to connect electronic device 500 to a network, and an input / output (I / O) interface 558. Electronic device 500 may operate on an operating system stored in memory 532, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or similar.

[0226] This application also provides a computer program product, including a computer program, which, when executed by a processor, implements an on-chip system testing method.

[0227] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the application disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this application are indicated by the following claims.

[0228] It should be understood that this application is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this application is limited only by the appended claims.

[0229] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

[0230] The above provides a detailed description of the system-on-a-chip method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for testing an on-chip system, characterized in that, The system-on-a-chip includes multiple interconnected device nodes; the method includes: Select a target test scenario from the preset test scenarios, and obtain the constraint conditions corresponding to the target test scenario from the constraint conditions corresponding to each test scenario as the target constraint conditions; the constraint conditions corresponding to the test scenario include: the node identifier of the device node corresponding to the test scenario, and the bus protocol supported by the device node corresponding to the test scenario. Based on the target test scenario and the target constraints, a test instruction sequence is generated; the test instructions in the test instruction sequence are used to test the target device node in the target constraints, and the test instructions meet the requirements of the target bus protocol supported by the target device node. The on-chip system is tested according to the test instruction sequence; Wherein, the target test scenario includes at least one target transaction; the device nodes associated with the test scenario include at least one master device node and at least one slave device node; the target device node includes at least one target master device node and at least one target slave device node; according to the target test scenario and the target constraints, a test instruction sequence is generated, including: Using a fuzzing algorithm, a source node corresponding to the target transaction is obtained from at least one target master device node, and a destination node corresponding to the target transaction is obtained from at least one target slave device node. Based on the source node and the destination node, a test instruction corresponding to the target transaction is generated. Based on at least one of the test instructions, a test instruction sequence is constructed, and a test instruction sequence output by the fuzzing algorithm is obtained. The test instructions in the test instruction sequence correspond one-to-one with the target transaction, and the test instruction corresponding to the target transaction is used to implement the target transaction.

2. The method according to claim 1, characterized in that, The target constraint further includes: a target address range allocated to the target device node; the step of generating test instructions corresponding to the target transaction based on the source node and the destination node includes: The fuzzing algorithm is used to obtain the opcode corresponding to the target transaction, and the access address of the target transaction is obtained within the address range of the destination node. From the multiple target bus protocols supported by the source node and the destination node, the final target bus protocol and the attribute information of the final target bus protocol are obtained. Based on the opcode, the source node, the destination node, the access address, and the attribute information, a test instruction corresponding to the target transaction is generated.

3. The method according to claim 2, characterized in that, The target constraint also includes data, which includes write data or read data; the step of generating a test instruction corresponding to the target transaction based on the opcode, the source node, the destination node, the access address, and the attribute information includes: Using the fuzz testing algorithm, target data corresponding to the opcode of the target transaction is obtained from the data. Based on the opcode, the source node, the destination node, the access address, the data, the attribute information, and the target data, a test instruction corresponding to the target transaction is generated.

4. The method according to any one of claims 1 to 3, characterized in that, The target test scenario includes at least one target transaction, and the testing of the on-chip system according to the test instruction sequence includes: The test instruction sequence is translated into a transaction sequence that meets the syntactic requirements of a general verification methodology; The transaction sequence is executed in the general verification methodology environment to test the on-chip system.

5. The method according to claim 4, characterized in that, After executing the transaction sequence in the general verification methodology environment to test the on-chip system, the method further includes: Obtain the coverage rate output by the general verification methodology environment, and the uncovered points corresponding to the coverage rate; the coverage rate includes at least one of the following: row coverage rate, state machine coverage rate, inversion coverage rate, and functional coverage rate; If the coverage rate is lower than the preset coverage rate, the target constraint is updated based on the uncovered points, and the step of generating a test instruction sequence based on the target test scenario and the target constraint is returned.

6. A system-on-a-chip testing device, characterized in that, The device includes: The constraint acquisition module is used to select a target test scenario from the preset test scenarios, and to acquire the constraint conditions corresponding to the target test scenario from the constraint conditions corresponding to each test scenario as the target constraint conditions; the constraint conditions corresponding to the test scenario include: the node identifier of the device node corresponding to the test scenario, and the bus protocol supported by the device node corresponding to the test scenario. The instruction generation module is used to generate a test instruction sequence based on the target test scenario and the target constraints; the test instructions in the test instruction sequence are used to test the target device node in the target constraints, and the test instructions meet the requirements of the target bus protocol supported by the target device node. The testing module is used to test the on-chip system according to the test instruction sequence; The target test scenario includes at least one target transaction; the generation module is also used to: take the target constraints and the target test scenario as input to the fuzzing algorithm, and obtain the test instruction sequence output by the fuzzing algorithm; wherein, the test instructions in the test instruction sequence correspond one-to-one with the target transaction, and the test instructions corresponding to the target transaction are used to implement the target transaction; The device nodes related to the scenario under test include at least one master device node and at least one slave device node; the target device nodes include at least one target master device node and at least one target slave device node; the generation module is further configured to: obtain the source node corresponding to the target transaction from at least one target master device node using a fuzzing algorithm, and obtain the destination node corresponding to the target transaction from at least one target slave device node; generate test instructions corresponding to the target transaction based on the source node and destination node; and construct a test instruction sequence based on at least one test instruction.

7. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Verification platform of system-on-chip and verification method thereof

    CN113868987A

  • Method for verifying network-on-chip deadlock in system-on-chip and computing equipment

    CN119026535A