Methods and devices for determining task running status, electronic equipment, and storage media

By monitoring the execution phase of the chip verification task and reading logs in real time, the problems of high resource consumption and late failure identification in long-cycle chip verification are solved, enabling early detection of anomalies, reducing invalid waiting and resource waste, and improving verification efficiency.

CN123114890APending Publication Date: 2026-11-17MOORE THREADS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In long-cycle chip verification simulation scenarios, chip verification tasks have long running times, high resource consumption, and late failure identification, leading to resource waste and impacting subsequent task scheduling.

Method used

By identifying the operational phase of the chip verification task and reading simulation logs or compilation logs in real time, the running status information can be determined so as to detect anomalies before the task ends naturally.

Benefits of technology

It shortens the time for anomaly detection, reduces invalid waiting time, reduces resource waste, and improves chip verification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123114890A_ABST
    Figure CN123114890A_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, electronic device, and storage medium for determining the running status of a task. The method includes: identifying the current running stage of a chip verification task during its execution; the running log includes simulation logs or compilation logs; reading the running logs generated in the current running stage; and determining the running status information of the chip verification task based on the running logs; wherein the running status information is used to indicate whether there are any abnormalities during the execution of the chip verification task. Embodiments of this disclosure can improve chip verification efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of chip technology, and in particular to a method and apparatus for determining the running status of a task, an electronic device, and a storage medium. Background Technology

[0002] In the System-on-Chip (SOC) development process, there are long-cycle chip verification simulation scenarios, such as Gate Level simulation (GLS). In these scenarios, a single chip verification task can take a long time to run, sometimes for several days, consuming a lot of resources and impacting the scheduling of subsequent tasks. Summary of the Invention

[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for determining the running status of a task, which can shorten the time for anomaly detection, reduce invalid waiting time, and improve chip verification efficiency.

[0004] In a first aspect, this disclosure provides a method for determining the running status of a task, which includes: identifying the current running stage of the chip verification task during its execution; reading the running log generated in the current running stage; the running log including simulation log or compilation log; and determining the running status information of the chip verification task based on the running log; wherein the running status information is used to indicate whether there is an anomaly during the execution of the chip verification task.

[0005] Secondly, this disclosure provides a task operation status determination device, which includes: an identification module for identifying the current operation stage of the chip verification task during its operation; a reading module for reading operation logs generated in the current operation stage; the operation logs include simulation logs or compilation logs; and a first determination module for determining the operation status information of the chip verification task based on the operation logs; wherein the operation status information is used to indicate whether there are any abnormalities during the operation of the chip verification task.

[0006] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the above-described task running state determination method.

[0007] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the above-described task running state determination method.

[0008] The embodiments provided in this disclosure first identify the current running stage of the chip verification task during its execution, read the running logs generated in that stage (i.e., simulation logs or compilation logs), and then determine the running status information of the chip verification task based on these logs, thereby detecting anomalies in the chip verification task as early as possible. In this way, anomalies in the chip verification task can be identified promptly based on the real-time generated running logs before the task naturally ends, significantly shortening the anomaly detection time, reducing invalid waiting time, and minimizing resource waste caused by long periods of invalid waiting.

[0009] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0010] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed description of exemplary embodiments with reference to the accompanying drawings, in which:

[0011] Figure 1 A flowchart of a method for determining the running status of a task provided in an embodiment of this disclosure.

[0012] Figure 2 A flowchart of a method for determining the running status of a task provided in an embodiment of this disclosure.

[0013] Figure 3 This is an exemplary schematic diagram of a state machine provided for an embodiment of this disclosure.

[0014] Figure 4 This is a block diagram of a task operation status determination device provided in an embodiment of the present disclosure.

[0015] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation

[0016] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0017] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0018] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0019] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0020] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0021] In related technologies, the monitoring and result determination of chip verification tasks mainly employ methods such as manual review, post-completion summary, and polling scripts. In the manual review method, verification engineers periodically log into the server and retrieve log files such as the compilation log (elab.log) and simulation log (run.log) for pass / fail (PASSED), failure (FAILED), and Universal Verification Methodology (UVM) related error keywords (such as UVM_ERROR) to determine the task status. In the post-completion summary method, the regression platform uniformly reads the result files and provides a pass / fail conclusion after the chip verification task naturally concludes. In the polling script method, the status log records the current running status of the test cases, such as simulation in progress, simulation passed, and simulation failed. Upon receiving a query command, the running status of the target test case is retrieved from the status file.

[0022] While the methods described above can reflect the results of chip verification tasks to some extent, they have significant shortcomings in long-cycle chip verification simulation scenarios. First, the manual review method heavily relies on engineer experience and requires frequent access to the task directory, making it unsuitable for large-scale regression testing. Second, the post-completion summary method only provides results after the task is completely finished, failing to detect errors that occurred early in the task's execution. Finally, the polling script method only records simulation progress, success, and failure, again failing to promptly identify errors during the simulation process.

[0023] It is evident that related technologies primarily rely on simulation logs to provide final conclusions. In long-cycle chip verification scenarios, especially when a single chip verification task may run for several days, these technologies require waiting for the task to complete naturally before providing results, resulting in several days of unnecessary waiting. Furthermore, chip verification tasks typically consume significant amounts of memory, CPU cores, simulation licenses, and storage resources for extended periods. If failures are not identified promptly, the chip verification task will continue to consume resources, leading to severe resource waste and impacting subsequent task scheduling.

[0024] In summary, long-cycle chip verification simulation scenarios present challenges such as long execution cycles for single chip verification tasks, high resource consumption, late failure detection, and high costs for manual tracking. Therefore, a method is needed to identify failure signs as early as possible during task execution to minimize losses, reduce unnecessary downtime, and reduce resource waste.

[0025] According to the task execution status determination method of this disclosure, the current execution stage of the chip verification task is first identified during the task's execution. The execution log generated in this stage (i.e., simulation log or compilation log) is then read. Based on this log, the execution status information of the chip verification task is determined, thereby detecting anomalies as early as possible. In this way, anomalies are identified promptly based on the real-time generated execution logs before the chip verification task naturally ends, significantly shortening the anomaly detection time, reducing invalid waiting time, and minimizing resource waste caused by long-term invalid waiting periods.

[0026] The task running state determination method according to embodiments of this disclosure can be executed by an electronic device such as a terminal device or a server. The terminal device can be a user equipment (UE), a mobile device, a user terminal, a personal digital assistant (PDA), a handheld device, a computing device, etc. The method can be implemented by a processor calling computer-readable program instructions stored in memory. Alternatively, the method can be executed by a server.

[0027] The task execution state determination method provided in this disclosure can be applied to long-cycle chip verification scenarios. For example, a long-cycle chip verification scenario can be a gate-level post-simulation (GLS) task. Unlike pre-simulation, gate-level post-simulation introduces real-world factors such as synthesis netlists, timing delays, clock trees, and place-and-route, resulting in a longer execution cycle for a single gate-level post-simulation task; therefore, it falls under the category of long-cycle chip verification scenarios. It should be understood that the task execution state determination method provided in this disclosure can also be applied to other scenarios, such as post-synthesis net-level pre-simulation and register transfer level (RTL) pre-simulation, and this disclosure does not limit its application to these applications.

[0028] The task running status determination method according to the embodiments of this disclosure can be embedded in the chip verification task execution script process, or it can be called as a sub-process of the chip verification task. The embodiments of this disclosure do not limit this.

[0029] Figure 1 A flowchart illustrating a method for determining the running state of a task, as provided in this embodiment of the disclosure. (Refer to...) Figure 1 The method may include steps S101 to S103.

[0030] In step S101, during the execution of the chip verification task, the current stage of the chip verification task is identified.

[0031] After the chip design is completed, the chip's functionality, timing, and logical correctness can be verified. This process, known as chip verification, is a core step before chip tape-out. A chip verification task can represent the task that implements the chip verification process. In this embodiment, the chip verification task can be the verification task of any type of chip, such as a graphics processor or a central processing unit; this embodiment does not impose any limitations on this.

