Self-adaptive dynamic adjustment error injection method, device and medium

Through the adaptive and dynamically adjusted error injection method, the rigid error injection problem in component testing is solved, the closed-loop feedback and efficient coverage convergence of component testing are achieved, and the fault tolerance of the design is improved.

CN120653480APending Publication Date: 2025-09-16JINAN MAIWEI INTELLIGENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510803974.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-16
Publication Date
2025-09-16

AI Technical Summary

Technical Problem

In existing technologies, the error injection strategy in component testing is rigid and cannot be adjusted dynamically, resulting in insufficient coverage of boundary scenarios and lack of feedback, making it difficult to quantify the impact of errors.

Method used

An adaptive and dynamically adjusted error injection method is provided. By injecting an error signal into the component under test, a feedback signal is obtained to generate a target structured feature vector. An adjustment strategy is determined according to the score to dynamically adjust the error signal.

Benefits of technology

It realizes closed-loop feedback of component testing, reduces invalid error injection, shortens coverage convergence time, and improves verification efficiency and design fault tolerance robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120653480A_ABST
    Figure CN120653480A_ABST
Patent Text Reader

Abstract

The invention provides a self-adaptive dynamic adjustment error injection method and device and a medium, and is applied to the technical field of design testing. Wherein an error signal is injected into the to-be-tested component; acquiring a feedback signal generated by error detection of the to-be-detected component according to the error signal; generating a corresponding target structured feature vector according to the feedback signal; determining a corresponding effective score according to the error signal and the target structured feature vector; and determining an error adjustment strategy corresponding to the effective score so as to adjust an error signal injected into the to-be-tested component according to the error adjustment strategy. Therefore, the input and output of error detection form a closed loop, the feedback signal of the component to be detected is monitored in real time, the injected error signal is dynamically adjusted, the subsequent injection strategy is optimized based on the feedback signal, and the coverage rate convergence time is shortened. In addition, the flexibility and expansibility of determining the effective score and the error adjustment strategy are high, and the design fault-tolerant robustness can be further verified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of design and testing technology, and in particular to an error injection method, device and medium for adaptive dynamic regulation. Background Art

[0002] At the end of component design, errors are injected into the component to verify the design's fault tolerance and error correction robustness. In existing testing, errors are preset before testing, and test cases are manually adjusted to construct error injection scenarios. This means static or semi-static modes are typically used, where fixed error types, injection locations, and trigger conditions are preset before testing. However, this testing approach presents the following problems: 1. Rigidity: Because fixed error types are preset before testing, it's impossible to dynamically adjust the error injection strategy based on the real-time response of the device under test (DUT), making it difficult to cover some edge cases. 2. Lack of feedback: The system behavior analysis after error injection does not form a closed loop, making it difficult to quantify the impact of the error.

[0003] It can be seen that how to dynamically adjust the error signal of the injection component is a problem that needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide an adaptive and dynamically adjusted error injection method, device, and medium, which can solve the problems of rigidity and lack of feedback caused by error testing of components under test in the prior art.

[0005] To solve the above technical problems, an embodiment of the present invention provides an adaptive and dynamically adjusted error injection method, comprising:

[0006] Injecting error signals into the component under test;

[0007] Obtaining a feedback signal generated by the component under test through error detection according to the error signal;

[0008] Generate a corresponding target structured feature vector according to the feedback signal;

[0009] Determine the corresponding effective score based on the error signal and the target structured feature vector;

[0010] An error adjustment strategy corresponding to the effective score is determined, so as to adjust the error signal injected into the component under test according to the error adjustment strategy.

[0011] In some embodiments, generating a corresponding target structured feature vector according to the feedback signal includes:

[0012] Constructing an initial structured feature vector and determining the meaning of each parameter representation in the initial structured feature vector;

[0013] The various signals in the feedback signal are matched with the parameters in the initial structured feature vector to construct the target structured feature vector.

[0014] In some embodiments, determining a corresponding effective score based on the error signal and the target structured feature vector includes:

[0015] Determine whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than the coverage rate threshold corresponding to the error signal, and determine the corresponding score based on the judgment result;

[0016] Determine whether the target structured feature vector representing the error of the initial error signal at any node is detected, and determine the corresponding score based on the judgment result;

[0017] The corresponding effective score is determined based on each score.

[0018] In some embodiments, determining whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than a coverage rate threshold corresponding to the error signal, and determining a corresponding score based on the determination result includes:

[0019] When the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than the coverage rate threshold corresponding to the error signal, the score is positive;

[0020] When the error coverage caused by the initial error signal represented by the target structured feature vector is equal to the coverage threshold corresponding to the error signal, the score is zero;

[0021] When the error coverage rate caused by the initial error signal represented by the target structured feature vector is less than the coverage rate threshold corresponding to the error signal, the score is negative;

