Simulation timeout protection exit method, device and electronic equipment in chip verification

By adopting a centralized multi-level parallel monitoring architecture and a parallel competition arbitration mechanism, the problems of component coupling and misjudgment in simulation exit control during chip verification are solved, and the timely termination of the simulation process and complete comparison of results are achieved.

CN123157366APending Publication Date: 2026-11-24LOOKING TO THE FUTURE (SHANGHAI) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611298941.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-25
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing simulation exit control schemes in chip verification suffer from problems such as high component coupling, complex state coordination, inability to identify internal transaction processing residues, and high risk of misjudgment, leading to premature simulation exit or incomplete comparison.

Method used

A centralized, multi-level parallel monitoring architecture is adopted, with three independent and parallel exit paths: timeout protection, event triggering, and cyclic emptying detection. Combined with the silent period and the blocking flag status to confirm the normal termination condition, a parallel competition arbitration mechanism is used to prioritize the exit signal and terminate unfinished threads.

Benefits of technology

It effectively avoids the complex problems of component coupling and state coordination caused by distributed monitoring, reduces the risk of misjudgment caused by sudden excitation intervals and transient states, and ensures that the simulation ends in a timely manner under abnormal conditions and guarantees the integrity of transaction processing and result comparison under normal conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157366A_ABST
    Figure CN123157366A_ABST
Patent Text Reader

Abstract

This application relates to the field of integrated circuit design verification technology, specifically disclosing a simulation timeout protection exit method, device, and electronic device in chip verification. This method locks the simulation lifecycle control at the start of the simulation run phase, and executes timeout detection, external termination event listening, and cyclic emptying detection in parallel. It cyclically acquires the occupancy status of each data path queue within the verification environment and determines the emptying exit condition based on the silence period and the total number of blocking flags. It performs first-come-first-served arbitration on timeout exit signals, event exit signals, and normal emptying exit signals, terminating the remaining unfinished threads and releasing lifecycle control. This solution can reduce exit misjudgments caused by interface silence or intermittent excitation, ensure the integrity of verification transaction processing and result comparison, and reduce the computational resource consumption caused by abnormal simulations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of integrated circuit design verification technology, and more specifically, to a method, apparatus, and electronic device for exiting simulation timeout protection during chip verification. Background Technology

[0002] As chip functionality becomes increasingly complex and integrated, chip design typically requires executing numerous functional test cases in a simulation verification environment before tape-out to check the results of the design under test (DUT) under different stimulus conditions. During simulation, if the DUT, stimulus components, or verification components experience deadlocks or abnormal waiting, the simulation may occupy processor, memory, and simulation license resources for an extended period without exiting. Conversely, if the termination conditions are set too aggressively, the simulation may terminate prematurely before the verification environment has completed its transactions, resulting in incomplete comparison between expected and actual results. Therefore, a simulation exit control mechanism is needed to terminate the simulation promptly in abnormal situations and ensure that the transactions to be verified are fully processed under normal conditions, thus balancing computational resource utilization and the completeness of verification results.

[0003] Existing simulation exit control schemes mainly include distributed watchdog schemes and timeout schemes based on signal change counting. Distributed watchdog schemes typically set up monitoring logic in multiple verification components. Each monitoring logic determines whether a component has entered a pending termination state based on whether its corresponding interface continuously generates new data, and terminates the simulation after a fixed delay once all components are in the pending termination state. This scheme requires repeated querying and synchronization of states between different components. As the number of agents, reference models, and checkers in the verification environment increases, the state coordination relationship becomes more complex. When reusing the environment, the monitoring logic of each component also needs to be re-adapted, resulting in high component coupling and maintenance costs. Timeout schemes based on signal change counting group the bus signals of the design under test according to function, accumulate counts when the signals remain continuously unchanged, and trigger a timeout exit when the count reaches a preset threshold. However, a temporarily unchanged bus signal could indicate completion or a normal interval between sudden stimuli, thus easily leading to misjudgments. Furthermore, a fixed threshold is difficult to adapt to verification test cases with different execution durations and pipeline depths.

[0004] It is particularly important to note that existing solutions typically monitor only the external interface signals of the design under test. Even when the external bus has stopped changing, there may still be transactions within the verification environment that have been collected but not yet processed by the reference model, or that have not yet been compared by the checker. Existing solutions cannot identify these internal processing remnants based on external signal states, and may therefore incorrectly interpret "interface silence" as "verification complete," leading to premature simulation termination, incomplete transaction comparisons, and omissions of chip functional defects. The main reason for this problem is that the external interface signal states cannot fully characterize the progress of transaction transmission and consumption among the various processing components in the verification environment, and existing exit criteria typically rely on one-time status checks or fixed delays, lacking confirmation of the continued validity of termination conditions.

[0005] Therefore, an optimized simulation timeout protection exit scheme is desired in chip verification. Summary of the Invention

[0006] To address the aforementioned technical problems, this application is proposed. Embodiments of this application provide a method, apparatus, and electronic device for exiting simulation timeout protection during chip verification.

[0007] According to one aspect of this application, a simulation timeout protection exit method is provided in chip verification, comprising: S1: When the simulation operation phase starts, control over the simulation lifecycle is locked based on the verification environment monitoring configuration set to generate a simulation control blocking flag. S2: Based on the verification environment monitoring configuration set, three non-blocking competitive exit paths are started simultaneously in the first-level parallel structure: timeout protection thread, event triggering thread, and loop emptying detection thread. Multi-level parallel monitoring of the verification environment is performed to obtain timeout exit signal, event exit signal, and normal emptying exit signal. S3: The parallel competition arbitration mechanism is used to determine the priority of timeout exit signals, event exit signals and normal drain exit signals and terminate the remaining unfinished threads to generate a simulation termination instruction. S4: Based on the simulation termination command, perform a pairing and release operation on the simulation control blocking flag to complete the simulation exit.

[0008] According to another aspect of this application, a simulation timeout protection exit device for chip verification is provided, comprising: The simulation control locking module is used to lock the control rights of the simulation lifecycle based on the verification environment monitoring configuration set when the simulation operation phase starts, so as to generate a simulation control right blocking identifier. The parallel exit monitoring module is used to simultaneously start three non-blocking competitive exit paths—timeout protection thread, event triggering thread, and loop emptying detection thread—in the first-level parallel structure based on the verification environment monitoring configuration set. This allows for multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal emptying exit signals. The exit competition arbitration module is used to determine the priority of timeout exit signals, event exit signals, and normal drain exit signals through a parallel competition arbitration mechanism and terminate the remaining unfinished threads to generate a simulation termination instruction. The simulation release and regression module is used to perform a paired release operation on the simulation control blocking flag based on the simulation termination command, so as to complete the simulation exit.

[0009] Compared with existing technologies, this application provides a simulation timeout protection exit method, device, and electronic device for chip verification. It constructs a centralized, multi-level parallel monitoring architecture, locks lifecycle control during the simulation run phase, and ensures that the three exit paths—timeout protection, external event triggering, and cyclic emptying detection—operate independently and in parallel. This avoids the complex problems of component coupling and state coordination caused by distributed monitoring. Specifically, by monitoring the transaction residue status of each data path queue within the verification environment and combining the silent period and the blocking flag status to cyclically confirm the normal termination condition, it avoids premature exit due to transactions not being completed, which might occur solely based on external interface silence or one-time delay judgments. This also reduces the risk of misjudgment caused by sudden stimulus intervals and transient states. When any exit path first meets the condition, the exit signal is arbitrated on a first-come, first-served basis, terminating the remaining monitoring threads and releasing lifecycle control in pairs. This ensures timely termination of the simulation in abnormal states and guarantees complete transaction processing and result comparison in normal states, while reducing the maintenance complexity of the verification environment and the consumption of simulation resources. Attached Figure Description