[0032] This step allows us to identify the current stage of the chip verification task during its execution, thus enabling us to detect any anomalies before the task ends.

[0033] The main operational phases of a chip verification task include the compilation phase and the simulation phase. The compilation phase is a pre-simulation phase in the chip verification task. It involves parsing and compiling the chip's design code and test code before simulation, generating an executable file for the simulation phase. After the chip verification task starts, it first enters the compilation phase. After successful compilation, it then enters the simulation phase. In the simulation phase, the simulation tool loads the compiled executable file, simulates the chip's actual operating conditions, inputs test forces, and verifies the chip's output logic.

[0034] In one example, the presence of simulation logs can be used to determine whether the chip verification task is in the simulation phase. If simulation logs are present, the running phase is confirmed to be the simulation phase; otherwise, the running phase is not confirmed to be the simulation phase.

[0035] In step S102, the running log generated during the current running phase is read.

[0036] Runtime logs represent the logs generated during chip verification tasks, recording runtime information in real time. They can be used to fully reconstruct the execution process, locate errors, and view the running status. Runtime logs include simulation logs or compilation logs. Different stages of a chip verification task can generate different runtime logs. For example, compilation logs are generated during the compilation stage, and simulation logs are generated during the simulation stage.

[0037] The simulation log is a log file generated in real time by the simulation tool during the simulation phase. It records runtime information such as simulation startup, running, intermediate results, exception information, and termination status. The compilation log is a log file generated in real time by the compilation tool. It records information such as code compilation progress, syntax check results, compilation errors, compilation completion time, and file modification time.

[0038] As chip verification progresses, the runtime log is continuously updated. The content of the runtime log read by the electronic device at different times may change. Therefore, the electronic device can read the runtime log at the current moment. For example, during the compilation phase, the compilation log at the current moment can be read as the runtime log, and during the simulation phase, the simulation log at the current moment can be read as the runtime log.

[0039] It should be understood that we are currently in the process of performing a chip verification task.

[0040] In step S103, the running status information of the chip verification task is determined based on the running log; wherein, the running status information is used to indicate whether there are any abnormalities in the running of the chip verification task.

[0041] Operational status information can be used to uniquely identify the current running state of a chip verification task and to indicate whether there are any anomalies during the task's execution. For example, operational status information involved in the compilation phase includes successful compilation status and compilation failure status; operational status information involved in the simulation phase includes simulation pass status, simulation failure status, and simulation stall status.

[0042] It should be understood that this step is performed before the chip verification task finishes.

[0043] The embodiments provided in this disclosure first identify the current running stage of the chip verification task during its execution, read the running log generated in that stage at the current moment, and then determine the running status information of the chip verification task based on the running log, thereby detecting anomalies in the chip verification task as early as possible. In this way, anomalies in the chip verification task can be identified promptly based on the real-time generated running log before the chip verification task naturally ends, significantly shortening the anomaly detection time, reducing invalid waiting time, and minimizing resource waste caused by long-term invalid waiting periods.

[0044] Considering the differences in runtime logs between the compilation and simulation phases, the following describes how to read runtime logs.

[0045] In some embodiments, step S102 may include: when the running phase is the simulation phase, reading the simulation log at the current moment as the running log.

[0046] If the chip verification task is identified as being in the simulation phase, it indicates that the simulation is currently in progress. Therefore, the simulation log at the current moment can be read to understand detailed information about the chip verification task, such as whether it has ended or if there are any anomalies. In one example, all log content up to the current moment can be retrieved from the simulation log path as the real-time simulation log.

[0047] In this embodiment of the disclosure, simulation logs are collected in real time during the simulation phase, providing reliable data for subsequent state determination, ensuring the real-time nature of state monitoring during the simulation phase, and facilitating the timely detection of anomalies during the simulation phase.

[0048] Therefore, during the simulation phase, electronic devices can determine the operational status information of the chip verification task based on the simulation log. In the simulation phase, the operational status information can be used to indicate whether there are any anomalies in the chip verification task during the simulation process. For example, the operational status information can be a simulation pass status, a simulation failure status, or a simulation stall status, where the simulation failure status and the simulation stall status can indicate the presence of anomalies during the simulation process.

[0049] It should be understood that during the simulation phase, the compilation has already succeeded. Although both compilation logs and simulation logs exist during the simulation phase, the success of the compilation is certain. Therefore, it is not necessary to read the compilation logs to determine whether there are any exceptions during the compilation phase.

[0050] Considering that chip verification tasks require compilation before entering the simulation phase, and simulation will only proceed after successful compilation, this embodiment of the disclosure allows for monitoring of the compilation phase, which can further facilitate the early detection of anomalies. In some embodiments, step S102 may include: when the runtime phase is the compilation phase, reading the current compilation log as the runtime log.

[0051] Based on this, electronic devices can determine their operational status information based on compilation logs.

[0052] When the chip verification task is in the simulation phase, compilation logs can be read in real time, and the runtime status information can be determined based on these logs. During the compilation phase, the runtime status information can be used to indicate whether any exceptions occurred during the compilation process. For example, the runtime status information can be either a successful compilation status or a failed compilation status, where a failed compilation status indicates that an exception occurred during the compilation process.

[0053] In this embodiment, the execution phase of the chip verification task is first identified during its operation. If the execution phase is identified as the compilation phase, the current compilation log is read, and the execution status information of the chip verification task is determined based on the compilation log, thereby detecting anomalies as early as possible. In this way, anomalies during compilation are identified promptly based on real-time compilation logs before the chip verification task naturally ends, or even before entering the simulation phase, significantly shortening the anomaly detection time, reducing invalid waiting time, and minimizing resource waste caused by long-term wireless waiting. Simultaneously, comprehensive coverage of both the compilation and simulation phases ensures the completeness of monitoring; and fine-grained state differentiation in each phase improves accuracy and reduces judgment errors.

[0054] The process of determining the running status information based on the simulation log during the simulation phase is described below. In some embodiments, when the running phase is the simulation phase, step S103, which determines the running status information of the chip verification task based on the running log, may include steps S1031 to S1035.

[0055] In step S1031, it is detected whether there is a pass mark in the operation log; if there is a pass mark in the operation log, then step S1032 is executed; if there is no pass mark in the operation log, then steps S1033 to S1035 are executed.

[0056] The pass flag can be a pre-set identifier indicating that the simulation has passed, and can be customized. In one example, the pass flag can be SIMULATION PASSED. It should be understood that the pass flag can also be in other forms, such as SIMULATION PASS. This disclosure does not limit this. If the simulation passes, the chip verification task can automatically generate a pass flag and record the pass flag in the simulation log.

[0057] In step S1032, the running status information is determined to be a simulation pass status.

[0058] In step S1033, it is determined whether the simulation phase has ended or not.

[0059] The presence of a "pass" marker in the simulation log indicates that the simulation process has ended and the simulation has succeeded. Therefore, the running status information can be determined as a "simulation passed" status. The absence of a "pass" marker in the simulation log indicates that the simulation has failed. This could be because the simulation is in progress or it has ended but failed. Therefore, it can be further determined whether the simulation phase has ended or not.

[0060] In one possible implementation, step S1033 may include: performing failure flag detection on the running log to obtain a failure flag detection result; if the failure flag detection result indicates the presence of a failure flag, determining that the simulation phase has ended; if the failure flag detection result indicates the absence of a failure flag, determining that the simulation phase has not ended.

[0061] The failure flag detection result is either the presence of a failure flag in the simulation log or the absence of a failure flag in the simulation log. The failure flag can be set as needed. In one example, the failure flag can be SIMULATION FAILED. The failure flag only needs to indicate that the simulation has ended and failed; this disclosure does not impose any other limitations on the failure flag.

[0062] In step S1034, if the simulation phase has ended, the running status information is determined to be a simulation failure status.

[0063] If the failure flag detection result shows that there is a failure flag in the simulation log, it indicates that the current simulation process has ended and the simulation has failed. Therefore, the running status information can be determined to be a simulation failure status.

[0064] In step S1035, if the simulation phase has not ended, the simulation phase is subjected to process anomaly detection based on the running log to obtain running status information.

