X-value tracking method, electronic device and medium based on driver source code

By adopting a driver source code-based analysis method during chip development and verification, the target signal and target time are directly analyzed, and the cumbersome X-value tracking process is solved, achieving efficient and accurate X-value tracking and display.

CN118114607BActive Publication Date: 2025-05-16成都融见软件科技有限公司 +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410348706.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2025-05-16
Estimated Expiration
2044-03-26

AI Technical Summary

Technical Problem

During the chip development and verification process, the X-value tracking process in Verilog syntax is cumbersome, time-consuming and inefficient, and it is impossible to accurately and intuitively display the X-value tracking results.

Method used

Through the analysis method based on the driver source code, the target signal and target time are directly analyzed, the effective driver source code collection is obtained, and the X-value root cause tracking is performed based on these source codes, showing the tracking path and results.

Benefits of technology

There is no need to generate a circuit diagram, and the X-value tracking results can be displayed accurately and intuitively, improving the X-value tracking efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118114607B_ABST
    Figure CN118114607B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of chip technology, and in particular to an X-value tracking method, an electronic device, and a medium based on driving source code. The method includes step S1: determining a raw target signal with a raw target time value of X; step S2: performing driving source code analysis on the target signal at the target time to obtain a set of valid driving source codes; step S3: based on A k performing X root cause tracking. If a preset X root cause type code is tracked, determining the target X root cause of A k and executing step S6; otherwise, executing step S4 based on A k ; step S4: obtaining a set of intermediate target information with a median value of X in A k ; step S5: updating G n k to the target signal, updating T n k to the target time, and returning to execute step S2; step S6: presenting the tracking path and tracking result of A k on a preset display interface. The present invention can accurately and intuitively display the X-value tracking result, improving the tracking efficiency of the X value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of chip technology, and in particular to an X-value tracking method based on driver source code, electronic equipment and medium. Background Art

[0002] In the process of chip development and verification, the X value (uncertain value) in Verilog syntax has multiple semantics and has different functions in different design stages. In some cases, the X value is set according to the requirements, but in some cases, the X value is generated because of problems in the chip design. In order to determine whether the existence of the X value meets the chip design requirements and whether it implies certain design defects, it is necessary to analyze and determine the root cause of the X value. In the prior art, it is usually necessary to generate a circuit diagram based on the chip design code, and then track the root cause of the X value by analyzing the circuit diagram. The existing process of tracking the root cause of the X value is very cumbersome, requiring a lot of time and manpower, with low tracking efficiency, and unable to accurately and intuitively display the X value tracking results. It can be seen that how to improve the tracking efficiency of the X value and accurately and intuitively display the X value tracking results has become a technical problem that needs to be solved urgently. Summary of the invention

[0003] The object of the present invention is to provide a method, electronic device and medium based on X-value tracking display, which can accurately and intuitively display the X-value tracking result and improve the X-value tracking efficiency.

[0004] According to a first aspect of the present invention, there is provided a method for displaying based on X-value tracking, comprising:

[0005] Step S1, determine the signal with the original target time value X as the original target signal, take the original target time as the target time, take the original target signal as the target signal, and execute step S2;

[0006] Step S2: Perform a driver source code analysis on the target signal at the target time to obtain a valid driver source code set {A1, A2, ..., A k ,…,A K}, A k is the kth valid driver source code, and the value range of k is 1 to K;

[0007] Step S3: Based on A k Perform X root cause tracking. If the preset X root cause type code is tracked, the tracked X root cause type code is determined as A. k The corresponding target X root cause B k , ending based on A k The tracking process of A is executed, step S6 is executed, otherwise, the tracking process based on A is executed. k Step S4;

[0008] Step S4: Get Ak The intermediate target information set with median value X {(G1 k ,T1 k ),(G2 k ,T2 k ),…,(G n k ,T n k ),…,(G N k ,T N k )}, where G n k A k The nth intermediate target signal, T n k G n k The time when the value becomes X, n ranges from 1 to N;

[0009] Step S5: G n k Update to the target signal and set T n k Update to the target time, and return to execute step S2;

[0010] Step S6: A k The tracking path and tracking results are presented on the preset display interface.

