A method of visualizing digital waveform density
By calculating the waveform density ratio and updating the pixel group height to represent it with different colors, the problem of dense waveform overlap and sparse waveforms being difficult to observe is solved, realizing the visualization of waveform density and supporting circuit debugging and power consumption evaluation.
Patent Information
- Application Number
- CN202210748410.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-06-27
AI Technical Summary
In existing technologies, densely changing digital waveform regions overlap as color blocks in the visualization window, making it impossible for users to distinguish the frequency of waveform changes, and the distribution of the number of waveform changes in sparse regions on the time axis is difficult to observe.
By obtaining the number of transitions in each pixel group within a time interval, calculating the transition density ratio, updating the height of the pixel group to reflect density differences, and using different colors to represent density, the waveform density is visualized.
Users can intuitively observe the density distribution of waveform transitions and quickly locate locations with high density, which helps with circuit debugging and power consumption assessment.
Smart Images

Figure CN116243038B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic design technology, and more specifically to a method for visualizing digital waveform density. Background Technology
[0002] Typically, digital waveform graphs present waveforms at different times in a visualization window using lines of corresponding colors. The waveform includes high levels, low levels, rising edges, and falling edges, with the rising and falling edges referred to as waveform transitions. For circuit debugging, power consumption assessment, or other purposes, it's necessary to observe these transitions in the visualization window. Since areas with dense transitions tend to cluster together, appearing as large blocks of color, users cannot discern the frequency of these transitions. Typically, users can repeatedly trigger amplification signals to shorten the time scale displayed in the same visualization window, thus pinpointing the range of frequent waveform transitions and observing their frequency. Conversely, for sparsely transitioned areas, users can repeatedly trigger reduction signals to lengthen the time scale displayed in the same visualization window, but this doesn't allow for a direct observation of the distribution of waveform transitions along the time axis. Summary of the Invention
[0003] To address the aforementioned technical problems, the present invention aims to provide a method for visualizing digital waveform density, the specific technical solution of which is as follows:
[0004] A method for visualizing digital waveform density includes the following steps: obtaining the number of transitions in the digital waveform for each pixel group within a corresponding time interval at the current time scale; the time interval is the time interval corresponding to each pixel group in the visualization window, and the time interval is the time interval divided according to the number of pixel groups in the visualization window based on the current time scale; wherein, a pixel group includes several pixels in the width direction and is equal to the high level of the digital waveform in the height direction; when the number of transitions in the digital waveform corresponding to any pixel group is greater than a preset number of transitions threshold, obtaining the transition number ratio of the corresponding pixel group based on the number of transitions in the digital waveform to obtain a transition density ratio; based on the height direction of the pixel group, obtaining the target height corresponding to the pixel group according to the density ratio; updating the pixel values within the target height in the corresponding pixel group and presenting the updated waveform in the visualization window, wherein the updated pixel values are different from the pixel values of the waveform itself.
[0005] The present invention has the following beneficial effects:
[0006] This invention provides a method for visualizing digital waveform density. The method involves obtaining the number of transitions in the digital waveform for each pixel group within a corresponding time interval at the current time scale; when the number of transitions in the digital waveform corresponding to any pixel group exceeds a preset threshold, obtaining the transition ratio of the corresponding pixel group based on the number of transitions in the digital waveform, thus obtaining a transition density ratio; based on the height direction of the pixel group, obtaining the target height corresponding to the pixel group according to the density ratio; updating the pixel values within the target height of the corresponding pixel group and presenting the updated waveform in the visualization window, so that the waveform displays the color of the corresponding height as the waveform transition density ratio changes, achieving the purpose of visualizing waveform transition density. Since the waveform transition density distribution reflects the circuit's activity, it is helpful for circuit debugging and power consumption assessment. Attached Figure Description
[0007] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the 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.
[0008] Figure 1 A flowchart illustrating a method for visualizing digital waveform density according to an embodiment of the present invention;
[0009] Figure 2 A schematic diagram of a waveform where waveform transitions are indistinguishable;
[0010] Figure 3 To be Figure 2 A waveform diagram showing how waveform transitions can be distinguished after multiple amplifications of the waveform.
[0011] Figure 4 This is a schematic diagram showing the effect after smoothing the lines representing the density of the color edges. Detailed Implementation
[0012] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a digital waveform density visualization method proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0013] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0014] The following description, in conjunction with the accompanying drawings, details a specific scheme for a digital waveform density visualization method provided by the present invention.
[0015] Please see Figure 1 The diagram illustrates a flowchart of a method for visualizing digital waveform density according to an embodiment of the present invention, which includes the following steps:
[0016] Step S001: Obtain the number of transitions in the digital waveform for each pixel group within the corresponding time interval at the current time scale; the time interval is the time interval corresponding to each pixel group in the visualization window, and the time interval is the time interval divided according to the number of pixel groups in the visualization window at the current time scale; wherein, the pixel group includes several pixels in the width direction and is equal to the high level of the digital waveform in the height direction.
[0017] Specifically, digital waveform diagrams belong to timing diagrams. A digital waveform diagram is a waveform of a digital signal changing over time. Since digital signals are usually represented in binary, the horizontal axis of a digital waveform diagram is time and the vertical axis is the level. The level value is 0 or 1. In a digital waveform diagram, the waveform is presented as high and low levels and waveform transition lines. Waveform transitions include rising edges and falling edges.
[0018] Specifically, in the visualization window, the waveform is displayed by assigning pixel values to the pixels corresponding to each moment. To better align with human visual perception, a number of pixels are typically selected as a pixel group. The number of pixel groups corresponding to the time axis in the visualization window is obtained. The time interval corresponding to each pixel group is calculated based on the ratio of the time scale to the number of pixel groups. For example, if the time scale is 1 second and the number of pixel groups is 500, then the time interval corresponding to each pixel group is 1 / 500.
[0019] Taking the chip's clock signal as an example, assuming the chip's clock frequency is 1GHz, the visualization window's time scale is 1 second, and the number of pixel groups in the visualization window is 500, according to step S001, the clock signal within 1 second can be divided into 500 time intervals, with each time interval corresponding to a total of 10 clock signals. 9 / 500 means that each time interval corresponds to two million clock cycles, and each pixel group contains transitions within two million clock cycles. Because the number of transitions within the time interval corresponding to each pixel group is enormous, with traditional waveform display methods, densely packed waveforms will completely overlap at the corresponding time scale, making it impossible to display the corresponding waveforms within the visualization window. Figure 2 As shown. Figure 3 It is Figure 2 The waveform in the image is magnified multiple times, with the time scale increased from 900,000 nanoseconds to 10,000 nanoseconds. Figure 2 The color blocks in the image can only be distinguished by magnifying them multiple times to reveal the transition lines of the waveform.
[0020] Preferably, the horizontal axis is the width direction of the pixel group, and each pixel group may contain three pixels in the direction of the time axis, with the height direction of the pixel group extending along the vertical axis. In other embodiments, it may also include one pixel or five pixels, or the number of pixels contained in each pixel group may be set as needed.
[0021] Step S002: When the number of transitions in the digital waveform corresponding to any pixel group is greater than a preset transition number threshold, obtain the transition number ratio of the corresponding pixel group based on the number of transitions in the digital waveform; based on the height direction of the pixel group, obtain the target height corresponding to the pixel group according to the transition number ratio; update the pixel values within the target height in the pixel group and present the updated waveform in the visualization window. The updated pixel values are different from the pixel values of the waveform itself.
[0022] Specifically, the waveform transition frequency within a pixel group is directly proportional to the chip's power consumption. Users can quickly estimate the chip's power consumption based on the number of waveform transitions. The more waveform transitions there are, the denser the transition lines formed by the rising and falling edges become. However, when the waveform transition density exceeds a certain value, the transitions will completely overlap into a single color block in the visualization window, making it impossible to distinguish the transition lines or determine the number of transitions at a given time position. To allow users to intuitively observe the distribution of waveform transition density and quickly locate the corresponding transition density, the following steps are taken: Pixel groups with a waveform transition count greater than a preset threshold are filtered. Then, the transition count ratio for each pixel group is calculated based on the waveform transition count. This transition ratio reflects the waveform transition density ratio. The target height is then calculated based on this transition ratio and the height of the pixel group, and the pixel values within the target height are updated. For example, when the density ratio of the i-th pixel group is ρ(i) and the height of the pixel group is H, then the target height H′(i) = ρ(i) × H. Since the number of waveform transitions increases or decreases over a continuous time period, the target height gradually increases or decreases with the density ratio as the pixel group in the visualization window changes over time. The final visual effect is that the higher the density ratio, the higher the height of the updated color in the vertical axis direction. By observing the height distribution of the corresponding color in the vertical axis direction in the visualization window, the higher the updated color is in the vertical axis direction, the greater its corresponding density. This allows for a quick understanding of the waveform density distribution at that time scale and also enables quick location of the time range with high waveform density.
[0023] Specifically, the first step is to obtain the jump quantity ratio based on the number of jumps, thus obtaining the jump density ratio. The density ratio can be obtained using any one of the following three embodiments, and other methods that can achieve the same effect can also be used in other embodiments:
[0024] The first method for obtaining the density ratio is as follows: the density ratio is the ratio between the number of transitions in the digital waveform and the maximum number of transitions. Specifically, based on the number of transitions corresponding to all pixel groups obtained in step S001, the maximum number of transitions n among all the number of transitions is obtained. max The number of transitions n corresponding to the i-th pixel group i With the maximum number of transitions n max The ratio n i / n max Let ρ(i) be the density ratio of the i-th pixel group. A larger density ratio indicates a larger number of transitions in the corresponding pixel group, which means a larger waveform density.
[0025] The second method for obtaining the density ratio is as follows: At the current time scale, for all pixel groups with a transition number greater than a preset threshold, the normalized value of the transition number corresponding to each pixel group is obtained. Specifically, the normalization method can use range normalization: based on the pixel groups whose transition number of the digital waveform is greater than the preset threshold, the maximum value n of the transition number of the digital waveform at the current time scale is obtained. max and minimum value n min ; Obtain the range n between the maximum and minimum values of the waveform transition count. max -n min Calculate the number of transitions n in the digital waveform corresponding to the i-th pixel group. i The ratio n to the range i / (n max -n min The ratio is the density ratio corresponding to the i-th pixel group. In other embodiments, other normalization methods may be selected as needed.
[0026] Preferably, to make the color edge lines representing density corresponding to adjacent pixel groups smoother in the visualization window, the following optimization steps are included before updating the pixel values within the target height of the pixel group: smoothing all target heights and updating the target height based on the smoothed height. Specifically, after obtaining the target height of each pixel group and obtaining the target height sequence H′={H′(1),H′(2),……,H′(i),……,H′(M)} of all pixel groups, the target height value sequence H′ is smoothed to obtain the smoothed height, and the target height is updated to the smoothed height. The smoothing algorithm is an existing technology and can employ least squares curve fitting or other curve smoothing algorithms.
[0027] Preferably, the updated pixel value is one or more color components in any color space, or a grayscale value. Specifically, the color presented by the updated pixel value is different from the color of the waveform itself. This difference can be in hue, different saturation of the same color, different brightness of the same color, or the updated color is a grayscale value. For example, if the waveform itself is green, and the updated color of the pixels within the target height is red, then the final visual effect is that as the density ratio of the pixel group increases, the corresponding red height increases. Figure 4 As shown, Figure 4 This image shows the effect of smoothing the lines representing the color edges of density. The visualization window includes the waveform's own color (10) and the color within the target height (20) as red, relative to... Figure 2The waveforms displayed in the existing visualization window at the same time scale can be intuitively and quickly located by the method provided in this embodiment, allowing users to locate locations with higher density.
[0028] Preferably, before updating the pixel values within the target height of the corresponding pixel group, the following optimization steps are included: The target heights of several adjacent pixel groups are averaged according to the same pixel group interval to obtain an average height; the target height of each pixel group is then updated based on the average height. Specifically, taking a pixel group interval of 5 as an example, that is, 5 pixel groups are grouped together, and every 5 adjacent consecutive pixel groups are grouped together. The average height is obtained by taking the average of the target heights of the 5 pixel groups. This average height is used as the target height of all pixel groups within this group, and the corresponding pixel values are assigned to this target height. The final effect is that the waveform density presents a stepped bar, with the higher the bar, the higher the waveform transition density, and the lower the bar, the lower the waveform transition density.
[0029] In the visualization window, the color within the target height of the corresponding pixel group is updated. The size of the color height represents the number of transitions, allowing users to intuitively observe the density distribution of waveform transitions in the visualization window. This enables them to quickly locate locations with higher density, facilitating rapid estimation of chip power consumption.
[0030] In summary, this invention provides a method for visualizing digital waveform density. This method involves obtaining the number of transitions in the digital waveform for each pixel group within a corresponding time interval at the current time scale; when the number of transitions in the digital waveform corresponding to any pixel group exceeds a preset threshold, obtaining the transition ratio of the corresponding pixel group based on the number of transitions in the digital waveform, thus obtaining the transition density ratio; based on the height direction of the pixel group, obtaining the target height corresponding to the pixel group according to the density ratio; updating the pixel values within the target height of the corresponding pixel group and presenting the updated waveform in the visualization window, so that the waveform displays the color of the corresponding height as the waveform transition density ratio changes, thereby achieving the purpose of visualizing waveform transition density.
[0031] When you need to view waveform transitions over a shorter timeframe, you need to trigger the zoom-in command to magnify the time scale of the time axis within the visualization window, thus viewing the waveform over a shorter time range within the same visualization window. Similarly, when you need to view waveforms over a longer time range, you need to trigger the zoom-out command to zoom out the time scale of the time axis within the visualization window, thus viewing the waveform over a longer time range within the same visualization window. Zooming in or out on a waveform essentially involves magnifying or reducing the time scale on the time axis.
[0032] In a preferred embodiment, the user can quickly locate positions with frequent waveform transitions by observing the color height displayed in the visualization window. When observing the waveform, the user can trigger a command to zoom in on the waveform in the visualization window as needed. Upon detecting the trigger signal for zooming in on the waveform, the number of waveform transitions contained in each pixel group at the corresponding time scale is obtained, and the target height corresponding to the corresponding pixel group is updated in real time based on the number of waveform transitions. When the number of waveform transitions in any pixel group is less than a preset threshold, the waveform and its pixel values are displayed normally. Specifically, when the command to zoom in on the waveform is triggered, the time scale in the visualization window is reduced, that is, the time interval corresponding to the same pixel group after the zoom signal is triggered becomes smaller, and the number of waveform transitions decreases with the zoom level. The density ratio corresponding to the pixel group is updated in real time based on the number of waveform transitions, and then the target height is updated based on this density ratio.
[0033] In a preferred embodiment, when a user observes a waveform, they can trigger a command to zoom out of the waveform in the visualization window as needed. Upon detecting the trigger signal for zooming out, the number of waveform transitions in each pixel group at the corresponding time scale is obtained, and the target height of the corresponding pixel group is updated in real time based on the number of waveform transitions. If the number of waveform transitions in any pixel group exceeds a preset threshold, the target height of the corresponding pixel group is updated in real time based on the number of waveform transitions. Similarly, specifically, when the command to zoom out is triggered, the time scale in the visualization window is increased, meaning the time interval corresponding to the same pixel group after the zoom-out signal is triggered becomes larger, and the number of waveform transitions increases with the zoom-out magnitude. The density ratio of the pixel group is updated in real time based on the number of waveform transitions, and then the target height of the corresponding pixel group is updated based on this density ratio.
[0034] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0035] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
[0036] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method of visualizing the density of digital waveforms, characterized by, The method comprises the following steps: Obtaining the number of jumps of the digital waveform of each pixel group in the corresponding time interval under the current time scale; the time interval is the time interval corresponding to each pixel group in the visualization window, which is divided according to the number of pixel groups in the visualization window; wherein the pixel group comprises a plurality of pixel points in the width direction and is equal to the high level of the digital waveform in the height direction; When the number of jumps of the digital waveform corresponding to any one pixel group is greater than the preset jump number threshold, obtaining the jump number ratio of the corresponding pixel group according to the number of jumps of the digital waveform to obtain the density ratio of the jump; based on the height direction of the pixel group, obtaining the target height corresponding to the pixel group according to the density ratio; updating the pixel value in the target height of the corresponding pixel group and presenting the updated waveform in the visualization window, wherein the updated pixel value is different from the pixel value of the waveform itself; Wherein, before updating the pixel value in the target height of the corresponding pixel group, the following optimization step is further included: averaging the target heights of a plurality of adjacent pixel groups to obtain an average height according to the same pixel group interval, and updating the target height corresponding to each pixel group according to the average height.
2. A method of visualizing digital waveform density according to claim 1, characterized in that, The density ratio is the ratio between the number of jumps of the digital waveform and the maximum number of jumps.
3. A method of visualizing digital waveform density according to claim 1, characterized in that, The density ratio is the value after normalizing the number of jumps corresponding to the pixel group according to all pixel groups greater than the preset jump number threshold under the current time scale.
4. A method of visualizing digital waveform density according to claim 3, characterized in that, The density ratio is obtained by the following steps: Based on the pixel group whose number of jumps of the digital waveform is greater than the preset jump number threshold, obtaining the maximum value and the minimum value of the number of jumps of the digital waveform under the current time scale; Obtaining the range between the maximum value and the minimum value of the waveform jump number, calculating the ratio of the number of jumps of the digital waveform corresponding to the pixel group to the range, and the ratio is the density ratio.
5. The method of visualizing digital waveform density according to claim 1, wherein, Before the step of updating the pixel value in the target height of the corresponding pixel group, the following optimization step is further included: Smoothing all target heights, and updating the target height according to the smoothed height.
6. A method of visualizing digital waveform density according to any one of claims 1 to 5, characterized in that, The method further comprises the following steps: When the trigger signal of zooming in the waveform is detected, obtaining the number of jumps of the digital waveform corresponding to each pixel group under the corresponding time scale, and updating the target height corresponding to the corresponding pixel group in real time according to the number of jumps of the digital waveform; When the number of waveform jumps in any one pixel group is less than the preset jump number threshold, the waveform and the pixel value of the waveform itself are normally presented.
7. A method of visualizing the density of digital waveforms according to any one of claims 1 to 5, characterized in that, The method further comprises the following steps: When the trigger signal of zooming out the waveform is detected, obtaining the number of jumps of the digital waveform corresponding to each pixel group under the corresponding time scale, and updating the target height corresponding to the corresponding pixel group in real time according to the number of jumps of the digital waveform; When the number of waveform jumps in any one pixel group is greater than the preset jump number threshold, updating the target height of the corresponding pixel group in real time according to the number of waveform jumps.
8. A method of visualizing digital waveform density according to any one of claims 1 to 5, characterized in that, The updated pixel value is a gray value.
9. A method of visualizing the density of digital waveforms according to any one of claims 1 to 5, characterized in that, The updated pixel value is one or more color components in any color space.
Citation Information
Patent Citations
Device and method for lossless continuous monitoring of strip-shaped material density abnormity
CN102735583A
FPGA-based sensor test driving signal waveform display method and device
CN112883912A