[0010] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0011] Figure 1 This is a flowchart of the simulation timeout protection exit method in chip verification according to an embodiment of this application; Figure 2 This is a schematic diagram of the data flow in the simulation timeout protection exit method during chip verification according to an embodiment of this application; Figure 3This is a schematic diagram of the integrated architecture of the watchdog component in the simulation timeout protection exit method for chip verification according to an embodiment of this application in the verification environment; Figure 4 This is a flowchart of step S2 of the simulation timeout protection exit method in chip verification according to an embodiment of this application; Figure 5 This is a schematic diagram of a multi-level parallel competition exit architecture for a simulation timeout protection exit method in chip verification according to an embodiment of this application; Figure 6 This is a flowchart of step S3 of the simulation timeout protection exit method in chip verification according to an embodiment of this application; Figure 7 This is a timing comparison diagram of the normal drain exit, event-triggered exit, and timeout protection exit methods in the simulation timeout protection exit method during chip verification according to the embodiments of this application; Figure 8 This is a block diagram of a simulation timeout protection exit device in chip verification according to an embodiment of this application. Detailed Implementation

[0012] Hereinafter, exemplary embodiments according to this application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments of this application. It should be understood that this application is not limited to the exemplary embodiments described herein.

[0013] To address the issues of existing simulation exit controls relying on external bus changes, fixed waiting times, or dispersed coordination of multiple components, making it difficult to identify unprocessed transactions within the verification environment, and prone to premature exit due to intermittent stimulus or transient silence, this solution locks the simulation lifecycle after the simulation starts, based on configuration information such as timeout thresholds, silence period thresholds, ready thresholds for blocking flags, data path queues, and external termination events. Simultaneously, three competing paths—timeout detection, external event listening, and cyclic emptying detection—run. The cyclic emptying detection path continuously acquires the queue occupancy status from the input agent to the reference model, from the reference model to the checker, and from the output agent to the checker, and repeatedly confirms the completion of each processing stage based on the silence period and the total number of blocking flags. A normal emptying exit signal is generated when there are no remaining transactions on the data path and the system reaches a ready state; a corresponding exit signal is generated when a timeout occurs or an external termination event is received. Subsequently, each exit signal is prioritized, stopping any unfinished threads, generating and executing simulation termination instructions, releasing lifecycle control in pairs, and cleaning up residual data in the environment. This approach balances timely termination of abnormal simulations, complete comparison of normal simulations, and continuous execution of subsequent regression test cases.

[0014] Figure 1This is a flowchart of the simulation timeout protection exit method in chip verification according to an embodiment of this application. Figure 2 This is a schematic diagram of the data flow in the simulation timeout protection exit method during chip verification according to an embodiment of this application. Figure 1 and Figure 2 As shown, the simulation timeout protection exit method in chip verification according to an embodiment of this application includes the following steps: S1, when the simulation operation phase starts, control over the simulation lifecycle is locked based on the verification environment monitoring configuration set to generate a simulation control blocking flag; S2, based on the verification environment monitoring configuration set, three non-blocking competitive exit paths—a timeout protection thread, an event triggering thread, and a loop emptying detection thread—are simultaneously started in the first-level parallel structure to perform multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal emptying exit signals; S3, the timeout exit signal, event exit signal, and normal emptying exit signal are determined by a parallel competition arbitration mechanism, and the remaining unfinished threads are terminated to generate a simulation termination instruction; S4, the simulation control blocking flag is paired and released based on the simulation termination instruction to complete the simulation exit.

[0015] Specifically, in step S1, at the start of the simulation run phase, control over the simulation lifecycle is locked based on the verification environment monitoring configuration set to generate a simulation control blocking flag. It's worth noting that the verification environment monitoring configuration set includes timeout thresholds, silence period thresholds, blocking flag ready thresholds, input agent to reference model queue, reference model to checker queue, output agent to checker queue, and external termination events. It should be understood that since the UVM (Universal Verification Methodology) simulation verification environment controls the operation and termination of phases through an objection mechanism, when the input agent, reference model, output agent, or checker completes its respective task and releases the objection, if a unified watchdog does not continue to hold control, the run_phase may terminate before transactions in the input agent to reference model queue, reference model to checker queue, or output agent to checker queue are fully consumed, resulting in incomplete scoreboard comparisons. Simultaneously, subsequent timeout protection threads, event triggering threads, and loop emptying detection threads need to run continuously within the same simulation lifecycle until any competing exit path meets the exit condition. Therefore, in the technical solution of this application, when the simulation run phase starts, control over the simulation lifecycle is locked based on the verification environment monitoring configuration set to generate a simulation control blocking flag. This prevents the phase from jumping prematurely before the completion of multi-level parallel monitoring and provides a control basis for the subsequent execution of paired drop_objections. In this way, the watchdog can centrally control the simulation lifecycle independently of each agent, monitor, reference model, and scoreboard, without adding status query logic between components, and ensures that the three exit scenarios—abnormal timeout, external active termination, and normal emptying—are all determined within the controlled simulation run phase.

[0016] More specifically, in the embodiments of this application, step S1 includes: based on the effective pulse of the start signal of the running phase, performing control escalation locking on the simulation lifecycle, and simultaneously performing deep copying and serialization conversion on the verification environment monitoring configuration set to generate a simulation control blocking identifier and a global configuration image; unpacking, splitting, and recombining the fields of the global configuration image to obtain a basic timing threshold vector and a data path probe matrix; performing nonlinear adaptive timing derivation on the basic timing threshold vector to obtain an adaptive timing control set; and aligning and assembling the data path probe matrix and the adaptive timing control set to obtain parallel monitoring context data.

[0017] Specifically, in a concrete example of this application, the verification environment class inherits from uvm_env, and the watchdog is declared in the verification environment class as an extern virtual task, so that test cases can override the watchdog's exit strategy by deriving subclasses; the verification environment calls the watchdog in the main_phase, or in the implementation that uses run_phase to manage the simulation lifecycle, the run_phase calls the watchdog, and the configuration switch cfg.watchdog_sw determines whether to enable the simulation timeout protection exit function. In practical implementation, firstly, before starting the verification environment during the construction or runtime phase, the verification environment monitoring configuration set is loaded via uvm_config_db, the environment configuration object cfg object, or the command-line parameter plusargs. The verification environment monitoring configuration set includes at least the timeout threshold timeout_th, the quiet period threshold quiet_period, the blocking flag ready threshold, the input agent to reference model queue inag2rmFIFO, the reference model to checker queue rm2chk FIFO, the output agent to checker queue outagt2chk FIFO, and the external termination event end_sim. Specifically, timeout_th is configured to be greater than the expected maximum execution time of the current valid test case, and quiet_period is configured to be greater than the maximum processing latency of the DUT. The validity of timeout_th, quiet_period, and each queue and event object is verified. Timeout_th is set to 10. 3 ~10 7 An integer within a clock cycle range, quiet_period uses 10 to 10^6. 4 Integers within a clock cycle range are used to terminate the initialization of the current test case via uvm_fatal when verification fails, in order to prevent invalid thresholds from entering subsequent monitoring threads. It's worth noting that the verification environment includes an input stimulus layer, a reference model layer, an output sampling layer, a comparison and checking layer, and a TLM FIFO interconnection layer. The input agent transmits input transactions to the reference model via inagt2rmFIFO, the reference model transmits expected transactions to the checker via rm2chk FIFO, and the output agent transmits actual output transactions to the checker via outagt2chk FIFO. The checker compares the expected transactions and actual output transactions one by one. When it is necessary to model backpressure states based on actual output, the verification environment also sets up outagt2rmFIFO to feed back the actual output transactions collected by the output agent to the reference model.

[0018] Figure 3This is a schematic diagram of the integrated architecture of the watchdog component in the simulation timeout protection exit method during chip verification according to an embodiment of this application, within the verification environment. Figure 3 As shown, the verification environment `env` (extends `uvm_env`) includes an input agent group, a reference model `ref_model`, an output agent group, a comparison and checking group, and a TLM FIFO interconnect layer. The input agent group includes multiple input agent instances used to drive input transactions to the DUT. The reference model `ref_model` is used to generate expected transactions based on the input transactions. The output agent group includes multiple output agent instances used to collect the actual output transactions generated by the DUT. The comparison and checking group includes multiple checker instances used to compare the expected transactions with the actual output transactions. The TLM FIFO interconnect layer includes `inagt2rm FIFO`, `rm2chk FIFO`, `outagt2rm FIFO` (optional), and `outagt2chk FIFO`. `inagt2rm FIFO` connects the input agent to the reference model; `rm2chk FIFO` connects the reference model to the checker; `outagt2rm FIFO` (optional) feeds back the actual output transactions collected by the output agent to the reference model; and `outagt2chk FIFO` connects the output agent to the checker. The solid lines in the diagram represent the transmission relationship of verification transactions between the input Agent group, the reference model ref_model, the output Agent group, the comparison check group, and each TLM FIFO. The dashed lines represent the watchdog's access relationship to the configuration switch and the state of each FIFO.