[0011] According to a second aspect of the present invention, there is provided an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to execute the method described in the first aspect of the present invention.

[0012] According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the first aspect of the present invention.

[0013] Compared with the prior art, the present invention has obvious advantages and beneficial effects. By means of the above technical solution, the X-value tracking method, electronic device and medium provided by the present invention based on the driver source code can achieve considerable technical advancement and practicality, and has wide industrial utilization value, and has at least the following beneficial effects:

[0014] The present invention does not need to generate a circuit diagram, but directly analyzes the driving source code based on the target signal and the target time, and presents the tracing path and the tracing result on a preset display interface, which can accurately and intuitively display the X-value tracing result, thereby improving the X-value tracing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0016] Figure 1 A flow chart of a method for tracking and displaying based on X values ​​provided by an embodiment of the present invention;

[0017] Figure 2 The source code corresponding to the specific example of Mismatch UDP Entry type;

[0018] Figure 3 This is a schematic diagram of the analysis results corresponding to a specific example of the Mismatch UDP Entry type;

[0019] Figure 4 The source code corresponding to the specific example of Net Decl Delay type;

[0020] Figure 5 Schematic diagram of the analysis results corresponding to a specific example of Net Decl Delay type

[0021] Figure 6 The source code corresponding to the specific example of the Read External File type;

[0022] Figure 7 Definition of the external file value corresponding to the specific example of the Read External File type;

[0023] Figure 8 This is a diagram showing the analysis results for a specific example of the Read External File type. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0025] The embodiment of the present invention provides a method for displaying based on X value tracking, such as Figure 1 As shown, including:

[0026] Step S1, determine the signal with the original target time value of X as the original target signal, use the original target time as the target time, use the original target signal as the target signal, and execute step S2.

[0027] The original target signal and the original target time value may be specified by the user.

[0028] Step S2: Perform a driver source code analysis on the target signal at the target time to obtain a valid driver source code set {A1, A2, ..., A k ,…,A K}, A k is the kth valid driver source code, and the value range of k is 1 to K.

[0029] Wherein, K is the total number of valid driving source codes, K≥1, and the target signal may have one or more driving source codes.

[0030] Step S3: Based on A k Perform X root cause tracking. If the preset X root cause type code is tracked, the tracked X root cause type code is determined as A. k The corresponding target X root cause B k , ending based on A k The tracking process of A is executed, step S6 is executed, otherwise, the tracking process based on A is executed. k Step S4.

[0031] It should be noted that for each A k Step S3 needs to be executed to obtain the target X root cause corresponding to each valid driving source code, where the target X root cause is the code that makes the target signal have a value of X at the target time.

[0032] Step S4: Get A k The intermediate target information set with median value X {(G1 k ,T1 k ),(G2 k ,T2 k ),…,(G n k ,T n k ),…,(G N k ,T N k )}, where G n k A k The nth intermediate target signal, T n k G n k The time when the value becomes X, where n ranges from 1 to N.

[0033] Where N is A k The total number of intermediate target signals with median value X, N ≥ 0.

[0034] Step S5: G n k Update to the target signal and set T n k Update to the target time and return to step S2.

[0035] Step S6: A k The tracking path and tracking results are presented on the preset display interface.

[0036] It should be noted that the target X root cause can usually be determined through steps S1 to S5. If the target X root cause cannot be determined through steps S1 to S5, a prompt message is generated on a preset display interface.

[0037] As an embodiment, step S2 includes:

[0038] Step S21: Analyze the target signal for the driver source code to obtain a candidate driver source code set {D1, D2, ..., D r ,…,D R}, D r is the rth candidate driving source code, the candidate driving source code is a code that may cause the target signal value to become X, and the value range of r is 1 to R.

[0039] Among them, R is the total number of candidate driver source codes.

[0040] Step S22: Get D r The syntax tree structure where D r Extract D from the syntax tree structure r The set of expressions E that need to be satisfied r .

[0041] Among them, the expressions that need to be extracted are the driver source codes of the if / else conditions, case branch conditions, event trigger waits, wait wait conditions, and always_comb blocks in the grammatical structure.

[0042] Step S23: Get D r The set of signals F contained in all expressions in the set of expressions that need to be satisfied r .

