RTL code verification exception automatic attribution method and attribution device

CN122433632BActive Publication Date: 2026-09-22CORE TREND (ZHUHAI) TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610904404.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-09-22
Estimated Expiration
2046-06-23

AI Technical Summary

Technical Problem

[0006]第三是基于信号驱动链的波形到代码追踪方案,这种方案能够根据驱动关系将目标信号追溯到对应代码语句或驱动路径,实现了波形与代码之间的追踪,但没有将参数配置作为独立分析对象纳入统一归因框架

Benefits of technology

[0029]由此可见,归因装置还通过结构化异常事件和各候选对象的上下文计算关联归因评分,基于关联归因评分能够更加准确的判定异常类别,通过多域联动的方式提高异常类别的判定准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122433632B_ABST
    Figure CN122433632B_ABST
Patent Text Reader

Abstract

The application provides an RTL code verification exception automatic attribution method and an attribution device, the method comprises the following steps: constructing a unified object model comprising a waveform domain object, a code domain object and a parameter domain object, and constructing an association relationship from the waveform domain object to the code domain object, an association relationship from the code domain object to the parameter domain object, and an association relationship from the parameter domain object to the waveform domain object to form a linkage tracing network; extracting exception information from a chip simulation result to generate a structured exception event, and extracting candidate objects involved by the exception information based on the linkage tracing network; performing attribution score calculation on the candidate objects, and determining and outputting an exception category according to the attribution score. The application also provides a device for implementing the above method. The application can automatically complete candidate contraction and attribution score calculation around an exception event by combining a waveform, code and parameters, and improves the analysis accuracy of exception causes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of integrated circuit manufacturing, and in particular to the technology of software code development and simulation. Specifically, it relates to an automatic attribution method for RTL code verification anomalies and an attribution device for implementing this method. Background Technology

[0002] With the development of intelligent and digital technologies, artificial intelligence (AI) technology has been widely applied. However, as AI technology advances, the design complexity of chips continues to increase. The RTL verification phase requires simultaneous processing of simulation waveforms, assertion results, log information, RTL code, and parameterized configurations. Especially in scenarios with multiple instances, configurable modules, and complex state machines, the same anomaly often does not correspond to a single signal phenomenon but is simultaneously associated with waveform behavior, driving logic, and parameter boundary conditions. Therefore, determining the cause of anomalies during the simulation phase is often a complex task.

[0003] Traditional verification methods still rely on engineers repeatedly switching between waveform tools, code editors, and configuration files. Specifically, they first observe abnormal time windows on the waveform, then trace back to possible driving logic, and finally determine whether the problem is a configuration issue or an RTL code issue by combining parameter coverage relationships. This process is lengthy, repetitive, and heavily dependent on experience, making it difficult to reliably reuse in complex designs.

[0004] Therefore, there are several existing methods for automated debugging of RTL code, and the main solutions include the following categories: The first approach is a problem localization scheme based on log text or call tree. This scheme uses log transformation and call tree to construct error localization in RTL code. This type of scheme is mainly focused on parsing and locating log content, but lacks joint modeling of abnormal waveform time windows and parameter domain objects.

[0005] The second is a waveform recording scheme based on trigger conditions, which usually records relevant waveforms around the time window before and after the fault. This type of scheme solves the problem of waveform acquisition and retention, but the root cause of the anomaly still needs to be analyzed manually in combination with code and parameters.

[0006] The third approach is a waveform-to-code tracing scheme based on signal-driven chains. This scheme can trace the target signal to the corresponding code statement or drive path based on the driving relationship, achieving tracing between waveforms and code. However, it does not incorporate parameter configuration as an independent analysis object into a unified attribution framework. Another approach is a joint synchronous error correction method based on assertion state machines and waveform diagrams. This method integrates error attributes into a state machine graph and displays it together with waveform diagrams and code browsers. However, it is essentially a visualization aid and does not involve an automatic attribution scoring mechanism.

[0007] The fourth is a classification and evaluation scheme based on rule bases or fault samples. This scheme can perform rule-based evaluation according to fault categories, but it is more inclined to detect and classify predefined faults and is difficult to give dynamic attribution conclusions based on the linkage of waveforms, codes and parameters for real simulation anomalies.