[0022] Determine whether the target structured feature vector representing the initial error signal at any node is detected, and determine the corresponding score based on the judgment result, including:

[0023] When the target structured feature vector represents the initial error signal and the error at any node is detected, the score is positive;

[0024] When the target structured feature vector represents that the error of the initial error signal at any node is not detected, the score is negative.

[0025] In some embodiments, determining an error adjustment strategy corresponding to the effective score so as to adjust the error signal injected into the component under test according to the error adjustment strategy includes:

[0026] If the effective score is lower than the error adjustment threshold, the policy adjustment is triggered and the cause of the effective score is analyzed;

[0027] If the reason why the effective score is lower than the error adjustment threshold is the signal injection timing, then the injection timing of the error signal is adjusted;

[0028] If the reason why the effective score is lower than the error adjustment threshold is the signal type, then switch the type of error signal injected into the component under test;

[0029] If the reason why the effective score is lower than the error adjustment threshold is the signal injection position, the injection position of the error signal is adjusted.

[0030] In some embodiments, after adjusting the error signal injected into the component under test according to the error adjustment strategy, the method further includes:

[0031] Determine in real time whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than the target coverage rate threshold corresponding to the error signal;

[0032] If the error coverage is greater than the target coverage threshold, the component under test is controlled to terminate the current round of error detection;

[0033] and / or;

[0034] Real-time determination of whether the number of iterations of error detection for the error signal in the current round is greater than the preset termination number;

[0035] If the number of iterations is greater than the preset termination number, the component under test is controlled to terminate the current round of error detection.

[0036] In some embodiments, it further includes:

[0037] Determine whether each parameter in the target structured feature vector is within the corresponding state indicator threshold range;

[0038] If all parameters in the target structured feature vector are within the corresponding state indicator threshold range, it is judged that the current error detection is running normally;

[0039] If any parameter in the target structured feature vector is outside the corresponding state indicator threshold range, the current error detection operation is judged to be abnormal;

[0040] and / or;

[0041] Obtain the changes of each parameter in the target structured feature vector and determine whether the changed parameters are related to error correction;

[0042] If the changed parameter is related to error correction, it is determined that error correction has been performed during error detection of the component under test;

[0043] If the changed parameters are not related to error correction, then determine whether there is a cascade relationship between the changed parameters;

[0044] If there is a cascade relationship between the changed parameters, it is determined that an error cascade occurs during the error detection of the component under test.

[0045] In some embodiments, it further includes:

[0046] Setting corresponding callback trigger points in multiple nodes during the error detection process;

[0047] If an abnormal signal indicating an abnormal operation of the error detection is received, a callback is made to the corresponding node according to the cause corresponding to the abnormal signal.

[0048] In another aspect, the present invention further provides an electronic device, comprising:

[0049] memory for storing computer programs;

[0050] The processor is configured to execute a computer program to implement the steps of the above-mentioned adaptive dynamic adjustment error injection method.

[0051] On the other hand, the present invention further provides a computer-readable storage medium having a computer program stored thereon, and the computer program is used by a processor to execute the steps of the above-mentioned adaptive dynamic adjustment error injection method.

[0052] On the other hand, the present invention further provides a computer program product, comprising a computer program / instruction, which implements the steps of the above-mentioned adaptive dynamic adjustment error injection method when executed by a processor.

[0053] It can be seen from the above technical solution that the present invention provides an adaptive dynamic adjustment error injection method, including: injecting an error signal into the component under test; obtaining a feedback signal generated by the component under test performing error detection based on the error signal; generating a corresponding target structured feature vector based on the feedback signal; determining a corresponding effective score based on the error signal and the target structured feature vector; determining an error adjustment strategy corresponding to the effective score, so as to adjust the error signal injected into the component under test according to the error adjustment strategy. It can be seen that the present application forms a closed loop with the input and output of error detection, dynamically adjusts the injected error signal by real-time monitoring of the feedback signal of the component under test, and optimizes the subsequent injection strategy based on the feedback signal, thereby reducing invalid error injection and shortening the coverage convergence time. In addition, the present invention has high flexibility and scalability in determining the effective score and the error adjustment strategy, which can further verify the fault tolerance robustness of the design. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the embodiments of the present invention, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0055] Figure 1 A flowchart of an adaptive dynamic adjustment error injection method provided by an embodiment of the present invention;

[0056] Figure 2 A schematic diagram of a multi-level callback triggering architecture provided by an embodiment of the present invention;

[0057] Figure 3 A complete flow chart of an adaptive dynamic adjustment error injection method provided by an embodiment of the present invention;

[0058] Figure 4 A schematic structural diagram of an adaptive dynamic adjustment error injection device provided by an embodiment of the present invention;

[0059] Figure 5 A structural diagram of an electronic device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0060] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.

[0061] The terms "including" and "having," as used in the present description and accompanying drawings, and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.

