A random asynchronous input verification method, electronic device and storage medium

By adopting the verification method of random asynchronous input in chip design, creating independent threads and injecting asynchronous event excitation signals using a random generator, the problems of insufficient coverage and false errors in asynchronous event verification are solved, and more comprehensive verification and higher credibility are achieved.

CN120387407BActive Publication Date: 2025-08-29METAX INTEGRATED CIRCUITS (SHANGHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art cannot effectively handle the randomness of asynchronous events in chip design, resulting in insufficient verification coverage and false errors, and cannot guarantee the credibility of verification results.

Method used

Using the verification method of random asynchronous input, by creating an independent thread for each asynchronous event during the simulation stage, a random generator is used to generate a random time injection of the asynchronous event excitation signal, and closing the input when the simulation is completed, avoiding abnormal false errors.

Benefits of technology

Full coverage verification of asynchronous events is achieved, the credibility of verification results is improved, false errors are avoided, and the efficiency and accuracy of verification are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120387407B_ABST
    Figure CN120387407B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of chip design technology, and in particular to a random asynchronous input verification method, electronic device and storage medium, which obtain asynchronous event test cases configured for a verification platform; enable asynchronous input after a design to be tested is initialized; create an independent thread for an infinite loop process of each asynchronous event during a simulation phase of the design to be tested; the infinite loop process of each asynchronous event continuously and randomly injects a bound asynchronous event excitation signal into the design to be tested according to the random time, and the design to be tested responds to the asynchronous event excitation signal according to a preset logic; when the simulation phase of the design to be tested is completed, the asynchronous input is turned off; the verification environment of the design to be tested is checked; the method achieves random injection of asynchronous events and fully verifies various scenarios; and by enabling and turning off the asynchronous input before and after the simulation phase, various abnormal false errors caused by injection during the entire 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 in particular to a random asynchronous input verification method, electronic equipment and storage medium. Background Art

[0002] In chip design, the control module, as the core processing unit, undertakes the critical task of integrating multi-source signals and providing real-time response. Its defining characteristic is the need to process control information inputs from diverse interfaces and with varying timing requirements. The handling of asynchronous events, in particular, becomes a key technical bottleneck affecting system reliability. Traditional verification methods for simulating asynchronous events generally employ an injection model based on fixed test cases, an approach that exhibits significant technical flaws in practical engineering applications.

[0003] First, in the current mainstream verification architecture, testers must manually insert trigger conditions for asynchronous events into test cases. Because asynchronous events are unpredictable and random, engineers must repeatedly write multiple trigger conditions for the same event at different time points to ensure verification coverage. This repetitive operation not only increases the redundancy of verification scripts but, more seriously, fails to exhaustively enumerate all possible timing combinations, resulting in insufficient scenario coverage.

[0004] Secondly, existing technologies cannot achieve intelligent event injection throughout the entire simulation cycle. If testers inject asynchronous events at the simulation startup phase, they will trigger initial state anomalies. Such false errors not only significantly increase debugging costs but also mask real design flaws, reducing the credibility of verification results.

[0005] In summary, the rigid way of writing test cases cannot adapt to the random occurrence of asynchronous events in real-world environments. As a result, the verification process cannot guarantee the completeness of scenario coverage and cannot effectively distinguish between real errors and false exceptions. Therefore, a verification method that can solve the dual dilemma of insufficient coverage and false errors is urgently needed. Summary of the Invention

[0006] In view of the above technical problems, the technical solution adopted by the present invention is: a random asynchronous input verification method, the method comprising the following steps: obtaining an asynchronous event test case asy configured for the verification platform, the asy={asy1,asy2,…,asy i ,…,easy N}, easy i is an infinite loop process of the i-th asynchronous event, where the value of i ranges from 1 to N; i Includes random generator rad for generating random times i, and an asynchronous event excitation signal stim dynamically generated and triggered based on the random time i After the design to be tested is initialized, asynchronous input is enabled. During the simulation phase of the design to be tested, an independent thread is created for the infinite loop process of each asynchronous event; the infinite loop process of each asynchronous event continuously and randomly injects a bound asynchronous event stimulus signal into the design to be tested according to the random time, and the design to be tested responds to the asynchronous event stimulus signal according to the preset logic; wherein, asynchronous event stimulus signal is generated by the infinite loop process of each asynchronous event. i The steps of randomly injecting bound asynchronous event stimulus signals include: i A random time t is randomly generated in each loop process i ; Upon arrival at t i When stim i Applying the test design to the test design, closing the asynchronous input when the simulation phase of the test design is completed, and checking the verification environment of the test design.

[0007] In addition, the present invention also provides a non-transitory computer-readable storage medium, which stores at least one instruction or at least one program, and the at least one instruction or at least one 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-mentioned non-transitory computer-readable storage medium.

[0009] The present invention has at least the following beneficial effects:

[0010] The present invention provides a random asynchronous input verification method, electronic device and storage medium. During the simulation phase, each process of the verification platform continuously and randomly injects asynchronous event stimulus signals into the design to be verified according to the random time generated by each process, thereby achieving random injection of asynchronous events and fully verifying various scenarios. Moreover, by enabling and disabling asynchronous input before and after the simulation phase, various abnormal false errors caused by injection during the entire simulation time are avoided. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of 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 creative work.

[0012] Figure 1 A flow chart of a random asynchronous input verification method provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0013] 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 the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.

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