[0008] The fifth approach is an error tracing scheme based on cross-level tags. Tags are injected into registers, signals, or state machines during the RTL encoding stage. After synthesis and placement / routing, tag information is retained in the gate-level netlist and physical layout. New tags are injected into interconnect channels during the package design stage. When simulation anomalies occur, static timing analysis and power analysis are used to locate errors across layers from the layout to the code by tracing the tags. Alternatively, the inter-layer connectivity is verified using netlist composite files and 3D layouts. The tracing dimension expands vertically along the design abstraction level, focusing on cross-level error backtracking after physical implementation. However, parameter configuration is not treated as an independent analysis object, nor is a horizontal linkage established between the waveform domain, code domain, and parameter domain. Summary of the Invention

[0009] The primary objective of this invention is to provide an automatic attribution method for RTL code verification anomalies that combines waveforms, codes, and parameters to automatically perform candidate shrinking and attribution scoring around anomalies.

[0010] A second objective of this invention is to provide an attribution apparatus for implementing the above-described automatic attribution method for RTL code verification exceptions.

[0011] To achieve the first objective of this invention, the RTL code verification anomaly automatic attribution method provided by this invention comprises the following steps performed by the processor: constructing a unified object model containing waveform domain objects, code domain objects, and parameter domain objects, and constructing association relationships from waveform domain objects to code domain objects, from code domain objects to parameter domain objects, and from parameter domain objects to waveform domain objects, forming a linkage tracing network; extracting anomaly information from chip simulation results, generating structured anomaly events, and extracting candidate objects involved in the anomaly information based on the linkage tracing network; calculating attribution scores for the candidate objects, and determining and outputting the anomaly category based on the attribution scores.

[0012] As can be seen from the above scheme, this invention, by constructing a unified model object and a linked traceability network, generates structured abnormal events when anomalies occur during the verification process. Multiple candidate objects that may lead to the anomaly are extracted, and an attribution score is calculated for each candidate object individually. The anomaly category is determined based on the attribution score. In this way, the determination of the anomaly category combines waveform, code, and parameter analysis, accurately identifying the specific cause of the anomaly through the linkage of the waveform domain, code domain, and parameter domain.

[0013] A preferred approach is to determine the anomaly category based on the attribution score, which includes: if the attribution score of a candidate object meets the ranking requirements for distinguishing the anomaly categories of the candidate objects, then the anomaly category is output; if the attribution score of the candidate object with the highest attribution score among all candidate objects is lower than a preset confidence threshold, then the associated attribution score is calculated based on the structured anomaly event and the context of each candidate object, and the anomaly category is determined based on the associated attribution score.

[0014] Therefore, if the anomaly category can be directly determined based on the attribution score of the candidate object, the anomaly category is directly output. If the candidate object with the highest attribution score is still insufficient to determine the category of a single-domain anomaly, the associated attribution score is calculated by using structured anomaly events and the context of each candidate object, and then the accurate anomaly category is analyzed.

[0015] A further approach is to generate a causal inference chain after determining the anomaly category based on the association attribution score, and output the anomaly category and the causal inference chain together when outputting the anomaly category.

[0016] Therefore, when multi-domain joint analysis is required to determine the anomaly category, outputting the reasoning process along with the anomaly can allow verifiers to intuitively understand the reasoning process and more clearly understand the root cause of the anomaly.

[0017] A further approach is to include analytical information on waveform anomalies, code logic, and parameter effects in the causal reasoning chain.

[0018] Therefore, by analyzing the waveform anomalies, code logic, and parameter effects one by one, verification personnel can intuitively and clearly understand the reasons for determining the anomaly category, and then analyze whether the anomaly category is accurate.

[0019] A further approach is to determine a code domain anomaly if the difference between the association attribution score of the candidate object with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter values ​​of the candidate parameter domain object from the legal range is less than the parameter violation threshold; if the difference between the association attribution score of the candidate object with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter values ​​of the candidate parameter domain object from the legal range is less than the parameter violation threshold, then the code domain is considered an anomaly. If the deviation of a parameter value from the legal range of a domain object is greater than or equal to the parameter violation threshold, it is determined to be a parameter domain anomaly. If the correlation attribution score of the candidate object with the highest correlation attribution score in the candidate parameter domain object and the correlation attribution score of the candidate code domain object are both greater than or equal to the linkage judgment threshold, and the absolute value of the difference between the correlation attribution score of the candidate object with the highest correlation attribution score in the candidate code domain object and the correlation attribution score of the candidate object with the highest correlation attribution score in the candidate parameter domain object is less than the inter-domain difference threshold, then the anomaly category is determined based on the correlation attribution score.

[0020] It can be seen that by setting multiple parameters such as inter-domain difference threshold, parameter violation threshold, and linkage judgment threshold, and determining the judgment rules based on these parameters, the judgment of anomaly categories can be made more accurate.