[0062] In order to enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0063] Next, an adaptive dynamic adjustment error injection method, device, and medium provided by an embodiment of the present invention are described in detail.

[0064] Figure 1 A flowchart of an adaptive dynamic adjustment error injection method provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the following steps are included:

[0065] S10: Inject an error signal into the component under test.

[0066] S11: Acquire a feedback signal generated by the component under test performing error detection according to the error signal.

[0067] In a specific embodiment, the system architecture in which the adaptive dynamic adjustment error injection method provided by the present invention is specifically applied belongs to a multi-level callback trigger architecture, such as Figure 2 As shown, it includes a transaction layer, a signal layer, and a functional coverage layer, and the callback method is: UVM callback, which allows users to insert additional logic into the behavior of a class without modifying the existing code. The transaction layer mainly performs error injection such as modifying data packet fields; the signal layer mainly performs error injection such as forcing bus signals, forcibly pulling down the clock signal or inserting glitches; the functional coverage layer triggers error injection when the coverage point is missed, guiding the test to the uncovered scenario. In other words, the various error signals in the present invention are bound to the transaction layer, signal layer, and functional coverage layer, and different error signals are injected through different layers.

[0068] The device under test (DUT) performs error detection based on error signals. This error detection process may trigger a series of subsequent changes. For example, an error in one node in the current round may cause errors in all subsequent nodes, which in turn may cause errors in the next round; or an error may be corrected in a particular node. Therefore, corresponding feedback signals are required, including DUT behavior signals, coverage change signals, assertion failure rate signals, and log error code signals.

[0069] Coverage is a key indicator of verification completeness, indicating the degree to which the verification process covers the design functionality. Coverage change refers to the change in functional coverage before and after fault injection. If fault injection improves coverage, it indicates that this method may have guided testing into previously uncovered scenarios, helping to verify the integrity of the design. A decrease in coverage may indicate that the fault injection has impacted normal functional execution, preventing some scenarios that would otherwise be covered from occurring. Further analysis and adjustment of the fault injection strategy are necessary.

[0070] Assertions are a mechanism used during verification to check that a design behaves as expected. The assertion failure rate is the ratio of failed assertions to the total number of assertions performed during testing. A high assertion failure rate indicates that fault injection may have triggered vulnerabilities or anomalies in the design, and the design is having trouble handling these errors. A low assertion failure rate indicates that the design performs relatively well under the given fault injection scenario and can correctly handle most situations.

[0071] Log error codes are code identifiers used to record error information during system operation. When a system error occurs, relevant information is recorded in the log, and each error condition is assigned a specific error code. These error codes can help developers and verifiers quickly locate and understand the type and cause of the error. During the verification process after error injection, log error codes are one of the important data collected through real-time monitoring. These error codes can be used to determine whether the error injection caused errors in the design, as well as the severity and type of these errors. By analyzing log error codes, the impact of error injection on the design can be more accurately assessed, such as determining which part of the design has a problem. This provides a strong basis for adjusting the error injection strategy to better verify the design's behavior and fault tolerance under various error conditions.

[0072] S12: Generate a corresponding target structured feature vector according to the feedback signal.

[0073] In an embodiment, since the numerical value represented by the feedback signal is large and cumbersome, its analysis requires a lot of computing resources to be wasted. Therefore, the present invention performs preliminary feature extraction on the feedback signal, that is, converts the feedback signal into a target structured feature vector for representing the current state, thereby reducing the amount of calculation.

[0074] S13: Determine a corresponding effective score according to the error signal and the target structured feature vector.

[0075] S14: Determine an error adjustment strategy corresponding to the effective score, so as to adjust the error signal injected into the component under test according to the error adjustment strategy.

[0076] In this embodiment, since the target structured feature vector can represent the current operating status of the component under test's error detection, the current detection effect can be determined based on the operating status. In other words, the present invention uses an effective score to represent the current detection effect. For example, if the error increases coverage by ≥5%, the score is +1, indicating wider coverage; if the error is not detected by the component under test, the score is -2, indicating a design vulnerability.

[0077] After determining the current effective score, the input error signal can be further adjusted based on the test requirements to ensure that the component under test continuously performs error detection until the test criteria are met. As mentioned above, the process of error detection based on the error signal by the component under test may cause a series of subsequent changes. To avoid this, the present invention adjusts the injected error signal based on the effective score. For example, dynamically switching the error type (e.g., changing from a packet CRC error to a length limit exceedance);

[0078] Adjust the injection timing (e.g., delay the error trigger to the protocol handshake phase); migrate the injection location (from the transaction layer to the signal layer); and adjust the input probability (e.g., from 50% to 30% to avoid excessive interference).

[0079] The present invention provides three adjustment strategies, which can be automatically determined based on the effective scores and the corresponding models, or can be determined by an operator analyzing the effective scores.

