Method for identifying packet types in Verdi waveform

By intercepting pictures and analyzing the serial number in the verdi waveform, and combining memory database comparison, we can quickly identify USB packet types, solve the problem of time-consuming and low accuracy of existing methods, and improve the verification efficiency and engineers' ability to discover defects.

CN114548004BActive Publication Date: 2025-08-12IPGOAL MICROELECTRONICS (SICHUAN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111105002.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-22
Publication Date
2025-08-12
Estimated Expiration
2041-09-22

AI Technical Summary

Technical Problem

The existing methods of identifying packet types in verdi waveforms are time-consuming and have low accuracy, making it difficult to quickly and efficiently obtain key packet information, affecting verification efficiency and engineers' ability to detect defects.

Method used

By intercepting waveform pictures in verdi and inputting them into computer software, analyzing and obtaining the serial number and saving it to the memory bank. In the future, by comparing the recognition package type with the memory bank, manual input and software learning methods are used to reduce redundant printing information and improve recognition efficiency.

Benefits of technology

Quickly obtain key package information, reduce simulation time, improve verification efficiency and engineers' ability to detect defects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114548004B_ABST
    Figure CN114548004B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for identifying packet types in a Verdi waveform, which is used for identifying USB packet types. The method comprises the following steps: a. intercepting a waveform image in Verdi and inputting the image into computer software; b. the computer software parses the input image to obtain the serial number and corresponding description information of the current image, and saves the serial number into a memory bank of the computer software; c. repeating steps a-b until a required number of serial numbers are obtained; d. inputting a waveform image to be tested into the computer software and obtaining the serial number of the waveform image to be tested; e. comparing the serial number to be tested with the serial numbers in the memory bank one by one until the serial number to be tested contains the serial number in the memory bank and outputs the description information of the waveform to be tested. The method for identifying packet types in a Verdi waveform of the present invention can quickly obtain the package information of key parts, reduce printing information, shorten simulation time, improve verification efficiency, and also improve the ability of verification engineers to find defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of electronic information, and more particularly to a method for identifying packet types in a Verdi waveform. Background Art

[0002] Today, digital circuit verification primarily relies on automated comparisons and software-printed results. During the verification process, after verifying the log files for errors, verification engineers need to compare waveforms with the log files to verify that the DUT behaves as expected. They typically use Synopsys' VCS software to simulate the circuit. This generates log files and waveform data files. The waveform data files record the time-dependent changes in the values of various signals during the simulation. Synopsys' Verdi software can read these waveform data files and display the signal value changes in a graph window. The graph window's horizontal axis represents time, and the vertical axis represents the signal value changes. This allows for visualization of the value changes of multiple circuit signals in a single Verdi window. However, simply passing a test case often does not guarantee that the DUT is free of design defects. During the verification of the DUT's behavior, reading the log files accounts for 50% of the time, while verifying the Verdi waveforms accounts for 50%. Verification engineers can determine the packet type of a particular region on the waveform by: 1. Back-calculating the packet transmission time from the log files; 2. Inferring the packet type from waveform transitions; 3. Inferring the packet type from the DUT's internal signals. However, the verification time of methods 1 and 2 is long, which reduces the verification efficiency; and in method 3, the signal of the design to be tested may have logical errors, and the verification accuracy cannot be effectively guaranteed.

[0003] Taking USB verification as an example, both the host and device are typically simulated using VIP (Verification Intellectual Property), making packet information opaque to verification engineers. For example, during a split transmission, determining whether a packet is a start or completion packet requires adding print information to a callback function. This is not only time-consuming and significantly increases the log size, but also contains a lot of redundant information that engineers don't need.

[0004] Therefore, it is necessary to provide an improved method for identifying the packet type in the Verdi waveform that can quickly and effectively identify packet information to overcome the above-mentioned defects. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for identifying the packet type in the Verdi waveform. The method for identifying the packet type in the Verdi waveform of the present invention can quickly obtain the packet information of the key parts, reduce the printing information, shorten the simulation time, improve the verification efficiency, and also improve the ability of the verification engineer to find defects.

[0006] To achieve the above object, the present invention provides a method for identifying the packet type in a Verdi waveform, which is used to identify the USB packet type, and comprises the following steps:

[0007] a. Capture a waveform image in Verdi and input the image into the computer software;

[0008] b. The computer software parses the input image to obtain the serial number and corresponding description information of the current image, and saves the serial number to the computer software's memory;

[0009] c. Repeat steps ab until the required number of serial numbers is obtained;

[0010] d. Input the waveform image to be tested into the computer software and obtain the serial number of the waveform image to be tested;

[0011] e. Compare the serial number to be tested with the serial numbers in the memory bank one by one until the serial number to be tested contains the serial number in the memory bank and output the description information of the waveform to be tested.

[0012] Preferably, the signal line on the upper side of the waveform picture is set as signal line 1, and the signal line on the lower side is set as signal line 2, and it is defined that: when signal line 1 is high and signal line 2 is low, it is in J state; when signal line 1 is low and signal line 2 is high, it is in K state; when signal line 1 is low and signal line 2 is low, it is in SE0 state; and the serial number is formed by any arrangement and combination of J, K, and SE0.

[0013] Preferably, in step a, the captured waveform image includes at least one period information and packet description information.

[0014] Preferably, the captured waveform image only includes the background and the signal line, and the background and the signal line are different colors.

[0015] Preferably, the step b specifically includes the following steps: parsing pixel information of the current image and extracting a hopping sequence of the signal line to obtain the serial number and corresponding description information.

[0016] Preferably, the length of the serial number to be tested is m bits, the length of the serial number in the memory bank is n, and m≥n; both m and n are natural numbers.

[0017] 7. The method for identifying packet types in a Verdi waveform as claimed in claim 6, wherein when m>n, the mn portion of the sequence number to be tested is cleared to zero and compared one by one with the sequence numbers in the memory bank.

[0018] Preferably, the step e specifically further includes the following steps:

[0019] e1. Compare the serial number to be tested with a serial number in the memory bank;

[0020] e2. Shift the serial number to be tested one position to the left and compare it with the serial number in the memory bank;

[0021] e3. Repeat step e2 until the serial number to be tested matches the serial number or the number of left shifts reaches mn.

[0022] Compared with the prior art, the method for identifying the packet type in the Verdi waveform of the present invention is mainly used for identifying the USB packet type. It adopts the method of manual input and software learning. During use, the user only needs to input the correct waveform image and description information when using it for the first time, and let the software parse the waveform image to obtain the serial number, that is, independently complete the learning of the waveform image. In subsequent identification, the software can identify the description information of the package contained in the waveform image based on the learning experience; therefore, the key part of the package information can be quickly obtained, the printing information is reduced, the simulation time is shortened, the verification efficiency is improved, and the ability of the verification engineer to find defects is also improved.

[0023] The present invention will become more apparent from the following description taken in conjunction with the accompanying drawings, which are used to illustrate embodiments of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The flowchart of the method for identifying the packet type in the Verdi waveform of the present invention.

[0025] Figure 2 This is a waveform picture of an embodiment of the method for identifying packet types in a Verdi waveform according to the present invention.

[0026] Figure 3 This is a flow chart of comparing the sequence number to be tested with the sequence number in the memory library in the method for identifying the packet type in the Verdi waveform of the present invention.

[0027] Figure 4 This is a flow chart of comparing the sequence number to be tested with the sequence number in the memory library in the method for identifying the packet type in the Verdi waveform of the present invention.

[0028] Figure 5 This is a flow chart of determining the sequence number in the method for identifying the packet type in the Verdi waveform of the present invention. DETAILED DESCRIPTION

[0029] Embodiments of the present invention will now be described with reference to the accompanying drawings, in which like reference numerals represent like elements. As described above, the present invention provides a method for identifying packet types in a Verdi waveform. This method can quickly obtain key packet information, reduce printed information, shorten simulation time, improve verification efficiency, and enhance the ability of verification engineers to detect defects.

[0030] Please refer to Figure 1 , Figure 1 Flowchart of the method for identifying the packet type in the Verdi waveform of the present invention. As shown in the figure, the method for identifying the packet type in the Verdi waveform of the present invention includes the following steps:

[0031] Step S001. intercepting a waveform image in Verdi and inputting the image into the computer software; in this step, the waveform image is intercepted in the Verdi software in a conventional screenshot manner, and in the present invention, the Verdi waveform image used itself contains description information, which is formed by the user who first intercepts the waveform image entering the image description into the software, that is, description information; and the description is customized by the user, for example: image description example 1, this is a SOF package, image description example 2, the configuration descriptor data packet sent by USB device 1, image description example 3, this is a start separation transmission packet; in short, the description includes information such as the type of packet, the data type of the packet transmission, etc. When the software outputs this description information to the user again, the user can know what type of packet is contained in the screenshot through the description, that is, obtain the description information of the waveform image. In addition, in this step, the intercepted waveform image must contain at least one period information so that complete period information and related description information can be obtained when the image is subsequently parsed; the image is then input into the computer software to facilitate further processing of the image in subsequent steps.

[0032] Step S002. The computer software analyzes the input image to obtain the serial number and corresponding description information of the current image, and saves the serial number to the memory of the computer software. In this step, the waveform image input to the computer software only contains the background and signal line, and there are no other redundant lines or graphic colors in the waveform image, so that when analyzing the current image, it will not be interfered with and affected by other lines or graphic colors, thereby ensuring the accuracy of the analysis result. The background and signal line are different colors. In Verdi, the background color is usually black (such as Figure 2As shown), the color of the signal line is non-black so that the signal line can be easily distinguished from the background. Usually, in order to clearly distinguish it from the background color, in the present invention, the signal line can be set to a color that is significantly different from the background color (black), such as green, white, or red. Of course, in actual applications, the color combination can be flexibly set as long as the background color and the color of the signal line can be clearly distinguished. In addition, in the present invention, the upper signal line in the waveform image is set as signal line 1, and the lower signal line is set as signal line 2, and it is defined that: when signal line 1 is high and signal line 2 is low, it is in J state; when signal line 1 is low and signal line 2 is high, it is in K state; when signal line 1 is low and signal line 2 is low, it is in SE0 state; the serial number is formed by any arrangement and combination of J, K, and SE0, such as the serial number: J, K, J, K, J, J, J, J, K, J, K, K, K, SE0, the serial number reflects the description information of the package corresponding to the waveform image, so that different packages have different serial numbers after being parsed, so the description information of each package can be analyzed and determined by different serial numbers. Furthermore, in this step, the serial number mainly parses the pixel information of the current image through python programming code and extracts the jump sequence of the signal line to obtain the serial number and the corresponding description information; wherein, the specific process of obtaining the serial number by extracting the jump sequence of the signal line is as follows Figure 5 In addition, in this step, after obtaining the serial number, it is saved in the memory of the computer software to facilitate subsequent calling of the serial number.

[0033] Step S003. Repeat steps S001-S002 until the required number of serial numbers is obtained; in this step, the above steps S001-S002 are repeatedly executed to obtain a sufficient number of serial numbers so that the required number of serial numbers are stored in the memory bank to complete the learning of the serial numbers of each waveform image. Subsequently, the serial numbers of the waveform images to be identified can be compared with the serial numbers of the waveform images to be identified, and then the description information corresponding to the waveform images to be identified can be identified; in the present invention, the required maximum recognizable number is 200, that is, a maximum of 200 serial numbers are stored in the memory bank, which takes into account both recognition accuracy and recognition speed. In actual applications, the recognizable number can be flexibly set according to the capacity and running speed of the software used, and the present invention does not make specific limitations on this.

[0034] Step S004. Input the image of the waveform to be measured into the computer software and obtain the serial number of the image of the waveform to be measured; in this step, after the image of the waveform to be measured is input into the computer software, the serial number of the image of the waveform to be measured is obtained through the same processing as step S002.

[0035] Step S005. Compare the sequence number to be tested with the sequence numbers in the memory bank one by one until the sequence number to be tested contains the sequence number in the memory bank and outputs the description information of the waveform to be tested; in this step, the sequence number to be tested is compared with the sequence numbers stored in the memory bank one by one in order to avoid missing some sequence numbers in the memory bank and not being compared, thereby ensuring the accuracy of the comparison range. In addition, in the present invention, the length of the sequence number to be tested is m bits, the length of the sequence number in the memory bank is n, and m≥n; m and n are both natural numbers, that is, the length of the sequence number to be tested must be longer than or equal to the length of the sequence number currently being compared in the memory bank in order for the sequence number to be tested to be normally compared and analyzed with the sequence number in the memory bank; otherwise, the sequence number to be tested does not match the sequence number currently being compared in the memory bank, and the comparison is skipped, and the sequence number to be tested continues to be compared with the next sequence number in the memory bank. If the serial number cannot be matched with the serial number in the memory bank, an error message will be output; and when m>n, each time the serial number to be tested is compared with the serial number in the memory bank, the mn part of the serial number to be tested must be cleared to zero, and then compared with the serial number in the memory bank to ensure that the number of digits of the two compared serial numbers is exactly the same, ensuring the accuracy of the comparison result.

[0036] In step S005, please refer to Figure 4 , comparing the serial number to be tested with the serial numbers in the memory bank one by one specifically also includes the following steps:

[0037] Step S501. Compare the serial number to be tested with a serial number in the memory bank. In this step, after obtaining the serial number of the image of the waveform to be tested through step S004, the serial number is compared with a serial number in the memory bank. If the match is successful, the description information corresponding to the serial number can be determined through the learned serial number in the memory bank. If the match is unsuccessful, the following steps are performed.

[0038] Step S502. The sequence number to be tested is shifted left by one position and compared with the sequence number in the memory bank. In this step, if there is no match in the comparison of step S501, the sequence number to be tested is shifted left by one position and then compared with the sequence number in the memory bank to avoid repeating step S501. Since the number of digits of the sequence number to be tested is greater than the number of digits of the sequence number in the memory bank, after the sequence number to be tested is shifted left by one position in this step, the excess digits (i.e., mn digits) still need to be cleared to ensure that the number of digits of the two compared sequence numbers is the same. Specifically, the comparison of the two sequence numbers is as follows: Figure 3 As shown, the serial number H1 is any one in the memory bank, K1 is the serial number to be tested, K2 is the serial number to be tested after being shifted left by one position, and K3 is the serial number to be tested after being shifted left by two positions.

[0039] Step S503. Repeat step S502 until the sequence number to be tested matches the current sequence number or the number of left shifts reaches mn. In this step, step S502 is stopped in two cases. Case 1 is when the sequence number to be tested, after any left shift, matches the sequence number in the current memory bank, meaning that the sequence number to be tested has been parsed and its description information has been obtained. Case 2 is when the number of left shifts reaches mn, meaning that the sequence number to be tested has been traversed to the number of bits corresponding to the current sequence number in the memory bank, thereby preventing missed detections and ensuring recognition accuracy.

[0040] In addition, in the present invention, please refer to Figure 2 and Figure 5 , the process of determining the serial number is as follows Figure 5 As shown, the method specifically includes the following steps:

[0041] Step S201. Extract pixel information of the waveform image; in this step, the pixel information of the captured waveform image is obtained in the same manner as described above, and the size of the captured image is 600*150 to meet the requirement for the set pixel.

[0042] Step S202. Determine the pixel information of the i-th column; in this step, i is set to 0, i.e., the pixel information of each pixel is determined starting from the origin; wherein, the pixel value of black (background color) is defined as 0, and the pixel values of other colors (signal lines) are non-zero to distinguish the background from the signal lines.

[0043] Step S203. The row number j increases from 0. In this step, all pixels on column 0 can be traversed by increasing the row number j from 0 to prevent omissions.

[0044] Step S204. If the number p of rows j with pixel values greater than 0 is greater than 2, it is determined to be a jump edge; in this step, the value of p can be greater than 2. In actual applications, the setting can be selected according to the specific waveform. In actual applications, the setting can be selected according to the specific waveform characteristics.

[0045] Step S205. Record the row and column coordinates before and after the transition edge. In this step, completing the recording of the row and column coordinates before and after the transition edge means completing the determination of a transition edge.

[0046] In step S206, the value of i is incremented, and steps S202 to S205 are repeated. In this step, by incrementing i and repeating steps S202 to S205, all the transition edges in the waveform image can be determined and recorded.

[0047] Step S207: Calculate the absolute value of the difference between the row coordinates of two adjacent transition edges to obtain multiple absolute values.

[0048] Step S208. Compare the absolute values to determine the corresponding states; in this step, the state with the largest absolute value is the J state, the state with the smallest absolute value is the K state, and the others are the SE0 state.

[0049] Step S209. Determine the transition period t; in this step, calculate the absolute value of the column coordinate difference between the first transition edge and the second transition edge, the second transition edge and the third transition edge, the third transition edge and the fourth transition edge, and the fourth transition edge and the fifth transition edge, and take the average, then the average is the transition period t; in the application process, in fact, the period t can be calculated using the first two transition edges, and the average value of 4 periods can be obtained by using 5 transition edges, but in software testing, it is found that verdi will have a small error For example, if the real cycle is 5, the actual picture analysis will show that the first cycle is 4 or 6. Take the average value and then round up or down. For example, the cycle is 4 / 5 / 5 / 5, and the average value is 4.7. According to the algorithm, 4.7>4.5, the cycle is 5. Therefore, the average of the odd number of cycles is taken, and the jump edge is taken to 4. For more accuracy, one more cycle is taken to the jump edge 5. Therefore, in actual application, the number of jump edges can be flexibly selected according to the accuracy requirements, and an odd number is best.

[0050] Step S210. Calculate the state duration beat number n; in this step, starting from the 6th jump edge, calculate the absolute value x of the coordinate difference between each jump edge, and then obtain the state duration beat number n=x / t; in the present invention, since the first 5 jump edges are taken in the aforementioned step S209, this step adds 1 to the number of jump edges in the above step, that is, starts calculating from the 6th jump edge; in actual application, the number of jump edges calculated at the beginning of the step can be added by 1 on the basis of the previous step, and the starting number is not specifically limited.

[0051] Step S211. Obtain a serial number based on the state and the number of continuous beats n; in this step, the number of continuous beats n represents the number of repetitions of the J state and the K state, thereby obtaining, for example, a serial number: J, K, J, K, J, K, J, J, K, J, K, K, J, K, SE0.

[0052] In summary, the method for identifying the packet type in the Verdi waveform of the present invention is used to identify the USB packet type. It adopts the method of manual input and software learning. During use, the user only needs to input the correct waveform image and description information when using it for the first time, and let the software parse the waveform image to obtain the serial number, that is, independently complete the learning of the waveform image. In subsequent identification, the software can identify the description information of the package contained in the waveform image based on the learning experience; therefore, the package information of the key part can be quickly obtained, the printing information is reduced, the simulation time is shortened, the verification efficiency is improved, and the ability of the verification engineer to find defects is also improved.

[0053] The present invention has been described above in conjunction with the best embodiments, but the present invention is not limited to the embodiments disclosed above, but should cover various modifications and equivalent combinations based on the essence of the present invention.

Claims

1. A method for identifying packet types in a Verdi waveform, characterized in that: Used to identify the USB packet type, including the following steps: a. Capture a waveform image in Verdi and input the image into the computer software; b. The computer software parses the input image to obtain the serial number and corresponding description information of the current image, and saves the serial number to the computer software's memory; c. Repeat steps ab until the required number of serial numbers is obtained; d. Input the waveform image to be tested into the computer software and obtain the serial number of the waveform image to be tested; e. The serial number to be tested is compared with the serial number in the memory one by one until the serial number to be tested contains the serial number in the memory and outputs a description of the waveform to be tested; The upper signal line in the waveform image is set as signal line 1, and the lower signal line is set as signal line 2. It is defined that: when signal line 1 is high and signal line 2 is low, it is in J state; when signal line 1 is low and signal line 2 is high, it is in K state; when signal line 1 is low and signal line 2 is low, it is in SE0 state; and the serial number is formed by any arrangement and combination of J, K, and SE0.

2. The method for identifying packet types in a Verdi waveform as claimed in claim 1, wherein: In step a, the captured waveform image includes at least one period information and packet description information.

3. The method for identifying packet types in a Verdi waveform as claimed in claim 2, wherein: The captured waveform image only includes the background and the signal line, and the background and the signal line are different colors.

4. The method for identifying packet types in a Verdi waveform as claimed in claim 3, wherein: The step b specifically includes the following steps: parsing the pixel information of the current image and extracting the hopping sequence of the signal line to obtain the serial number and the corresponding description information.

5. The method for identifying packet types in a Verdi waveform as claimed in claim 3, wherein: The length of the serial number to be tested is m bits, the length of the serial number in the memory bank is n, and m≥n; both m and n are natural numbers.

6. The method for identifying packet types in a Verdi waveform as claimed in claim 5, wherein: When m>n, the mn part of the serial number to be tested is cleared to zero and compared with the serial numbers in the memory bank one by one.

7. The method for identifying packet types in a Verdi waveform as claimed in claim 6, wherein: The step e specifically further includes the following steps: e1. Compare the serial number to be tested with a serial number in the memory bank; e2. Shift the serial number to be tested one position to the left and compare it with the serial number in the memory bank; e3. Repeat step e2 until the serial number to be tested matches the serial number or the number of left shifts reaches mn.

Citation Information

Patent Citations

  • Flow control method in wireless usb communication, and wireless USB device and wireless USB host using the same

    CN101238686A

  • Methods for bus data transmission and systems utilizing the same

    CN101634977A