Disclosure of Invention
The solutions mentioned in the background art have the following drawbacks: in the prior art, the characteristic points set by a user are directly searched from an input waveform, the method is only suitable for the conditions of small data volume and low sampling rate of the input waveform, the number of the characteristic points searched under the conditions of large data volume and high-speed sampling is possibly too large, the characteristic points do not need to be displayed on a screen at all, and the defect of resource waste exists.
In order to solve the above technical problem, the present application provides a waveform searching method of a digital oscilloscope, including:
receiving search information configured by a user;
extracting part of waveform data from the sampled waveform data, and performing interpolation processing on the part of waveform data to obtain waveform data to be displayed;
carrying out conversion processing on waveform data to be displayed to obtain logic waveform data;
feature points satisfying the search information are searched from the logical waveform data, and addresses of the feature points are stored in an address memory.
Further, the search information includes: search criteria, search channels, and/or search thresholds.
Further, the waveform searching method of the digital oscilloscope further comprises the following steps:
receiving a first copying instruction set by a user, and copying the search condition into a trigger condition according to the first copying instruction;
or receiving a second copying instruction set by a user, and copying the triggering condition into the search condition according to the second copying instruction.
Further, the waveform searching method of the digital oscilloscope further comprises the following steps:
receiving a trigger signal, and reading the address of a characteristic point corresponding to a waveform displayed on a screen from the address memory according to the address of the trigger signal;
calculating the offset address of the read characteristic point according to the address of the read characteristic point and the address of the trigger signal;
and displaying the characteristic points on the screen according to the offset addresses of the read characteristic points.
Further, the waveform searching method of the digital oscilloscope further comprises the following steps:
receiving a first display instruction set by a user, and displaying a search timestamp according to the first display instruction;
and the search time stamp comprises a characteristic point identifier, and the advance time or the delay time of the characteristic point relative to the trigger position.
Further, the waveform searching method of the digital oscilloscope further comprises the following steps:
receiving a second display instruction set by a user, and displaying a navigation menu according to the second display instruction, wherein the navigation menu comprises a knob or a push button;
and receiving a rotation instruction of the knob or a pushing instruction of the pushing key, navigating to a specific characteristic point according to the rotation instruction or the pushing instruction, and displaying the specific characteristic point in the middle of the screen.
The present application also provides a digital oscilloscope with a waveform searching function, comprising: the device comprises a processing module, a signal input module, an interpolation module, a digital comparator, a search module and an address memory;
the processing module is used for receiving search information configured by a user;
the signal input module is used for providing sampled waveform data;
the interpolation module is used for extracting part of waveform data from the sampled waveform data and carrying out interpolation processing on the part of waveform data to obtain waveform data to be displayed;
the digital comparator is used for carrying out conversion processing on waveform data to be displayed to obtain logic waveform data;
the searching module searches the characteristic points meeting the searching information from the logic waveform data, determines the addresses of the characteristic points, and stores the characteristic points in the address memory.
Further, the search information includes: search criteria, search channels, and/or search thresholds.
Further, the processing module is further configured to receive a first copy instruction set by a user, and copy the search condition as a trigger condition according to the first copy instruction;
or receiving a second copying instruction set by a user, and copying the triggering condition into the search condition according to the second copying instruction.
Further, the processing module is further configured to receive a trigger signal, and read an address of a feature point corresponding to a waveform displayed on a screen from the address memory according to the address of the trigger signal; calculating the offset address of the read characteristic point according to the address of the read characteristic point and the address of the trigger signal; and displaying the characteristic points on the screen according to the offset addresses of the read characteristic points.
Further, the processing module is further configured to receive a first display instruction set by a user, and display a search timestamp according to the first display instruction;
and the search time stamp comprises a characteristic point identifier, and the advance time or the delay time of the characteristic point relative to the trigger position.
Further, the processing module is further configured to receive a second display instruction set by a user, and display a navigation menu according to the second display instruction, where the navigation menu includes a knob or a push button;
and receiving a rotation instruction of the knob or a pushing instruction of the pushing key, navigating to a specific characteristic point according to the rotation instruction or the pushing instruction, and displaying the specific characteristic point in the middle of the screen.
Furthermore, at least two signal input modules are used for providing multi-path sampled waveform data.
In the method, part of waveform data is extracted from sampled waveform data, interpolation processing is carried out on the part of waveform data to obtain waveform data to be displayed, conversion processing is carried out on the waveform data to be displayed to obtain logic waveform data, feature points meeting the search information are searched from the logic waveform data, the search speed of the feature points can be improved, stable use of the feature points is guaranteed, all the feature points can be displayed, resources cannot be wasted, and the problem of space shortage of feature point storage can be relieved.
Detailed Description
In order to make the technical features and effects of the invention more obvious, the technical solution of the invention is further described below with reference to the accompanying drawings, and the invention can also be described or implemented by other different specific examples, and any equivalent changes made by those skilled in the art within the scope of the claims belong to the protection scope of the invention.
In the description herein, reference to the description of the terms "one embodiment," "a particular embodiment," "some embodiments," "for example," "an example," "a particular instance," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the various embodiments is provided to illustrate the practice of the present application, and the sequence of steps is not limited thereto and can be adjusted as needed.
As shown in fig. 1, fig. 1 is a flowchart of a waveform searching method of a digital oscilloscope according to an embodiment of the present application. The embodiment can be suitable for a digital oscilloscope with a common sampling rate and a digital oscilloscope with a high sampling rate, can improve the searching speed of the characteristic points, reduce the searching time, ensure the stable use of the characteristic points, display all the characteristic points and avoid wasting resources. Specifically, the method comprises the following steps:
step 101: search information configured by a user is received.
In implementation, the processing module receives search information configured by a user through the human-computer interaction interface.
The search information comprises search conditions, search channels and/or search threshold values, and can be set according to the requirements of users. In detail, the search condition includes, but is not limited to, edge pulse, pulse width, rise and fall time, under pulse, setup/hold time, timeout detection, slope detection, URAT, IIC, SPI, CAN, etc.; the number of the search channels is related to the number of the input channels, for example, the search channels include CH1, CH2, CH3 and CH 4; the search threshold is a voltage value, the waveform data to be displayed can be searched only when the voltage is greater than the search threshold, and even if the characteristic point exists, the characteristic point can not be searched when the voltage is less than the search threshold.
Step 102: and extracting part of waveform data from the sampled waveform data, and performing interpolation processing on the part of waveform data to obtain waveform data to be displayed.
In practice, the continuous portion of waveform data may be extracted according to a search threshold configured by a user, or the portion of waveform data may be extracted in other ways, which is not limited in this application. And if the search threshold value is empty in the search information configured by the user, namely the user does not set the search threshold value, directly searching the characteristic points meeting the search information from the sampled waveform data. The interpolation process is determined based on a time base selected by the user.
For example, 100 ten thousand pieces of sampled waveform data are extracted, 10 ten thousand pieces of waveform data are extracted from the sampled waveform data, 20 ten thousand pieces of data are obtained by performing interpolation processing on the 10 ten thousand pieces of data (the number of data that can be displayed on a screen is at most 20 ten thousand pieces of data), 20 ten thousand pieces of logic waveform data can be obtained according to the 20 ten thousand pieces of interpolated data, a search function is performed on the 20 ten thousand pieces of logic waveform data, and it is possible to ensure that the searched feature points can be displayed on the screen.
Extracting part of waveform data can reduce the search time, so that all feature points can be displayed, and resources are not wasted. The interpolation processing is carried out on the part of waveform data, so that the waveform displayed on a screen can be ensured to be smooth, and the amplified waveform is not distorted, thereby being convenient for a user to observe. The interpolation process described in this application may be linear interpolation or sinusoidal interpolation, and the specific algorithm of the interpolation process is not limited in this application.
Step 103: carrying out conversion processing on waveform data to be displayed to obtain logic waveform data;
in specific implementation, step 103 is executed by the digital comparator, and the digital comparator compares the waveform data to be displayed with a first threshold and a second threshold, where the second threshold is greater than the first threshold, if the waveform point value in the waveform to be displayed is greater than the second threshold, the output of the data comparator is 1, and if the waveform point value is less than the second threshold, the output of the digital comparator is 0.
Step 104: feature points satisfying the search information are searched from the logical waveform data, and addresses of the feature points are stored in an address memory. Specifically, the address of the feature point is time information, and the address of the feature point is stored in the address memory in a loop overlay storage manner.
In one embodiment, for example, the search condition is set to a rising edge search. If a jump from 0 to 1 is detected at the 4000 th point (i.e., the search condition is satisfied), the position, i.e., the 4000 th point, is stored.
In some embodiments, as shown in fig. 2, the waveform searching method of the digital oscilloscope further includes:
step 105: and receiving a trigger signal which is a current effective trigger signal, and reading the address of the characteristic point corresponding to the waveform displayed on the screen from the address memory according to the address of the trigger signal. The address of the trigger signal is the address of the trigger point on the waveform.
Step 106: and calculating the offset address of the read characteristic point according to the address of the read characteristic point and the address of the trigger signal.
Specifically, the offset address of the feature point is an offset address based on the trigger position, and the offset address based on the trigger position is obtained by subtracting the address of the trigger signal from the address of the read feature point.
Step 107: and displaying the characteristic points on the screen according to the offset addresses of the read characteristic points.
In specific implementation, the trigger position of the waveform is displayed in the middle of the screen. The waveform display and the feature point display are two layers, when a user needs to display the feature point, the two layers are only needed to be superposed, the feature point is displayed on the waveform in an inverted triangle form or is marked on a horizontal line in the inverted triangle form after the superposition is seen by the user, and the horizontal line is positioned above or below the displayed waveform.
Because the trigger function and the search function have the characteristic of high consistency, and the search condition is required to be used for triggering under certain specific environments, in some embodiments, the waveform searching method of the digital oscilloscope further comprises the following steps: receiving a first copying instruction set by a user, and copying the search condition into a trigger condition according to the first copying instruction; or receiving a second copying instruction set by a user, and copying the triggering condition into the search condition according to the second copying instruction.
The first copying instruction and the second copying instruction can be set by a user through a human-computer interaction interface. The quick copying between the search condition and the trigger condition can enable the user to skip the tedious manual operation, thereby improving the working efficiency of the user.
In some embodiments, in order to prevent the problem that the way of identifying the positions of the feature points only by the marks causes great inconvenience and trouble to users once the feature points are increased, the waveform searching method of the digital oscilloscope further comprises the following steps:
and receiving a first display instruction set by a user, and displaying the search timestamp according to the first display instruction.
The search time stamp includes a feature point identifier (the first feature point), and the advance time or the delay time of the feature point relative to the trigger position. In addition, the search timestamp may further include description information of the feature point, where the description information is, for example, a search condition, and this application is not limited in this respect.
In practice, the search timestamp is a table in text form, as shown in fig. 3, the table lists information of each feature point, for example, the 500 th feature point, the search condition is a rising edge search, and the feature point is 1 second left of the trigger position.
The mode of displaying the timestamp can be convenient for a user to observe and process the characteristic points, and the user experience is improved.
In some embodiments, in order to facilitate a user to navigate to a specific feature point, the waveform searching method of the digital oscilloscope further comprises:
receiving a second display instruction set by a user, and displaying a navigation menu according to the second display instruction, wherein the navigation menu comprises a knob or a push button;
and receiving a rotation instruction of the knob or a pushing instruction of the pushing key, navigating to a specific characteristic point according to the rotation instruction or the pushing instruction, and displaying the specific characteristic point in the middle of the screen. In implementation, the specific feature points navigated to are displayed in the form of solid inverted triangles, and the rest feature points are displayed in the form of hollow inverted triangles.
As shown in fig. 4, fig. 4 is a digital oscilloscope with a waveform searching function according to an embodiment of the present application. Specifically, the digital oscilloscope includes: a processing module 407, a signal input module 401, an interpolation module 402, a digital comparator 403, a search module 404, and an address memory 405.
The processing module 407 is configured to receive search information configured by a user. In specific implementation, the search information may be configured by the user through the human-computer interface, and the configured information is sent to the processing module 407, and the processing module 407 sends the configuration information to the search module 404 through the bus GTP.
The signal input module 401 is used to provide sampled waveform data. In implementation, as shown in fig. 5, the signal input module 401 includes an input channel and a sampling unit, and the sampling unit is configured to sample a waveform input by the input channel.
The interpolation module 402 is configured to extract a part of waveform data from the sampled waveform data, and perform interpolation processing on the part of waveform data to obtain waveform data to be displayed.
In practice, the display device further comprises a waveform data storage module 406 for storing waveform data to be displayed. The waveform displayed on the screen corresponds to an area of the data storage module, the data volume of the area is generally more than the number of pixel points on the screen, so that the characteristic points of the area can be displayed on the screen only after being compressed. As shown in fig. 5, the interpolated waveform data is compressed by the compression unit and then sent to the waveform drawing unit, so that the waveform drawing unit displays the input waveform.
The digital comparator 403 is used for performing transformation processing on the waveform data to be displayed to obtain logical waveform data.
The search module 404 is configured to search the logical waveform data for feature points satisfying the search information and determine addresses of the feature points, and store the feature points in the address memory 505.
The search information includes search criteria, search channels, and/or search thresholds. The digital oscilloscope with the waveform searching function provided by the embodiment can improve the searching speed of the feature points, ensure the stable use of the feature points, display all the feature points, avoid resource waste and simultaneously relieve the problem of short space for storing the feature points.
Referring back to fig. 4, in some embodiments, the processing module 407 in the digital oscilloscope is further configured to receive a first copy instruction set by a user, and copy the search condition as a trigger condition according to the first copy instruction; or receiving a second copying instruction set by a user, and copying the triggering condition into the search condition according to the second copying instruction.
The first replication instruction and the second replication instruction can be set by a user through a human-computer interaction interface. The rapid copying between the search condition and the trigger condition can skip the fussy manual operation, and the user experience is improved.
In some embodiments, the processing module 407 is further configured to receive a trigger signal, where the trigger signal is provided by a trigger device, and read an address of a feature point corresponding to a waveform displayed on the screen from the address memory 405 according to an address (i.e., a trigger position) of the trigger signal; calculating the offset address of the read characteristic point according to the address of the read characteristic point and the address of the trigger signal; and displaying the characteristic points on the screen according to the offset addresses of the read characteristic points.
In some embodiments, the processing module 407 is further configured to receive a first display instruction set by a user, and display a search timestamp according to the first display instruction;
the search time stamp comprises a characteristic point identifier, and the advance time or the delay time of the characteristic point relative to the trigger position.
In some embodiments, the processing module 407 is further configured to receive a second display instruction set by the user, and display a navigation menu according to the second display instruction, where the navigation menu includes a knob or a push button;
and receiving a rotation instruction of the knob or a pushing instruction of the pushing key, navigating to a specific characteristic point according to the rotation instruction or the pushing instruction, and displaying the specific characteristic point in the middle of the screen.
In some embodiments, to enable synchronous searching for serial bus protocol events, at least two of the signal input modules are configured to provide multi-sampled waveform data. For example, IIC serial bus protocol searching requires two channels for clock and data, and SPI protocol requires four channels.
In some embodiments, the interpolation module and the search module are implemented by an FPGA, and the search information configured on the human-computer interaction interface is configured from the processing module to the FPGA side through the high-speed bus GTP. In the prior art, a programmable logic device (FPGA) internal memory is adopted to store searching characteristic points, the storage capacity of the internal memory is small, most of input waveforms are continuous in practice, and once the characteristic points meeting the searching conditions in the input waveforms are excessive or the sampling frequency is increased, the internal memory cannot be stored continuously. To solve this problem, the address memory described in the present application is a memory external to the FPGA, for example, a DDR3 memory.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the purpose of illustrating the present invention, and any person skilled in the art can modify and change the above embodiments without departing from the spirit and scope of the present invention. Therefore, the scope of the claims should be accorded the full scope of the claims.