[0015] See also Figure 1 , which shows a flow chart of a random asynchronous input verification method, the method comprising the following steps:

[0016] S100, obtaining an asynchronous event test case asy configured for the verification platform, where asy={asy1, asy2, ..., asy i ,…,easy N}, easy i is an infinite loop process of the i-th asynchronous event, where i ranges from 1 to N; i Includes random generator rad for generating random times i , and an asynchronous event excitation signal stim dynamically generated and triggered based on the random time i .

[0017] Among them, the verification platform (testbench) is used to conduct comprehensive and systematic testing and verification of the design to be verified. Its main function is to generate various asynchronous event stimulus signals and apply them to the design to be verified, and collect the response results of the design to be verified. By comparing them with the expected results, it is determined whether the design to be verified is working correctly.

[0018] In one embodiment, the design to be tested is a control module. The biggest feature of the control module is that it needs to input various control information, and the input of the control information is an asynchronous event.

[0019] The infinite loop process of each asynchronous event in the asynchronous event test case asy needs to be triggered independently without interfering with each other. Each thread has its own random delay and trigger condition.

[0020] The infinite loop process for asynchronous events is a continuously running loop structure that continuously monitors and processes asynchronous events. This process uses a random generator to generate random time intervals, simulating the random occurrence of asynchronous events in the real world. Simultaneously, based on the generated time intervals, it injects asynchronous event stimuli into the design under test at specified time points.

[0021] Asy includes all asynchronous events in the entire design to be tested, and the total number of asynchronous events is N.

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

[0023] 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.

[0024] In one embodiment, the probability distribution used by the random generator is a uniform distribution and / or an exponential distribution, wherein 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 the event 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 scope of protection of the present invention.

[0025] Asynchronous event stimulus signals are used to simulate random asynchronous events that occur in the real world, such as interrupt requests, configuration registers, and external signal triggers. The core purpose of asynchronous event stimulus signals is to verify the stability and responsiveness of the design under test when handling random, unpredictable events.

[0026] S200 , after the design under test is initialized, asynchronous input is enabled.

[0027] Enabling asynchronous inputs means enabling the ability to handle asynchronous events after the system design is initialized. By enabling asynchronous inputs after the design under test is initialized, you can avoid various false errors caused by asynchronous events injected before initialization is complete.

[0028] S300, during the simulation phase of the design to be tested, an independent thread is created for each infinite loop process of an asynchronous event; the infinite loop process of each asynchronous event continuously and randomly injects a bound asynchronous event stimulus signal into the design to be tested according to the random time, and the design to be tested responds to the asynchronous event stimulus signal according to a preset logic; wherein,i The steps of randomly injecting bound asynchronous event stimulus signals include: i A random time t is randomly generated in each loop process i ; Upon arrival at t i When stim i is applied to the design under test.

[0029] Creating an independent thread means creating an independent execution unit for each asynchronous event. These threads do not affect each other and can run simultaneously.

[0030] In one embodiment, the step of creating an independent thread includes: using a multi-thread library; defining each thread to handle a specific asynchronous event; and starting the thread to start executing a task.

[0031] It should be noted that the configuration of random time can avoid blind spots in artificial modes and cover all possible timing combinations through probability distribution. Random time can simulate real scenarios and conform to the random characteristics of asynchronous events in actual chip operation. Asynchronous events can be inserted into any scenario, making verification more thorough.

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

[0033] In one embodiment, the trigger density of the infinite loop process of the asynchronous event is adjusted dynamically by adjusting the random injection time, or the trigger density of the infinite loop process of the asynchronous event is adjusted according to the simulation progress to more realistically simulate the actual operating environment. The trigger density is the number of injections of the asynchronous event per unit time.

[0034] In one embodiment, a method for dynamically adjusting the random injection time to adjust the trigger density of the infinite loop process of the asynchronous event includes: defining an initial random time range at the beginning of the program; randomly selecting a time from the current random time range as the injection time before each injection of the asynchronous event excitation signal; and updating the random time range according to a preset adjustment rule. In one embodiment, the preset adjustment rule is to periodically narrow the random time range, or to narrow the random time range when the success rate of the randomly injected asynchronous event being successfully received reaches a preset target. Other types of methods for adjusting the random time range all fall within the scope of protection of the present invention. Different random injection time ranges may cause different behaviors in the design to be tested. 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, thereby making it easier to discover potential defects and loopholes in the design to be tested, making the verification more sufficient.