[0043] Step S24: Obtain F from a preset waveform database r The value of at the target time is substituted into E r In the expression in, if E r If all the expressions in D are true,r Determine the valid driver source code.

[0044] It should be noted that the preset waveform database includes signals, signal values, and the time corresponding to the signal values. Based on the preset waveform database, the signal value corresponding to any signal at any time can be accurately obtained. r If there is an invalid expression in the source code, the candidate driver source code is filtered out.

[0045] Step S25: Generate a valid driver source code set {A1, A2, ..., A k ,…,A K}.

[0046] As an embodiment, step S3 includes:

[0047] Step S31: Get A k The signal value set contained in {(Q1 k ,V1 k ),(Q2 k ,V2 k ),…,(Q m k ,V m k ),…,(Q M k ,V M k )}, Q m k is the mth signal in the signal value set, V m k Q m The signal value of m ranges from 1 to M.

[0048] Where M is A k The total number of signals contained in .

[0049] Step S32: Based on {(Q1 k ,V1 k ),(Q2 k ,V2 k ),…,(Q m k ,V m k ),…,(Q M k ,V M k )}, target time, target signal and A k Perform first priority X root cause tracking. If any of the preset first priority X root causes is met, the tracked first X root cause type code is determined as A.k The corresponding target X root cause B k , ending based on A k Otherwise, execute the tracking process based on A k Step S4.

[0050] As an embodiment, the preset first priority X root causes include:

[0051] A k For one of the user defined primitive (User Defined Primitive, referred to as UDP) instances, the target signal is the output of the user defined primitive instance, and the input signal does not match any item in the user defined primitive truth table. The first priority X root cause type can be set to Mismatch UDP Entry, indicating that it does not match any item in the UDP truth table, resulting in the output being the X value.

[0052] A k is a preset system function, and the target signal is the output of the preset system function; the preset system function may be fread function, fscanf function, readmemh function or readmemb function. That is, because of the X value generated when reading the external file, the value of the original target signal at the original target time is X, and the first priority X root cause type can be set to Read External File, indicating the X value generated when reading the external file.

[0053] A k It is a continuous assignment statement, and the target time is 0. The target signal uses a delayed declaration. The first priority X root cause type can be set to Net Decl Delay, indicating that the signal has a declaration delay, and the value initialized at time 0 is the X value.

[0054] Assign Delay:A k It is a continuous assignment statement, and the target time is 0. The continuous assignment statement uses a declaration delay. The first priority X root cause type can be set to Assign Delay, indicating that the signal has an assignment delay, and the value initialized at time 0 is the X value.

[0055] As an embodiment, in order to avoid performing useless operations and entering a useless loop, step S5 includes:

[0056] Step S51, determine G n k Has it been analyzed? If so, based on G n k Generate loop path prompt information, otherwise, execute step S52.

[0057] Step S52: G n k Update to the target signal and set T n k Update to the target time and return to step S2.

[0058] As an embodiment, step S6 includes:

[0059] Step S61: Get A k Tracking result information {H1 k ,H2 k ,…,H w k ,…,H W k}, H w is the wth tracking result information, the value range of w is 1 to W, H w k For {A1,A2,…,A k ,…,A K}, W≤K, H w ={h11 wk , h21 wk ,h12 wk ,h22 wk ,…,h1 i wk ,h2 i wk ,…,h1 f(w) wk ,h2 f(w) wk}, h11 wk H w The corresponding original target signal information, h21 wk For h11 wk Corresponding valid driver source code information, h1 i wk H w k The corresponding (i-1)th intermediate target signal information, h2 i wk H w k The corresponding valid driver source code information, the value range of i is 2 to f(w), f(w) is H w k The corresponding target signal number;

[0060] Step S62: h21 wk Set to h11 wk The child node of h2 i wkSet to h1 i wk The child node of h1 i wk Set to h2 i-1 wk The child nodes are displayed in a tree structure on the preset display interface.

[0061] Through step S61 - step S62 , the X value tracking result and the tracking path can be clearly displayed on the display interface.

