Random asynchronous input verification method, electronic equipment and storage medium

By using the verification method of random asynchronous input in chip design, an independent infinite loop process is created and a random generator injects asynchronous event excitation signal is used to solve the problems of insufficient scenario coverage and false errors in the existing technology, and an efficient and reliable verification process is achieved.

CN120387407AActive Publication Date: 2025-07-29METAX INTEGRATED CIRCUITS (SHANGHAI) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510876935.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2025-07-29
Estimated Expiration
2045-06-27

AI Technical Summary

Technical Problem

Existing chip design verification methods cannot effectively cover all possible scenarios of asynchronous events, resulting in insufficient scenario coverage and prone to false errors, and the inability to distinguish between real errors and false exceptions.

Method used

The verification method of random asynchronous input is adopted. By obtaining asynchronous event test cases and creating an independent infinite loop process for each event, a random generator is used to generate a random time injection of asynchronous event excitation signal, enabling and closing the asynchronous input before and after the simulation stage to avoid abnormal false errors.

Benefits of technology

Full coverage verification of asynchronous events is achieved, the credibility and efficiency of verification is improved, false errors are avoided, and the discovery of design defects is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387407A_ABST
    Figure CN120387407A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of chip design, in particular to a random asynchronous input verification method, electronic equipment and a storage medium, and the method comprises the steps: obtaining an asynchronous event test case configured for a verification platform; after the to-be-verified design is initialized, enabling asynchronous input; creating an independent thread for an infinite loop process of each asynchronous event in a simulation stage of the to-be-verified design; the infinite loop process of each asynchronous event continuously and randomly injects a bound asynchronous event excitation signal into the to-be-verified design according to the random time, and the to-be-verified design responds to the asynchronous event excitation signal according to preset logic; when the simulation stage of the to-be-tested design is completed, asynchronous input is closed; checking a verification environment of the to-be-verified design; asynchronous events are randomly injected, and various scenes are fully verified; and by enabling and closing asynchronous input before and after the simulation stage, various abnormal false errors caused by injection in the whole simulation time are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of chip design, and particularly to a verification method for random asynchronous input, an electronic device, and a storage medium. Background Art

[0002] In chip design, as the core processing unit, the control module undertakes the key functions of multi-source signal integration and real-time response. Its typical feature is that it needs to process control information inputs from different interfaces with different timing requirements, and the processing mechanism of asynchronous events has become the key technical bottleneck affecting system reliability. When traditional verification methods deal with asynchronous event simulation, they generally adopt an injection mode based on fixed test cases (cases), and this method exposes significant technical defects in actual engineering applications.

[0003] First of all, in the current mainstream verification system architecture, testers need to manually insert the triggering conditions of asynchronous events in test cases. Due to the unpredictable and randomly occurring characteristics of asynchronous events, in order to ensure verification coverage, engineers have to repeatedly write multiple triggering conditions for the same event at different time nodes. This repetitive operation not only increases the redundancy of verification scripts, but more seriously, it is impossible to exhaust all possible timing combinations, resulting in insufficient scenario coverage.

[0004] Secondly, the existing technology cannot achieve intelligent event injection throughout the entire simulation cycle. If testers inject asynchronous events concentratedly at the simulation startup stage, it will cause abnormal initial states. This false error reporting not only greatly increases the debugging cost, but also masks the actually existing design defects, resulting in a decrease in the credibility of verification results.

[0005] In summary, the fixed writing method of test cases cannot adapt to the randomly occurring characteristics of asynchronous events in the real operating environment, resulting in that the verification process can neither ensure the completeness of scenario coverage nor effectively distinguish real errors from false exceptions. Therefore, there is an urgent need for a verification method that can solve the double dilemmas of insufficient coverage and false error reporting. Summary of the Invention