[0019] The verification environment controls whether the watchdog function is enabled via `watchdog_sw - ON / OFF`. The watchdog is declared as an `extern virtual task` in the verification environment class and executes `watchdog()` based on `cfg.watchdog_sw` within the `main_phase`. When `cfg.watchdog_sw` is ON, the watchdog enters the running state and establishes the exit paths shown in the diagram: path A (timeout protection exit), path B (event-triggered exit), and path C (loop emptying detection). When `cfg.watchdog_sw` is OFF, the above exit paths are not initiated. The watchdog participates in phase lifecycle management through `raise / drop objections`, reads the queue occupancy depth through the `used()` interface of each FIFO, and can be overridden by derived verification environment classes to expand exit conditions without changing the connection relationships of the input Agent group, reference model `ref_model`, output Agent group, and comparison check group.

[0020] Next, after the main_phase or run_phase starts execution and generates a valid pulse for the run phase start signal, the watchdog checks cfg.watchdog_sw. When cfg.watchdog_sw is enabled, it obtains the current phase object and calls raise_objection with itself as the holder of the blocking flag, incrementing the object reference count of the current phase by one. The simulation control component records the execution status of this raise_objection, the corresponding phase object, and the watchdog holder relationship as a simulation control blocking flag. This simulation control blocking flag indicates that the watchdog has acquired control of the current simulation lifecycle and sets a paired release state to ensure that the control elevation is only released by the subsequent drop_objection. When a duplicate valid pulse of the same run phase is detected, the repeated execution of raise_objection is prohibited according to the paired release state to prevent the object reference count from failing to return to zero due to repeated elevations. Then, a deep copy and serialization conversion are performed on the verification environment monitoring configuration set. Specifically, the timeout threshold, silent period threshold, and blocking flag ready threshold are numerically copied. The object paths, handle indices, and access interfaces of the inagt2rm FIFO, rm2chk FIFO, outagt2chk FIFO, and end_sim events are serialized and registered, and the corresponding objects are rebound in the current verification environment instance, thereby generating a global configuration image. This process does not copy the transactions stored in each FIFO, but retains the access relationship to the actual queues in the current simulation instance, so that the watchdog can obtain the queue occupancy depth in real time through the used() interface of each FIFO, and can block and wait for the end_sim event in the form of @(event).

[0021] Furthermore, the global configuration image is unpacked and its fields are reassembled. The timeout_th, quiet_period, and the ready threshold for the blocking flag are combined to form a basic timing threshold vector. The object handles, used() interfaces, and sampling order of inagt2rm FIFO, rm2chk FIFO, and outagt2chkFIFO are combined to form a data path probe matrix. The event handle of the end_sim event is then associated with the data path probe matrix. Subsequently, deterministic segmented mapping and timing correction are performed on the basic timing threshold vector to obtain an adaptive timing control set. Specifically, timeout_th and quiet_period are first converted into integer cycles corresponding to the monitoring clock. In a single-clock-domain scenario, the clock of the DUT's clock domain is used as the counting benchmark. In a multi-clock-domain scenario, the clock with the largest cycle is used as the counting benchmark for the timeout protection thread. quiet_period is configured according to the clock domain to which each FIFO belongs to, to avoid the counting benchmark of the fast clock domain causing the slow clock domain to be judged as silent before completing transaction processing. After determining the counting baseline, upper and lower limits are checked for timeout_th and quiet_period. If timeout_th is less than 10, then... 3 One clock cycle or more than 10 7 Every clock cycle, a timeout threshold configuration error is reported via uvm_fatal, where quiet_period is less than 10 clock cycles or greater than 10. 4At each clock cycle, an error in the silent period threshold configuration is reported via uvm_fatal. When all thresholds are within the valid range, timeout_th is maintained as the upper limit of the cumulative count for timeout protection threads, and the detection interval of the cyclic emptying detection thread is determined according to the interval of quiet_period. Specifically, when quiet_period is 10 to 99 clock cycles, the detection interval is set to 1 clock cycle; when quiet_period is 100 to 999 clock cycles, the detection interval is set to 10 clock cycles; and when quiet_period is 1000 to 10000 clock cycles, the detection interval is set to 100 clock cycles. The above segmented mapping is implemented using if, elseif, or case statements in SystemVerilog, without relying on model training or runtime parameter fitting. By making shorter silent periods correspond to higher FIFO detection frequencies, short-term test cases for development and debugging can promptly identify the emptying status. By making longer silent periods correspond to lower FIFO detection frequencies, the polling overhead caused by repeated calls to the used() interface in long-term regression test cases is reduced. Furthermore, the determined detection interval is set as the buffer waiting period buffer_period after the exit of the second-level parallel structure. This allows the cyclic emptying detection thread to wait for buffer_period after each contention detection, and then read the used() return value of each FIFO and the total number of objects in the current phase again. This absorbs the state changes within the Delta Cycle and the transient fluctuations caused by the output of the last step of the DUT pipeline. When quiet_period corresponds to multiple clock domains, buffer_period adopts the maximum value among the detection intervals of each clock domain, thereby ensuring that the buffer wait covers the slowest data path. Therefore, timeout_th, the corresponding timeout counter clock, quiet_period for each clock domain, the ready threshold for the blocking flag, the detection interval, and buffer_period are encapsulated together into an adaptive timing control set. In this adaptive timing control set, timeout_th is used by the timeout protection thread to count clock cycles through a repeat loop, quiet_period and buffer_period for each clock domain are used by the loop emptying detection thread to perform silent waiting and loop re-checking, and the ready threshold for the blocking flag is used for comparison of the return values ​​of wait_for_total_count or get_objection_total.

[0022] Finally, the data path probe matrix and the adaptive timing control set are aligned and assembled to generate parallel monitoring context data. In specific implementation, timeout monitoring fields, event listening fields, and loop emptying detection fields are set according to the reading requirements of the three competition exit paths. Among them, the timeout monitoring field writes timeout_th and the corresponding timeout counter clock; the event listening field writes the end_sim event handle; and the loop emptying detection field writes the object handles, used() interfaces, sampling order, clock domain, quiet_period, blocking flag ready threshold, detection interval, and buffer_period of inagt2rm FIFO, rm2chk FIFO, and outagt2chk FIFO. After the fields are written, it is checked in turn whether the three FIFO object handles and end_sim event handle are empty, whether each used() interface can return a non-negative queue occupancy depth, and whether timeout_th, quiet_period, and buffer_period are all positive integers. If any check fails, uvm_fatal is called to stop the current test case. If all checks pass, the parallel monitoring context data is frozen, and external threads are prohibited from modifying the threshold values, object handles, and sampling order during this round of simulation. Subsequently, the parallel monitoring context data is passed to the first-level fork / join_any parallel structure, enabling the timeout protection thread to accumulate counts based on timeout_th, the event triggering thread to block and wait for external termination events via @(end_sim), and the loop emptying detection thread to call the used() interface of inagt2rm FIFO, rm2chk FIFO, and outagt2chk FIFO according to the detection interval, and to determine whether the total number of objects in the current phase has reached the blocking flag ready threshold through get_objection_total or wait_for_total_count. At the same time, the simulation control blocking flag is independently passed to the subsequent competition arbitration and control release process, and a unique drop_objection is executed for the simulation control blocking flag after any exit path is completed, thereby ensuring that raise_objection and drop_objection are strictly paired, keeping the simulation lifecycle locked before the completion of parallel monitoring, and ending normally according to the UVM phase mechanism after the exit scenario is determined.