[0062] It should be noted that in some application scenarios, there are multiple target X root causes for the target signal, and the tracking paths corresponding to some target root causes are also long. If all tracking paths and target X root causes are displayed, the amount of information to be displayed will be relatively large. In some application requirements, only the target X root cause needs to be paid attention to. Therefore, only the target root cause can be displayed directly, specifically only h11 wk and h2 f(w) wk In order to flexibly control, you can also set the folding mark to fold or unfold h21 according to specific application requirements. wk ,h12 wk ,h22 wk ,…,h1 i wk ,h2 i wk ,…,h1 f(w) wk information.

[0063] As an example, h11 wk Includes the signal identification, signal value change information, time information, location information and code range information corresponding to the original target signal; h22 wk Includes the valid driving source code expression, time information, location information and code range information corresponding to the original target signal; h1 i wk Including the signal identification, signal value change information, time information, location information and code range information corresponding to the (i-1)th intermediate target signal; h21 wk Includes the valid driving source code expression, time information, location information and code range information corresponding to the (i-1)th intermediate target signal; h2 f(w) wk Also included is the target X root cause type identifier.

[0064] As an example, h11 wk Set the folding mark of the node. When the folding mark is set to the expansion mark, {h11 wk , h21wk ,h12 wk ,h22 wk ,…,h1 i wk ,h2 i wk ,…,h1 f(w) wk ,h2 f(w) wk} corresponding to all node information; when the folding mark is set to the collapsed state, only h11 is displayed on the preset display interface wk and h2 f(w) wk The corresponding node information.

[0065] The following is further explained through several specific examples:

[0066] Figure 2 The source code corresponding to the specific example of Mismatch UDP Entry type is set to 29, and the original target signal is set to out. By executing steps S1 to S6, it can be generated Figure 3 The analysis results are shown.

[0067] Figure 4 The source code corresponding to the specific example of Net Decl Delay type is set to 0, the original target time is set to w, and by executing steps S1 to S6, it is possible to generate Figure 5 The analysis results are shown.

[0068] Figure 6 The source code corresponding to the specific example of the Read External File type. Figure 7 For the definition of the external file value, the original target signal is set to memory[6], and the original target time is set to 0. By executing steps S1 to S6, it is possible to generate Figure 8 The analysis results are shown.

[0069] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.

[0070] It should be noted that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0071] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are configured to execute the method described in the embodiment of the present invention.

[0072] The embodiment of the present invention further provides a computer-readable storage medium storing computer-executable instructions, wherein the computer instructions are used to execute the method described in the embodiment of the present invention.

[0073] The embodiment of the present invention does not need to generate a circuit diagram, but directly analyzes the driving source code based on the target signal and the target time, and presents the tracing path and the tracing result on a preset display interface, which can accurately and intuitively display the X value tracing result, thereby improving the X value tracing efficiency.

[0074] The above description is only a preferred embodiment of the present invention and does not limit the present invention in any form. Although the present invention has been disclosed as a preferred embodiment as above, it is not used to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical contents disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modification, equivalent change and modification made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention still falls within the scope of the technical solution of the present invention.

Claims

1. A method for displaying based on X value tracking, characterized in that: include: Step S1, determine the signal with the original target time value X as the original target signal, take the original target time as the target time, take the original target signal as the target signal, and execute step S2; Step S2: Perform a driver source code analysis on the target signal at the target time to obtain a valid driver source code set {A1, A2, ..., A k ,…,A K }, A k is the kth valid driver source code, and the value range of k is 1 to K; Step S3: Based on A k Perform X root cause tracking. If the preset X root cause type code is tracked, the tracked X root cause type code is determined as A. k The corresponding target X root cause B k , ending based on A k The tracking process of A is executed, and step S6 is executed. Otherwise, the tracking process based on A is executed. k Step S4; Step S3 include: Step S31: Get A k The signal value set contained in {(Q1 k ,V1 k ),(Q2 k ,V2 k ),…,(Q m k ,V m k ),…,(Q M k ,V M k )}, Q m k is the mth signal in the signal value set, V m k Q m The signal value of m ranges from 1 to M; Step S32: Based on {(Q1 k ,V1 k ),(Q2 k ,V2 k ),…,(Q m k ,V m k ),…,(Q M k ,V M k )}, target time, target signal and A k Perform first priority X root cause tracking. If any of the preset first priority X root causes is met, the tracked first X root cause type code is determined as A. k The corresponding target X root cause B k , ending based on A k Otherwise, execute the tracking process based on A k Step S4: The preset first priority X root causes include: A k is one of the user-defined primitives, the target signal is the output of the user-defined primitive, and the input signal does not match any item in the truth table of the user-defined primitive; A k is a preset system function, and the target signal is the output of the preset system function; A k It is a continuous assignment statement, and the target time is 0, and the target signal uses a delay statement; A k It is a continuous assignment statement with a target time of 0 and a declaration delay is used for the continuous assignment statement; Step S4: Get A k The intermediate target information set with median value X {(G1 k ,T1 k ),(G2 k ,T2 k ),…,(G n k ,T n k ),…,(G N k ,T N k )}, where G n k A k The nth intermediate target signal, T n k G n k The time when the value becomes X, n ranges from 1 to N; Step S5: G n k Update to the target signal and set T n k Update to the target time, and return to execute step S2; Step S6: A k The tracking path and tracking results are presented on the preset display interface.