[0065] If the failure flag detection result shows no failure flag in the simulation log, it indicates that the current simulation process has not yet ended. At this point, the simulation process may be running normally or it may be stuck, i.e., a false run has occurred. Therefore, it is necessary to further determine whether there are any anomalies in the simulation process.

[0066] In one possible implementation, step S1035, which involves detecting process anomalies in the simulation phase based on the running log to obtain the running status information, may include: performing failure keyword detection on the running log to obtain the failure keyword detection result; and determining the running status information as a simulation failure state if the failure keyword detection result indicates the presence of a failure keyword.

[0067] The failure keywords can be pre-defined keywords that represent explicit errors during the simulation. There can be one or more failure keywords, which can be stored in a failure keyword list. Failure keywords in the list can be added, deleted, or updated as needed. In one example, failure keywords could be UVM_ERROR, UVM_FATAL, etc. The failure keyword detection results can be used to indicate whether failure keywords exist or not in the simulation log.

[0068] The presence of the "failure" keyword in the simulation log indicates that the simulation is still in progress but an error has occurred, thus confirming the running status as a simulation failure. The absence of the "failure" keyword in the simulation log suggests either that the simulation is in progress without errors, or that the simulation has already ended. Therefore, further failure flag detection can be performed on the simulation log.

[0069] In one possible implementation, step S1035, which involves detecting process anomalies in the simulation phase based on the running log to obtain the running status information, may include: determining the number of consecutive occurrences of the abnormal stagnation flag in the running log; and determining the running status information as a simulation stagnation state if the number of consecutive occurrences is greater than or equal to a preset threshold.

[0070] If the simulation phase is not yet over, the electronic device can count the number of consecutive occurrences of the abnormal stop flag to determine whether the simulation process is running normally or is in a false state.

[0071] In one example, an abnormal stall indicator could be a running message, such as "simulation running." It should be understood that during a normal simulation, the running message should only appear at the start of the simulation. If the running message appears repeatedly during the simulation, it may indicate that the simulation has stalled, resulting in a false running phenomenon.

[0072] The abnormal stall flag can also be other features indicating that the simulation task is not updating, such as log printing prompts. This disclosure does not impose any other limitations on the abnormal stall flag.

[0073] If the number of consecutive occurrences of the abnormal stall flag reaches a preset threshold within a preset polling cycle, it can be determined that the simulation process has stalled and is stuck. In this case, the running status information can be determined as a simulation stall state.

[0074] The preset threshold number of detection attempts can be set as needed. It should be understood that a larger preset threshold results in lower detection sensitivity, requiring a greater number of abnormal stoppage flag occurrences before confirmation, thus reducing false alarms. A smaller preset threshold results in higher detection sensitivity, requiring fewer occurrences of the abnormal stoppage flag for confirmation, thus reducing false negatives.

[0075] It should be noted that during the simulation phase, the detected runtime log is actually the simulation log. In this embodiment, the order of runtime log detection is not limited. In one example, the runtime log may first be checked for a pass marker; if no pass marker is found, the log may be checked for a failure keyword; if no failure keyword is found, the log may be checked for a failure marker; if no failure marker is found, the log may be checked for whether the consecutive occurrences of an abnormal stop marker are greater than or equal to a preset threshold. In another example, the runtime log may first be checked for a pass marker; if no pass marker is found, the log may be checked for a failure marker; if no failure marker is found, the log may be checked for whether the consecutive occurrences of a failure keyword or an abnormal stop marker are greater than or equal to a preset threshold. The detection of a failure keyword can be performed before, simultaneously with, or after the detection of whether the consecutive occurrences of an abnormal stop marker are greater than or equal to the preset threshold; this embodiment is not limited in this respect.

[0076] As can be seen, the running status information during the simulation phase can be simulation pass status, simulation failure status, simulation stall status, etc.

[0077] As one implementation of this disclosure, based on classification and judgment using tags, failure keywords, failure flags, and abnormal stall flags, various states of the simulation process during the simulation phase are accurately identified, yielding highly accurate and finely granular operational status information. Simultaneously, anomalies can be detected early in the initial stages of the simulation phase, saving waiting time and resources. Furthermore, for scenarios where failure keywords appear early but the results are reflected late, the timing of anomaly detection can be further advanced; simulation stalls can also be accurately identified. This facilitates targeted problem-solving by engineers, improving fault location efficiency.

[0078] The process of determining runtime status information based on compilation logs during the compilation phase is described below. In some embodiments, when the runtime phase is the compilation phase, step S103, based on the runtime logs, determining the runtime status information of the chip verification task may include steps S1036 and S1037.

[0079] In step S1036, if the time interval between the last modification time of the running log and the current time is greater than or equal to a preset time threshold, the running status information is determined to be a compilation failure status.

[0080] In step S1037, if the time interval is less than a preset threshold, the running status information is determined to be in the compilation process state.

[0081] During the compilation phase, the compiler continuously updates the compilation log as compilation progresses. If the time interval between the last modified time of the compilation log and the current time is greater than or equal to a preset time threshold, it indicates that the compilation log has not been updated for a long time, the compilation process has not made any progress updates for an extended period, and the compilation process may be stuck or stalled. Therefore, the runtime status information can be determined to be a compilation failure status. If the time interval between the last modified time of the compilation log and the current time is less than the preset time threshold, it indicates that the compilation log is being updated normally, and the compilation process is progressing normally. Therefore, the runtime status information can be determined to be a compilation in progress status.

[0082] The preset time threshold can be set as needed, for example, it can be set to 5 minutes. This embodiment does not impose any restrictions on the preset time threshold.

[0083] As can be seen, runtime status information during the compilation phase can include compilation failure status and compilation in progress status, etc.

[0084] As one embodiment of this disclosure, when compilation stalls or freezes, the runtime status information is determined to be a compilation failure state. This allows exceptions to be detected during the compilation phase, further advancing the opportunity for exception detection and saving time and resources.

[0085] Considering that the present disclosure embodiments divide the compilation and simulation phases into different stages for state determination, the process of determining whether the running phase is the compilation phase or the running phase is described below. In some embodiments, step S101, which identifies the current running phase of the chip verification task, may include step S1011.

[0086] In step S1011, if a simulation log exists, the current running stage of the chip verification task is determined to be the simulation stage.

[0087] Simulation logs are dedicated to the simulation phase; they are not generated during the compilation phase. Furthermore, the compilation and simulation phases are sequential; the simulation phase only begins after compilation succeeds. Therefore, the presence or absence of simulation logs can determine whether the runtime phase is the simulation phase.

[0088] If simulation logs exist, it indicates that the simulation process has started. At this point, the compilation is complete and successful. Therefore, the running phase can be identified as the simulation phase.

[0089] As one implementation of this disclosure, determining whether a simulation phase exists based on the presence or absence of simulation logs provides a simple and efficient method for judgment, improves the speed of phase identification, and helps to further save time.

[0090] In some embodiments, step S101, which identifies the current stage of the chip verification task, may include steps S1012 to S1014.

[0091] In step S1012, if there is no simulation log, the first check identifier is obtained.

[0092] In step S1013, when the identification characterizes the running status information of the chip verification task for the first time, the running stage is determined to be either the simulation stage or the compilation stage based on the stage parameters of the chip verification task; wherein, the stage parameters are used to indicate whether the chip verification task is a simulation stage task or a compilation stage task.

[0093] In step S1014, if the identification information represents the running status information of the non-first determination of the chip verification task, the running stage is determined to be the compilation stage.

[0094] The initial check flag can be used to distinguish whether this status confirmation is the first monitoring poll after the task starts, or a subsequent periodic poll. The initial check flag can be used to indicate whether this is the first time the chip verification task is being determined, or the status information of a local chip verification task that is not the first time.