[0021] A further approach is to make the linkage determination threshold independent of the confidence threshold. This way, the linkage determination threshold is not affected by the confidence threshold, thus ensuring the accuracy of joint anomaly category determination across multiple domains.

[0022] A further approach is to configure the linkage judgment threshold, inter-domain difference threshold, and parameter violation threshold separately based on project characteristics and / or anomaly category.

[0023] Therefore, setting matching linkage judgment thresholds, inter-domain difference thresholds, and parameter violation thresholds according to different project situations and different anomaly categories can improve the accuracy of anomaly category judgment.

[0024] A further approach is to calculate the attribution score using a weighted sum of the matching values ​​between the anomaly category and the candidate object type, the degree of deviation of the parameter values ​​from the legal range, and the tracing distance from the candidate object to the direct driving source of the anomaly trigger signal.

[0025] Therefore, when calculating the attribution score of candidate objects, combining multiple different parameters and applying reasonable weights to calculate a weighted sum, the attribution score obtained based on this weighted sum can accurately reflect the anomaly category.

[0026] To achieve the second objective mentioned above, the RTL code verification anomaly automatic attribution device provided by the present invention includes an object construction module, a linkage tracing network construction module, an anomaly event generation module, an attribution scoring module, and an anomaly determination module. The object construction module is used to construct a unified object model containing waveform domain objects, code domain objects, and parameter domain objects. The linkage tracing network construction module is used to construct the association relationships from waveform domain objects to code domain objects, from code domain objects to parameter domain objects, and from parameter domain objects to waveform domain objects, forming a linkage tracing network. The anomaly event generation module is used to extract anomaly information from chip simulation results, generate structured anomaly events, and extract candidate objects related to the anomaly information based on the linkage tracing network. The attribution scoring module is used to calculate the attribution score for the candidate objects. The anomaly determination module is used to determine and output the anomaly category based on the attribution score.

[0027] As can be seen from the above scheme, after acquiring verification data such as simulation waveforms, assertion results, inspection logs, and parameter configurations, the attribution device organizes them into waveform domain objects, code domain objects, and parameter domain objects, thus forming a unified object model. Furthermore, by constructing a linked tracing network, it generates structured abnormal events for abnormal situations and narrows the analysis scope along the linked tracing network to extract candidate objects directly related to the current abnormal event. Finally, by performing deterministic scoring on the candidate objects and ranking them based on three factors—abnormal category matching, parameter violation degree, and tracing proximity—the abnormal category is determined.

[0028] In a preferred embodiment, the attribution scoring module is also used to: output the anomaly category when it is confirmed that the attribution score of the candidate object meets the requirements for distinguishing the anomaly categories of the candidate objects; and calculate the associated attribution score based on the structured anomaly event and the context of each candidate object when it is confirmed that the attribution score of the candidate object with the highest attribution score is lower than the preset confidence threshold, and determine the anomaly category based on the associated attribution score.

[0029] Therefore, it can be seen that the attribution device also calculates the correlation attribution score by structuring the abnormal events and the context of each candidate object. Based on the correlation attribution score, the anomaly category can be determined more accurately, and the accuracy of the anomaly category determination can be improved by multi-domain linkage. Attached Figure Description

[0030] Figure 1 This is a flowchart of an embodiment of the RTL code verification exception automatic attribution method of the present invention.

[0031] Figure 2 This is a structural block diagram of an embodiment of the RTL code verification exception automatic attribution device of the present invention.

[0032] The present invention will be further described below with reference to the accompanying drawings and embodiments. Detailed Implementation

[0033] The RTL code verification anomaly automatic attribution method of the present invention is applied in the integrated circuit manufacturing process, combining waveform domain, code domain, and parameter domain to perform root cause analysis of anomalies. The method of the present invention can be implemented on a computer device having a processor and memory, the processor being capable of executing the various steps of the aforementioned RTL code verification anomaly automatic attribution method. The RTL code verification anomaly automatic attribution device of the present invention can also implement the RTL code verification anomaly automatic attribution method.

[0034] Example of an automatic attribution method for RTL code verification exceptions: This embodiment is executed by the processor, that is, by the computer's processor. Figure 1 The steps shown.

[0035] See Figure 1 In this embodiment, step S11 is executed first to construct a unified object model. Specifically, verification data such as simulation waveforms, assertion results, check logs, and parameter configurations are acquired and organized into three types of objects: waveform domain objects, code domain objects, and parameter domain objects. These objects form the unified object model. The three types can be formally represented as: U = {Owave, Ocode, O_param, R}, where Owave is the set of waveform domain objects, Ocode is the set of code domain objects, O_param is the set of parameter domain objects, and R is the set of linkage and traceability relationships between the three types of objects. The key fields and functions of the three types of objects in the unified object model are shown in Table 1.