[0023] Specifically, in step S2, based on the verification environment monitoring configuration set, three non-blocking competing exit paths—a timeout protection thread, an event triggering thread, and a loop emptying detection thread—are simultaneously started in the first-level parallel structure. This allows for multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal emptying exit signals. It should be understood that chip simulation may enter an exit state due to abnormal suspension of the design under test or verification component, active termination by external test control, or completion of internal transaction processing within the verification environment. If only a fixed timeout path is set, normal use cases need to wait for the timeout threshold to be reached before ending. If the judgment is based solely on the silent state of the external bus, it is impossible to determine whether the transactions in the input agent to the reference model queue, the reference model to the checker queue, and the output agent to the checker queue have been fully consumed by the reference model and checker. If different exit conditions are detected serially, the previous detection process will block the response of the next exit condition, and a brief period of no data error may be identified as simulation completion during the burst stimulus interval. Therefore, in the technical solution of this application, based on the verification environment monitoring configuration set, three non-blocking competitive exit paths—a timeout protection thread, an event triggering thread, and a loop drain detection thread—are simultaneously started in the first-level parallel structure. This allows for multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal drain exit signals. This covers three exit scenarios: abnormal timeout, external active termination, and normal drain of internal data paths, respectively, and decouples the abnormal protection logic, active control logic, and normal termination logic. In this way, when the verification environment is abnormally suspended, the timeout exit signal limits simulation resource usage; when targeted testing or error injection testing is completed, the event exit signal promptly terminates the simulation; and during normal regression testing, the normal drain exit signal ensures that the scoreboard completes transaction comparison, while preventing any monitoring path from blocking other paths during the waiting period.

[0024] Figure 4 This is a flowchart of step S2 of the simulation timeout protection exit method in chip verification according to an embodiment of this application. Figure 4As shown, step S2 includes: S21, unpacking and parsing the parallel monitoring context data using a parallel dispatcher to obtain the timeout monitoring load, event listening load, and cyclic emptying detection load, and routing them to three non-blocking competing threads respectively; S22, incrementing the clock cycle based on the timeout monitoring load to generate a timeout exit signal, and simultaneously listening to external termination events in a blocking manner based on the event listening load to generate an event exit signal; S23, performing discrete weighted summation quantization on the queue occupancy depth of each data path based on the cyclic emptying detection load to generate emptying residual feature values, and performing sequential joint determination of the silence period and the total number of blocking flags to generate a silence ready state bit; S24, determining the zero value of the emptying residual feature values ​​and the validity of the silence ready state bit to generate a normal emptying exit signal.

[0025] Figure 5 This is a schematic diagram of a multi-level parallel competition exit architecture for a simulation timeout protection exit method in chip verification according to an embodiment of this application. Figure 5 As shown, the first-level fork / join_any includes path A timeout protection exit, path B event trigger exit, and path C loop emptying detection. The three paths start simultaneously after the watchdog gains control of the simulation lifecycle. Path A corresponds to Thread1, which waits for the set timeout time. After the number of running clock cycles reaches timeout_th, it prints timeout-related status information and triggers uvm_error, thereby generating a timeout exit signal. Path B corresponds to Thread2, which waits for the end event. After @(end_sim) unblocks, it prints event trigger exit information, thereby generating an event exit signal. Path C executes a while (1) loop and starts the second-level fork / join_any in each loop to perform the silent period and objection joint detection and TLM FIFO emptying detection in parallel.

[0026] In path C, Thread3_1 first executes repeat(quiet_period) to wait for the quiet period, and then waits for the total number of objects in the current phase to drop to the blocking flag ready threshold through wait_for_total_count. When the two conditions are met in sequence, vr_reached is set to valid. Thread3_2 calls the used() interface of inagt2rm FIFO, rm2chk FIFO and outagt2chk FIFO in a loop. When any FIFO has residual transactions, the current detection branch is completed. The second level join_any returns when either thread in Thread3_1 or Thread3_2 completes first, and terminates the other unfinished thread by disable fork. Then it waits for buffer_period and re-detects through get_objection_total and the used() interface of each FIFO. When vr_reached is valid, the total number of objects is equal to the blocking flag ready threshold and each FIFO is empty, a normal emptying exit signal is generated. Otherwise, the next while (1) loop is executed.

[0027] It is worth mentioning that, Figure 5 The printing of timeout-related status information, event-triggered exit information, normal termination information, and simulation termination indicates the functional results generated after the corresponding path meets the exit conditions. In this embodiment, the three paths do not execute `drop_objection` separately, but instead generate timeout exit signals, event exit signals, and normal emptying exit signals respectively. The subsequent parallel competition arbitration mechanism determines the first exit path, and then executes `drop_objection` once collectively based on the simulation control blocking flag. Therefore, the simulation termination in the figure should be understood as the corresponding path triggering a unified exit process, rather than the three paths repeatedly releasing the same object.

[0028] More specifically, in a concrete example of this application, the simulation control component receives the parallel monitoring context data generated in the previous stage, constructs a first-level parallel structure using SystemVerilog's fork / join_any, and establishes a timeout protection path Thread1, an event triggering path Thread2, and a loop emptying detection path Thread3 within this first-level parallel structure. Each of these three paths is set as an independent named thread, giving each path its own separate local counter, state variables, and event waiting control block. When the corresponding conditions are met, the three threads only generate their respective exit signals, without directly executing `drop_objection` in this step. This allows for a unique pairing release of the simulation control blocking flag based on a first-come, first-served arbitration result. This implementation has the same exit triggering result as the implementation where the winning path releases the control, and it avoids duplicate releases when multiple exit conditions are met within the same Delta Cycle. In specific implementation, firstly, the parallel monitoring context data is unpacked and parsed based on the parallel dispatcher. The timeout_th, timeout counter clock, and corresponding counter control fields are encapsulated into a timeout monitoring payload. The end_sim event handle and event validity status field are encapsulated into an event listening payload. The object handles, used() interfaces, sampling order, clock domain, quiet_period, blocking flag ready threshold, and buffer_period of inat2rm FIFO, rm2chk FIFO, and outagt2chk FIFO are encapsulated into a loop drain detection payload. Then, the three payloads are written into local read-only variables of Thread1, Thread2, and Thread3 respectively to avoid different exit conditions due to changes in external configuration objects during the execution of the three threads. Before starting the thread, the timeout exit signal, event exit signal, and normal drain exit signal are initialized to an invalid state, and it is verified that each FIFO object handle, end_sim event handle, and counter clock interface are in a valid state. If the verification fails, uvm_fatal is called to terminate the thread initialization of the current test case.

[0029] Next, in Thread1, `repeat(timeout_th)` is executed based on the timeout monitoring load, and the clock cycle count is incremented once each time a valid edge of the monitoring clock arrives. The timeout exit signal remains invalid until the count reaches `timeout_th`. Once the count reaches `timeout_th` and neither the event exit signal nor the normal drain exit signal has been arbitrated, the timeout exit signal is made valid. The simulation timeout status is recorded using `uvm_error`, and `display_objections()` is called to output information about components in the current phase that have not yet released objects, enabling subsequent structured logging to pinpoint the cause of the simulation failure. The components that terminate frequently; meanwhile, in Thread2, @(end_sim) is executed based on the event listening payload, causing the thread to remain in a blocked waiting state without periodic polling if no external termination event is received. Since Thread2 is located in an independent parallel branch, its blocked state does not affect the continued operation of Thread1 and Thread3. When the stimulus sending component, directed test case, or error injection control component triggers the end_sim event, Thread2 releases its wait, sets the event exit signal to valid, and records the external active termination state through uvm_info. This makes the event-triggered exit independent of whether the external bus is silent, and does not identify the burst stimulus interval as the test completion.

