GUI (Graphical User Interface) display method and equipment for digital waveform, medium and product
By acquiring time windows and pixel windows, the set of digital waveform values corresponding to each pixel is calculated, which solves the stuttering problem in scaling digital signal waveforms during chip simulation and improves the efficiency of digital waveform debugging.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-18
- Publication Date
- 2026-03-31
AI Technical Summary
During chip simulation, when the generated digital signal waveform is scaled and displayed, repeated drawing causes stuttering and affects debugging efficiency.
By obtaining the time window and pixel window matching the target digital waveform, the set of digital waveform values corresponding to each pixel point in the time coordinate axis is calculated, and the target digital waveform is drawn in the coordinate system displayed in the GUI, thus avoiding the repeated drawing of digital waveform values at multiple time points on the same pixel point.
It significantly improves the efficiency of digital waveform scaling operations and enhances the convenience of debugging digital waveforms in chip simulation, especially when the time window length reaches the million level, reducing graphics rendering lag.
Smart Images

Figure CN121764580A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of digital waveform viewing and debugging technology, and in particular to a GUI (Graphical User Interface) display method, device, medium and product for digital waveforms. Background Technology
[0002] Chip verification typically involves examining chip simulation waveforms to pinpoint problems. With advancements in integrated circuit technology, chip designs are becoming increasingly larger and more complex. To locate problems more effectively and quickly, the length of the simulation waveform data collected is constantly increasing, often exceeding one million clock cycles.
[0003] In the field of digital waveform display and debugging, scaling up and down waveforms is the most common debugging method. Waveform scaling typically uses a linear scaling algorithm. According to the algorithm's principle, when the waveform is scaled down to a certain extent, a horizontal axis (typically the X-axis) coordinate on the screen represents the waveform over a period of time. If conventional graphics drawing methods are used, the values of all moments within this time period need to be plotted at this horizontal axis coordinate to accurately reflect the waveform's characteristics. In other words, multiple waveforms are superimposed on a single horizontal axis coordinate. When the waveform duration reaches millions of seconds, waveform drawing will exhibit stuttering, severely impacting the user experience. Summary of the Invention
[0004] This invention provides a GUI display method, device, medium, and product for digital waveforms, to solve the problem that when scaling and displaying digital signals generated during chip simulation, repeated drawing on the same pixel on the display interface causes stuttering in waveform scaling and display, resulting in low debugging efficiency.
[0005] According to one aspect of the present invention, a GUI display method for digital waveforms is provided, comprising:
[0006] In response to a request to display the target digital waveform in the target display coordinate system in the GUI, a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system are obtained.
[0007] When it is determined from the time window and pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system, calculate the set of digital waveform values corresponding to each pixel point in the time coordinate axis;
[0008] The target digital waveform is drawn in the target display coordinate system of the GUI based on the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0009] According to another aspect of the present invention, a GUI display device for digital waveforms is provided, comprising:
[0010] The waveform drawing resource acquisition module is used to respond to the request to display the target digital waveform in the target display coordinate system in the GUI, and to acquire the time window that matches the target digital waveform and the pixel window that matches the time coordinate axis in the target display coordinate system.
[0011] The digital waveform value set acquisition module is used to calculate the digital waveform value set corresponding to each pixel in the time coordinate axis when it is determined from the time window and pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system.
[0012] The digital waveform drawing module is used to draw the target digital waveform in the target display coordinate system in the GUI based on the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0014] At least one processor; and
[0015] A memory communicatively connected to the at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the GUI display method for digital waveforms according to any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions, the computer instructions being configured to cause a processor to execute and implement the GUI display method for digital waveforms according to any embodiment of the present invention.
[0018] According to another aspect of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of the method as described in any embodiment of the present invention.
[0019] The technical solution of this invention can, in response to a request to display a target digital waveform in a target display coordinate system within a GUI, acquire a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system. When it is determined, based on the time window and pixel window, that the target digital waveform cannot be completely drawn in the target display coordinate system, a set of digital waveform values corresponding to each pixel point on the time axis is calculated. Based on the set of digital waveform values corresponding to each pixel point on the time axis, the target digital waveform is drawn in the target display coordinate system within the GUI. This technical solution, by sampling and drawing the target digital waveform values according to the target display coordinate system, significantly improves the efficiency of digital waveform scaling operations and enhances the convenience of debugging digital waveforms in chip simulation.
[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This is a flowchart of a GUI display method for digital waveforms provided in Embodiment 1 of the present invention;
[0023] Figure 2 This is a schematic diagram of a target digital waveform applicable to Embodiment 1 of the present invention;
[0024] Figure 3 This is a schematic diagram illustrating the complete rendering effect of a target digital waveform in a pixel window according to Embodiment 1 of the present invention;
[0025] Figure 4 This is a flowchart of a GUI display method for digital waveforms provided in Embodiment 2 of the present invention;
[0026] Figure 5 This is a schematic diagram of a target digital waveform drawing effect applicable to Embodiment 2 of the present invention;
[0027] Figure 6 This is a schematic diagram of the effect of drawing a segment of a target digital waveform in a matching pixel window according to Embodiment 2 of the present invention.
[0028] Figure 7This is a schematic diagram of the effect of drawing a segment of a target digital waveform in a matching pixel window according to Embodiment 2 of the present invention.
[0029] Figure 8 This is a schematic diagram of the structure of a GUI display device for a digital waveform according to Embodiment 3 of the present invention;
[0030] Figure 9 This is a schematic diagram of the structure of an electronic device that implements the GUI display method for digital waveforms according to embodiments of the present invention. Detailed Implementation
[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0033] Example 1
[0034] Figure 1 This is a flowchart of a GUI display method for digital waveforms provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where the digital signal waveform to be observed is scaled (especially reduced) on a GUI during chip simulation. This method can be executed by a GUI display device for digital waveforms, which can be implemented in hardware and / or software and is generally configured in electronic devices with data processing capabilities. Figure 1 As shown, the method includes:
[0035] S110. In response to a request to display the target digital waveform in the target display coordinate system of the GUI, obtain a time window that matches the target digital waveform and a pixel window that matches the time axis in the target display coordinate system.
[0036] The target digital waveform can be understood as the digital signal acquired from a specific detection location in the chip simulation system at multiple acquisition time points during the chip simulation process, and can be described by multiple signal values acquired at each acquisition time point.
[0037] Specifically, in Figure 2 The diagram shows a schematic representation of a target digital waveform. (For example...) Figure 2 As shown, the target digital waveform is confined to the time interval defined by [T1, T2], and the signal value at different time points can be 0 (corresponding to a low-level signal amplitude) or 1 (corresponding to a high-level signal amplitude). Accordingly, the time window matching the target digital waveform can be understood as the time interval defined by the start and end times of the target digital waveform. For example, Figure 2 The [T1, Tn] shown is the time window that matches the target digital waveform.
[0038] The target display coordinate system can be understood as a coordinate system used to visualize the target data waveform. Since the target digital waveform can be described by multiple signal values (also called digital waveform values) collected at multiple time points, the target display coordinate system accordingly includes a signal value coordinate axis and a time coordinate axis. That is, the time coordinate axis refers to the horizontal coordinate axis in the coordinate system used to display the digital waveform, representing the time scale of the digital waveform display.
[0039] Since the target display coordinate system is displayed in the defined graphical user interface (GUI), and this target display coordinate system occupies a defined image size within the GUI, the time axis also occupies a defined image size. Correspondingly, the pixel window matching the time axis in the target display coordinate system can be understood as the size of the image pixel area defined by the start and end points of the time axis. In other words, this pixel window can refer to the waveform coordinate system display window in the digital waveform display coordinate system that corresponds to the horizontal time axis, using pixel values from the GUI as the horizontal axis to indicate the scale.
[0040] In practice, once the image display scale of the target display coordinate system in the graphical user interface is determined, the size of the pixel window matching the time axis in the target display coordinate system is also determined accordingly. However, when viewing digital waveforms, users may dynamically update the scaling scale of the digital waveform. Understandably, when viewing a digital waveform within a set-size image area, the larger the magnification ratio selected by the user, the smaller the time window of the target digital waveform displayed in the target display coordinate system; conversely, the larger the zoom-out ratio selected by the user, the larger the time window of the target digital waveform displayed in the target display coordinate system.
[0041] Accordingly, the main problem solved by the technical solutions of the various embodiments of the present invention is that when the user selects a large scaling ratio, causing the pixel window size to be much smaller than the time window size, the data waveform values at multiple time points are repeatedly drawn on the same pixel. Accordingly, the aforementioned target digital waveform can be further understood as the digital waveform with a determined time window size after the original digital signal has been scaled by the user-selected scaling ratio.
[0042] S120. When it is determined from the time window and pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system, calculate the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0043] As mentioned earlier, when the pixel window size is greater than or equal to the time window size, only zero or one digital waveform value from the target digital waveform will be drawn at a single pixel on the time axis. In this case, the target digital waveform can be completely drawn within the target display coordinate system, without the need to repeatedly draw digital waveform values from multiple time points at a single pixel. Therefore, drawing the target digital waveform directly in the target display coordinate system is sufficient, without requiring additional operations. Specifically, in Figure 3 The diagram shows a schematic of the effect of a target digital waveform being fully drawn in a pixel window.
[0044] However, when the pixel window size is smaller than the time window size, it means that multiple time points' digital waveform values need to be repeatedly drawn at a single pixel on the time coordinate axis. In this case, the target digital waveform cannot be completely drawn within the target display coordinate system. Therefore, it is necessary to actually adopt the technical solutions of the various embodiments of this invention to avoid repeatedly drawing digital waveform values at multiple time points at a single pixel.
[0045] Specifically, it is necessary to first calculate the set of digital waveform values corresponding to each pixel point on the time coordinate axis.
[0046] It is understandable that the target digital waveform within this time window is composed of multiple digital waveform values. When the scale of the pixel window is smaller than the scale of the time window, it also means that the total number of the aforementioned digital waveform values is greater than the total number of pixels contained in the pixel window. In this case, according to a preset mapping rule, each pixel in the pixel window needs to be assigned one or more digital waveform values to form a set of digital waveform values corresponding to each pixel in the time coordinate axis.
[0047] In a specific example, the set 1 of digital waveform values corresponding to pixel A contains {digital waveform value 1, digital waveform value 2, digital waveform value 3}. In this case, it means that the above digital waveform value 1, digital waveform value 2, and digital waveform value 3 are waveform values that need to be repeatedly drawn under pixel A.
[0048] S130. Based on the set of digital waveform values corresponding to each pixel point in the time coordinate axis, draw the target digital waveform in the target display coordinate system in the GUI.
[0049] It is understandable that drawing the target digital waveform within the target display coordinate system in the GUI can use the corresponding pixels on the time axis of the pixel window as the reference for the horizontal coordinate axis of the waveform drawing. The digital waveform value of the pixel is selected based on the distribution of high and low levels in the set of matching digital waveform values of each pixel. Finally, the entire target digital waveform is drawn based on the digital waveform values of each pixel and its adjacent pixels.
[0050] In this embodiment, since a set of digital waveform values corresponding to each pixel in the time coordinate axis is obtained through pre-screening, only one specific digital waveform value can be selected from each set of digital waveform values and drawn under the corresponding pixel based on the distribution of high and low level values contained in each set of digital waveform values. This effectively avoids the repeated drawing of multiple digital waveform values on the same pixel and effectively reduces the stuttering problem in graphics drawing. It is particularly suitable for application scenarios where the time window length of the target digital waveform to be drawn reaches millions or tens of millions.
[0051] The technical solution of this invention can, in response to a request to display a target digital waveform in a target display coordinate system within a GUI, acquire a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system. When it is determined, based on the time window and pixel window, that the target digital waveform cannot be completely drawn in the target display coordinate system, a set of digital waveform values corresponding to each pixel point on the time axis is calculated. Based on the set of digital waveform values corresponding to each pixel point on the time axis, the target digital waveform is drawn in the target display coordinate system within the GUI. This technical solution, by sampling and drawing the target digital waveform values according to the target display coordinate system, significantly improves the efficiency of digital waveform scaling operations and enhances the convenience of debugging digital waveforms in chip simulation.
[0052] Example 2
[0053] Figure 4 This is a flowchart illustrating a GUI display method for digital waveforms according to Embodiment 2 of the present invention. This embodiment is a specific embodiment based on the above embodiments, including a specific method for drawing the target digital waveform by retrieving its value within a pixel window. For example... Figure 4 As shown, the method includes:
[0054] S410, In response to a request to display the target digital waveform in the target display coordinate system of the GUI, obtain a time window that matches the target digital waveform and a pixel window that matches the time axis in the target display coordinate system.
[0055] S420. Based on the waveform start time and waveform end time in the time window, and the signal sampling interval corresponding to the target digital waveform, determine the set of waveform time points that match the time window, and obtain the total number of time points contained in the waveform time point set.
[0056] In this context, a waveform time point corresponds to a digital waveform value in the target digital waveform, and the digital waveform value includes high level and low level values.
[0057] The waveform start time can be the starting point of the aforementioned time window, and the waveform end time can be the ending point of the aforementioned time window. Specifically, for example... Figure 2 As shown, the start time of this waveform can be specifically T1, and the end time of this waveform can be specifically Tn. The signal sampling interval can be understood as the signal acquisition interval selected when acquiring signals at the detected position during chip simulation, such as 1ms, 2ms, or 5ms.
[0058] As mentioned earlier, the actual acquired target digital waveform is composed of digital waveform values acquired at multiple time points. Therefore, once the time window is determined, for example, 100 seconds, and combined with the signal sampling interval, a set of waveform time points matching the time window can be determined accordingly. The total number of time points in the waveform time point set can be calculated using the formula: (waveform end time - waveform start time) / signal sampling interval.
[0059] Specifically, when plotting the target digital waveform, it is necessary to obtain the time axis range corresponding to the target digital waveform in the target display coordinate system. This range can be determined based on the start and end times of the target digital waveform within the time window. By combining the set of waveform time points matching the time window within the signal sampling interval and the total number of included time points, it can be determined whether the digital waveform value corresponding to each waveform time point is a high-level or low-level value, and thus the corresponding digital waveform value in the target digital waveform can be determined.
[0060] S430. Calculate the total number of pixels contained in the time coordinate system based on the starting and ending pixel sizes of the pixel window on the time axis.
[0061] Here, pixel size can be understood as the pixel coordinate value of a single pixel on the X-axis of the image coordinate system. Correspondingly, the starting pixel size can be understood as the X-axis coordinate value X1 of the starting pixel in the pixel window, and the ending pixel size can be understood as the X-axis coordinate value Xn of the ending pixel in the pixel window. Optionally, the total number of pixels in the time coordinate system can be calculated using the formula Xn-X1.
[0062] S440. If the total number of time points is greater than the total number of pixels, then the target digital waveform cannot be fully drawn within the target display coordinate system.
[0063] Understandably, when drawing a target digital waveform, it is necessary to determine whether the target digital waveform can be completely drawn in the target display coordinate system based on the total number of time points determined by the start and end times of the waveform, and the total number of pixels in the target display coordinate system. If the total number of time points is greater than the total number of pixels, it cannot be completely drawn.
[0064] S450, Calculate the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0065] In this embodiment, when the total number of time points is greater than the total number of pixels, it is necessary to first determine which digital waveform values need to be drawn under the same pixel, that is, to determine the set of digital waveform values corresponding to each pixel.
[0066] In an optional implementation of this embodiment, calculating the set of digital waveform values corresponding to each pixel on the time coordinate axis may include:
[0067] S4501. Sequentially obtain one current waveform time point from the waveform time point set.
[0068] Specifically, each waveform time point obtained sequentially from the waveform time point set can be processed as follows, according to the time extension order.
[0069] S4502. Based on the current waveform time point, the starting pixel size and the ending pixel size of the pixel window, call the pre-built coordinate transformation formula to calculate the current pixel point in the pixel window mapped to the time coordinate axis.
[0070] The coordinate transformation formula refers to an algorithm that converts the time coordinate dimension of a digital waveform in a time window into the pixel coordinates of the horizontal coordinate axis in a pixel window. Essentially, it maps the abstract time coordinate axis to specific pixel positions that can be displayed on the screen, allowing the digital waveform to be intuitively drawn on the graphical user interface. The current pixel point refers to the pixel point in the time coordinate axis pixel window corresponding to the current waveform time point.
[0071] In an optional implementation of this embodiment, the existing coordinate transformation function CoordinatesXToPixel can be called, and the current waveform time point T, the starting pixel size X1, and the ending pixel size Xn can be input accordingly. Then, the current pixel point pixelX can be obtained in the pixel window of the time coordinate axis mapped from the current waveform time point T, that is, pixelX = CoordinatesXToPixel(T, X1, Xn).
[0072] As mentioned earlier, since the total number of time points is greater than the total number of pixels, the above mapping method will inevitably result in multiple waveform time point mapping values for the same pixel on the time coordinate axis.
[0073] S4503. Add the digital waveform value at the current waveform time point to the set of digital waveform values corresponding to the current pixel point.
[0074] Understandably, once the mapping relationship between the current waveform time point and the current pixel point is determined, the digital waveform value at the current waveform time point can be added to the set of digital waveform values corresponding to the current pixel point, which can then be used as the basis for drawing the digital waveform values of each pixel point in the target digital waveform diagram.
[0075] S4504. Return to the previous step and execute the operation of sequentially obtaining one current waveform time point from the waveform time point set until all waveform time points in the waveform time point set have been processed to obtain a set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0076] Understandably, before drawing the target digital waveform, it is necessary to confirm the set of digital waveform values corresponding to each pixel point under the pixel window of the time axis. The waveform time point can be obtained by traversing the set of waveform time points in the order of the above steps as the current waveform time point. The pixel points mapped by each waveform time point are confirmed according to the pre-built coordinate transformation formula, and the set of digital waveform values of the corresponding pixel points is determined, until all waveform time points in the waveform time point set have been traversed and processed.
[0077] S460. Obtain the set of target digital waveform values corresponding to the target pixel in the time coordinate axis, and obtain the previous drawing result executed for the previous pixel of the target pixel.
[0078] The previous drawing result includes the first drawing point value at a first position corresponding to the first height in the signal value coordinate axis of the previous pixel and the target display coordinate system, or the second drawing point value at a second position corresponding to the second height in the signal value coordinate axis of the previous pixel; the first height corresponds to the high level value, and the second height corresponds to the low level value.
[0079] In this context, the target pixel can refer to the pixel currently being processed and having its digital waveform value determined within the time axis pixel window. The target digital waveform value set can refer to the set of digital waveform values corresponding to the target pixel, determined by a pre-built coordinate transformation formula. The signal value coordinate axis can refer to the vertical coordinate axis in the target display coordinate system used to indicate whether the digital waveform value is high or low. The previous pixel can refer to the pixel immediately preceding the target pixel in the time axis pixel window of the target display coordinate system. The first position can refer to the position in the signal value coordinate axis corresponding to a high digital waveform value. The first plotting point value can refer to the high-level digital waveform value represented at the first position. The second position can refer to the position in the signal value coordinate axis corresponding to a low digital waveform value. The second plotting point value can refer to the low-level digital waveform value represented at the second position.
[0080] It is understandable that, in addition to confirming the digital waveform value of the target pixel through the target digital waveform value set, drawing the target digital waveform also requires confirming the drawing result of the adjacent previous pixel. This allows us to determine whether the digital waveform value of each pixel constituting the target digital waveform is high or low, thereby drawing the continuous target digital waveform at the position of the digital waveform value of each pixel in the signal value coordinate axis.
[0081] S470. Based on the inclusion of high and low level values in the target digital waveform value set and the previous drawing result, perform matching point drawing and / or line drawing operations on the target pixel in the target display coordinate system in the GUI.
[0082] It is understandable that the target digital waveform value set corresponding to the target pixel can consist entirely of high-level values or low-level values, or contain both high-level and low-level values. The digital waveform value of the target pixel can be determined according to a pre-set selection strategy based on the specific situation. Furthermore, based on the drawing result of the previous pixel, the position of the digital waveform value of adjacent pixels in the signal value coordinate axis can be determined. This determines the matching point drawing and / or line drawing operation to be performed on the target pixel within the target display coordinate system in the GUI. The target digital waveform... Figure 1 Optional final drawing effects, such as Figure 5 As shown.
[0083] Optionally, based on the inclusion of high and low level values in the target digital waveform value set and the previous drawing result, within the target display coordinate system in the GUI, performing matching point drawing and / or line drawing operations on the target pixels may include:
[0084] If the target digital waveform value set contains a high-level value and the previous drawing result is the first drawing point value, then the target drawing point value is drawn only at the third position corresponding to the first height in the target pixel point and signal value coordinate axis.
[0085] If the target digital waveform value set contains a high-level value, and the previous drawing result is the second drawing point value, then after drawing the target drawing point value at the third position, draw the line connecting the second drawing point value and the target drawing point value.
[0086] The third position can refer to the position corresponding to the first height on the signal value coordinate axis when the target digital waveform value set contains a high-level value. The target pixel value can refer to the target digital waveform value of the target pixel on the signal value coordinate axis, determined based on the level values contained in the target digital waveform value set.
[0087] Specifically, when drawing the target digital waveform, if the target digital waveform value set contains at least one high-level value, and the previous drawing result is a first point value where the digital waveform value is high, then the target point value is drawn only at the third position corresponding to the high level in the target pixel and signal value coordinate axis; that is, a point is drawn only at the third position. If the target digital waveform value set contains at least one high-level value, and the previous drawing result is a second point value where the digital waveform value is low, then after drawing the target point value at the third position corresponding to the high level in the target pixel and signal value coordinate axis, a line is drawn connecting the second point value corresponding to the low level in the target pixel and signal value coordinate axis to the target point value. The drawing effect is as follows: Figure 6 As shown. This completes the drawing of the target digital waveform portion related to the previous drawing result when the target digital waveform value set corresponding to the target pixel contains a high-level value.
[0088] Optionally, based on the inclusion of high and low level values in the target digital waveform value set and the previous drawing result, performing matching point drawing and / or line drawing operations on the target pixels within the target display coordinate system in the GUI may further include:
[0089] If the target digital waveform value set does not contain a high level value, and the previous drawing result is the first drawing point value, then after drawing the target drawing point value at the fourth position corresponding to the second height in the coordinate axis of the target pixel point and the signal value, draw the connection between the first drawing point value and the target drawing point value.
[0090] If the target digital waveform value set does not contain a high-level value, and the previous drawing result is the second drawing point value, then the target drawing point value is drawn only at the fourth position.
[0091] The fourth position can refer to the position corresponding to the second height on the signal value coordinate axis when the target digital waveform value set does not contain a high-level value.
[0092] Specifically, when drawing the target digital waveform, if the target digital waveform value set contains no high-level values and all values are low-level values, and the previous drawing result is the first point value where the digital waveform is high-level, then after drawing the target point value at the fourth position corresponding to the low level in the target pixel and signal value coordinate axis, a line is drawn connecting the first point value corresponding to the high level in the target pixel and signal value coordinate axis to the target point value. If the target digital waveform value set does not contain high-level values, and the previous drawing result is the second point value where the digital waveform is low-level, then the target point value is only drawn at the fourth position corresponding to the low level in the target pixel and signal value coordinate axis; that is, a point is drawn only at the fourth position, and the drawing effect is as follows. Figure 7As shown. This completes the drawing of the target digital waveform portion related to the previous drawing result when all the target digital waveform values corresponding to the target pixel are low-level values.
[0093] Optionally, based on the above embodiments, after obtaining the set of target digital waveform values corresponding to the target pixel points in the time coordinate axis, the method further includes:
[0094] If the target pixel is the first pixel on the time axis, then check whether the target digital waveform value set contains a high level value;
[0095] If so, the target pixel value is drawn only at the third position corresponding to the first height in the target pixel and signal value coordinate axes;
[0096] Otherwise, the target pixel value is drawn only at the fourth position corresponding to the second height in the target pixel and signal value coordinate axes.
[0097] Specifically, when the target pixel is the first pixel on the time axis, drawing can be performed solely based on the level values contained in the target digital waveform value set. If at least one high level value is contained, the target pixel value is drawn only at the third position corresponding to the high level on the target pixel and signal value coordinate axis; that is, a point is drawn only at the third position. When the target digital waveform value set does not contain a high level value, the target pixel value is drawn only at the fourth position corresponding to the low level on the target pixel and signal value coordinate axis; that is, a point is drawn only at the fourth position. This completes the drawing of the target digital waveform portion when the target pixel is the first pixel on the time axis.
[0098] The technical solution of this invention can, in response to a request to display a target digital waveform in a target display coordinate system within a GUI, obtain a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system. Based on the waveform start and end times in the time window and the signal sampling interval corresponding to the target digital waveform, a set of waveform time points matching the time window is determined, and the total number of time points contained in the waveform time point set is obtained. Based on the start and end pixel sizes of the pixel window on the time axis, the total number of pixels in the time coordinate system is calculated. If the total number of time points is greater than the total number of pixels, it is determined that the target digital waveform cannot be completely drawn in the target display coordinate system. The digital waveform values corresponding to each waveform time point in the waveform time point set are obtained by traversing the set, and the set of digital waveform values corresponding to each pixel on the time axis is calculated. The method involves obtaining the target digital waveform value set corresponding to the target pixel on the time axis, and acquiring the previous drawing result for the previous pixel. Based on the inclusion of high and low level values in the target digital waveform value set and the previous drawing result, matching point drawing and / or line drawing operations are performed on the target pixel within the target display coordinate system in the GUI, thereby drawing the target digital waveform within the target display coordinate system in the GUI. This technical solution completes the drawing of the target digital waveform portion by considering the level values included in the target digital waveform value set corresponding to the target pixel and the previous drawing result of adjacent pixels. It implements a specific method to avoid repeated drawing at the same pixel during digital waveform scaling and drawing, improving the efficiency of digital waveform sampling and drawing, and solving the problem of stuttering caused by repeated drawing.
[0099] Example 3
[0100] Figure 8 This is a schematic diagram of the structure of a GUI display device for a digital waveform provided in Embodiment 3 of the present invention. Figure 8 As shown, the device includes: a waveform drawing resource acquisition module 810, a digital waveform value set acquisition module 820, and a digital waveform drawing module 830.
[0101] The waveform drawing resource acquisition module 810 is used to acquire a time window that matches the target digital waveform and a pixel window that matches the time axis in the target display coordinate system in response to a request to display the target digital waveform in the target display coordinate system.
[0102] The digital waveform value set acquisition module 820 is used to calculate the digital waveform value set corresponding to each pixel point in the time coordinate axis when it is determined from the time window and pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system.
[0103] The digital waveform drawing module 830 is used to draw the target digital waveform in the target display coordinate system in the GUI based on the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0104] The technical solution of this invention can, in response to a request to display a target digital waveform in a target display coordinate system within a GUI, acquire a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system. When it is determined, based on the time window and pixel window, that the target digital waveform cannot be completely drawn in the target display coordinate system, a set of digital waveform values corresponding to each pixel point on the time axis is calculated. Based on the set of digital waveform values corresponding to each pixel point on the time axis, the target digital waveform is drawn in the target display coordinate system within the GUI. This technical solution, by sampling and drawing the target digital waveform values according to the target display coordinate system, significantly improves the efficiency of digital waveform scaling operations and enhances the convenience of debugging digital waveforms in chip simulation.
[0105] Optionally, the digital waveform value set acquisition module 820 can be specifically used to: determine the waveform time point set matching the time window based on the waveform start and end times in the time window and the signal sampling interval corresponding to the target digital waveform, and obtain the total number of time points contained in the waveform time point set. Here, one waveform time point corresponds to one digital waveform value in the target digital waveform, and the digital waveform value includes high-level and low-level values. The total number of pixels contained in the time coordinate system is calculated based on the start and end pixel sizes of the pixel window on the time coordinate axis. If the total number of time points is greater than the total number of pixels, it is determined that the target digital waveform cannot be completely drawn within the target display coordinate system.
[0106] Optionally, the digital waveform value set acquisition module 820 can also be specifically used to: sequentially acquire a current waveform time point from the waveform time point set; based on the current waveform time point, the starting pixel size and ending pixel size of the pixel window, call a pre-built coordinate transformation formula to calculate the current pixel point mapped to the time coordinate axis in the pixel window; add the digital waveform value at the current waveform time point to the digital waveform value set corresponding to the current pixel point; return to execute the operation of sequentially acquiring a current waveform time point from the waveform time point set until all waveform time points in the waveform time point set have been processed to obtain the digital waveform value set corresponding to each pixel point in the time coordinate axis.
[0107] Optionally, the digital waveform plotting module 830 may specifically include:
[0108] The reference information acquisition unit is used to acquire the set of target digital waveform values corresponding to the target pixel in the time coordinate axis, and to acquire the previous drawing result executed for the previous pixel of the target pixel.
[0109] The previous drawing result includes the first drawing point value at a first position corresponding to the first height in the signal value coordinate axis of the previous pixel and the target display coordinate system, or the second drawing point value at a second position corresponding to the second height in the signal value coordinate axis of the previous pixel; the first height corresponds to the high level value, and the second height corresponds to the low level value.
[0110] The actual drawing unit is used to perform matching point drawing and / or line drawing operations on the target pixel points in the target display coordinate system in the GUI, based on the inclusion of high and low level values in the target digital waveform value set and the previous drawing result.
[0111] Optionally, the actual drawing unit can be specifically used to: if the target digital waveform value set contains a high-level value, and the previous drawing result is a first drawing point value, then draw the target drawing point value only at the third position corresponding to the first height in the coordinate axis of the target pixel and the signal value. If the target digital waveform value set contains a high-level value, and the previous drawing result is a second drawing point value, then after drawing the target drawing point value at the third position, draw the connection between the second drawing point value and the target drawing point value.
[0112] Optionally, the actual drawing unit can also be specifically used to: if the target digital waveform value set does not contain a high-level value, and the previous drawing result is a first drawing point value, then after drawing the target drawing point value at the fourth position corresponding to the second height in the coordinate axis of the target pixel point and the signal value, draw the line connecting the first drawing point value and the target drawing point value. If the target digital waveform value set does not contain a high-level value, and the previous drawing result is a second drawing point value, then only draw the target drawing point value at the fourth position.
[0113] Optionally, the actual drawing unit can also be specifically used to: if the target pixel is the first pixel on the time axis, detect whether the target digital waveform value set contains a high-level value. If so, draw the target pixel value only at the third position corresponding to the first height on the target pixel and signal value coordinate axis. Otherwise, draw the target pixel value only at the fourth position corresponding to the second height on the target pixel and signal value coordinate axis.
[0114] The digital waveform GUI display device provided in the embodiments of the present invention can execute the digital waveform GUI display method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0115] Example 4
[0116] Figure 9 A schematic diagram of an electronic device 10, which can be used to implement embodiments of the present invention, is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0117] like Figure 9 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0118] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0119] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the GUI display method for digital waveforms.
[0120] That is, in response to a request to display the target digital waveform in the target display coordinate system in the GUI, a time window matching the target digital waveform and a pixel window matching the time axis in the target display coordinate system are obtained.
[0121] When it is determined from the time window and pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system, calculate the set of digital waveform values corresponding to each pixel point in the time coordinate axis;
[0122] The target digital waveform is drawn in the target display coordinate system of the GUI based on the set of digital waveform values corresponding to each pixel point in the time coordinate axis.
[0123] In some embodiments, the GUI display method for digital waveforms can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the GUI display method for digital waveforms described above can be performed. Alternatively, in other embodiments, processor 11 can be configured to perform the GUI display method for digital waveforms by any other suitable means (e.g., by means of firmware).
[0124] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0125] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0126] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0127] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0128] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with a web browser through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0129] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0130] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0131] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A graphical user interface (GUI) display method of a digital waveform, characterized by, The method comprises the following steps: in response to a request for displaying a target digital waveform in a target display coordinate system in a GUI, obtaining a time window matched with the target digital waveform and a pixel window matched with a time axis in the target display coordinate system; when it is determined according to the time window and the pixel window that the target digital waveform cannot be completely drawn in the target display coordinate system, calculating a set of digital waveform values corresponding to each pixel point in the time axis; drawing the target digital waveform in the target display coordinate system in the GUI according to the set of digital waveform values corresponding to each pixel point in the time axis.
2. The method of claim 1, wherein, The method for determining that the target digital waveform cannot be completely drawn in the target display coordinate system according to the time window and the pixel window comprises the following steps: determining a set of waveform time points matched with the time window according to a waveform start time and a waveform end time in the time window and a signal sampling interval corresponding to the target digital waveform, and obtaining a total number of time points contained in the set of waveform time points; wherein one waveform time point corresponds to one digital waveform value in the target digital waveform, and the digital waveform value has a high level value and a low level value; calculating a total number of pixel points contained in the time coordinate system according to a start pixel point size and an end pixel point size of the pixel window of the time axis; if the total number of time points is greater than the total number of pixel points, it is determined that the target digital waveform cannot be completely drawn in the target display coordinate system.
3. The method of claim 2, wherein, The method for calculating the set of digital waveform values corresponding to each pixel point in the time axis comprises the following steps: obtaining a current waveform time point in the set of waveform time points in sequence; calculating a current pixel point in the pixel window of the time axis to which the current waveform time point is mapped according to the current waveform time point, the start pixel point size and the end pixel point size of the pixel window, by calling a pre-constructed coordinate conversion formula; adding the digital waveform value at the current waveform time point to the set of digital waveform values corresponding to the current pixel point; returning to the operation of obtaining a current waveform time point in the set of waveform time points in sequence until the processing of all waveform time points in the set of waveform time points is completed, so as to obtain the set of digital waveform values corresponding to each pixel point in the time axis.
4. The method according to claim 2 or 3, characterized in that, The method for drawing the target digital waveform in the target display coordinate system in the GUI according to the set of digital waveform values corresponding to each pixel point in the time axis comprises the following steps: obtaining a target set of digital waveform values corresponding to a target pixel point in the time axis, and obtaining a previous drawing result performed on a previous pixel point of the target pixel point; wherein the previous drawing result comprises a first drawing point value at a first position corresponding to a first height in a signal value axis in the target display coordinate system and a target pixel point, or a second drawing point value at a second position corresponding to a second height in the signal value axis and the previous pixel point; the first height corresponds to the high level value, and the second height corresponds to the low level value; performing a matching drawing point and / or line drawing operation on the target pixel point in the target display coordinate system in the GUI according to the inclusion of the high level value and the low level value in the target set of digital waveform values and the previous drawing result.
5. The method of claim 4, wherein, According to the inclusion of the high level value and the low level value in the target digital waveform value set, and the previous drawing result, a matching dot drawing and / or line drawing operation is performed on the target pixel point in the target display coordinate system in the GUI, including: If the target digital waveform value set contains a high level value, and the previous drawing result is the first dot value, only draw the target dot value at a third position corresponding to the target pixel point and the first height in the signal value coordinate axis; If the target digital waveform value set contains a high level value, and the previous drawing result is the second dot value, draw a line between the second dot value and the target dot value after drawing the target dot value at the third position.
6. The method of claim 4, wherein, According to the inclusion of the high level value and the low level value in the target digital waveform value set, and the previous drawing result, a matching dot drawing and / or line drawing operation is performed on the target pixel point in the target display coordinate system in the GUI, including: If the target digital waveform value set does not contain a high level value, and the previous drawing result is the first dot value, draw a line between the first dot value and the target dot value after drawing the target dot value at a fourth position corresponding to the target pixel point and the second height in the signal value coordinate axis; If the target digital waveform value set does not contain a high level value, and the previous drawing result is the second dot value, only draw the target dot value at the fourth position.
7. The method of claim 4, wherein, After obtaining the target digital waveform value set corresponding to the target pixel point in the time coordinate axis, further comprising: If the target pixel point is the first pixel point in the time coordinate axis, detecting whether the target digital waveform value set contains a high level value; If yes, only draw the target dot value at a third position corresponding to the target pixel point and the first height in the signal value coordinate axis; Otherwise, only draw the target dot value at a fourth position corresponding to the target pixel point and the second height in the signal value coordinate axis.
8. An electronic device, comprising: The electronic device comprises: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor to enable the at least one processor to perform the digital waveform graphical user interface GUI display method of any one of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions for causing the processor to perform the digital waveform graphical user interface GUI display method of any one of claims 1-7 when executed.
10. A computer program product, characterised in that, The computer program product comprises a computer program which, when executed by a processor, implements the digital waveform graphical user interface GUI display method according to any one of claims 1-7.