[0080] In addition, after the component under test continuously performs error detection through various types of error signals, a termination operation needs to be set. The present invention provides two ways to terminate error detection. The first way is: to judge in real time whether the error coverage rate caused by the target structured feature vector representing the initial error signal is greater than the target coverage rate threshold corresponding to the error signal; if the error coverage rate is greater than the target coverage rate threshold, the component under test is controlled to terminate the current round of error detection; the second way is: to judge in real time whether the number of iterations of error detection for the error signal in the current round is greater than the preset termination number; if the number of iterations is greater than the preset termination number, the component under test is controlled to terminate the current round of error detection. In other words, repeat steps S10-S14 until the target coverage rate threshold or the preset termination number (which can be understood as the upper limit of the number of iterations) is reached.

[0081] In other words, when the actual error coverage reaches the pre-set target coverage threshold after continuous error injection, real-time monitoring, feedback analysis, and strategy adjustment, a termination condition is considered met. For example, before design verification begins, a target error coverage of 95% is determined based on the design's functional characteristics and verification requirements. During the error injection process, the effectiveness of each error injection is evaluated through real-time monitoring and feedback analysis, and the error injection strategy is dynamically adjusted. After multiple iterations, if the error coverage reaches 95%, the termination condition is met.

[0082] A maximum number of iterations (preset termination times) is set. During the entire fault injection verification process, starting with initializing the fault injection, each step of the fault injection process, monitoring, analysis, and strategy adjustment process constitutes one iteration. If the coverage target is still not achieved after the specified maximum number of iterations, the verification process will terminate. For example, if the maximum number of iterations is set to 100, the current verification operation will be terminated at the 100th iteration, regardless of whether the coverage target is met. These two termination conditions are independent of each other; the verification process will terminate as long as either condition is met.

[0083] It can be seen from the above technical solution that the present invention provides an adaptive dynamic adjustment error injection method, including: injecting an error signal into the component under test; obtaining a feedback signal generated by the component under test performing error detection based on the error signal; generating a corresponding target structured feature vector based on the feedback signal; determining a corresponding effective score based on the error signal and the target structured feature vector; determining an error adjustment strategy corresponding to the effective score, so as to adjust the error signal injected into the component under test according to the error adjustment strategy. It can be seen that the present application forms a closed loop with the input and output of error detection, dynamically adjusts the injected error signal by real-time monitoring of the feedback signal of the component under test, and optimizes the subsequent injection strategy based on the feedback signal, thereby reducing invalid error injection and shortening the coverage convergence time. In addition, the present invention has high flexibility and scalability in determining the effective score and the error adjustment strategy, which can further verify the fault tolerance robustness of the design. And the present invention adopts a fully automatic method, which can reduce labor costs and test cycles.

[0084] In some embodiments, the above-mentioned S12 step: generating a corresponding target structured feature vector according to the feedback signal is specifically implemented as follows: constructing an initial structured feature vector, and determining the meaning represented by each parameter in the initial structured feature vector; matching the meaning of each type of signal in the feedback signal with each parameter in the initial structured feature vector to construct the target structured feature vector.

[0085] In other words, the present invention constructs an initial structured feature vector, in which each parameter has a fixed meaning. By inserting various signals from the feedback signal into corresponding positions in the initial structured feature vector, a target structured feature vector is constructed. For example, recovery time, number of retransmissions, coverage increment, and assertion trigger frequency form an initial structured feature vector, and relevant information from the feedback signal is inserted into corresponding positions in the feature vector.

[0086] In addition, the adaptive dynamic adjustment error injection method also includes state indicator analysis and cascade analysis of the target structured feature vector.

[0087] The steps of the status indicator analysis are as follows: determine whether each parameter in the target structured feature vector is within the corresponding status indicator threshold range; if each parameter in the target structured feature vector is within the corresponding status indicator threshold range, then the current error detection operation is judged to be normal; if any parameter in the target structured feature vector is outside the corresponding status indicator threshold range, then the current error detection operation is judged to be abnormal.

[0088] The steps of the cascade analysis are: obtain the changes of each parameter in the target structured feature vector, and determine whether the changed parameters are related to error correction; if the changed parameters are related to error correction, then determine that error correction was performed during the error detection of the component under test; if the changed parameters are not related to error correction, then determine whether there is a cascade relationship between the changed parameters; if there is a cascade relationship between the changed parameters, then determine that error cascade was performed during the error detection of the component under test.

[0089] That is, after an error signal is injected into the component under test, the component under test possesses certain detection mechanisms to detect these errors. For example, during data transmission, if a data tampering error is injected, the component under test may detect data inconsistencies through methods such as CRC checks. If the component under test can identify this error, it has successfully detected the error. After detecting the error, the component under test may also possess corresponding error correction capabilities. For example, when an error is detected in data transmission, the component under test can correct the error by retransmitting the correct data or using error-correcting codes to repair the data, thereby restoring the system to normal. If the component under test successfully takes measures to eliminate or mitigate the impact of the error, it has corrected the error. After an error occurs in the component under test, it may not be limited to the component that directly caused the error but may also trigger a series of other faults, a situation known as a cascading failure. For example, a data error in a module may cause other modules that rely on its output to receive erroneous data, causing these modules to behave abnormally, and so on, triggering a series of failures like a domino effect. Therefore, the present invention uses the correlation between changing parameters to determine whether a cascading failure has occurred.