[0095] During the initial check (i.e., the first determination of the chip verification task's status information), this represents the first monitoring poll since the task started; compilation logs and simulation logs may not have been generated yet. At this time, the stage parameters of the chip verification task can be obtained, and the running stage can be determined based on these parameters as either the simulation stage or the compilation stage.

[0096] Stage parameters can be pre-set before the chip verification task begins. Stage parameters can also be set according to requirements. Stage parameters can be used to indicate whether the chip verification task is a simulation stage task or a compilation stage task.

[0097] When the stage parameter indicates that the chip simulation task is in the simulation stage, the runtime stage can be determined as the simulation stage. When the stage parameter indicates that the chip simulation task is in the compilation stage, the runtime stage can be determined as the compilation stage. In this way, during the initial monitoring poll, the current runtime stage can be quickly confirmed according to user needs, which is beneficial for quickly and accurately determining the runtime status information subsequently.

[0098] In some embodiments, the task running status determination method provided in this disclosure may further include step S104.

[0099] In step S104, if the compilation log is not read during the compilation phase of the running phase, the running status information is determined to be a logless state.

[0100] If the runtime phase is the compilation phase, the compilation log at the current moment can be read. If the compilation log at the current moment is read, the runtime status information can be determined based on the compilation log. If the compilation log at the current moment is not read, the runtime status information can be directly determined to be a logless state.

[0101] As can be seen, during the compilation phase, runtime status information also includes a logless state.

[0102] A lack of logs could be due to a task failing to start or an incorrect log path. Early detection of a no-logs state allows for the early identification of problems within the task, further improving reliability.

[0103] In some embodiments, step S101, which identifies the current stage of the chip verification task, may further include step S1015.

[0104] In step S1015, if the chip verification task meets the preset monitoring conditions, the monitoring process is started so as to identify the current running stage of the chip verification task according to the preset polling conditions in the monitoring process.

[0105] The preset monitoring conditions are the pre-defined trigger conditions for the monitoring process. When these conditions are met, the monitoring process can be initiated, identifying the current stage of the chip verification task and determining its operational status information at each stage. If the preset conditions are not met, the monitoring process can be skipped. In one example, a notification can be sent when skipping the monitoring process.

[0106] Among them, meeting the preset monitoring conditions includes at least one of the following: the macro definition file of the chip verification task contains preset macro definitions; the task directory name of the chip verification task does not contain preset exclusion keywords.

[0107] In one example, the default macro definition could be `define GATE`. In another example, the default exclusion keyword could be `debug_gate_test`. It should be understood that in some scenarios, engineers only need to perform chip testing and obtain the test results, without requiring monitoring. In such cases, engineers can add default exclusion keywords to the task directory name. This way, if the default exclusion keyword is detected during the task's execution, monitoring of the task can be eliminated, thus saving monitoring resources.

[0108] It should be understood that preset macro definitions and preset excluded keywords can be set as needed, and there are no restrictions on them in this embodiment.

[0109] In one possible implementation, identifying the current running stage of the chip verification task according to preset polling conditions may include: identifying the running stage of the chip verification task according to a preset polling interval.

[0110] The preset polling interval represents the periodicity for determining the task's running status. In other words, in this embodiment, the task's running status can be determined periodically. The preset polling interval can be set as needed, and this embodiment does not impose any limitations on it. It should be understood that a smaller preset polling interval results in higher real-time performance of the running status information, which is beneficial for timely identification of anomalies in the chip verification task, significantly shortening the anomaly detection time, reducing invalid waiting time, and minimizing resource waste caused by long-term invalid waiting periods. A larger preset polling interval reduces the number of times the task's running status needs to be determined, reducing resource contention and improving the efficiency of the chip verification task.

[0111] In one possible implementation, identifying the current operational stage of the chip verification task according to preset polling conditions could include: identifying the operational stage of the chip verification task upon first entering the monitoring process. That is, the operational status of the chip verification task is determined upon first entering the monitoring process, and thereafter, the operational stage and operational status of the chip verification task are no longer identified. In this way, the user determines the task's operational status each time the monitoring process is initiated, saving resources and enabling timely detection of anomalies when needed.

[0112] As one implementation of this disclosure, the monitoring process is initiated when preset monitoring conditions are met, and skipped when monitoring conditions are not met. This allows for flexible monitoring as needed, achieving a balance between timely detection of anomalies and saving monitoring resources.

[0113] In some embodiments, the task running status determination method provided in this disclosure may further include step S105.

[0114] In step S105, if the running status information is in the terminated state, the monitoring process ends. The terminated state includes any one of the following: simulation passed state, simulation failed state, simulation stalled state, and compilation failed state.

[0115] In this embodiment, the operating status information can be determined periodically. If a termination state is detected, the operating status information will no longer change as the chip verification task continues, thus eliminating the need for further monitoring and avoiding ineffective monitoring.

[0116] In this embodiment of the disclosure, after obtaining the running status information, this running status information can also be output. For easy review, the running status information can be formatted and stored. In some embodiments, the task running status determination method provided in this embodiment of the disclosure may further include steps S106 and S107.

[0117] In step S106, the attribution information and operating environment information of the chip verification task are spliced ​​together according to a preset format to obtain a status record; wherein, the attribution information includes at least the operating status information.

[0118] In step S107, the status record is stored in the status log file under the status log output path.

[0119] Attribution information may also include the responsible person and the host machine. Operating environment information may include tool version, compilation environment configuration information, and simulation environment configuration information. The status log may also include the time at which the operating status information was determined.

[0120] The preset format can be customized as needed. In one example, the preset format can define multiple fields, each corresponding to different attribution and runtime environment information. In another example, the preset format is either JSON or a table.

[0121] Status records can be stored in a status log file, which can contain multiple status records. Each status record corresponds to one polling cycle and records the running status information at a specific moment. This status log file can be located under a status log output path. This output path can be set before the chip verification task begins, a unified directory set according to the gate type, or the task directory of the chip verification task. If the status log output path is a unified directory, engineers can read various status logs of the same gate type from a single location, facilitating unified analysis of chip verification tasks of this gate type. If the status log output path is the task directory of the chip verification task, engineers can obtain various logs of a chip verification task from a single location, facilitating comprehensive and multi-dimensional analysis of the chip verification task.

[0122] As one implementation of this disclosure, splicing the attribution information and operating environment information according to a preset format can ensure that the loading log is uniform, standardized, parsable, and traceable.

[0123] This disclosure can be applied to the fields of integrated circuit verification and electronic design automation, and is suitable for long-cycle chip verification scenarios such as gate-level post-simulation in system-on-a-chip development. It can handle the long task execution cycle, high resource consumption, significant differences in judgment logic between the compilation and simulation stages, and the potential for false runs or stalls during operation in such scenarios. In this disclosure, before entering the monitoring process, it determines whether the current chip verification task belongs to the chip verification tasks that need to be monitored; it constructs a unified state machine to achieve integrated management of all states, including compilation in progress, compilation failure, simulation in progress, simulation passed, simulation failed, and simulation stall; before the chip verification task naturally ends, it achieves early judgment and timely loss mitigation of failure states based on failure keyword symptoms in the simulation log; and it identifies common problems in long-cycle chip verification simulations such as false runs, repeated printing, and compilation deadlocks. Furthermore, it outputs the running status information in a structured form for direct use by regression platforms, developers, and verification personnel.

[0124] In some embodiments, Figure 2 This is a flowchart illustrating a method for determining the running status of a task, as provided in an embodiment of this disclosure. It shows steps including task selection, compilation stage determination, simulation stage determination, early failure determination, running status information output, and termination status exit. (Refer to...) Figure 2 The method may include steps S201 to S212.

[0125] In step S201, the input parameters of the chip verification task to be monitored are obtained.

[0126] In one example, the input parameters include at least one or more of the following: simulation log path, compilation log path, design file list path, macro definition file path, stage parameters, polling interval parameters, status log output path, gate type, and preset exclusion keywords. The preset exclusion keywords can be referred to as optional monitored process identifiers.

[0127] In step S202, a chip verification task suitability screening is performed to determine whether the chip verification task meets the preset monitoring conditions; if yes, step S203 is executed; otherwise, step S212 is executed.

[0128] In one example, the contents of a macro definition file can be read to determine if the file contains preset macro definitions; similarly, the task directory name and preset exclusion keywords can be read to determine if the task directory name contains the preset exclusion keywords. If the macro definition file contains preset macro definitions or the task directory name does not contain the preset exclusion keywords, it can be determined that the chip verification task meets the preset monitoring conditions; otherwise, it can be determined that the chip verification task does not meet the preset monitoring conditions.

[0129] It should be noted that the embodiments of this disclosure determine the task running status periodically according to a preset polling interval. However, the embodiments of this disclosure do not require repeated execution of chip verification task suitability screening in each round. Step S202 can be executed once first when the monitoring process starts, thereby ensuring that chip verification tasks that do not meet the preset monitoring conditions will not enter a long-term background polling state, thus effectively saving resources.

[0130] In step S203, the monitoring process for the chip verification task is initiated.

[0131] In step S204, the status log output path is constructed according to priority.

[0132] If the input parameters in step S201 include a status log output path, then the status log output path parameter included in the input parameters is determined as the status log output path constructed in step S204. Otherwise, the gate type is read from the input parameters in step S201, and the common directory corresponding to that gate type is determined as the status log output path constructed in step S204. If the input parameters in step S201 do not include a gate type, then the task directory of the chip verification task can be determined as the status log output path constructed in step S204. In this case, the file name of the status log can be constructed based on the task directory name.

[0133] This ensures compatibility with different projects and different gate-level regression environments.

[0134] In step S205, the stage of the chip verification task is determined to be either the simulation stage or the compilation stage, depending on whether a simulation log exists.

[0135] This step is performed during the chip verification task.

[0136] If simulation logs exist, the chip verification task is determined to be in the simulation phase.

[0137] If no simulation log exists, the system determines whether the running status information of the chip verification task is being determined for the first time based on the initial check identifier. If the initial check identifier indicates that the running status information of the chip verification task is being determined for the first time, the running stage is determined to be either the simulation stage or the compilation stage based on the stage parameter in the input parameters of step S201. If the initial check identifier indicates that the running status information of a non-first-time chip verification task is being determined, the running stage is determined to be the compilation stage.

[0138] In this embodiment, the monitoring of the chip verification task can cover both the compilation and simulation phases. The phase parameter in the input parameters can reflect whether the chip verification task is in the simulation or compilation phase. For example, when the phase parameter is "comp," the running phase can be determined to be the compilation phase; when the phase parameter is "simulation," the running phase can be determined to be the simulation phase. As the compilation log or simulation log is generated and updated, the phase parameter can evolve to "COMP IN PROGRESS," "COMP FAILED," "Simulation in progress," "FAILED," "PASSED," or "Simulation anomaly," etc.

[0139] Based on the accurate identification of the operational phases of the chip verification task, the operational status information of the chip verification task can be accurately determined in stages.

[0140] In step S206, if the chip verification task is identified as being in the simulation phase, the simulation log at the current moment is read, and the running status information of the chip verification task is determined based on the simulation log.

[0141] In one possible implementation, step S206, determining the running status information of the chip verification task based on the simulation log, may include: detecting whether a pass marker (such as SIMULATION PASSED) exists in the simulation log; if a pass marker exists in the simulation log, determining the running status information as a simulation pass status (which can be denoted as PASSED); if no pass marker exists in the simulation log, checking whether a failure keyword (such as UVM_ERROR, UVM_FATAL, etc.) exists in the simulation log; if a failure keyword exists in the simulation log, determining the running status information as a simulation failure status (which can be denoted as FAILED); if no failure keyword exists in the simulation log, checking whether a failure marker (such as SIMULATION FAILED) exists in the simulation log; if a failure marker exists in the simulation log, determining the running status information as a simulation failure status (which can be denoted as FAILED); if no failure marker exists in the simulation log, obtaining an abnormal stall flag (such as the running prompt "simulation"). The running status is determined by the number of consecutive occurrences of the abnormal stop flag. If the number of consecutive occurrences of the abnormal stop flag is greater than or equal to the preset number threshold, the running status is determined to be a simulation stop state (which can be denoted as Simulationanomaly). If the number of consecutive occurrences of the abnormal stop flag is less than the preset number threshold, the running status can be determined to be a simulation in progress state.

[0142] In one possible implementation, a default list of failure keywords can be set, and each failure keyword can be stored in this list. This failure keyword list can be designed to be extensible, allowing new failure keywords or failure identifiers to be added as needed, thus adapting to different projects, business modules, and regression testing platforms.

[0143] In step S207, if the chip verification task is identified as being in the compilation phase, the current compilation log is read, and the running status information of the chip verification task is determined based on the compilation log.

[0144] In one possible implementation, step S207, which determines the running status information of the chip verification task based on the compilation log, may include: obtaining the last modification time of the compilation log; if the time interval between the last modification time of the compilation log and the current time is greater than or equal to a preset time threshold, then the running status information is determined to be a compilation failure status (which can be denoted as COMP FAILED); if the time interval between the last modification time of the compilation log and the current time is less than the preset time threshold, then the running status information is determined to be a compilation in progress status.

[0145] In one possible implementation, if the compilation log is not read in step S207, the runtime status information can be determined to be a logless state.

[0146] In this embodiment of the disclosure, the instantiation or compilation deadlock problem can be identified before the chip verification actually enters the simulation stage.

[0147] In this embodiment of the disclosure, if there is no simulation log and the chip verification task's running status information is not determined for the first time, it can be determined that the chip verification task is in the compilation stage. By combining whether there is a compilation log, it can be determined whether the chip verification task is in a logless state, a compilation in progress state, or a compilation failure state.

[0148] In step S208, the attribution information and operating environment information of the chip verification task are extracted, and the attribution information and operating environment information are concatenated according to a preset format to obtain a status record. The status record is then stored in a status log file under the status log output path.

[0149] The attribution information includes at least the current time, responsible person, hostname, associated log path, and runtime status information. The associated log path can include compilation log path, simulation log path, and status log output path, etc. The initial write uses an overwrite method, and subsequent checks use an append method, writing to the already constructed status log output path.

[0150] In step S209, it is determined whether the running status information is in a terminated state; if yes, step S210 is executed; otherwise, step S211 is executed.

[0151] In this step, termination status exit control is executed based on the running status information. If the running status information of the chip verification task is terminated, the monitoring process ends immediately. If the running status information of the chip verification task is any other than terminated, the next round of checks is repeated after the preset polling interval is reached, such as identifying the running stage of the chip verification task and determining the running status information based on the running stage.

[0152] The termination state can include any one or more of the following: simulation passed (e.g., PASSED), simulation failed (e.g., FAILED), simulation stalled (e.g., Simulation anomaly), and compilation failed (e.g., COMP FAILED). The simulation in progress, compilation in progress, and no-logs states can be referred to as intermediate states. In the termination state, the monitoring process can be terminated; in the intermediate state, the task's running status can be periodically determined according to a preset polling interval, i.e., the running status information of the chip verification task can be periodically determined.

[0153] It should be noted that the simulation stall state can be called the pseudo-running state, and the compilation failure state can be called the compilation stuck state.

[0154] In step S210, the monitoring process is terminated.

[0155] In step S211, proceed to the next round of checks according to the preset polling interval; then proceed to step S205.

[0156] In step S212, a prompt to skip the monitoring process is directly output.

[0157] In some embodiments, the task execution status determination method provided in this disclosure can be executed independently as a Python monitoring script, or it can be called as a sub-step in the main process of a chip verification task. In the latter implementation, the chip verification process is responsible for completing tasks such as environment preparation, compilation, simulation startup, log parsing, and simulation script invocation. The task execution status determination method provided in this disclosure is responsible for performing phased monitoring of the execution status of the chip verification task and early failure determination during the execution of the chip verification task, thereby forming an integrated execution process for long-cycle chip verification tasks.

[0158] In some embodiments, Figure 3 This is an exemplary schematic diagram of a state machine provided for embodiments of this disclosure. (Refer to...) Figure 3The chip verification task includes a compilation phase (COMP RUNNING) and a simulation phase (SIMULATION RUNNING).

[0159] Reference Figure 3 After the chip verification task begins execution, it first enters the compilation phase. During this phase, if the compilation log times out (i.e., the time interval between the last modification time and the current time in the compilation log is greater than or equal to a preset time threshold), the chip verification task's running status is determined to be "COMP FAILED". Otherwise, the chip verification task's running status is determined to be "COMP IN PROGRESS". During the "COMP IN PROGRESS" state, the compilation log is continuously updated. If, during the "COMP IN PROGRESS" state, the compilation log times out (i.e., the time interval between the last modification time and the check time in the compilation log is greater than or equal to the preset time threshold), the task immediately transitions to the "COMP FAILED" state.

[0160] Reference Figure 3 After the compilation phase, i.e., after successful compilation, the simulation phase begins. During the simulation phase, if a pass flag is present in the simulation log, the running status is determined to be simulation passed (PASSED); if a failure keyword or failure flag is present in the simulation log, the running status is determined to be simulation failed (FAILED); if the number of consecutive occurrences of the abnormal stall flag during simulation is greater than or equal to a preset threshold, the running status is determined to be simulation anomaly. If no termination state is hit (i.e., no simulation passed, simulation failed, or simulation stall state occurs), monitoring of the simulation phase continues.

[0161] In this embodiment: First, it is specifically designed for gate-level post-simulation scenarios, rather than revolving around a status query interface or polling ordinary simulation logs, making it more suitable for handling practical engineering problems with long single-task execution times and high resource costs. Second, it focuses on the dynamic formation and real-time determination of states, rather than on querying and displaying states after they are generated, making it more suitable for solving engineering pain points in chip verification operations. Third, it can make early failure determinations based on failure keywords before the chip verification task naturally ends, directly resolving the contradiction between early error occurrence and late conclusion output. Fourth, by incorporating the compilation and simulation phases into the same monitoring logic, it covers the complete state chain of gate-level post-simulation from compilation and deployment to simulation, which is more effective than focusing on a single log or only performing status queries. Fifth, by using pre-application applicability screening to avoid long-term persistence of invalid monitoring processes, it has better engineering implementation results in large-scale regression environments. Sixth, by outputting the responsible person, host, and associated log paths through structured logs, it makes problem tracking, task attribution, and platform aggregation more efficient. The structured status logs can be further read and displayed by web pages, platform pages, or query interfaces. Seventh, it is naturally adapted to the chip verification process and can be used as a key monitoring and judgment link in the chip verification process, with strong process-level reuse capability.

[0162] For ease of understanding, the following example of a gate-level post-regression simulation scenario of a SOC module will be used to provide a detailed description of the task running state determination method provided in this disclosure. It should be understood that this example is only used to explain the embodiments of this disclosure and is not intended to limit the scope of the embodiments of this disclosure.

[0163] In a gate-level post-simulation regression scenario for a SOC module, the chip verification task (run_sim) script first prepares environment variables, initializes the working directory, prepares log archive paths (including simulation log path, compilation log path, and status log output path), executes compilation commands, generates the simulation executable file, and starts the simulation (i.e., the chip verification task begins running). Because gate-level post-simulation tasks are large-scale, a single task typically runs for several days. Therefore, after the simulation starts, a running monitoring module is needed to continuously track its running status.

[0164] In this embodiment, after the monitoring module starts, it first obtains the task directory name of the currently running chip verification task and the path information of the macro definition file define.v, the design file list file.f, the compilation log elab.log, the simulation log run.log, etc. (corresponding to the macro definition file path, design file path list path, simulation log path, compilation log path, etc. in step S201). Then, the monitoring module reads the macro definition file define.v and checks whether it contains the preset macro definition define GATE, and whether the task directory name contains the preset exclusion keyword debug_gate_test. If the preset macro definition is missing or the preset exclusion keyword is hit (i.e., the task directory name contains the preset exclusion keyword), the chip verification task is considered not to meet the preset monitoring conditions and is not a gate-level post-simulation task that needs to be tracked for a long time. In this case, the monitoring module can print a message to skip the monitoring process and exit directly without entering background polling.

[0165] If the chip verification task meets the preset monitoring conditions, the monitoring module officially starts the monitoring process. The monitoring module first constructs the status log output path based on the input parameters. For example, when the gate type in the input parameters is pr and the gate version is 20260320, the common directory of the gate-level simulation can be determined as the status log output path so that the results of different tasks can be viewed centrally. If no common directory for the gate-level simulation is specified, a status log file based on the task directory name is generated by default in the task directory.

[0166] When the chip task's running status is checked for the first time (i.e., the initial check identifier indicates the initial determination of the chip verification task's running status information) and the simulation log has not yet been generated (i.e., no simulation log exists), the monitoring module determines whether the current running stage is the compilation stage (COMP RUNNING) or the simulation stage (SIMULATION RUNNING) based on the stage parameters. This step is particularly meaningful for long-cycle gate-level post-simulation because the failure forms of gate-level post-simulation in the compilation stage and the simulation stage are completely different. Only by accurately identifying the running stage first can subsequent status determination be meaningful.