[0030] Then, a while(1) loop is executed in Thread3, and at the beginning of each loop, the implementation variable vr_reached corresponding to the silent ready state bit is cleared to zero. Then, the second-level fork / join_any parallel structure consisting of the silent and objection joint detection sub-thread Thread3_1 and the data path emptying detection sub-thread Thread3_2 is started. Among them, Thread3_1 first waits for the preset silent period by repeat(quiet_period), and then waits for the total number of blocking flags in the current phase to drop to the blocking flag ready threshold by wait_for_total_count, or periodically reads the total number of objects by get_objection_total and compares it with the blocking flag ready threshold. When the two conditions are met in the order of first passing quiet_period and then reaching the blocking flag ready threshold, vr_reached is set to 1 to generate a valid silent ready state bit. Thread3_2 calls inagt2rm FIFO, rm2chk FIFO and outagt2chk according to the sampling order specified by the data path probe matrix. The `used()` interface of the FIFO retrieves the non-negative occupancy depths of the three queues and performs integer multiplication and accumulation on the three occupancy depths using pre-set positive integer weights. In this example, the weights for the three queues are set to 1, 2, and 4 respectively, thus obtaining the empty residual feature value. Since each occupancy depth is a non-negative integer and each weight is greater than zero, an empty residual feature value of zero uniquely corresponds to all three FIFOs being empty, while an empty residual feature value greater than zero corresponds to at least one FIFO having an unprocessed transaction. When Thread3_2 detects an empty residual feature value greater than zero, it completes the current sub-thread, causing the second-level `join_any` to return and executing `disable fork` to terminate Thread3_1, which is still in a silent waiting or blocking state, preventing the continued use of the current silent detection result after a transaction reappears in the data path. When the `used()` return values ​​of all three FIFOs are zero, Thread3_2 continues running and enters the next sampling cycle until Thread3_1 completes first after `quiet_period` and the total number of objects reaches the blocking ready threshold.

[0031] Furthermore, after the second-level parallel structure ends, wait for buffer_period to absorb the state changes within Delta Cycle and the transient fluctuations caused by the last output of the DUT pipeline. Call the used() interface of the three FIFOs again to calculate the empty residual characteristic value, and reread the total number of blocking flags through get_objection_total. If and only if the empty residual characteristic value is equal to zero, the silent ready state bit is valid, and the total number of blocking flags is equal to the blocking flag ready threshold, set the normal empty exit signal to valid and exit the while(1) loop. If any condition is not met, clear vr_reached and enter the next loop iteration. This confirms that the empty condition is a continuously satisfied state rather than a transient state generated by a single sampling. When any one of Thread1, Thread2, or Thread3 generates a valid exit signal and completes the process, the first-level join_any returns, outputting the timeout exit signal, event exit signal, and normal drain exit signal to the subsequent parallel competition arbitration mechanism. Subsequent steps capture the first exit status and execute disable fork to terminate the remaining uncompleted threads in the first-level parallel structure, thereby ensuring that the three exit paths run simultaneously without blocking each other, and that the exit scenario of the current simulation is determined only by the exit path that first meets the conditions.

[0032] It's worth noting that the emptying detection targets are not limited to TLM FIFOs, but can also include pending transaction queues in the UVM register model, comparison queues within the scoreboard, pending transaction counts in the virtual sequencer, and custom data structures implementing the capacity query interface. When adding a detection target, simply add its object handle and capacity query interface to the data path probe set. Furthermore, for test cases where an expected error causes a specific FIFO to fail to empty, remove the corresponding FIFO from the current test case's data path probe set, or trigger the end_sim event after error injection. For negative test cases aimed at verifying timeout behavior, shorten the timeout_th, or disable the watchdog via cfg.watchdog_sw and let the test case manage the exit timing.

[0033] Specifically, in step S3, a parallel competition arbitration mechanism is used to determine the priority of timeout exit signals, event exit signals, and normal drain exit signals, and to terminate the remaining unfinished threads, thereby generating a simulation termination instruction. It should be understood that since the timeout protection thread, event triggering thread, and cyclic drain detection thread run in parallel within the same simulation period, when the simulation approaches timeout_th, the external end event end_sim is triggered, and the data path completes draining, the timeout exit signal, event exit signal, and normal drain exit signal may become valid sequentially within adjacent clock cycles or the same Delta Cycle. If each thread executes drop_objection separately, it may not only cause the same simulation control blocking flag to be released repeatedly, but also lead to inconsistent exit reason records, other threads continuing to access inagt2rm FIFO, rm2chk FIFO, and outagt2chk FIFO after the exit conditions have been met, and background threads failing to terminate. Therefore, in the technical solution of this application, a parallel competition arbitration mechanism is further used to determine the priority of timeout exit signals, event exit signals, and normal drain exit signals, and to terminate the remaining unfinished threads, thereby generating a simulation termination instruction. This converges the three competing exit paths into a single simulation exit scenario, and ensures that the control release operation, exit reason, and debugging diagnostic information remain consistent. This avoids parallel threads repeatedly executing `drop_objection` or outputting conflicting exit logs, promptly stops unfinished threads from continuously occupying clock, event, and queue resources, and ensures that abnormal timeouts, externally initiated terminations, and normal drain terminations all complete the simulation exit according to a defined control flow.

[0034] Figure 6 This is a flowchart of step S3 of the simulation timeout protection exit method in chip verification according to an embodiment of this application. Figure 6 As shown, step S3 includes: S31, capturing and one-hot encoding the timeout exit signal, event exit signal, and normal drain exit signal based on the logic OR competition arbitrator to generate the initial trigger state vector; S32, after terminating and cleaning up the non-triggered suspended threads based on the initial trigger state vector, performing stability quantization scoring on the trigger state to obtain a stable exit scenario identifier; S33, decoding the debugging diagnostic information of the stable exit scenario identifier based on the lookup table mapping, and atomically combining the simulation control blocking identifier with the structured log to generate a paired release action word to obtain the simulation termination instruction.

[0035] More specifically, in a specific example of this application, the simulation control component sets the timeout protection thread, the event triggering thread, and the loop empty detection thread in a named first-level fork / join_any parallel structure, and sets the timeout exit signal, event exit signal, and normal empty exit signal generated by the three threads as latched status signals. Each status signal remains valid after becoming valid until the competition arbitration completion status is received, so that the parallel competition arbitration mechanism can complete the stability check. In specific implementation, firstly, when starting the first-level parallel structure, the timeout exit signal, event exit signal, and normal drain exit signal are initialized to an invalid state. A three-dimensional state bus is established in the order of the timeout exit signal, event exit signal, and normal drain exit signal. When Thread1 completes repeat(timeout_th) and generates a timeout exit signal, Thread2 unblocks and generates an event exit signal through @(end_sim), or Thread3 completes the data path drain judgment and generates a normal drain exit signal, the logic or contention arbiter waits for any one of the three state signals to become valid through a wait statement. The simulation time, Delta Cycle, thread number, and current phase of the signal are recorded, and the first detected valid state is immediately latched. The timeout exit signal corresponds to the one-hot code 100, the event exit signal corresponds to the one-hot code 010, and the normal drain exit signal corresponds to the one-hot code 001, thereby generating the initial trigger state vector. For cases where three signals arrive at different simulation times, the signal with the earliest simulation time is selected. For cases where two or more signals are valid simultaneously within the same simulation time and the same Delta Cycle, the same-cycle adjudication is performed in a fixed order of timeout exit signal, event exit signal, and normal drain exit signal to ensure that only one valid bit is generated each time arbitration. Timeout exit is used first to retain abnormal diagnostic results where the simulation has reached timeout_th. Next, based on the initial trigger state vector, the completed and incomplete threads are determined. After the first-level join_any returns due to the completion of the first thread, disable fork is executed, or disable monitoring_fork is executed for the named parallel block to terminate the remaining threads that are still in clock wait, @(end_sim) event wait, quiet_period wait, wait_for_total_count wait, or while(1) loop, and simultaneously terminate the second-level fork / join_any child threads that have not yet been completed inside the loop emptying detection thread. After executing disablefork, the write permissions of the other two state signals are cleared, the latch state of the initial signal is retained, and the local counters, event wait control blocks and queue polling tasks corresponding to each incomplete thread are reclaimed, thereby preventing the continued calling of the used() interface of each FIFO or the generation of exit requests after the arbitration is completed.

[0036] Then, within the buffer time window corresponding to `buffer_period`, the stability of the initial trigger state vector is quantified and scored. The stability score is initialized to zero. One point is added when the initial trigger state vector equals any one of the valid one-hot codes 100, 010, or 001; one point is added when the winning signal corresponding to the initial trigger state vector remains valid within `buffer_period`; and one point is added when `disable fork` completes and the other two threads are no longer running. When the stability score reaches three points, 100 is mapped to a timeout exit scenario flag, 010 is mapped to an event exit scenario flag, and 001 is mapped to a normal drain exit scenario flag, thus obtaining the stable exit scenario flag. If the initial trigger state vector is not a valid one-hot code, the winning signal fails to remain valid, or the incomplete thread is not terminated, an abnormal contention arbitration state is reported via `uvm_fatal`, and the control release is stopped to prevent the simulation control release blocking flag from being released with an uncertain exit reason.