[0006] In view of the above technical problems, the technical solution adopted by the present invention is: a verification method for random asynchronous input, the method comprising the following steps: obtaining an asynchronous event test case asy configured for the verification platform, where asy = {asy1, asy2, …, asy i , …, asy N}, asy i is an infinite loop process of the i-th asynchronous event, and the value range of i is from 1 to N; where asy i includes a random generator rad for generating random time i, and an asynchronous event excitation signal stim that is dynamically generated and triggered based on the random time i . After initializing the design under test, enable asynchronous input. During the simulation phase of the design under test, create independent threads for the infinite loop processes of each asynchronous event; each infinite loop process of an asynchronous event continuously injects the bound asynchronous event excitation signal into the design under test according to the random time, and the design under test responds to the asynchronous event excitation signal according to the preset logic; where, asy i The step of randomly injecting the bound asynchronous event excitation signal includes: rad i Randomly generate a random time t in each loop process i ; when reaching t i , apply stim i to the design under test. When the simulation phase of the design under test is completed, turn off the asynchronous input. Check the verification environment of the design under test.

[0007] In addition, the present invention also provides a non-transitory computer-readable storage medium, in which at least one instruction or at least one segment of program is stored, and the at least one instruction or the at least one segment of program is loaded and executed by a processor to implement the above method.

[0008] In addition, the present invention also provides an electronic device, including a processor and the above non-transitory computer-readable storage medium.

[0009] The present invention has at least the following beneficial effects: The present invention provides a verification method, an electronic device, and a storage medium for random asynchronous input. By, during the simulation phase, each process of the verification platform continuously injects asynchronous event excitation signals into the design under test according to the randomly generated random time by itself, it achieves random injection of asynchronous events and fully verifies various scenarios; and by enabling and disabling asynchronous input before and after the simulation phase, it avoids various abnormal false errors caused by injection throughout the simulation time. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.

[0011] Figure 1 It is a flowchart of a verification method for random asynchronous input provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0012] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present invention.

[0013] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present invention have the same meaning as commonly understood by those skilled in the art.

[0014] Please refer to Figure 1 , which shows a flowchart of a verification method for random asynchronous input. The method includes the following steps: S100, obtain the asynchronous event test case asy configured for the verification platform, where asy = {asy1, asy2, …, asy i , …, asy N}, asy i is an infinite loop process of the i-th asynchronous event, and the value range of i is from 1 to N; where asy i includes a random generator rad for generating random time i , and an asynchronous event excitation signal stim dynamically generated and triggered based on the random time i .

[0015] Among them, the verification platform (testbench) is used to comprehensively and systematically test and verify the design under test. Its main function is to generate various asynchronous event excitation signals and apply them to the design under test to be verified, and collect the response results of the design under test, and judge whether the design under test works correctly by comparing with the expected results.

[0016] In one implementation, the design under test is a control module. The biggest feature of the control module is that it needs to input various control information, and the input of control information is an asynchronous event.

[0017] Among them, the infinite loop processes of each asynchronous event in the asynchronous event test case asy need to be triggered independently and do not interfere with each other. Each thread has its own random delay and trigger condition.

[0018] Among them, the infinite loop process of the asynchronous event is a continuously running loop structure for continuously listening to and processing the occurrence of asynchronous events. This process generates a random time interval through a random generator to simulate the randomly occurring asynchronous events in the real world. At the same time, according to the generated time interval, an asynchronous event excitation is injected into the design under test at a specified time point.

[0019] Among them, asy includes all asynchronous events in the entire design to be verified, and the total number of asynchronous events is N.

[0020] In one implementation, asy i is a while(1) loop process or a forever begin process. It should be noted that in a testbench, multiple languages can be used. When the testbench uses programming languages such as C and C++, asy i is a while(1) loop process. When the testbench uses a hardware description language to write test cases, asy i is a forever begin process. Other types of loop processes also fall within the protection scope of the present invention.

[0021] Among them, the random generator is a tool or algorithm used to simulate the random occurrence time of asynchronous events, generating random time intervals or time points to simulate events that may occur at any time in the real world.

[0022] In one implementation, the probability distribution used by the random generator is a uniform distribution and / or an exponential distribution. Among them, the exponential distribution can simulate the randomness of real events, and the uniform distribution can cover more scenarios to ensure that the occurrence time of events conforms to the expected statistical characteristics. In this way, the performance and stability of the system under different loads and random events can be tested and verified. Other types of probability distributions also fall within the protection scope of the present invention.

[0023] Among them, the asynchronous event excitation signal is used to simulate asynchronous events that randomly occur in the real world, such as interrupt requests, configuration registers, external signal triggers, etc. The core purpose of the asynchronous event excitation signal is to verify the stability and response ability of the design under test when processing random and unpredictable events.