[0167] Once the simulation log begins to generate (i.e., the simulation log exists), the monitoring module reads its contents. First, it checks if the simulation log contains the "SIMULATION PASSED" flag. If the simulation log contains the "SIMULATION PASSED," it indicates that the post-simulation has ended normally and passed verification. The monitoring module can output the simulation pass status "PASSED" as the running status information and end the monitoring process. If the simulation log does not contain the "SIMULATION PASSED," the monitoring module can continue to check if the simulation log contains keywords from the failure keyword list, such as UVM_ERROR and UVM_FATAL. If such failure keywords are found in the simulation log, the monitoring module can output the simulation failure status "FAILED" as the running status information. Since many gate-level post-simulations continue to run for a long time after a UVM error occurs, or even wait until a timeout before truly exiting, the mechanism for early failure determination in this embodiment can significantly reduce invalid waiting time.

[0168] If the failure keyword is not found (i.e., the simulation log does not contain the failure keyword), the monitoring module continues to check if the simulation log contains the failure flag "SIMULATION FAILED". If the failure flag is detected in the simulation log, it indicates that the simulation phase has reached a clear failure conclusion, and the monitoring module can output the simulation failure status "FAILED" as the running status information. If no failure flag is detected in the simulation log, the monitoring module can count the number of consecutive occurrences of abnormal stall indicators (such as simulation running prompts) and determine whether the number of consecutive occurrences is greater than or equal to a preset threshold. If the number of consecutive occurrences is greater than or equal to the preset threshold, for example, reaching four times, the monitoring module can output the simulation stall status "Simulation anomaly" as the running status information to remind engineers that the task simulation phase may have entered an abnormal stall state.