[0036] Table 1. Object type definitions in the Unified Object Model

[0037] After constructing the unified object model, step S12 needs to be executed to build a linkage traceability network based on the constructed unified object model. In this embodiment, the linkage traceability network includes three types of association relationships: the association relationship from waveform domain objects to code domain objects, the association relationship from code domain objects to parameter domain objects, and the association relationship from parameter domain objects to waveform domain objects. The basis for establishing the three types of association relationships and their functions are shown in Table 2.

[0038] Table 2. Definition of Relationship Types in Linked Traceability Networks

[0039] The following example, using a design incorporating a parameterized DMA controller, illustrates the three relationship types described above. For the association from a waveform domain object to a code domain object, assuming the simulation observes the signal dma_ctrl.axi_wdata[31:16] to be continuously zero within the time window [1200ns, 1500ns], this waveform domain object is associated with the code domain object through the instance hierarchy path top.u_dma_ctrl and the signal-driven relationship, as shown in the assignment statement `assign axi_wdata=data_buf[DMA_DATA_WIDTH-1:0]` on line 87 of the file src / dma / dma_ctrl.v. For the association from a code domain object to a parameter domain object, assuming the above assignment statement references the parameter DMA_DATA_WIDTH, this parameter reference associates the code domain object with the parameter domain object. For example, the parameter name DMA_DATA_WIDTH, currently valued at 16, has a valid range of [8, 64], and originates from the parameter overriding during top-level instantiation. Regarding the association between parameter domain objects and waveform domain objects, assuming that the set of affected signals for parameter DMA_DATA_WIDTH includes axi_wdata, this mapping relationship will inversely associate parameter domain objects with affected waveform domain objects, so that the waveform signals that may be affected can be directly located when the parameter value changes.

[0040] By constructing the three object types and three association relationships mentioned above, this embodiment constructs a bidirectional linkage tracing network of waveform-code-parameter. This network supports both tracing layer by layer from abnormal waveforms and reverse lookup of related waveform domain objects from code domain objects or parameter domain objects, thus providing a basis for candidate object shrinking, scoring sorting, and linkage interpretation.

[0041] During RTL code simulation, if an anomaly occurs, it is necessary to extract anomaly information such as the anomaly time window, trigger signal, expected and actual values, and source information from the simulation results. Then, step S13 is executed to generate structured anomaly events based on this anomaly information. Generating structured anomaly events essentially unifies the clues originally scattered in assertion logs, waveform clips, and inspection reports into event carriers that can directly participate in attribution calculations.

[0042] After generating a structured exception event, candidate objects related to the exception event are extracted along the linkage tracing network. These candidate objects include candidate code domain objects and candidate parameter domain objects. The extraction of candidate objects is not expanded to all design objects, but rather narrowed down by combining the exception time window, trigger signal, instance hierarchy path, and object relationships, focusing the attribution calculation on the set of objects directly related to the current exception event. For example, based on the exception situation, the obtained candidate objects include two candidate code domain objects and three candidate parameter domain objects.

[0043] Then, step S14 is executed to calculate the attribution score for each candidate. Specifically, the attribution score for each candidate is calculated using the following formula: Score=w1×TypeMatch(anomalytype,candidatetype)+w2×ParamViolation(candidate) w3×TraceDistance(candidate,trigger_signal)(Equation 1).

[0044] In this implementation, `TypeMatch(anomaly_type, candidate_type)` represents the matching value between the anomaly category and the candidate object type. This embodiment uses a pre-defined anomaly category-node type matching matrix. The rows of this matrix represent the anomaly categories, such as timing violations, out-of-bounds values, protocol violations, and state stagnation. The columns represent the candidate node types, such as state machine branches, combinational logic assignments, parameter definitions, and clock domain intersection nodes. Each element in this matrix ranges from [0, 1]. A higher value indicates a stronger correlation between the anomaly category and the node type. For example, the matching value between a state stagnation anomaly and a state machine branch node is 0.9, and the matching value with a combinational logic assignment node is 0.3.

[0045] ParamViolation(candidate) represents the degree to which a parameter value deviates from the valid range. For candidate parameter domain objects, the deviation of the parameter value from the valid range is calculated as follows: When the current value of the parameter is within the valid range [min, max], the closer the parameter value is to the boundary of the valid range, the larger the calculated ParamViolation value; when the current value of the parameter exceeds the valid range, ParamViolation = 1 + |excess amount| / (max). For candidate code domain objects, the value of ParamViolation is zero.