2. The method according to claim 1, characterized in that The step S2 comprises: Step S21: Analyze the target signal for the driver source code to obtain a candidate driver source code set {D1, D2, ..., D r ,…,D R }, D r is the rth candidate driving source code, the candidate driving source code is a code that may change the target signal value to X, and the value range of r is 1 to R; Step S22: Get D r The syntax tree structure where D r Extract D from the syntax tree structure r The set of expressions E that need to be satisfied r ; Step S23: Get D r The set of signals F contained in all expressions in the set of expressions that need to be satisfied r ; Step S24: Obtain F from a preset waveform database r The value of at the target time is substituted into E r In the expression in, if E r If all the expressions in D are true, r Determine the valid driver source code; Step S25: Generate a valid driver source code set {A1, A2, ..., A k ,…,A K }.

3. The method according to claim 1, characterized in that The step S6 comprises: Step S61: Get A k Tracking result information {H1 k ,H2 k ,…,H w k ,…,H W k }, H w is the wth tracking result information, the value range of w is 1 to W, H w k For {A1,A2,…,A k ,…,A K }, W≤K, H w ={h11 wk , h21 wk ,h12 wk ,h22 wk ,…,h1 i wk ,h2 i wk ,…,h1 f(w) wk ,h2 f(w) wk }, h11 wk H w The corresponding original target signal information, h21 wk For h11 wk Corresponding valid driver source code information, h1 i wk H w k The corresponding (i-1)th intermediate target signal information, h2 i wk H w k The corresponding valid driver source code information, the value range of i is 2 to f(w), f(w) is H w k The corresponding target signal number; Step S62: h21 wk Set to h11 wk The child node of h2 i wk Set to h1 i wk The child node of h1 i wk Set to h2 i-1 wk The child nodes are displayed in a tree structure on the preset display interface.

4. The method according to claim 3, characterized in that h11 wk Set the folding mark of the node. When the folding mark is set to the expansion mark, {h11 wk , h21 wk ,h12 wk ,h22 wk ,…,h1 i wk ,h2 i wk ,…,h1 f(w) wk ,h2 f(w) wk } corresponding to all node information; when the folding mark is set to the collapsed state, only h11 is displayed on the preset display interface wk and h2 f(w) wk The corresponding node information.

5. The method according to claim 3, characterized in that: h11 wk Including the signal identification, signal value change information, time information, location information and code range information corresponding to the original target signal; h22 wk Including the valid driving source code expression, time information, location information and code range information corresponding to the original target signal; h1 i wk Including the signal identification, signal value change information, time information, location information and code range information corresponding to the (i-1)th intermediate target signal; h21 wk Including the valid driving source code expression, time information, location information and code range information corresponding to the (i-1)th intermediate target signal; h2 f(w) wk Also included is the target X root cause type identifier.

6. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, wherein the instructions are configured to execute the method according to any one of claims 1 to 5.

7. A computer-readable storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute the method according to any one of the preceding claims 1-5.

Citation Information

Patent Citations

  • Compiler, compiling method, tracking method and DCS controller

    CN110471670A

  • Urban rail transit platform door linkage control fault detection method and device

    CN115140102A