[0169] When this is not the first check and the simulation run log has not yet been generated, the monitoring module checks for the existence of the compilation log `elab.log`. If the compilation log `elab.log` does not exist, the monitoring module can output a "NO LOGS" status as the running status information. If the compilation log `elab.log` exists and is continuously updated within a preset time threshold (i.e., the time interval between the last modification time of the compilation log and the current time is less than the preset time threshold), the module outputs a "COMP IN PROGRESS" status as the running status information. If the time interval between the last modification time of the compilation log and the current time is greater than or equal to the preset time threshold, such as 7200 seconds, it indicates that the compilation stage may have stalled or failed. Therefore, the monitoring module can output a "COMP FAILED" status as the running status information.

[0170] When outputting runtime status information, the monitoring module further reads the design file list file.f and parses the responsible person and other attribution information from the include paths. For example, in the path "+incdir+ / project / host / name / ...", the responsible person is "name". Simultaneously, when the task directory of the current chip verification task is located under a preset local data path prefix, the monitoring module can invoke a host query command to obtain the running host of the chip verification task. Subsequently, the monitoring module can generate structured output containing time, responsible person, host, log path, and status value (i.e., runtime status information) for use by the regression platform, responsible person query, and subsequent issue archiving.

[0171] When a chip verification task reaches its final state (i.e., terminated state), the monitoring module can immediately exit the monitoring process and stop polling. For chip verification tasks that do not meet the preset monitoring conditions, the monitoring module can exit the monitoring process directly at the beginning. For chip verification tasks that are running for a long time, the monitoring module will only perform the next round of status checks after the preset polling interval has elapsed, thus balancing monitoring timeliness and resource consumption.