[0046] TraceDistance(candidate, trigger_signal) is the tracing distance from the candidate object to the direct driving source of the abnormal trigger signal. It is defined as the number of edges traversed by the shortest path from the waveform domain object corresponding to the trigger signal to the candidate object in the linkage tracing network. The smaller the distance, the more direct the association between the current candidate object and the abnormal signal.

[0047] w1, w2, and w3 are pre-set weight values. Preferably, the three weight values ​​w1, w2, and w3 are flexibly adjusted according to the verification project to ensure that the three weight values ​​are configured with the characteristics of the verification project.

[0048] After calculating the attribution score for each candidate object, step S15 is executed to determine whether the attribution score of each candidate object meets the sorting requirements for distinguishing the anomaly categories of candidate objects. If it does, step S19 is executed, and the anomaly category determination result is directly output. Otherwise, a comprehensive analysis combining multiple domain cases is required to determine the anomaly category. In essence, step S15 determines whether the attribution scores of each candidate object calculated in step S14 can directly identify a single-domain anomaly, such as whether it is a waveform domain anomaly, code domain anomaly, or parameter domain anomaly. If it can be directly determined to be a domain anomaly, the determination result for that domain anomaly is directly output in step S19. If it cannot be directly determined, step S16 is executed.

[0049] After calculating the attribution scores of each candidate object in step S14, in step S15, the candidate object with the highest attribution score among the candidate objects of each domain is first obtained, and it is determined whether the attribution score of the candidate object with the highest attribution score in this domain is greater than or equal to a preset confidence threshold θ_conf. If so, the current anomaly category is determined to be an anomaly in that domain. For example, after the calculation in step S14, among multiple candidate code domain objects, the attribution score of the candidate code domain object with the highest attribution score is greater than the confidence threshold θ_conf, but the attribution scores of all candidate parameter domain objects are lower than the confidence threshold θ_conf, then step S19 is executed to determine that the current anomaly category is a code domain anomaly. Furthermore, the confidence threshold θ_conf used to determine code domain anomalies and the confidence threshold θ_conf used to determine parameter domain anomalies can be the same value or different values. The specific confidence threshold θ_conf can be set according to the designed verification project.

[0050] If the attribution scores of all candidate objects are lower than the confidence threshold θ_conf, the anomaly category cannot be directly determined. Therefore, it is necessary to comprehensively determine the anomaly category by combining the waveform domain, code domain, and parameter domain data. In this embodiment, an existing large language model is used for analysis. Specifically, step S16 is executed first, inputting the structured anomaly event and the context of multiple candidate objects into the large language model. The large language model is then used to calculate the semantic association score ScoreLLM. The large language model used in this embodiment is a general-purpose large language model, such as the GPT series, Claude series, or other open-source large language models. These large language models perform semantic association evaluation analysis based on prompt words to calculate the semantic association score ScoreLLM.

[0051] Then, the attribution score Score calculated in step S14 and the semantic association score ScoreLLM are weighted together to obtain the association attribution score Scorefinal. The formula for calculating the association attribution score Scorefinal is as follows: Scorefinal=β×Score+(1 β)×Score_LLM (Equation 2).

[0052] Here, β is a set fusion coefficient, which is adjusted based on the historical attribution accuracy of the project.

[0053] In step S16, a corresponding attribution score, Scorefinal, is calculated for each candidate object. Then, step S17 is executed to determine the anomaly category based on the final attribution score, Score_final, for each candidate code domain object and candidate parameter domain object. During the determination process in step S17, a linkage determination threshold, θ_link, is used as the basis for the determination. Furthermore, the linkage determination threshold θ_link and the confidence threshold θ_conf used in step S15 are two independent thresholds; they are set separately and are not correlated.

[0054] Assuming that among multiple candidate objects, the candidate object with the highest association attribution score in the candidate code domain is assigned an association attribution score of S_code, and the candidate object with the highest association attribution score in the candidate parameter domain is assigned an association attribution score of S_param, and that inter-domain difference threshold θ_gap and parameter violation threshold θ_pv are pre-set, preferably, the linkage judgment threshold θ_link, the inter-domain difference threshold θ_gap, and the parameter violation threshold θ_pv are configured separately according to the characteristics of the verification project and the anomaly category, allowing for flexible adjustment based on different project characteristics. The specific judgment method is as follows: If the difference between the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter values ​​of the candidate parameter domain object from the legal range is less than the parameter violation threshold, then it is determined to be a code domain exception; that is, it satisfies S_param. If S_code≥θ_gap and ParamViolation<θ_pv, then it is determined to be a code domain exception.