[0090] Based on the above steps, we can further generate a behavioral snapshot corresponding to the error detection of the component under test. That is, a comprehensive record of the behavior of the component under test at a specific moment, covering status indicators such as the current simulation cycle and transaction processing throughput, as well as error impact indicators such as whether the error is detected / corrected and whether cascading failures are caused. This is used to reflect the operating status of the component under test and provide data support for analysis.

[0091] Furthermore, corresponding callback trigger points can be set at multiple nodes in the error detection process. When an exception signal is received, indicating an abnormal error detection operation, a callback is sent to the corresponding node based on the cause of the exception signal. The corresponding callback trigger conditions can be probability or timing. Adjusting the callback trigger conditions refers to dynamically changing the timing, frequency, or other relevant conditions of the UVM callback function based on the error adjustment strategy generated by the feedback analysis results.

[0092] Regarding timing adjustments, error injection was originally performed at the "pre_send" callback trigger point at the transaction layer. If feedback analysis reveals that the current strategy is ineffective, such as when changes in coverage or assertion failure rates indicate a need for adjustment, the callback trigger point may be dynamically adjusted to the "post_recv" phase. This shifts the timing of error injection, allowing it to occur after transaction reception. This allows for observation of the system's error handling at different stages, hoping to achieve more effective verification results.

[0093] For frequency adjustment, you can change trigger frequency conditions such as the probability of error injection. For example, if you initially set a 50% probability of error injection at the "pre_send" trigger point, and feedback analysis reveals that excessive error injection leads to abnormal system behavior or insignificant coverage improvement, you can reduce the injection probability from 50% to 30%. This approach maintains a certain level of error injection pressure to verify the system's fault tolerance while avoiding excessive interference with normal system operation. This allows for more precise control of the error injection frequency and optimizes the verification process.

[0094] It should be noted that injecting an error signal at the callback point requires recording context information (such as transaction ID, injection timestamp, etc.).

[0095] It should be noted that the embodiment provided by the present invention is only one possible implementation method, but is not limited to this implementation method and can be set according to user needs.

[0096] The present invention provides steps for generating corresponding target structured feature vectors and steps for state indicator analysis and cascade analysis, which can reduce the amount of calculation of subsequent signal data and improve the test cycle; at the same time, the state of the component to be tested during the error detection process can be determined in real time.

[0097] In some embodiments, the above-mentioned S13 step: determining the corresponding effective score based on the error signal and the target structured feature vector is specifically implemented as follows: judging whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than the coverage rate threshold corresponding to the error signal, and determining the corresponding score based on the judgment result; judging whether the error of the initial error signal represented by the target structured feature vector at any node is detected, and determining the corresponding score based on the judgment result; determining the corresponding effective score based on each score.

[0098] That is to say, the present invention judges it from two perspectives: one is the error coverage, and the other is whether the error is detected.

[0099] From the perspective of error coverage, since this use case is an error-injected use case, the increase in coverage is due to the injection of error signals. During the error detection process, error coverage is continuously collected synchronously, and the maximum error coverage is 100%. At the beginning of error detection, all situations that should be covered are written. When one is covered, the error coverage increases a little. When all are covered, the error coverage is 100%. The final coverage can be viewed in the report or the corresponding software program. In other words, the greater the error coverage, the better the error detection effect. Therefore, the current judgment rule is: when the error coverage caused by the initial error signal represented by the target structured feature vector is greater than the coverage threshold corresponding to the error signal, the score is positive (for example: +1 point); when the error coverage caused by the initial error signal represented by the target structured feature vector is equal to the coverage threshold corresponding to the error signal, the score is zero (for example: +0 point); when the error coverage caused by the initial error signal represented by the target structured feature vector is less than the coverage threshold corresponding to the error signal, the score is negative (for example: -1 point).

[0100] From the perspective of whether the error is detected, since the error signal is injected manually or automatically, the error in the error signal is clear. Therefore, when the final feedback result reflects that any error is not detected, it means that the detection effect is not good. Therefore, the current judgment rule is: when the target structured feature vector represents that the error of the initial error signal at any node is detected, the score is positive (for example: +2 points); when the target structured feature vector represents that the error of the initial error signal at any node is not detected, the score is negative (for example: -2 points).

[0101] It should be noted that the present invention determines the error detection effect from two perspectives, but is not limited to only two perspectives, and can be set according to user needs.