[0024] S200, after initializing the design to be verified, enable asynchronous input.

[0025] Among them, enabling asynchronous input means enabling the processing ability of asynchronous events after the system design initialization is completed. By enabling asynchronous input after the design to be verified is initialized, various abnormal false errors caused by injecting asynchronous events before the initialization is completed can be avoided.

[0026] S300, in the simulation stage of the design to be verified, create independent threads for the infinite loop processes of each asynchronous event; the infinite loop processes of each asynchronous event continuously inject the bound asynchronous event excitation signals into the design to be verified according to the random time, and the design to be verified responds to the asynchronous event excitation signals according to the preset logic; among them, asy iThe steps of randomly injecting bound asynchronous event excitation signals include: rad i Randomly generate a random time t in each loop process i ; when reaching t i , apply stim i to the design under test.

[0027] Among them, creating independent threads means creating an independent execution unit for each asynchronous event. These threads do not affect each other and can run simultaneously.

[0028] In one implementation, the steps of creating independent threads include: using a multithreading library; defining that each thread processes a specific asynchronous event; starting the thread to make it start executing tasks.

[0029] It should be noted that the configuration of random time can avoid the blind area of the manual mode, cover all possible timing combinations through probability distribution; through random time, it can simulate the real scenario, conforming to the randomness characteristics of asynchronous events in actual chip operation; asynchronous events can be inserted into any scenario, making the verification more sufficient.

[0030] Among them, the infinite loop process of N asynchronous events is a concurrent thread, and each thread processes one asynchronous event.

[0031] In one implementation, dynamically adjust the randomly injected time to adjust the trigger density of the infinite loop process of the asynchronous event, or adjust the trigger density of the infinite loop process of the asynchronous event according to the simulation progress, so as to more realistically simulate the actual operating environment. Among them, the trigger density is the number of asynchronous event injections per unit time.

[0032] In one implementation, the method of dynamically adjusting the randomly injected time to adjust the trigger density of the infinite loop process of the asynchronous event includes: at the beginning of the program, define an initial random time range; before each injection of the asynchronous event excitation signal, randomly select a time from the current random time range as the injection time; update the random time range according to the preset adjustment rule. In one implementation, the preset adjustment rule is to regularly narrow the random time range, or narrow the random time range when the success rate of successfully receiving the randomly injected asynchronous event reaches the preset target. Other types of methods for adjusting the random time range all fall within the protection scope of the present invention. Different randomly injected time ranges may cause different behaviors in the design under test. By dynamically adjusting the random time range, more situations can be covered, including some boundary situations and abnormal situations that may not occur under a fixed time range, so as to more easily discover potential defects and vulnerabilities in the design under test, making the verification more sufficient.

[0033] In one embodiment, the steps of adjusting the triggering density of the infinite loop process of the asynchronous event according to the simulation progress include: selecting a suitable metric to measure the simulation progress; setting the relationship between the triggering density and the simulation progress, that is, the triggering density is low at the initial stage of the simulation phase and gradually increases as the simulation progress advances to test the limit of the system; during the simulation process, obtaining the value of the simulation progress metric in real time; and dynamically adjusting the random time for injecting asynchronous events according to the current simulation progress, so as to achieve the adjustment of the triggering density. Among them, the selected metric is the simulation time or the number of simulation steps. Other metrics that can measure the simulation progress also fall within the protection scope of the present invention.

[0034] S400, when the simulation phase of the design under test is completed, turn off the asynchronous input. That is, at the end of the simulation phase, stop the input of asynchronous events, that is, the infinite loop process of asynchronous events ends and exits, to avoid various abnormal false error problems caused by injecting asynchronous events after the simulation phase ends.

[0035] S500, check the verification environment of the design under test. That is, conduct a comprehensive inspection and evaluation of the entire environment used to verify the design under test to confirm whether the asynchronous events are correctly processed.

[0036] In one embodiment, the delay i is greater than 1 clock cycle and less than the overall time of the simulation phase. That is, ensure that asynchronous events can be injected at least once during the entire simulation phase to ensure that all asynchronous events can be verified.