[0055] If the difference between the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter values ​​of the candidate parameter domain object from the legal range is greater than or equal to the parameter violation threshold, then it is determined to be a parameter domain anomaly, that is, it satisfies S_param. If the condition S_code≥θ_gap and ParamViolation≥θ_pv is met, then the parameter domain is considered abnormal.

[0056] If the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate code domain object are both greater than or equal to the linkage determination threshold, and the absolute value of the difference between the association attribution score of the candidate code domain object and the association attribution score of the candidate parameter domain object is less than the inter-domain difference threshold, then the anomaly category is determined based on the association attribution score. That is, if S_code ≥ θ_link and S_param ≥ θ_link and |S_code... If the condition S_param|<θ_gap is met, it is determined to be a linkage anomaly. The structured anomaly event, candidate code domain object, and candidate parameter domain object are input into the large language model to generate a causal inference chain. Preferably, the causal inference chain includes a description of the inference process organized in the order of waveform anomaly phenomenon, code logic, and parameter influence, and the anomaly category is analyzed based on the inference process.

[0057] Finally, execute step S18 and output the anomaly category determined in step S17 or step S19. If a causal reasoning chain is generated through a large language model, the causal reasoning chain will also be output when outputting the anomaly category, so that the verifier can understand the anomaly phenomenon and the reasoning process, and thus analyze the rationality of the reasoning.

[0058] The following three examples illustrate the anomaly classification process in this embodiment. Assume that in the RTL code simulation, the high-order bits of the DMA output signal are consistently zero. The anomaly is located to the bit-width definition parameter DMA_DATA_WIDTH via the linked tracing network. At this point, the bit-width definition parameter DMA_DATA_WIDTH is set as a candidate parameter domain object. Furthermore, if the current value of this parameter exceeds the legal range, and the attribution score shows a high degree of parameter violation for the candidate parameter domain object (e.g., the attribution score is greater than the confidence threshold θ_conf), then the anomaly category is directly classified as a parameter domain anomaly.

[0059] Assume that in the simulation of the AXI slave device controller, the axi_wvalid signal continues to be at a high level while the axi_wready signal is not responded. The waiting branch node of the state machine is located through the linkage trace network, and the values of the candidate parameter domain objects are all within the legal value range. After the attribution score calculation, the attribution score of the candidate code domain object is significantly higher than that of the candidate parameter domain object, so it is directly determined as a code domain abnormality.

[0060] Assume that in the simulation of a parameterized arbitration module, the abnormal situation that occurs is that the assertion reports that the state machine stays in the WAIT_GRANT state for more than the expected number of cycles. After obtaining the simulation waveform and the assertion result, the abnormal state signal grant_state (including the instance path top.arb_inst, expected jump, and actual滞留) is set as a candidate waveform domain object, and the conditional branch "if(wait_cnt<MAX_GRANT_WAIT_CYCLES)" is set as a candidate code domain object, which contains information such as the file location and the driving signal wait_cnt. The waiting threshold parameter MAX_GRANT_WAIT_CYCLES is set as a candidate parameter domain object. For example, the current value of this parameter is 128, while the legal value range is 1 to 256, and the affected signal is grant_state. When determining the abnormal category, two-way associations among the waveform domain, code domain, and parameter domain are established based on instance path alignment, parameter reference and affected signals. Then, by generating a structured abnormal event, it is recorded that the abnormal event is manifested as a state machine stagnation, the trigger signal is grant_state, the expected value is a state jump, and the actual value is continuous滞留. Subsequently, the range of candidate objects is narrowed through the linkage trace network, and finally it is determined that the candidate objects that may cause the abnormality are the conditional branch code domain object and the threshold parameter domain object.

[0061] Then, the attribution scores are calculated respectively for the above two candidate objects. Assume that the matching value TypeMatch between the abnormal category of the candidate code domain object and the candidate object type is relatively high. According to the abnormal category-node type matching matrix, the preset matching value for a state stagnation type abnormality and a state machine waiting branch node is 0.9; the value of the deviation degree ParamViolation of the parameter value of the candidate parameter domain object relative to the legal range is not zero, that is to say, the current value 128 of the parameter is within the legal range [1, 256], and the deviation degree ParamViolation of the parameter value relative to the legal range = min(|128 -1|,|128 -256|) / (256 -1)≈0.50.