[0102] The present invention provides a method for determining the error detection effect of a component under test from two angles. The effect is expressed in a numerical value, which can clearly show the detection effect of the component under test at any angle.

[0103] In some embodiments, the above-mentioned S14 step: determining the error adjustment strategy corresponding to the effective score so as to adjust the error signal injected into the component under test according to the error adjustment strategy is specifically implemented as follows: if the effective score is lower than the error adjustment threshold, the strategy adjustment is triggered, and the cause of the effective score is analyzed; if the reason why the effective score is lower than the error adjustment threshold is the signal injection timing, the injection timing of the error signal is adjusted; if the reason why the effective score is lower than the error adjustment threshold is the signal type, the type of error signal injected into the component under test is switched; if the reason why the effective score is lower than the error adjustment threshold is the signal injection position, the injection position of the error signal is adjusted.

[0104] In the embodiments, the present invention also performs a standard test during the error signal adjustment process. Specifically, if the effective score is not less than the error adjustment threshold, the current error injection strategy is considered effective. At this point, the current strategy should be maintained and error injection operations should continue according to this strategy to further verify the design's performance under this effective strategy, ensure that the component under test can stably pass verification under this strategy, and verify the design's fault tolerance and error correction robustness under the current strategy. For example, queue full errors can be injected to verify stability. Or, in other similar error injection scenarios, the current error type, injection timing, and location parameters can be maintained, and the component under test's response and various metrics (such as coverage changes and assertion failure rates) can be continuously observed until the coverage target is achieved or the maximum number of iterations is reached. If the effective score is less than the error adjustment threshold, the current error injection strategy is considered partially effective, triggering a strategy adjustment. The specific strategy adjustment rule is to determine the reason why the effective score is less than the error adjustment threshold and adjust the injected error signal accordingly.

[0105] Alternatively, comprehensively evaluate the potential impact of each strategy. For example, for the three strategies of dynamically switching error types, adjusting injection timing, and migrating injection locations, consider each strategy's potential impact on improving coverage, discovering design vulnerabilities, and verifying design fault tolerance. If current coverage is low and certain functional points are not fully covered, switching error types may be a priority, as different error types may trigger different design behaviors, potentially covering more uncovered functional scenarios.

[0106] Alternatively, you can use real-time monitoring data to make a judgment. For example, if you find that the assertion failure rate is high after the current error injection, and it is mainly caused by operations under a specific timing, then adjusting the injection timing may be a more appropriate strategy. If you find that the behavior of certain signal layers is not fully verified under the current error injection, migrating the injection location to the signal layer callback may help more comprehensively verify the design's fault tolerance at the signal level.

[0107] Alternatively, consider the cost and risk of adjusting the strategy. For example, switching error types may require re-preparing the corresponding error model and test data, resulting in relatively high adjustment costs. Adjusting the injection timing, on the other hand, may be relatively simple and pose less risk. If resources are limited and time is tight, you might prioritize strategies with lower adjustment costs and risks. For example, you might first try adjusting the injection probability, a relatively simple operation, and then make further decisions after observing the results.

[0108] The steps of comprehensively evaluating the potential impact of each strategy, combining real-time monitoring data, and considering the costs and risks of strategy adjustments can be analyzed manually or through model learning, and then tell the system to adjust the strategy.

[0109] Of course, after the above steps are completed, a verification report for error detection of the component under test can be output.

[0110] In summary, the complete flow chart of its adaptive dynamic adjustment error injection method is as follows Figure 3 As shown, the process includes the following:

[0111] S20: Initialize the error injection strategy library and define the callback trigger point.

[0112] S21: Start the test, inject an error signal at the callback point and record the context information.

[0113] S22: Monitor the feedback signal of the component under test in real time.

[0114] S23: Feedback analysis to calculate effective scores.

[0115] S24: Determine whether the effective score meets the standard.

[0116] S25: If the target is met, continue with the current strategy.

[0117] S26: If the target is not met, adjust the strategy.

[0118] S27: Determine whether the termination condition is met.

[0119] S28: If yes, output a verification report.

[0120] S29: If not, continue with the next round of injection.

[0121] Among them, steps S20-211 are preparatory work before testing, and steps S22-S29 are a summary of the above embodiments, so the present invention will not be described in detail here.

[0122] It can be seen that the beneficial effects of the adaptive dynamic adjustment error injection method provided by the present invention are as follows:

[0123] 1. Improved verification efficiency: Reduce invalid error injection through closed-loop feedback and shorten coverage convergence time.

[0124] 2. High degree of automation: reduces manual intervention and is suitable for complex full-chip verification.

[0125] 3. Highly flexible and scalable: Error type libraries and scoring rules support dynamic loading, and users can extend them through configuration files.

[0126] 4. Multi-level error coverage: Synchronously inject errors at the transaction, signal, and function coverage levels to avoid single-level verification blind spots.