[0037] In summary, the present invention provides a verification method for random asynchronous input. During the simulation phase, the infinite loop process of each asynchronous event in the verification platform continuously injects asynchronous event excitation signals into the design under test according to the randomly generated time for each, achieving random injection of asynchronous events and fully verifying various scenarios; and by enabling and disabling asynchronous input before and after the simulation phase, various abnormal false error problems caused by injection during the entire simulation time are avoided.

[0038] An embodiment of the present invention further provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one segment of a program related to a method in the method embodiment. The at least one instruction or the at least one segment of the program is loaded and executed by the processor to implement the method provided in the above embodiment.

[0039] An embodiment of the present invention further provides an electronic device, including a processor and the foregoing non-transitory computer-readable storage medium.

[0040] Embodiments of the present invention also provide a computer program product, which includes program code. When the program product runs on an electronic device, the program code is used to cause the electronic device to execute the steps in the methods according to various exemplary embodiments of the present invention described above in this specification.

[0041] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above.

[0042] Although some specific embodiments of the present invention have been described in detail by way of examples, those skilled in the art should understand that the above examples are only for illustration, rather than for limiting the scope of the present invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention disclosed is defined by the appended claims.

Claims

1. A verification method for random asynchronous input, characterized in that, The method includes the following steps: Obtain the asynchronous event test cases asy configured for the verification platform, where asy = {asy1, asy2, …, asy i , …, asy N}, and asy i is an infinite loop process for the i-th asynchronous event, where the value range of i is from 1 to N; among them, asy i includes a random generator rad for generating random time i , and an asynchronous event excitation signal stim dynamically generated and triggered based on the random time i ; After the initialization of the design under test, enable the asynchronous input; In the simulation stage of the design under test, independent threads are created for the infinite loop processes of each asynchronous event; the infinite loop processes of each asynchronous event continuously inject the bound asynchronous event excitation signals into the design under test according to the random time, and the design under test responds to the asynchronous event excitation signals according to the preset logic; where, asy i The steps of randomly injecting the bound asynchronous event excitation signals include: rad i Randomly generate a random time t in each loop process i ; when t i is reached, apply stim i to the design under test; When the simulation phase of the design under test is completed, disable the asynchronous input; Check the verification environment of the design under test.

2. The method according to claim 1, wherein The said delay i is greater than 1 clock cycle and less than the overall time of the simulation phase.

3. The method according to claim 1, wherein The design under test is a control module.

4. The method according to claim 1, wherein The asy i is a while(1) loop process or a forever begin process.

5. The method according to claim 1, wherein The probability distribution used by the random generator is a uniform distribution and / or an exponential distribution.

6. The method according to claim 1, wherein The method further includes: dynamically adjusting the time of random injection to adjust the trigger density of the infinite loop process of the asynchronous event, including: At the beginning of the program, define an initial random time range; Before each injection of the asynchronous event excitation signal, randomly select a time from the current random time range as the injection time; Update the random time range according to a preset adjustment rule.

7. The method according to claim 6, wherein The preset adjustment rule is: Regularly narrow the random time range; or narrow the random time range when the success rate of successfully receiving the randomly injected asynchronous event reaches a preset target.

8. The method according to claim 1, characterized in that, The method further includes: adjusting the trigger density of the infinite loop process of the asynchronous event according to the simulation progress, including: Select a suitable metric to measure the simulation progress; Set the relationship between the trigger density and the simulation progress; During the simulation process, obtain the value of the simulation progress metric in real time; According to the current simulation progress, dynamically adjust the random time of injecting the asynchronous event.

9. A non-transitory computer-readable storage medium storing at least one instruction or at least one program segment, characterized in that, The at least one instruction or the at least one program segment is loaded and executed by a processor to implement the method according to any one of claims 1-8.

10. An electronic device, characterized in that, It includes a processor and the non-transitory computer-readable storage medium according to claim 9.

Citation Information

Patent Citations

  • Random interrupt debugging verification system based on RISC-V architecture

    CN117422025A

  • System-level random verification method and system for general MCU verification platform

    CN120012442A

  • Methods and systems for verifying out-of-order page fault detection

    US20200201778A1

  • Enhanced coverage convergence and test status during simulation runtime

    US20230094798A1