[0037] Furthermore, SystemVerilog's case statements or pre-defined associative arrays are used to perform lookup table mapping for stable exit scenario identifiers. When the stable exit scenario identifier is a timeout exit scenario identifier, the timeout_th arrival information is recorded through uvm_error, display_objections() is called to obtain the component information of the object that has not yet been released in the current phase, and the used() return values ​​of inagt2rm FIFO, rm2chk FIFO, and outagt2chk FIFO are recorded. When the stable exit scenario identifier is an event exit scenario identifier, the trigger time, trigger source, and current phase of end_sim are recorded through uvm_info and UVM_LOW. When the stable exit scenario identifier is a normal emptying exit scenario identifier, the occupancy depth of the three FIFOs is recorded as zero, the silent ready status bit vr_reached is valid, and the return value of get_objection_total is equal to the blocking identifier ready threshold, thereby generating a structured log corresponding to the exit scenario. The simulation control component then reads the phase object, watchdog holder, control elevation state, and pending release state from the simulation control blocking flag. When the control elevation state is valid and the pending release state has not been consumed, it generates a paired release action word containing the phase object, watchdog holder, drop_objection opcode, and single execution sequence number. Finally, it locks the instruction synthesis area using a semaphore, writes the stable exit scene flag, paired release action word, and structured log to the same instruction object, and then sends this instruction object as an indivisible data unit to the subsequent instruction decoder using mailbox.put, thus obtaining the simulation termination instruction. After sending, it releases the semaphore, allowing subsequent steps to call drop_objection once based on the simulation termination instruction, thereby completing the unique paired release of the simulation control blocking flag.

[0038] Specifically, in the normal emptying exit scenario, after the stimulus is sent, each verification component releases the objection in turn. When the monitored FIFO is continuously empty and the total number of objects drops to the blocking flag ready threshold, the normal emptying exit path is completed first. In the event-triggered exit scenario, the test case triggers the end_sim event, and the event-triggered path is completed first. In the timeout protection exit scenario, neither the event-triggered path nor the normal emptying exit path is completed. Thread1 is completed first after the count reaches timeout_th, and outputs the information of the components that have not released objects.

[0039] Figure 7This is a timing comparison diagram of normal drain exit, event-triggered exit, and timeout protection exit in the simulation timeout protection exit method during chip verification according to embodiments of this application. Figure 7 As shown, the horizontal arrows indicate the direction of time progression. In the diagram, `raise_obj` represents a simplified marker for `raise_objection`, and `drop_obj` represents a simplified marker for `drop_objection`. At the start of the simulation, the watchdog executes `raise_obj` to gain control of the simulation lifecycle. The timeout protection path, event triggering path, and cyclic emptying detection path run in parallel from this moment. The `drop_obj` for paths A, B, and C in the diagram represent paths that first meet the exit conditions and trigger the unified control release process to execute `drop_objection`. This does not mean that each path can repeatedly execute the release for the same simulation control prevention flag.

[0040] In scenario A, during normal exhaust and exit, after the watchdog executes `raise_obj`, the verification environment sequentially undergoes stimulus transmission, DUT processing, and transaction comparison. Each verification component releases its held objects after completing its task. When the `inagt2rm` FIFO, `rm2chk` FIFO, and `outagt2chk` FIFO are all exhausted, `vr_reached` is valid, and the total number of objects drops to the blocking flag ready threshold, path C completes first and triggers `drop_obj`, thus ending the current simulation. In this scenario, the normal exhaust and exit signal becomes valid first, ensuring that the reference model and checker complete their pending transactions.

[0041] In scenario B, the watchdog executes `raise_obj` and initiates three exit paths. At time t1 after the stimulus transmission ends, `end_sim` is triggered. Path B's `@(end_sim)` is unblocked and completes first, subsequently triggering path B's `drop_obj` and ending the simulation. This scenario is suitable for targeted stimulus testing, verification of specific functional points, or testing processes where, after error injection, there is no need to wait for all data paths to be cleared. `end_sim` is used to distinguish between the completion of stimulus transmission and the burst stimulus interval.

[0042] In scenario C, after the timeout protection exit, the simulation enters an abnormal running or abnormal suspension state after the watchdog executes raise_obj. Path B does not receive end_sim, and path C also fails to meet the normal drain conditions. When the clock cycle count of path A reaches the timeout_th corresponding to the timeout, path A completes first and triggers path A drop_obj. At the same time, display_objections() outputs the component information of the current phase that has not yet released objects, and uvm_error records the timeout status, thereby forcibly ending the abnormal simulation.

[0043] Specifically, in step S4, a paired release operation is performed on the simulation control blocking flag based on the simulation termination instruction to complete the simulation exit. It should be understood that since the simulation control blocking flag corresponds to a `raise_objection` operation performed by the watchdog in the current phase, only by executing a `drop_objection` operation matching this control elevation operation can the object reference count of the current phase be correctly decremented. If the release operation is not performed, the main_phase or run_phase cannot end normally; if the release operation is repeatedly executed, it will cause an abnormal object count. Furthermore, the environmental states corresponding to timeout exit, external event exit, and normal drain exit are different. Timeout exit may involve components with unreleased objects and unconsumed transactions; event exit may involve queue data retained according to the test intent; and normal drain exit requires confirmation that the data path has completed transaction processing. If diagnostic information is not saved and residual states are not cleaned up before releasing control, the data of the current use case may also affect subsequent regression use cases. Therefore, in the technical solution of this application, a pairing release operation is further performed on the simulation control blocking flag based on the simulation termination command to complete the simulation exit. After the control is released, the exit scenario archiving, verification environment reset, and the start of the next regression test case are executed sequentially. This ensures that raise_objection and drop_objection maintain a one-to-one correspondence and isolates the running states between adjacent verification test cases. In this way, it can be ensured that the current simulation ends according to the determined exit reason, avoid phase suspension and count abnormalities caused by object not being released or being released repeatedly, retain the information required for timeout location and result traceability, and enable the next regression test case to start running from a determined state with no residual transactions.

[0044] More specifically, in this embodiment, step S4 includes: deframing and unpacking the simulation termination instruction based on the instruction decoder, releasing control of the simulation lifecycle to generate a lifecycle termination pulse, and structurally encoding and archiving the diagnostic residual information to obtain a simulation scenario log set; waking up the hard reset engine based on the lifecycle termination pulse, and performing a cleanup load assessment on the simulation scenario log set before flushing dirty data from registers and queues to obtain a clean initial state physical layer; performing test case cursor stepping and parameter re-instantiation on the clean initial state physical layer based on the regression test scheduler to generate a verification environment monitoring configuration set, and injecting an excitation pulse into the virtual test bus to generate a runtime start signal.

[0045] Specifically, in a specific example of this application, the instruction decoder reads the simulation termination instruction from the mailbox, deframes and unpacks the stable exit scenario identifier, paired release action word, structured log, instruction sequence number, and integrity verification field in the simulation termination instruction, and sequentially executes one-time control release, diagnostic information archiving, environment reset, and regression scheduling through a state machine. In specific implementation, firstly, the instruction decoder checks whether the phase object, watchdog holder, and instruction sequence number carried by the simulation termination instruction are consistent with the corresponding phase object, watchdog holder, control elevation state, and paired release state recorded in the simulation control prevention identifier. When the control elevation state is valid, the paired release state has not been consumed, and the instruction sequence number has not been executed, the release operation area is locked through a semaphore, the paired release state is updated to "releasing," and then drop_objection is called to perform a control release once, updating the paired release state to "released" to prevent the same simulation termination instruction from being repeatedly decoded and then drop_objection called again. After `drop_objection` is completed, the total number of objects in the current phase is read using `get_objection_total`. When the stable exit scenario flag is the normal empty exit scenario flag, it is confirmed that the total number of objects has dropped to the value that allows the phase to end. When the stable exit scenario flag is the timeout exit scenario flag or the event exit scenario flag, and other components still hold objects, `display_objections()` is called to output the path, number, and duration of the components that have not released objects. The abnormal state is saved using `uvm_error`, and if the number of objects has not reached zero after the preset exit grace period, `uvm_fatal` is called to terminate the current simulation process, thus ensuring that abnormally suspended components do not cause the regression task to occupy simulation resources indefinitely. After the release operation is accepted, the instruction decoder sends a lifecycle termination pulse of one valid cycle to the reset control channel. This lifecycle termination pulse indicates that the current simulation control blocking flag has been paired and released, rather than prematurely announcing the end of the lifecycle before `drop_objection` is executed.