[0062] Since both the correlation attribution scores of the candidate code domain object and the candidate parameter domain object are not lower than the linkage determination threshold θ_link, and the difference between the correlation attribution scores of the candidate code domain object and the candidate parameter domain object is less than the inter-domain difference threshold θ_gap, therefore, it is determined as linkage abnormality. At this time, the above two candidate objects need to be sent to a large language model to generate a causal inference chain. Since the condition judgment in the RTL code is if(wait_cnt<MAX_GRANT_WAIT_CYCLES), the strict less than operator "<" is used. When wait_cnt increments to exactly equal to MAX_GRANT_WAIT_CYCLES (that is, 128), the condition 128<128 is false, and the state machine cannot jump out of the waiting state; if the condition is changed to <=, the jump can be triggered when wait_cnt is equal to 128. It can be determined through the above inference that this abnormality is caused jointly by the boundary condition judgment logic in the code and the parameter value being at the boundary.

[0063] Embodiment of automatic attribution device for RTL code verification abnormality: The following combination Figure 2 introduces the automatic attribution device for RTL code verification abnormality of this embodiment. This embodiment includes an object construction module 21, a linkage tracing network construction module 22, an abnormal event generation module 23, an attribution scoring module 24 and an abnormality determination module 25.

[0064] Wherein, the object construction module 21 is configured to obtain verification data such as simulation waveforms, assertion results, check logs and parameter configurations, and organize these verification data into waveform domain objects, code domain objects and parameter domain objects respectively, so as to form a unified object model.

[0065] The linkage tracing network construction module 22 is configured to construct the association relationship from the waveform domain object to the code domain object, the association relationship from the code domain object to the parameter domain object, and the association relationship from the parameter domain object to the waveform domain object, and forms a linkage tracing network by constructing the above three association relationships.

[0066] The abnormal event generation module 23 is configured to extract abnormal information from chip simulation results, generate structured abnormal events, and extract candidate objects involved in the abnormal information based on the linkage tracing network, including candidate code domain objects and candidate parameter domain objects.

[0067] The attribution scoring module 24 is configured to calculate attribution scores for candidate objects, for example, directly calculate the attribution score of each candidate object according to formula 1. When the abnormal category cannot be directly determined based on the attribution score, it is also necessary to further calculate the semantic correlation score through a large language model, and calculate the correlation attribution score based on formula 2.

[0068] The anomaly determination module 25 is used to determine and output the anomaly category based on the attribution score. If the anomaly category can be directly determined based on the attribution score, the anomaly category is directly output. If the anomaly category cannot be directly determined based on the attribution score, the calculation results of the associated attribution score are combined to comprehensively analyze the cause of the anomaly and generate a causal inference chain. The final anomaly category and the causal inference chain are then output together.

[0069] This invention solves the problem in the prior art where anomaly analysis of waveforms, codes, and parameters is scattered across different verification tools, making it impossible to comprehensively analyze anomalies across multiple domains. By using a unified object model, the three types of verification data are incorporated into the same identification system, enabling anomaly analysis to be organized and compared within the same framework. This reduces the need for verification personnel to repeatedly switch between waveform viewers, code editors, and parameter files, thus improving the efficiency of anomaly attribution.

[0070] Furthermore, addressing the limitation of existing solutions that can only perform localized anomaly tracking, this invention establishes a bidirectional tracing link covering the waveform, code, and parameter domains through a linked tracing network. This allows anomalies to be traced forward from the waveform side to the code and parameters, and also backward from the code or parameter side to query the affected waveforms. Moreover, considering the problem that existing simulation anomalies exist in a scattered form and are difficult to directly participate in automatic attribution, this invention organizes anomaly time windows, trigger signals, anomaly categories, and source information into structured anomaly events, providing a unified data input for subsequent candidate narrowing and scoring ranking.

[0071] To address the problem that existing technologies using fixed rules are not adaptable to new anomaly patterns, this invention introduces a large language model when calculating attribution scores and uses it to calculate association attribution scores. Furthermore, it determines the anomaly category based on the association attribution scores, thereby improving the coverage of complex and novel anomaly patterns while preserving the stability of the rules.

[0072] Finally, addressing the problem that existing technologies lack explanatory power when code and parameter factors work together, this invention outputs a complete causal reasoning path from waveform phenomena through code logic to parameter influences through a mechanism that links anomaly detection and the generation of causal reasoning chains, enabling verification personnel to understand the reasoning process very intuitively.