[0035] In one embodiment, the step of adjusting the trigger density of the infinite loop process of the asynchronous event according to the simulation progress includes: selecting a suitable indicator to measure the simulation progress; setting the relationship between the trigger density and the simulation progress, that is, the trigger density is low at the beginning of the simulation stage, and gradually increases as the simulation progress advances to test the limit of the system; in the simulation process, the value of the simulation progress indicator is obtained in real time; according to the current simulation progress, the random time of injecting the asynchronous event is dynamically adjusted to achieve the adjustment of the trigger density. Among them, the selected indicator is the simulation time or the number of simulation steps. Other indicators that can measure the simulation progress also fall within the protection scope of the present invention.

[0036] At step S400, when the simulation phase of the design under test is completed, asynchronous input is disabled. Specifically, at the end of the simulation phase, the input of asynchronous events is stopped, and the infinite loop of asynchronous events is terminated and exited, thereby avoiding various false errors caused by the injection of asynchronous events after the simulation phase has ended.

[0037] S500: Check the verification environment of the design to be verified, that is, conduct a comprehensive inspection and evaluation of the entire environment used to verify the design to be verified to confirm whether the asynchronous event is correctly processed.

[0038] In one embodiment, the t i The time is greater than one clock cycle and less than the entire duration of the simulation phase, which means that it is guaranteed that at least one asynchronous event can be injected into the entire simulation phase and that all asynchronous events can be verified.

[0039] In summary, the present invention provides a verification method for random asynchronous input, which achieves random injection of asynchronous events and fully verifies various scenarios by continuously and randomly injecting asynchronous event stimulus signals into the design to be tested according to the random time generated by each asynchronous event of the verification platform during the simulation phase; and by enabling and disabling asynchronous input before and after the simulation phase, various abnormal false errors caused by injection during the entire simulation time are avoided.

[0040] An embodiment of the present invention also 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 program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided in the above embodiment.

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

[0042] An embodiment of the present invention further provides a computer program product comprising program code. When the program product is run on an electronic device, the program code is used to enable the electronic device to execute the steps of the method according to various exemplary embodiments of the present invention described above in this specification.

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

[0044] Although some specific embodiments of the present invention have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.

Claims

1. A random asynchronous input verification method, characterized in that: The method comprises the following steps: Get the asynchronous event test case asy configured for the verification platform, where asy={asy1,asy2,…,asy i ,…,easy N }, easy i is an infinite loop process of the i-th asynchronous event, where i ranges from 1 to N; i Includes random generator rad for generating random times i , and an asynchronous event excitation signal stim dynamically generated and triggered based on the random time i ; After the design under test is initialized, enable the asynchronous input; During the simulation phase of the design to be tested, an independent thread is created for the infinite loop process of each asynchronous event; the infinite loop process of each asynchronous event continuously and randomly injects a bound asynchronous event stimulus signal into the design to be tested according to the random time, and the design to be tested responds to the asynchronous event stimulus signal according to the preset logic; wherein, i The steps of randomly injecting bound asynchronous event stimulus signals include: i A random time t is randomly generated in each loop process i ; Upon arrival at t i When stim i Applying to the design under test; When the simulation phase of the design to be tested is completed, closing the asynchronous input; Check the verification environment of the design to be verified.

2. The method according to claim 1, characterized in that The t i More than 1 clock cycle is less than the overall time of the simulation phase.

3. The method according to claim 1, characterized in that The design to be tested is a control module.

4. The method according to claim 1, wherein The easy i It 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 uniform distribution and / or exponential distribution.

6. The method according to claim 1, characterized in that The method further includes: dynamically adjusting the random injection time to adjust the triggering density of the infinite loop process of the asynchronous event, including: At the beginning of the program, define an initial random time range; Before injecting the asynchronous event stimulus signal each time, a time is randomly selected from the current random time range as the injection time; Update the random time range according to the preset adjustment rules.

7. The method according to claim 6, characterized in that The preset adjustment rules are: The random time range is periodically reduced; or the random time range is reduced when the success rate of the randomly injected asynchronous events being successfully received 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 appropriate metrics to measure simulation progress; Set the relationship between trigger density and simulation progress; During the simulation process, the value of the simulation progress indicator is obtained in real time; Dynamically adjust the random time of injected asynchronous events according to the current simulation progress.

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

10. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.

Citation Information

Patent Citations

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

    US20200201778A1

  • Enhanced coverage convergence and test status during simulation runtime

    US20230094798A1