[0046] Next, before executing the environment reset, the instruction decoder performs structured encoding and archiving of the diagnostic residual information in the simulation termination instruction. Specifically, when the stable exit scenario flag is the timeout exit scenario flag, it records the arrival time of timeout_th, the current phase, the information of unreleased components returned by display_objections(), inagt2rm FIFO, rm2chkFIFO, and outagt2chk. The `used()` return value of the FIFO and the timeout protection path identifier are recorded. When the stable exit scenario identifier is the event exit scenario identifier, the trigger time of `end_sim`, the triggering component, the occupied depth of the three FIFOs, and the event trigger path identifier are recorded. When the stable exit scenario identifier is the normal empty exit scenario identifier, the `used()` return values ​​of the three FIFOs are all zero, the silent ready status bit `vr_reached` is valid, the return value of `get_objection_total` reaches the blocking identifier ready threshold, and the cyclic empty detection path identifier are recorded. The instruction decoder outputs the exit reason summary through `uvm_info` and `UVM_LOW`, and writes the test case identifier, random seed, exit time, exit path, queue residual depth, objection holder, and scoreboard comparison result into the log file in a fixed field order. This results in the simulation scenario log set, which is persisted before subsequent queue cleanup and DUT reset to prevent diagnostic information from being lost when the environment is reset.

[0047] Then, the lifecycle termination pulse wakes up the hard reset engine, which is the reset sequence controller in the verification environment. It is used to drive the DUT's reset interface and clean up the internal state of the verification component through the virtual test bus. The hard reset engine performs a deterministic cleanup load assessment based on the stable exit scenario identifier in the simulation scenario log set and the residual depth of the three FIFOs. When exiting normally and all three FIFOs are empty, the basic reset process is executed. When exiting due to an event and at least one FIFO has a transaction, the queue cleanup and DUT reset process is executed. When exiting due to timeout or there are components with unreleased objects, a deep cleanup process including thread termination, queue cleanup, reference model reset, checker reset, and complete DUT reset is executed. When performing queue cleanup, inagt2rm FIFO.flush(), rm2chkFIFO.flush(), and outagt2chk FIFO.flush() are called respectively to delete the transactions left over from the current use case, and to clear the pending comparison queue in the scoreboard, the pending processing queue of the reference model, and the pending transactions in the virtual sequencer. When performing DUT reset, the reset signal is kept in a valid state through the virtual test bus for the number of reset clock cycles specified by the DUT, and then the reset signal is released at the edge of the valid clock to restore the DUT registers and internal state machine to the reset values. At the same time, the reset() of the UVM register model is called to update the register image and the actual reset value of the key registers is verified by reading from the front door or the back door. After cleanup, call the used() interface of the three FIFOs again to confirm that the return value is zero, confirm that there are no pending transactions in the scoreboard and reference model, and confirm that the DUT reset completion indication is valid. Record the DUT reset state, verification queue idle state and register mirror synchronization state that meet the above conditions as the pure initial state physical layer. If any condition is not met, terminate the regression scheduling through uvm_fatal to prevent the next use case from starting in an uncertain state.

[0048] Furthermore, after receiving the ready state of the pure initial state physical layer, the regression test scheduler steps the test case cursor in the regression test case list, reads the test case name, random seed, timeout_th, quiet_period, blocking flag ready threshold, queue binding relationship, and end_sim event configuration of the next test case to be executed, and completes parameter re-instantiation through uvm_config_db, environment configuration object cfg object, or command line parameter plusargs to generate the verification environment monitoring configuration set corresponding to the next verification cycle. For the regression method that uses an independent simulation process for each test case, after the regression test scheduler ends the current simulation process, it starts the next simulation process with the verification environment monitoring configuration set, and the new simulation process generates a run phase start signal when it starts in main_phase or run_phase. For the verification method that uses the same simulation process to continuously execute multiple sub-test cases, after confirming that the current simulation control blocking flag has been released and the pure initial state physical layer is valid, the regression test scheduler injects a valid period of excitation pulse through the virtual test bus and converts the excitation pulse into a run phase start signal, so that the new watchdog task executes the next raise_objection according to cfg.watchdog_sw. Therefore, the initialization control process of verifying the environment monitoring configuration set and the start signal of the running phase is fed back to the next verification cycle. When there are no test cases to be executed, the regression test scheduler no longer injects excitation pulses and outputs the regression completion status, thus completing the orderly connection between the current simulation exit and the regression verification process.

[0049] Specifically, the watchdog participates in phase lifecycle management through `raise_objection` and `drop_objection`, queries the objection status through `get_objection_total`, and outputs runtime information through `uvm_info`, `uvm_error`, and `uvm_fatal`. Therefore, it is compatible with UVM's phase, objection, factory, and report mechanisms, and related reports can be intercepted by the UVM report catcher. This parallel competition exit method can also be implemented using event callbacks, interrupts, semaphores, or coroutines, and can be applied to OVM, VMM, OSVVM, and COcotb verification frameworks that support parallel tasks and lifecycle management.

[0050] In summary, the simulation timeout protection exit method in chip verification according to the embodiments of this application is explained. It constructs a centralized multi-level parallel monitoring architecture, locks the lifecycle control during the simulation operation phase, and makes the three exit paths—timeout protection, external event triggering, and cyclic emptying detection—operate independently and in parallel, thereby avoiding the complex problems of component coupling and state coordination caused by distributed monitoring. Specifically, by monitoring the transaction residue status of each data path queue within the verification environment, and combining the silent period and the blocking flag status to cyclically confirm the normal termination condition, it avoids premature exit due to transactions not being completed, which would be caused by judging solely based on external interface silence or one-time delay, and at the same time reduces the risk of misjudgment caused by sudden stimulus intervals and transient states. When any exit path meets the condition first, the exit signal is arbitrated on a first-come-first-served basis, terminating the remaining monitoring threads and releasing the lifecycle control in pairs, thereby ending the simulation in a timely manner under abnormal conditions, ensuring the integrity of transaction processing and result comparison under normal conditions, and reducing the maintenance complexity of the verification environment and the consumption of simulation resources.

[0051] Furthermore, a simulation timeout protection exit device is also provided during chip verification.

[0052] Figure 8 This is a block diagram of a simulation timeout protection exit device in chip verification according to an embodiment of this application. Figure 8 As shown, the simulation timeout protection exit device 100 in chip verification according to an embodiment of this application includes: a simulation control locking module 110, used to lock the control of the simulation lifecycle based on the verification environment monitoring configuration set to generate a simulation control blocking identifier when the simulation operation phase starts; a parallel exit monitoring module 120, used to simultaneously start three non-blocking competitive exit paths—a timeout protection thread, an event triggering thread, and a loop emptying detection thread—in a first-level parallel structure based on the verification environment monitoring configuration set, to perform multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal emptying exit signals; an exit competition arbitration module 130, used to determine the priority of the timeout exit signal, event exit signal, and normal emptying exit signal through a parallel competition arbitration mechanism and terminate the remaining unfinished threads to generate a simulation termination instruction; and a simulation release return module 140, used to perform a paired release operation on the simulation control blocking identifier based on the simulation termination instruction to complete the simulation exit.

[0053] As described above, the simulation timeout protection exit device 100 in chip verification according to the embodiments of this application can be deployed in a server, engineering workstation or computing cluster node running a chip verification simulation program, and implemented by the processor executing program instructions in the memory; the device can also be used as a software component in the verification environment, working in conjunction with the simulator, regression test scheduler and verification data storage system.

[0054] Based on the above embodiments, this application also provides an electronic device according to another exemplary embodiment. In some possible implementations, the electronic device in this application may include a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, can implement the steps of the simulation timeout protection exit method in the chip verification described above.

[0055] Embodiments of this application also provide a computer-readable storage medium storing computer-executable instructions. When the computer-executable instructions are executed by a processor, the simulation timeout protection exit method in chip verification according to embodiments of this application, as described above with reference to the accompanying drawings, can be executed. The computer-readable storage medium includes, but is not limited to, volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.