[0127] The present invention takes the NVMe (Non-Volatile Memory Express, a flash storage protocol) command queue full error scenario as an example, and its implementation steps are as follows:

[0128] 1. Initial Fault Injection Strategy

[0129] Error type: A queue depth limit exceedance error (simulating a full queue) is injected during the SQ submission phase (transaction layer callback pre_sq_submit).

[0130] Expected behavior: The DUT should return a "Queue Full" status code (StatusCode = 0x18). The DUT should block subsequent command submissions until the queue is empty.

[0131] 2. Real-time monitoring

[0132] Monitoring indicators: DUT feedback response: Check whether the status code in the Completion Entry is 0x18.

[0133] Queue behavior: Assertion monitors whether the queue pointer is out of bounds or subsequent commands are rejected.

[0134] Functional coverage: Check whether the coverage group's "queue full processing path" is hit (monitor the SQ full signal inside the DUT to ensure that the SQ full scenario is truly covered. For SQ, the host places commands into the SQ while the DUT may receive commands synchronously. It is possible that the commands injected into the SQ are greater than the queue depth, but the SQ is not full).

[0135] 3. Feedback analysis:

[0136] Scenario 1: The coverage group "Queue Full Processing Path" is hit, and the DUT correctly handles the queue full. Status code = 0x18 is observed, and subsequent commands are blocked.

[0137] Effective score: +1 (successfully triggered the target path).

[0138] Dynamic adjustment: 1) Maintain the current policy and continue to inject queue full errors to verify stability.

[0139] 2) After the above actions are stable, switch the error injection location: inject errors during the CQ (Completion Queue) update phase

[0140] Scenario 2: Cover group "Queue Full Processing Path" is not hit

[0141] Effective score: +0 (the environmental incentive did not trigger the queue to be full, and the purpose of injection error was not achieved)

[0142] Dynamic adjustment: 1) Increase stress test intensity and speed up the input frequency of the SQ input port

[0143] 2) Adjust the excitation to effectively reduce the output speed of the SQ output port

[0144] Scenario 3: The coverage group "Queue Full Processing Path" is not hit, but the DUT does not correctly handle the queue full condition and does not return status code 0x18, or the queue pointer is out of bounds, resulting in data overwrite.

[0145] Effective score: -2 (design flaw detected).

[0146] Dynamic adjustment: 1) Immediately terminate the current error-type test, mark it as failed, and generate an error report.

[0147] 2) Modify the error type and proceed to the next error type.

[0148] On the other hand, the present invention also provides an adaptive dynamic adjustment error injection device, such as Figure 4 Shown, including:

[0149] An error injection module 11 injects an error signal into the component under test;

[0150] A real-time monitoring module 12 is configured to obtain a feedback signal generated by the component under test during error detection based on the error signal, and generate a corresponding target structured feature vector based on the feedback signal;

[0151] A feedback analysis module 13 is used to determine a corresponding effective score based on the error signal and the target structured feature vector;

[0152] The dynamic control module 14 is configured to determine an error adjustment strategy corresponding to the effective score, so as to adjust the error signal injected into the component under test according to the error adjustment strategy.

[0153] Since the embodiments of the adaptive dynamic adjustment error injection device provided by the present invention correspond to the embodiments of the adaptive dynamic adjustment error injection method described above, the present invention will not be described in detail here.

[0154] Figure 5 A structural diagram of an electronic device provided by an embodiment of the present invention, such as Figure 5 As shown, the electronic device includes: a memory 60 for storing computer programs;

[0155] The processor 61 is configured to implement the steps of the adaptive dynamic adjustment error injection method according to the above embodiment when executing a computer program.

[0156] The electronic device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0157] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing content required to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor for handling computational operations related to machine learning.

[0158] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, it can implement the relevant steps of the adaptive dynamic adjustment error injection method disclosed in any of the aforementioned embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc.

[0159] In some embodiments, the electronic device may further include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0160] Those skilled in the art will understand that Figure 5 The structure shown in the figure does not constitute a limitation of the electronic device, and may include more or fewer components than shown in the figure.

[0161] It is understandable that if the adaptive dynamic adjustment error injection method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the current technology, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the various embodiments of the present invention. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, a magnetic disk, or an optical disk, etc. Various media that can store program code.

[0162] Based on this, the present invention also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned adaptive dynamic adjustment error injection method when executed by a processor.

[0163] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned adaptive dynamic adjustment error injection method are implemented.

[0164] The above describes in detail the adaptive, dynamically adjusted error injection method, device, and medium provided by the embodiments of the present invention. The various embodiments are described in a progressive manner throughout this specification, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between the various embodiments can be referenced to each other. The device disclosed in the embodiments corresponds to the method disclosed in the embodiments, so the description is relatively brief. For relevant details, refer to the method description.

[0165] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present invention.