[0172] Chip verification tasks typically go through a compilation phase and an elaboration phase before officially entering the simulation phase after successful compilation.

[0173] In the process of monitoring chip verification tasks, the following problems exist in related technologies: (1) Delay in detecting simulation failures. Many errors are exposed through keywords in the simulation log at the beginning of the simulation run, but the related technologies require waiting for the task to end naturally before giving the results, resulting in several days of invalid waiting. (2) Serious waste of machine resources. Chip verification tasks usually occupy large amounts of memory, CPU cores, simulation licenses and storage resources for a long time. The related technologies cannot identify failures in time, so that chip verification tasks continue to occupy expensive resources even if they fail, affecting the scheduling of subsequent tasks. (3) Lack of unified monitoring of the compilation and simulation stages. Chip verification simulation usually goes through compilation and instantiation expansion first, and then enters the simulation stage. The related technologies focus on simulation logs and lack complete management of compilation stagnation, compilation failure, and the initial state of the simulation stage. (4) Inability to identify abnormal stagnation states in the simulation stage. The related technologies have no effective means to identify false running scenarios that repeatedly print running prompts but actually stagnate during the simulation process. (5) Lack of structured state recording capabilities. Related technologies typically output simple pass or fail conclusions without simultaneously recording the responsible person, host, log path, running stage, and running status, which makes subsequent location and assignment difficult. (6) It is more inclined to status query and display, lacking stage perception and judgment of the state formation process, and cannot fundamentally solve the timeliness problem of long-cycle chip verification simulation.

[0174] Addressing the core characteristics of chip verification simulation tasks (especially gate-level post-simulation), such as long runtime, high resource consumption, and early but late failure detection, this disclosure provides a task execution determination method to solve problems such as delayed failure judgment, resource waste, lack of stage monitoring, invalid process persistence, and insufficient anomaly identification in related technologies. This method achieves applicability screening before task initiation, precise stage identification during execution, early judgment of failure symptoms, and effective detection of abnormal states, while generating a structured status log. Ultimately, it shortens problem discovery time, reduces resource consumption, minimizes manual intervention, and improves the regression efficiency of large-scale chip verification simulation. This task execution status determination method can be embedded in the execution process of chip verification tasks, enabling staged perception of execution status information and early failure judgment.

[0175] The task running status determination method provided in this embodiment includes: (1) For the long-cycle running characteristics of gate-level verification simulation, before the monitoring process starts, a one-time task applicability screening is performed based on whether the macro definition file contains preset macro definitions and / or whether the task directory name contains preset exclusion keywords, to identify the chip verification task to be monitored. (2) A unified state machine covering the compilation stage and the simulation stage is constructed to realize the full-stage perception and integrated status management of chip verification tasks. (3) Based on failure keywords such as UVM_ERROR and UVM_FATAL, failure signs in the simulation log are detected before the chip verification task ends naturally, so as to realize early failure judgment. (4) Multi-level priority judgment logic is implemented by using tags, failure keywords, failure tags and abnormal stagnation flags to perform accurate status judgment in the simulation stage. (5) The task responsibility is parsed from the design file list, and the running environment information is obtained by querying the host. A structured status log containing time, responsible person, host name, log path and status value (i.e. running status information) is generated and written to the specified status log output path according to preset rules. (6) Design a final state (i.e., terminate loading) exit control mechanism for chip verification tasks. For final states such as simulation pass, simulation failure, and simulation abnormal stop, immediately terminate the monitoring process. For non-final states, perform checks at polling intervals to balance monitoring timeliness and resource consumption.

[0176] Based on the running and loading determination method provided in this embodiment, the following effects can be achieved: (1) Significantly shorten the failure detection time. Failure can be determined in advance by identifying failure keywords in the early stage of simulation operation, avoiding several days of invalid waiting. (2) Significantly reduce resource waste. By identifying abnormalities such as simulation failure status or simulation stagnation status in advance, the occupation of simulation licenses, computing nodes and storage resources caused by long-term invalid waiting is reduced. (3) Achieve unified monitoring of the compilation stage and simulation stage, build a state machine covering the entire verification process, and eliminate the phenomenon of missing monitoring in the compilation stage. (4) Avoid invalid monitoring process resident. Through one-time applicability screening before monitoring starts, non-target tasks (i.e. chip verification tasks that do not meet the preset monitoring conditions) are directly exited, reducing the long-term polling of invalid background processes. (5) Accurately identify abnormal stagnation status of simulation and compilation. Through continuous statistics of prompt information and compilation log timeout detection, abnormalities that cannot be found in related technologies such as fake operation and compilation deadlock can be effectively identified. (6) Reduce the cost of manual intervention. Engineers do not need to log in to the server frequently to check the logs. They can directly obtain the task status through the structured status log, reducing the workload of manually checking the logs. (7) Improve the efficiency of problem localization and regression management. The structured status log synchronously records information such as the responsible person, host, and log path, providing a direct basis for problem assignment and root cause analysis, and significantly shortening the problem localization time. (8) It has high engineering adaptability. It can be naturally embedded into chip verification processes, or run independently as a script. Parameters such as failure keyword list and threshold (such as preset number threshold and preset time threshold) support extended configuration to adapt to the verification and regression environment of different SOC projects. (9) Achieve process-level optimization. The monitoring and early failure judgment capabilities are integrated into the simulation execution process, improving the manageability and observability of long-cycle chip verification simulation tasks from the process level, and is suitable for engineering implementation in large-scale regression scenarios.

[0177] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0178] In addition, this disclosure also provides a task operation status determination device, electronic device, and computer-readable storage medium, all of which can be used to implement any of the task operation status determination methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding records in the method section and will not be repeated here.

[0179] Figure 4 This is a block diagram of a task operation status determination device provided in an embodiment of the present disclosure.

[0180] Reference Figure 4This disclosure provides a task running status determination device 40, which includes an identification module 41, a reading module 42, and a first determination module 43.

[0181] The identification module 41 is used to identify the current running stage of the chip verification task during the operation of the chip verification task.

[0182] The reading module 42 is used to read the running logs generated in the current running phase; the running logs include simulation logs or compilation logs.

[0183] The first determining module 43 is used to determine the running status information of the chip verification task based on the running log; wherein the running status information is used to indicate whether there is an anomaly during the operation of the chip verification task.

[0184] In one possible implementation, the reading module is specifically used to: read the simulation log at the current moment as the running log when the running phase is the simulation phase.

[0185] In one possible implementation, the first determining module is specifically used to: determine whether the simulation phase has ended or not if there is no pass mark in the running log; determine the running status information as simulation failure status if the simulation phase has ended; and obtain the running status information by performing process anomaly detection on the simulation phase based on the running log if the simulation phase has not ended.

[0186] In one possible implementation, the first determining module is specifically used to: perform failure flag detection on the running log and obtain the failure flag detection result; if the failure flag detection result indicates that a failure flag exists, determine that the simulation phase has ended; if the failure flag detection result indicates that no failure flag exists, determine that the simulation phase has not ended.

[0187] In one possible implementation, the first determining module is specifically used to: perform failure keyword detection on the running log and obtain the failure keyword detection result; if the failure keyword detection result indicates the presence of a failure keyword, determine that the running status information is a simulation failure status.

[0188] In one possible implementation, the first determining module is specifically used to: determine the number of consecutive occurrences of the abnormal stagnation flag in the running log; and determine the running status information as a simulation stagnation state if the number of consecutive occurrences is greater than or equal to a preset threshold.

[0189] In one possible implementation, the reading module is also used to: read the current compilation log as the runtime log when the runtime phase is the compilation phase.

[0190] In one possible implementation, the first determining module is specifically used to: determine the running status information as a compilation failure state when the time interval between the last modification time of the running log and the current time is greater than or equal to a preset time threshold.

[0191] In one possible implementation, the identification module is specifically used to: determine, in the presence of simulation logs, the current running stage of the chip verification task as the simulation stage.