[0073] Finally, it should be emphasized that the above are merely preferred embodiments of the present invention and are not intended to limit the present invention. For those skilled in the art, the present invention can have various changes and modifications. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An automatic attribution method for RTL code verification exceptions, characterized in that, This includes the following steps performed by the processor: Construct a unified object model that includes waveform domain objects, code domain objects, and parameter domain objects, and establish the association relationships from the waveform domain objects to the code domain objects, from the code domain objects to the parameter domain objects, and from the parameter domain objects to the waveform domain objects to form a linkage and tracing network; Anomaly information is extracted from RTL code simulation results to generate structured anomaly events. Based on the linkage tracing network, candidate objects involving the structured anomaly events are extracted. The candidate objects include the code domain object and the parameter domain object. The candidate objects are evaluated by attribution scores, and anomaly categories are determined and output based on the attribution scores.

2. The automatic attribution method for RTL code verification anomalies according to claim 1, characterized in that: The attribution score is used to determine the anomaly category, which includes: If the attribution score of the candidate object meets the ranking requirement for distinguishing the candidate object's anomaly category, then the anomaly category is output; if the attribution score of the candidate object with the highest attribution score among all the candidate objects is lower than a preset confidence threshold, then the associated attribution score is calculated based on the structured anomaly event and the context of each candidate object, and the anomaly category is determined based on the associated attribution score.

3. The automatic attribution method for RTL code verification anomalies according to claim 2, characterized in that: After determining the anomaly category based on the association attribution score, a causal inference chain is also generated. When outputting the anomaly category, the anomaly category and the causal inference chain are output together.

4. The automatic attribution method for RTL code verification anomalies according to claim 3, characterized in that: The causal reasoning chain includes analytical information on waveform anomalies, code logic, and parameter effects.

5. The automatic attribution method for RTL code verification anomalies according to any one of claims 2 to 4, characterized in that: If the difference between the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate with the highest association attribution score in the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter value of the candidate parameter domain object from the legal range is less than the parameter violation threshold, then it is determined to be a code domain anomaly. If the difference between the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate with the highest association attribution score in the candidate code domain object is greater than or equal to the inter-domain difference threshold, and the deviation of the parameter value of the candidate parameter domain object from the legal range is greater than or equal to the parameter violation threshold, then it is determined to be a parameter domain abnormality. If the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object and the association attribution score of the candidate with the highest association attribution score in the candidate code domain object are both greater than or equal to the linkage determination threshold, and the absolute value of the difference between the association attribution score of the candidate with the highest association attribution score in the candidate code domain object and the association attribution score of the candidate with the highest association attribution score in the candidate parameter domain object is less than the inter-domain difference threshold, then the anomaly category is determined based on the association attribution score.

6. The automatic attribution method for RTL code verification exceptions according to claim 5, characterized in that: The linkage determination threshold is independent of the confidence threshold.

7. The automatic attribution method for RTL code verification anomalies according to claim 6, characterized in that: The linkage judgment threshold, the inter-domain difference threshold, and the parameter violation threshold are configured respectively according to project characteristics and / or anomaly categories.

8. The automatic attribution method for RTL code verification anomalies according to any one of claims 1 to 4, characterized in that: The attribution score is obtained by weighting and calculating the matching value between the anomaly category and the candidate object type, the degree of deviation of the parameter value from the legal range, and the tracing distance from the candidate object to the direct driving source of the anomaly trigger signal.

9. An automatic attribution device for RTL code verification anomalies, characterized in that, include: The object building module is used to build a unified object model that includes waveform domain objects, code domain objects, and parameter domain objects; The linkage traceability network construction module is used to construct the association relationships from the waveform domain object to the code domain object, from the code domain object to the parameter domain object, and from the parameter domain object to the waveform domain object, thereby forming a linkage traceability network; An exception event generation module is used to extract exception information from RTL code simulation results, generate structured exception events, and extract candidate objects related to the structured exception events based on the linkage tracing network. The candidate objects include the code domain object and the parameter domain object. The attribution scoring module is used to calculate the attribution score for the candidate object; The anomaly detection module is used to determine and output the anomaly category based on the attribution score.

10. The automatic attribution device for RTL code verification anomalies according to claim 9, characterized in that: The attribution scoring module is further configured to: output an anomaly category when it is confirmed that the attribution score of the candidate object meets the anomaly category ranking requirements for distinguishing the candidate object; and calculate an associated attribution score based on the structured anomaly event and the context of each candidate object when it is confirmed that the attribution score of the candidate object with the highest attribution score is lower than a preset confidence threshold, and determine the anomaly category based on the associated attribution score.

Citation Information

Patent Citations

  • VerilogA code automatic error correction method based on classification error library and large language model

    CN121118778A

  • RTL code generation method, computer device and readable storage medium

    CN122152323A