[0166] The above is a detailed introduction to the adaptive dynamic adjustment error injection method, device and medium provided by the present invention. This article uses specific examples to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. An adaptive dynamic adjustment error injection method, characterized in that: include: Injecting error signals into the component under test; Acquire a feedback signal generated by the component under test through error detection according to the error signal; generating a corresponding target structured feature vector according to the feedback signal; determining a corresponding effective score according to the error signal and the target structured feature vector; An error adjustment strategy corresponding to the effective score is determined, so as to adjust the error signal injected into the component under test according to the error adjustment strategy.

2. The adaptive dynamic adjustment error injection method according to claim 1, characterized in that: Generating a corresponding target structured feature vector according to the feedback signal includes: Constructing an initial structured feature vector and determining the meaning of each parameter representation in the initial structured feature vector; The various signals in the feedback signal are matched with the parameters in the initial structured feature vector to construct the target structured feature vector.

3. The adaptive dynamic adjustment error injection method according to claim 1, characterized in that: The determining a corresponding effective score according to the error signal and the target structured feature vector includes: Determine whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than a coverage rate threshold corresponding to the error signal, and determine a corresponding score according to the determination result; Determining whether an error at any node of the initial error signal represented by the target structured feature vector is detected, and determining a corresponding score according to the determination result; The corresponding effective score is determined according to each of the scores.

4. The adaptive dynamic adjustment error injection method according to claim 3, characterized in that: The determining whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than a coverage rate threshold corresponding to the error signal, and determining a corresponding score according to the determination result, includes: When the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than the coverage rate threshold corresponding to the error signal, the score is a positive value; When the error coverage rate caused by the initial error signal represented by the target structured feature vector is equal to the coverage rate threshold corresponding to the error signal, the score is zero; When the error coverage rate caused by the initial error signal represented by the target structured feature vector is less than the coverage rate threshold corresponding to the error signal, the score is a negative value; The determining whether the target structured feature vector represents whether an error in any node of the initial error signal is detected, and determining a corresponding score according to the determination result, includes: When the target structured feature vector represents that errors in any node of the initial error signal are detected, the score is a positive value; When the target structured feature vector represents that an error in any node of the initial error signal is not detected, the score is a negative value.

5. The adaptive dynamic adjustment error injection method according to claim 1, characterized in that: The determining the error adjustment strategy corresponding to the effective score, so as to adjust the error signal injected into the component under test according to the error adjustment strategy, includes: If the effective score is lower than the error adjustment threshold, a policy adjustment is triggered, and a cause analysis is performed on the effective score; If the reason why the effective score is lower than the error adjustment threshold is the signal injection timing, adjusting the injection timing of the error signal; If the reason why the effective score is lower than the error adjustment threshold is the signal type, switching the type of the error signal injected into the component under test; If the reason why the effective score is lower than the error adjustment threshold is the signal injection position, the injection position of the error signal is adjusted.

6. The adaptive dynamic adjustment error injection method according to claim 1, characterized in that: After adjusting the error signal injected into the component under test according to the error adjustment strategy, the method further includes: Determine in real time whether the error coverage rate caused by the initial error signal represented by the target structured feature vector is greater than a target coverage rate threshold corresponding to the error signal; If the error coverage is greater than the target coverage threshold, controlling the component under test to terminate the current round of error detection; and / or; Determine in real time whether the number of iterations of error detection for the error signal in the current round is greater than a preset termination number; If the number of iterations is greater than the preset termination number, the component under test is controlled to terminate the current round of error detection.

7. The adaptive dynamic adjustment error injection method according to any one of claims 1 to 6, characterized in that: Also includes: Determining whether each parameter in the target structured feature vector is within a corresponding state indicator threshold range; If all parameters in the target structured feature vector are within the corresponding state indicator threshold range, it is determined that the current error detection is running normally; If any parameter in the target structured feature vector is outside the corresponding state indicator threshold range, then it is determined that the current error detection operation is abnormal; and / or; Obtaining changes in parameters in the target structured feature vector, and determining whether the changed parameters are related to error correction; If the changed parameter is related to the error correction, it is determined that error correction is performed during the error detection of the component under test; If the changed parameters are not related to the error correction, determining whether there is a cascade relationship between the changed parameters; If the cascade relationship exists between the changed parameters, it is determined that an error cascade occurs during the error detection of the component under test.

8. The adaptive dynamic adjustment error injection method according to claim 7, characterized in that: Also includes: Setting corresponding callback trigger points in multiple nodes performing the error detection process; If an abnormal signal indicating that the error detection operation is abnormal is received, a callback is sent to the corresponding node according to the cause corresponding to the abnormal signal.

9. An electronic device, characterized in that: include: memory for storing computer programs; A processor is configured to execute the computer program to implement the steps of the adaptive dynamic adjustment error injection method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the error injection method for adaptive dynamic adjustment according to any one of claims 1 to 8.