[0192] In one possible implementation, the identification module is specifically used to: obtain the first check identifier when there is no simulation log; and determine whether the running stage is the simulation stage or the compilation stage based on the stage parameters of the chip verification task when the first check identifier represents the first determination of the running status information of the chip verification task; wherein the stage parameters are used to indicate whether the chip verification task is a simulation stage task or a compilation stage task.

[0193] In one possible implementation, the identification module is also used to: determine the running phase as the compilation phase when the identification characterizes the running status information of the chip verification task for the first time.

[0194] In one possible implementation, the device further includes a second determining module, which determines the running status information as a logless state if no compilation log is read when the running phase is the compilation phase.

[0195] In one possible implementation, the identification module is specifically used to: initiate a monitoring process when the chip verification task meets preset monitoring conditions, so as to identify the current running stage of the chip verification task according to preset polling conditions in the monitoring process; wherein meeting the preset monitoring conditions includes at least one of the following: the macro definition file of the chip verification task contains preset macro definitions; the task directory name of the chip verification task does not contain preset exclusion keywords.

[0196] In one possible implementation, the device further includes a termination module for ending the monitoring process when the running status information is in a termination state; wherein the termination state includes any one of simulation passed state, simulation failed state, simulation stalled state, and compilation failed state.

[0197] In one possible implementation, the device further includes: a splicing module, used to splice the attribution information and operating environment information of the chip verification task according to a preset format to obtain a status record; wherein the attribution information includes at least the operating status information; and an output module, used to store the status record in a status log file under the status log output path.

[0198] In some embodiments, this disclosure also provides a task running status determination device, which is used to implement the task running status determination method provided in this disclosure. The task running status determination device may include a task filtering module, a path construction module, a stage identification module, a status determination module, an early failure determination module, an anomaly detection module, an information extraction module, a status output module, and a polling control module.

[0199] The system includes the following modules: a task selection module for screening the suitability of chip verification simulation tasks and identifying those to be monitored; a path construction module for building status log output paths adapted to different regression environments; a stage identification module for identifying whether a chip verification task is in the compilation or simulation stage; a status determination module for performing differentiated status information determination on different stages and outputting intermediate states (i.e., non-termination states); an early failure determination module for determining early failures in the simulation stage based on a list of failure keywords; an anomaly detection module for identifying simulation stalls in the simulation stage and compilation failures (also known as compilation freezes) in the compilation stage; an information extraction module for extracting the chip verification task's attribution and runtime environment information; a status output module for concatenating attribution and runtime environment information according to a preset format to obtain status records and writing them to a structured status log; and a polling control module for executing termination status exit control, managing the continuation or termination of the monitoring process.

[0200] Figure 5 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0201] Reference Figure 5 This disclosure provides an electronic device, which includes: at least one processor 501; at least one memory 502; and one or more I / O interfaces 503 connected between the processor 501 and the memory 502; wherein the memory 502 stores one or more computer programs that can be executed by the at least one processor 501, and the one or more computer programs are executed by the at least one processor 501 to enable the at least one processor 501 to perform the above-described task running state determination method.

[0202] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the above-described task execution state determination method. The computer-readable storage medium may be volatile or non-volatile.

[0203] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code. When the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes the above-described task running state determination method.

[0204] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0205] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0206] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0207] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0208] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0209] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0210] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0211] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0212] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0213] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for determining the running state of a task, characterized in that, include: During the execution of the chip verification task, identify the current stage of the chip verification task. Read the runtime logs generated during the current runtime phase; the runtime logs include simulation logs or compilation logs. Based on the operation log, the operation status information of the chip verification task is determined; wherein, the operation status information is used to indicate whether there are any abnormalities during the operation of the chip verification task.

2. The method according to claim 1, characterized in that, The reading of the runtime logs generated during the current runtime phase includes: If the running phase is the simulation phase, the simulation log at the current moment is read as the running log.

3. The method according to claim 2, characterized in that, The step of determining the running status information of the chip verification task based on the running log includes: If no pass marker is found in the operation log, it is determined whether the simulation phase has ended or not. If the simulation phase has ended, the running status information is determined to be a simulation failure status; If the simulation phase is not yet completed, the running status information is obtained by performing process anomaly detection on the simulation phase based on the running log.

4. The method according to claim 3, characterized in that, Determining whether the simulation phase has ended or not includes: The runtime log is subjected to failure marking detection to obtain failure marking detection results; If the failure flag detection result indicates the presence of a failure flag, it is determined that the simulation phase has ended. If the failure flag detection result indicates that no failure flag exists, it is determined that the simulation phase has not ended.

5. The method according to claim 3, characterized in that, The process anomaly detection in the simulation phase based on the running logs to obtain the running status information includes: The operation log is subjected to failure keyword detection to obtain failure keyword detection results; If the failure keyword detection result indicates the presence of a failure keyword, the running status information is determined to be a simulation failure status.

6. The method according to claim 3, characterized in that, The process anomaly detection in the simulation phase based on the running logs to obtain the running status information includes: Determine the number of consecutive occurrences of the abnormal stop flag in the operation log; If the number of consecutive occurrences is greater than or equal to a preset threshold, the running status information is determined to be a simulation stagnation state.

7. The method according to claim 1, characterized in that, The step of reading the runtime log generated during the current runtime phase also includes: If the running phase is the compilation phase, the compilation log at the current moment is read as the running log.

8. The method according to claim 7, characterized in that, The step of determining the running status information of the chip verification task based on the running log includes: If the time interval between the last modification time of the running log and the current time is greater than or equal to a preset time threshold, the running status information is determined to be a compilation failure status.

9. The method according to any one of claims 1 to 8, characterized in that, The process of identifying the current operational stage of the chip verification task includes: If simulation logs exist, the current running stage of the chip verification task is determined to be the simulation stage.

10. The method according to claim 9, characterized in that, The step of identifying the current operational stage of the chip verification task also includes: If the simulation log is not present, obtain the first check identifier; When the initial inspection identifier indicates that the running status information of the chip verification task is determined for the first time, the running stage is determined to be the simulation stage or the compilation stage based on the stage parameters of the chip verification task; wherein, the stage parameters are used to indicate whether the chip verification task is a simulation stage task or a compilation stage task.

11. The method according to claim 10, characterized in that, The step of identifying the current operational stage of the chip verification task also includes: If the initial check identifier indicates that the chip verification task is not being checked for the first time, then the running phase is determined to be the compilation phase.

12. The method according to claim 7, characterized in that, The method further includes: If the runtime phase is the compilation phase and no compilation log is read, then the runtime status information is determined to be a logless state.

13. The method according to any one of claims 1 to 8, characterized in that, The process of identifying the current operational stage of the chip verification task includes: If the chip verification task meets the preset monitoring conditions, a monitoring process is started to identify the current running stage of the chip verification task according to the preset polling conditions in the monitoring process. Among them, meeting the preset monitoring conditions includes at least one of the following: The macro definition file for the chip verification task contains preset macro definitions; The task directory name of the chip verification task does not contain preset exclusion keywords.

14. The method according to claim 13, characterized in that, The method further includes: If the running status information is in a terminated state, the monitoring process ends; wherein, the terminated state includes any one of the following: simulation passed state, simulation failed state, simulation stalled state, and compilation failed state.

15. The method according to any one of claims 1 to 8, characterized in that, The method further includes: The chip verification task's attribution information and operating environment information are concatenated according to a preset format to obtain a status record; wherein, the attribution information includes at least the operating status information; The status records are stored in the status log file located in the status log output path.

16. A device for determining the running status of a task, characterized in that, include: The identification module is used to identify the current stage of the chip verification task during its execution. The reading module is used to read the running logs generated during the current running phase; the running logs include simulation logs or compilation logs. The first determining module is used to determine the running status information of the chip verification task based on the running log; wherein the running status information is used to indicate whether there is an anomaly during the operation of the chip verification task.

17. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor, and the one or more computer programs are executed by the at least one processor to enable the at least one processor to perform the task running state determination method as described in any one of claims 1-15.

18. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the task running state determination method as described in any one of claims 1-15.