[0056] Embodiments of this application also provide a computer program product or computer program including computer-executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the computer device to perform a simulation timeout protection exit method in chip verification according to embodiments of this application.

[0057] Those skilled in the art will understand that the content disclosed in this application can be varied and modified in many ways. For example, the various devices or components described above can be implemented by hardware, or by software, firmware, or a combination of some or all of the three.

[0058] Furthermore, while this application makes various references to certain units in the system according to embodiments of this application, any number of different units can be used and run on the client and / or server. The units described are merely illustrative, and different aspects of the system and method may use different units.

[0059] Those skilled in the art will understand that all or part of the steps in the above methods can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk. Optionally, all or part of the steps in the above embodiments can also be implemented using one or more integrated circuits. Accordingly, each module / unit in the above embodiments can be implemented in hardware or as a software functional module. This application is not limited to any particular combination of hardware and software.

[0060] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.

[0061] The basic principles of this application have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in this application are merely examples and not limitations, and should not be considered as essential features of each embodiment of this application. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the application to the necessity of employing the aforementioned specific details for implementation.

[0062] The block diagrams of devices, apparatuses, devices, and systems involved in this application are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0063] It should also be noted that in the apparatus, equipment, and methods of this application, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of this application.

[0064] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this application. Therefore, this application is not intended to be limited to the aspects shown herein, but rather to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0065] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.

Claims

1. A method for exiting simulation timeout protection during chip verification, characterized in that, include: S1: When the simulation operation phase starts, control over the simulation lifecycle is locked based on the verification environment monitoring configuration set to generate a simulation control blocking flag. S2: Based on the verification environment monitoring configuration set, three non-blocking competitive exit paths are started simultaneously in the first-level parallel structure: timeout protection thread, event triggering thread, and loop emptying detection thread. Multi-level parallel monitoring of the verification environment is performed to obtain timeout exit signal, event exit signal, and normal emptying exit signal. S3: The parallel competition arbitration mechanism is used to determine the priority of timeout exit signals, event exit signals and normal drain exit signals and terminate the remaining unfinished threads to generate a simulation termination instruction. S4: Based on the simulation termination command, perform a pairing and release operation on the simulation control blocking flag to complete the simulation exit.

2. The simulation timeout protection exit method for chip verification according to claim 1, characterized in that, The verification environment monitoring configuration set includes timeout thresholds, silent period thresholds, block flag ready thresholds, input agent to reference model queue, reference model to inspector queue, output agent to inspector queue, and external termination events.

3. The simulation timeout protection exit method in chip verification according to claim 2, characterized in that, Step S1 includes: Based on the effective pulse of the startup signal during the running phase, control rights are elevated and locked during the simulation lifecycle. At the same time, the verification environment monitoring configuration set is deeply copied and serialized to generate a simulation control rights blocking flag and a global configuration image. The global configuration image is unpacked, split, and reassembled to obtain the basic timing threshold vector and data path probe matrix; Nonlinear adaptive timing derivation is performed on the basic timing threshold vector to obtain the adaptive timing control set; The data path probe matrix and the adaptive timing control set are structured and assembled to obtain parallel monitoring context data.

4. The simulation timeout protection exit method in chip verification according to claim 3, characterized in that, Step S2 includes: The parallel dispatcher unpacks and parses the fields of the parallel monitoring context data to obtain the timeout monitoring load, event listening load, and loop emptying detection load, and then routes and distributes them to three non-blocking competing threads. The timeout monitoring load increments the clock cycle to generate a timeout exit signal, while the event listening load performs blocking listening for external termination events to generate an event exit signal. Based on the cyclic emptying detection load, the occupancy depth of each data path queue is discretely weighted and quantized to generate emptying residual feature values, and the silence period and the total number of blocking flags are sequentially jointly determined to generate a silence ready state bit. The residual purging characteristic value is zeroed, and the validity of the silent ready state bit is determined to generate a normal purging exit signal.

5. The simulation timeout protection exit method in chip verification according to claim 1, characterized in that, Step S3 includes: Based on a logic or competition arbitrator, the first-launch state capture and one-hot encoding of timeout exit signal, event exit signal and normal drain exit signal are performed to generate the first-launch trigger state vector. After terminating and cleaning up the non-triggered suspended threads based on the initial trigger state vector, the stability of the trigger state is quantified and scored to obtain a stable exit scenario identifier. Based on lookup table mapping, the debugging and diagnostic information of the stable exit scenario identifier is decoded, and the simulation control blocking identifier is generated into a paired release action word and then atomically combined with the structured log to obtain the simulation termination instruction.

6. The simulation timeout protection exit method in chip verification according to claim 1, characterized in that, Step S4 includes: The simulation termination command is deframed and unpacked based on the instruction decoder, control over the simulation lifecycle is released to generate a lifecycle termination pulse, and the residual diagnostic information is structured and archived to obtain a simulation scenario log set. The hard reset engine is woken up by the lifecycle end pulse, and after cleaning the simulation scenario log set and evaluating the load, the dirty data in the registers and queues is flushed to obtain a clean initial state physical layer. The regression test scheduler performs test case cursor stepping and parameter re-instantiation on the pure initial state physical layer to generate a verification environment monitoring configuration set, and injects excitation pulses into the virtual test bus to generate a runtime start signal.

7. A simulation timeout protection exit device for chip verification, characterized in that, include: The simulation control locking module is used to lock the control rights of the simulation lifecycle based on the verification environment monitoring configuration set when the simulation operation phase starts, so as to generate a simulation control right blocking identifier. The parallel exit monitoring module is used to simultaneously start three non-blocking competitive exit paths—timeout protection thread, event triggering thread, and loop emptying detection thread—in the first-level parallel structure based on the verification environment monitoring configuration set. This allows for multi-level parallel monitoring of the verification environment to obtain timeout exit signals, event exit signals, and normal emptying exit signals. The exit competition arbitration module is used to determine the priority of timeout exit signals, event exit signals, and normal drain exit signals through a parallel competition arbitration mechanism and terminate the remaining unfinished threads to generate a simulation termination instruction. The simulation release and regression module is used to perform a paired release operation on the simulation control blocking flag based on the simulation termination command, so as to complete the simulation exit.

8. The simulation timeout protection exit device for chip verification according to claim 7, characterized in that, The parallel exit monitoring module includes: The monitoring load distribution unit is used to unpack and parse the fields of the parallel monitoring context data based on the parallel distributor to obtain the timeout monitoring load, event listening load and loop emptying detection load, and then route and distribute them to three non-blocking competing threads respectively. The timeout event detection unit is used to increment the count of the running clock cycles based on the timeout monitoring load to generate a timeout exit signal, and at the same time, it uses the event listening load to block the listening of external termination events to generate an event exit signal. The emptying and silencing quantization unit is used to perform discrete weighted sum quantization on the occupancy depth of each data path queue based on the cyclic emptying detection load to generate emptying residual feature values, and to perform sequential joint determination on the silencing period and the total number of blocking flags to generate a silencing ready state bit. The emptying exit determination unit is used to determine the zero value of the emptying residual characteristic value and the validity of the silent ready state bit in order to generate a normal emptying exit signal.

9. The simulation timeout protection exit device for chip verification according to claim 7, characterized in that, The exit from competition arbitration module includes: The initial signal capture unit is used to capture the initial state of timeout exit signal, event exit signal and normal drain exit signal based on the logic or competition arbitrator and perform one-hot encoding to generate the initial trigger state vector. The thread cleanup evaluation unit is used to terminate and clean up non-triggered suspended threads based on the initial trigger state vector, and to perform stability quantification scoring on the trigger state to obtain a stable exit scenario identifier. The termination instruction synthesis unit is used to decode the debugging and diagnostic information of the stable exit scenario identifier based on table lookup mapping, and to atomically combine the simulation control blocking identifier into a paired release action word with the structured log to obtain the simulation termination instruction.

10. An electronic device, characterized in that, include: Memory, used to store instructions; A processor, coupled to the memory, is configured to execute instructions stored in the memory to implement the simulation timeout protection exit method for chip verification as described in claims 1 to 6.