Waveform data generation method and device for testing, equipment and storage medium

By generating standard waveforms that meet the target communication protocol and adjusting the protocol characteristics, the problem of difficulty in obtaining waveform data in electronic product testing is solved, and a more comprehensive test effect is achieved.

CN118914624APending Publication Date: 2024-11-08RIGOL TECHNOLOGIES CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411225087.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

In the communication protocol testing of electronic products, it is difficult to obtain the required signal or waveform data, resulting in insufficient comprehensive testing results.

Method used

A waveform data generation method and device are provided to generate standard waveforms that conform to the target communication protocol through the waveform parameters input by the user, and adjust the protocol characteristics through the waveform editing interface to generate abnormal waveforms to improve the test effect.

Benefits of technology

The generated waveform data is more comprehensive, can meet different testing needs, improve the test effect, and help discover the equipment to handle abnormal waveforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118914624A_ABST
    Figure CN118914624A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a waveform data generation method and device for testing, equipment and a storage medium. The method comprises the following steps: generating a standard waveform conforming to a target communication protocol according to a waveform parameter which is input by a user and aims at the target communication protocol; a waveform editing interface is displayed, the waveform editing interface comprises a waveform adjustment item, and the waveform adjustment item is used for adjusting protocol characteristics of the standard waveform; in response to a trigger operation of the waveform adjustment item, adjusting the standard waveform to obtain an adjusted waveform; wherein the standard waveform and the adjusted waveform are waveform data required for testing target equipment. According to the method, the standard waveform conforming to the target communication protocol can be generated, and the abnormal waveform not conforming to the target communication protocol can also be generated, so that the provided waveform data is more comprehensive, and the test effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of testing technology, and in particular to a method, apparatus, device and storage medium for generating waveform data for testing. Background Art

[0002] Generally, before electronic products are put on the market, they need to be tested in all aspects, especially those related to communication protocols. Taking an oscilloscope as an example, during the development of the oscilloscope, the protocol analysis function provided by the oscilloscope needs to be tested and verified. Therefore, how to obtain the signal or waveform data required for the test is a technical problem that needs to be solved urgently by those skilled in the art. Summary of the invention

[0003] Based on this, the embodiments of the present application provide a method, apparatus, device and storage medium for generating waveform data for testing, which can provide more comprehensive waveform data and improve the test effect.

[0004] In a first aspect, an embodiment of the present application provides a method for generating waveform data for testing, comprising:

[0005] Generate a standard waveform that conforms to the target communication protocol according to the waveform parameters for the target communication protocol input by the user;

[0006] Displaying a waveform editing interface, the waveform editing interface including waveform adjustment items, the waveform adjustment items being used to adjust the protocol characteristics of the standard waveform;

[0007] In response to the triggering operation of the waveform adjustment item, adjusting the standard waveform to obtain an adjusted waveform;

[0008] The standard waveform and the adjusted waveform are waveform data required for testing a target device.

[0009] In a second aspect, an embodiment of the present application provides a waveform data generating device for testing, comprising:

[0010] A first generating module, configured to generate a standard waveform conforming to the target communication protocol according to waveform parameters for the target communication protocol input by a user;

[0011] A display module, used to display a waveform editing interface, wherein the waveform editing interface includes waveform adjustment items, and the waveform adjustment items are used to adjust the protocol characteristics of the standard waveform;

[0012] A second generating module, configured to adjust the standard waveform in response to a triggering operation of the waveform adjustment item to obtain an adjusted waveform;

[0013] The standard waveform and the adjusted waveform are waveform data required for testing a target device.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the waveform data generation method for testing provided in the first aspect of the embodiment of the present application are implemented.

[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the waveform data generating method for testing provided in the first aspect of the embodiment of the present application are implemented.

[0016] The technical solution provided in the embodiment of the present application can interact with the user through a waveform editing interface after generating a standard waveform that conforms to the target communication protocol, so as to adjust the protocol characteristics of the standard waveform according to the user's test requirements and generate an abnormal waveform required for the test. That is, through the present technical solution, not only a standard waveform that conforms to the target communication protocol can be generated, but also an abnormal waveform that does not conform to the target communication protocol can be generated, so that the provided waveform data is more comprehensive, thereby improving the test effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A schematic diagram of a flow chart of a method for generating waveform data for testing provided in an embodiment of the present application;

[0018] Figure 2 A schematic diagram of a waveform configuration interface for a standard waveform provided in an embodiment of the present application;

[0019] Figure 3 A schematic diagram of a waveform editing interface provided in an embodiment of the present application;

[0020] Figure 4 Another schematic diagram of a waveform editing interface provided in an embodiment of the present application;

[0021] Figure 5 A schematic diagram of a flow chart of a standard waveform adjustment process provided in an embodiment of the present application;

[0022] Figure 6 A schematic diagram of a standard waveform and an adjusted waveform provided in an embodiment of the present application;

[0023] Figure 7 A schematic diagram of a structure of a waveform data generating device for testing provided in an embodiment of the present application;

[0024] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the technical solutions in the embodiments of the present application are further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. It should also be noted that, for the convenience of description, only the parts related to the present application are shown in the accompanying drawings, rather than all structures.

[0026] The embodiments of the present application can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld devices or portable devices, tablet devices, multi-processor devices, and distributed computing environments including any of the above devices or equipment.

[0027] Embodiments of the present application may be described in the general context of computer executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. Embodiments of the present application may also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0028] The embodiments of the present application can be applied to relevant test scenarios of communication protocols. For example, for devices / instruments with protocol decoding and protocol consistency analysis functions, or when developing devices / instruments that support protocol decoding and protocol consistency analysis functions, the technical solution provided by the embodiments of the present application can not only generate ideal standard waveforms, but also generate abnormal waveforms that do not conform to protocol specifications. The functions of the equipment are tested through more comprehensive waveform data to discover the equipment's processing capabilities for waveform abnormalities, thereby assisting R&D personnel in optimizing these devices. Taking an oscilloscope as an example, the embodiments of the present application can generate various waveform data required for oscilloscope testing through a human-computer interaction interface, thereby verifying the software functions of the oscilloscope.

[0029] Figure 1 A flow chart of a method for generating waveform data for testing provided in an embodiment of the present application. Figure 1 As shown, the method may include:

[0030] S101 . Generate a standard waveform that complies with the target communication protocol according to waveform parameters for the target communication protocol input by a user.

[0031] Among them, the target communication protocol can be any communication protocol to be tested, for example, the target communication protocol can be a controller area network (CAN), an inter-integrated circuit (I2C), a serial peripheral interface (SPI) or a universal asynchronous receiver / transmitter (UART) and other protocols.

[0032] In actual applications, the corresponding target communication protocol can be selected in combination with the test requirements. After selecting the target communication protocol, the user can set the waveform parameters involved in the target communication protocol, for example, set the protocol frame to be generated (such as data frame, remote frame, overload frame or error frame, etc.), the number of data points of a single channel, the sampling rate, the content of some fields of the protocol frame and the channels involved (such as single channel or multi-channel), etc. In an optional implementation, the electronic device can display a waveform configuration interface, which contains the waveform parameters that need to be configured, and the user configures the parameter values ​​of each waveform parameter based on the actual test requirements. The electronic device generates a standard waveform that meets the protocol specification according to the waveform parameters configured by the user and the protocol specification of the target communication protocol.

[0033] Take the target communication protocol as CAN bus protocol as an example, Figure 2 As shown, the electronic device displays a waveform configuration interface according to the user's instructions, and the waveform configuration interface includes multiple parameter configuration items, such as frame type, waveform sampling rate, number of data points of a single channel, channels involved, identification fields, control fields and data fields that need to be configured in the data frame, etc. The user configures each waveform parameter according to the test requirements, and the electronic device obtains the specific content of the identification field, control field and data field configured by the user, generates the content of other fields in the data frame according to the data frame format of the CAN bus protocol, and encapsulates the above data frame based on the physical layer specification of the CAN bus protocol and other waveform parameters configured by the above user (such as waveform sampling rate, number of data points of a single channel and channel parameters, etc.), thereby forming a standard waveform that conforms to the CAN bus protocol. Among them, the high and low levels of the standard waveform can be set based on the standard amplitude.

[0034] It should be noted that the above waveform parameters are related to specific communication protocols. For other communication protocols, there may be some differences in the waveform parameters that need to be configured. For example, some communication protocols involve the setting of signal rate, and may include one channel or multiple channels. The frame format may also be different, and the fields that need to be set in the frame format may also be different. Therefore, the corresponding waveform parameter configuration items can be displayed in the waveform configuration interface in combination with the specific communication protocol, thereby instructing the user to set the waveform parameters for generating a standard waveform.

[0035] S102 . Display a waveform editing interface, where the waveform editing interface includes waveform adjustment items, and the waveform adjustment items are used to adjust protocol characteristics of a standard waveform.

[0036] The waveform editing interface can be displayed automatically after the standard waveform is generated, or it can be displayed under the user's trigger operation. The protocol characteristics here refer to the characteristics related to the communication protocol layer, such as data link layer characteristics, physical layer characteristics or characteristics of other layers. By adjusting the protocol characteristics of the standard waveform, the purpose is to generate an abnormal waveform that does not conform to the target communication protocol, so as to discover the device's ability to handle waveform abnormalities.

[0037] In some examples, the above-mentioned waveform adjustment items may be one or more. When there are multiple waveform adjustment items in the waveform editing interface, different waveform adjustment items correspond to different waveform parameters to be adjusted (it can also be understood that different waveform adjustment items correspond to different adjustment dimensions). Users can trigger different waveform adjustment items in combination with actual test requirements. The electronic device adjusts the protocol characteristics of the standard waveform from different dimensions by calling the program module corresponding to the waveform adjustment item. Exemplarily, taking the adjustment of physical layer characteristics as an example, the adjustment dimensions may include amplitude, phase, interference, slope, signal rate, etc. The user can trigger the waveform adjustment item for indicating the adjustment amplitude, and the electronic device adjusts the amplitude of the standard waveform according to the user's triggering operation. For another example, the user can trigger the waveform adjustment item indicating the adjustment amplitude and the waveform adjustment item for adjusting the slope. The electronic device adjusts the amplitude, rising edge slope and falling edge slope of the standard waveform in response to the user's triggering operation.

[0038] Of course, the same waveform adjustment item may correspond to one waveform parameter to be adjusted, or may correspond to multiple waveform parameters to be adjusted. For example, the amplitude and phase may be associated with the same waveform adjustment item. By triggering the waveform adjustment item, the electronic device may simultaneously adjust the amplitude and phase of the standard waveform. This embodiment does not limit this.

[0039] The triggering methods of the above waveform adjustment items include but are not limited to click, double-click or voice.

[0040] S103 . In response to the triggering operation of the waveform adjustment item, the standard waveform is adjusted to obtain an adjusted waveform.

[0041] The standard waveform and the adjusted waveform are waveform data required for testing the target device.

[0042] After obtaining the waveform data required for the test, the electronic device can transmit the waveform data (i.e., the standard waveform and the adjusted waveform) to the target device in a specified format to perform protocol-related tests on the target device. Optionally, the specified format can be csv, bin, etc.

[0043] The waveform data generation method for testing provided in the embodiment of the present application can interact with the user through the waveform editing interface after generating a standard waveform that conforms to the target communication protocol, so as to adjust the protocol characteristics of the standard waveform according to the user's test requirements and generate the abnormal waveform required for the test. That is, through the present technical solution, not only the standard waveform that conforms to the target communication protocol can be generated, but also the abnormal waveform that does not conform to the target communication protocol can be generated, so that the provided waveform data is more comprehensive, thereby improving the test effect.

[0044] When the waveform adjustment item is detected to be triggered, the electronic device can execute the corresponding program module according to the default input parameter information according to the user's trigger, so as to adjust the standard waveform. For example, for the adjustment of the amplitude, the electronic device can adjust the amplitude of the standard waveform based on the default amplitude value pre-configured in the program module, so as to obtain a waveform with adjusted amplitude.

[0045] In order to meet personalized testing requirements, optionally, the above S103 may include: in response to a waveform adjustment item, a parameter setting interface pops up, the parameter setting interface including recommended information of the waveform parameters to be adjusted; obtaining input parameter information for the waveform parameters to be adjusted input by the user through the parameter setting interface; and adjusting the standard waveform based on the input parameter information to obtain an adjusted waveform.

[0046] Among them, the above reference information provides a reference for the user to configure the waveform parameters to be adjusted, which can be the current parameter value of the waveform parameter to be adjusted, or it can be the recommended parameter value or recommended parameter value range of the waveform parameter to be adjusted provided to the user. The user configures the input parameter information of the waveform parameter to be adjusted with reference to the above reference information. It is understandable that if the user arbitrarily configures the input parameter information of the waveform parameter to be adjusted, the waveform data may become invalid data and the test purpose cannot be achieved. By providing the reference information of the waveform parameter to be adjusted in the parameter setting interface, the user is guided to set the input parameter information of the waveform parameter to be adjusted, so that the input parameter information configured by the user can better meet the test requirements.

[0047] The above-mentioned waveform parameters to be adjusted may be parameters at the data link layer and / or parameters at the physical layer, such as jitter parameters, slope parameters or signal speed, etc. For jitter parameters, specifically, they refer to the periodic jitter component and random component based on the dual Dirac model, the peak-to-peak value or root mean square value of the jitter, etc.; for slope parameters, specifically, they refer to the rising edge time and the falling edge time (the rising edge time refers to the time taken for the signal to increase from 10% of the amplitude to 90% of the amplitude, or the time taken for the signal to increase from 20% of the amplitude to 80% of the amplitude, and the falling edge time refers to the time taken for the signal to decrease from 90% of the amplitude to 10% of the amplitude, or the time taken for the signal to decrease from 80% of the amplitude to 20% of the amplitude).

[0048] After obtaining the input parameter information set by the user through the parameter setting interface, the electronic device can perform corresponding adjustment operations on the standard waveform according to the input parameter information to obtain the adjusted waveform.

[0049] In this embodiment, the parameter setting interface supports personalized setting of input parameter information, thereby providing more diverse abnormal waveforms and improving the test effect.

[0050] In one embodiment, optionally, the above-mentioned waveform adjustment item may include a first waveform adjustment item and / or a second waveform adjustment item, the first waveform adjustment item is used to adjust the frame data of the standard waveform, and the second waveform adjustment item is used to adjust the physical layer signal characteristics of the standard waveform.

[0051] Among them, the above-mentioned waveform editing interface may provide a first waveform adjustment item, may provide a second waveform adjustment item, and may provide the first waveform adjustment item and the second waveform adjustment item at the same time. The user can trigger the corresponding waveform adjustment item according to the actual test requirements. When it is detected that the first waveform adjustment item is triggered, the electronic device adjusts the frame data of the standard waveform; when it is detected that the second waveform adjustment item is triggered, the electronic device adjusts the physical layer signal characteristics of the standard waveform; when it is detected that both the first waveform adjustment item and the second waveform adjustment item are triggered, the electronic device adjusts both the frame data and the physical layer signal characteristics of the standard waveform.

[0052] It should be noted that which type of waveform adjustment items provided in the waveform editing interface is related to the test requirements. If there is a protocol decoding test requirement, the first waveform adjustment item can be inserted in the waveform editing interface to adjust the frame format / frame data of the standard waveform; if there is a protocol consistency test requirement, the second waveform adjustment item can be inserted in the waveform editing interface to adjust the physical layer signal characteristics of the standard waveform; if there are both protocol decoding test requirements and protocol consistency test requirements, the first waveform adjustment item and the second waveform adjustment item can be inserted in the waveform editing interface to adjust the frame format / frame data of the standard waveform and the physical layer signal characteristics of the standard waveform.

[0053] When the number of the first waveform adjustment items and the second waveform adjustment items is small, the first waveform adjustment items and the second waveform adjustment items can be displayed in the same interface. When the number of the first waveform adjustment items and the second waveform adjustment items is large, the first waveform adjustment items and the second waveform adjustment items can be displayed in pages. In order to facilitate user operation, a switching control can also be inserted in the waveform editing interface, and the switching control is used to switch the waveform editing interface of the first waveform adjustment item and the second waveform adjustment item. For example, if the waveform editing interface of the first waveform adjustment item is currently displayed, when the physical layer signal characteristics of the standard waveform need to be edited, the user can trigger the switching control. When it is detected that the switching control is triggered, the waveform editing interface of the second waveform adjustment item is displayed.

[0054] Optionally, the waveform parameter to be adjusted indicated by the first waveform adjustment item is related to the protocol frame format of the target communication protocol. Exemplarily, the first waveform adjustment item is used to adjust the content, bit filling rule, bit timing and bit rate of each field in the protocol frame.

[0055] Taking the CAN bus protocol as an example, each part of the protocol can be adjusted independently, such as Figure 3 As shown, the first waveform adjustment item included in the waveform editing interface can be at least one of the following: frame start (Start Of Frame, SOF) adjustment, remote transfer request bit (Remote Transfer Request, RTR) adjustment, Data adjustment, ACK (acknowledgement) adjustment, Identifier adjustment, Control adjustment, cyclic redundancy check (Cyclic Redundancy Check, CRC) adjustment, frame end (End of Frame, EOF) adjustment, bit filling rule adjustment, bit timing and bit speed adjustment.

[0056] The user triggers the corresponding first waveform adjustment item based on the test requirements, and the electronic device adjusts the corresponding content in the frame data of the standard waveform according to the user's trigger. For example, according to the user's trigger, the value under the data length field in the data frame of the standard waveform is modified to a value that does not match the actual data length; for another example, an incorrect CRC value is generated through the triggered CRC adjustment item. For another example, the CAN bus protocol stipulates that after every 5 consecutive identical bits, an opposite data needs to be inserted, that is, 5 consecutive 1s must be followed by a 0, and 5 consecutive 0s must be followed by a 1. This rule can also be adjusted after detecting that the bit filling rule adjustment item is triggered, to create abnormal use cases to verify the protocol decoding function of the target device. Similarly, the bit timing and bit rate can also be flexibly adjusted to verify the compatibility of the decoding function.

[0057] Optionally, the waveform parameter to be adjusted indicated by the second waveform adjustment item is related to the consistency test content of the target communication protocol. Exemplarily, the second waveform adjustment item is used to adjust the amplitude, slope, signal rate, interference and channel delay of the standard waveform.

[0058] Take the CAN bus protocol as an example, Figure 4 As shown, the second waveform adjustment item included in the waveform editing interface can be at least one of the following: amplitude adjustment, rising edge and falling edge time setting (i.e., slope adjustment), channel delay setting, amplitude noise addition, signal rate adjustment, burr addition, phase noise addition, clock rate adjustment, groove addition, jitter addition, and bandwidth characteristic setting.

[0059] The user triggers the corresponding second waveform adjustment item based on the test requirements. After detecting that the second waveform adjustment item is triggered, the electronic device performs adjustment operations on the physical layer signal characteristics corresponding to the standard waveform. For example, the amplitude, rising edge time, falling edge time and signal rate of the standard waveform are adjusted based on the triggered second waveform adjustment item, and jitter, noise, burrs and channel delay are added to the standard waveform. Through the above process, an abnormal waveform at the signal feature level is constructed to verify whether the target device can accurately measure / extract signal characteristics in the abnormal waveform.

[0060] Optionally, for amplitude adjustment, the amplitude adjustment method may include at least one of the following: adding overshoot, preshoot and pre-emphasis, coupling the Gaussian distribution of the required parameters μ, σ, adding over-amplitude and under-amplitude. The applicable scope of the above amplitude adjustment method can be all waveform parts or individual waveform parts in the standard waveform.

[0061] Optionally, for adding jitter, the jitter type may include time interval error (TIE) jitter, positive-to-positive pulse width, negative-to-negative pulse width, cycle-to-cycle, duty cycle, and N-cycle jitter, etc.

[0062] Optionally, a glitch with a variable amplitude may be added to the rising edge or falling edge of the standard waveform according to a trigger operation of the user, thereby detecting the processing capability of the target device for the hysteresis effect.

[0063] Optionally, the signal speed and clock rate may be adjusted according to the user's trigger operation. For example, the signal rate and clock rate may be fine-tuned based on the standard rate to verify the target device's tolerance range for rate errors.

[0064] Optionally, the burr addition can be achieved by adding a sharp pulse in the middle of the waveform based on the standard waveform, so as to test the target device's recognition and anti-interference capabilities for pulse interference.

[0065] In this embodiment, Figure 3 The first waveform adjustment item shown and Figure 4 The second waveform adjustment item shown in is only an example. For other communication protocols, the first waveform adjustment item and the second waveform adjustment item may also be different, which is not limited in this embodiment.

[0066] In this embodiment, by providing various types of waveform editing items, abnormal waveforms can be constructed from multiple dimensions. For example, a waveform containing jitter, a waveform containing a slope, a waveform with a channel delay, etc. can be constructed, thereby providing diversified waveform data for protocol testing, thereby improving the test effect.

[0067] In one embodiment, optionally, when the waveform parameters to be adjusted are jitter parameters and slope parameters, as follows: Figure 5 As shown, the electronic device can adjust the standard waveform according to the following process:

[0068] S501. Determine the number of points included in the expected edge according to the set edge time and waveform sampling rate.

[0069] The edge may include a rising edge and / or a falling edge.

[0070] S502 : Determine a jitter time difference between an expected edge and an ideal edge in the standard waveform according to the set deterministic jitter component, the random jitter component and the number of edges included in the standard waveform.

[0071] Specifically, a convolution operation is performed on the deterministic jitter component and the random jitter component to determine the overall jitter component. Then, based on the overall jitter component and the number of edges included in the standard waveform, the jitter time difference between each expected edge and the ideal edge in the standard waveform can be obtained.

[0072] S503: Determine the point number difference between the expected edge and the ideal position based on the waveform sampling rate and the jitter time difference.

[0073] The point number difference between the expected edge and the ideal position can be understood as the point number difference between the jitter threshold decision point in the expected edge and the ideal position in the standard waveform.

[0074] S504: Determine the level values ​​of the remaining points in the expected edge based on the number of points included in the expected edge, the point number difference, and the level values ​​of the key points in the expected edge.

[0075] The key points in the expected edge may include at least one of a jitter threshold decision point, an edge high threshold point (e.g., a point at 80% of the amplitude, or a point at 90% of the amplitude), and an edge low threshold point (a point at 20% of the amplitude, or a point at 10% of the amplitude). The spacing between the points in the expected edge is fixed, and the level values ​​of the key points are known. Therefore, the level values ​​of the remaining points in the expected edge can be supplemented by limiting the number of points included in the expected edge and the difference in the number of points between the jitter threshold decision point and the ideal position in the standard waveform, combined with the level values ​​of the key points.

[0076] S505 , overwriting the level value of the corresponding point in the standard waveform based on the level value of each point in the expected edge to obtain an adjusted waveform.

[0077] At this point, the position of each expected rising edge and expected falling edge in the standard waveform is obtained. Taking the jitter decision threshold point as a reference, the level value of each point in the obtained expected edge is used to cover the corresponding waveform segment in the standard waveform, thereby obtaining the adjusted waveform.

[0078] For example, Figure 6 As shown in the figure, assuming that the waveform sampling rate is 10G, the time interval between the two points is 100ps, the rising edge time is expected to be set to 1ns, the falling edge time is 1.3ns, the deterministic jitter component is 500ps, and the random jitter component is 200ps. The number of edges in the standard waveform is also known. According to the convolution operation of the deterministic jitter component and the random jitter component, the overall jitter component can be obtained. Based on the overall jitter component and the number of edges in the standard waveform, edge 1 (i.e. Figure 6 The jitter time difference between the first rising edge in the waveform and the ideal edge in the standard waveform is 800ps, and the jitter time difference between edge 2 (i.e. Figure 6 The jitter time difference between the first falling edge in the waveform and the ideal edge in the standard waveform is -700ps. Figure 6The jitter time difference between the second rising edge in the standard waveform and the ideal edge in the standard waveform is 1ns. Through the jitter time difference of each edge and the waveform sampling rate, it can be obtained that the difference in the number of points between each edge and the edge jump point in the standard waveform is 8 (corresponding to edge 1), -7 (corresponding to edge 2), and 10 (corresponding to edge 3). In other words, the positions at the time D, H, and L in the original standard waveform should be at the positions B, F, and J respectively after adjustment. The edge threshold points around point B are A and C, the edge threshold points around point F are E and G, and the edge threshold points around point J are I and K. In addition, based on the set edge time and waveform sampling rate, it can be obtained that the number of points included in the expected rising edge and the expected falling edge should be 10 points and 13 points, respectively. Then, the number of points filled between AB, BC, EF, FG, IJ, and JK are 4, 4, 5, 6, 4, and 4, respectively. Next, combined with the level value of the key point, the level value of the above-mentioned point to be filled is determined. At this point, the level value of each point in each expected rising edge and expected falling edge is obtained, which can cover the corresponding point in the standard waveform, thereby achieving the purpose of setting the slope and adding jitter for the standard waveform.

[0079] Optionally, when it is necessary to add channel delay to the standard waveform, the electronic device can use one of the channels of the standard waveform as a reference, determine the target number of points that need to be delayed in the channel according to the waveform sampling rate and the set channel delay time; delete the target number of points at the front of the channel, and add the target number of points at the end of the channel. In this way, for a standard waveform with differential input, a channel delay can be added to the standard waveform.

[0080] Of course, the above-mentioned manner of adding jitter, channel delay and slope setting is also an example, and the adjustment can also be performed in other manners, which is not limited in this embodiment.

[0081] In this embodiment, the user's waveform adjustment requirements are obtained through the human-computer interaction interface, and the frame data and / or physical layer signal characteristics of the standard waveform are adjusted based on the user's waveform adjustment requirements. Not only normal waveforms can be constructed, but also various abnormal waveforms can be constructed, providing strong support for protocol testing.

[0082] Figure 7 A schematic diagram of a waveform data generating device for testing provided in an embodiment of the present application. Figure 7 As shown, the device may include: a first generating module 701 , a display module 702 , and a second generating module 703 .

[0083] Specifically, the first generating module 701 is used to generate a standard waveform that complies with the target communication protocol according to the waveform parameters for the target communication protocol input by the user;

[0084] The display module 702 is used to display a waveform editing interface, wherein the waveform editing interface includes waveform adjustment items, and the waveform adjustment items are used to adjust the protocol characteristics of the standard waveform;

[0085] The second generating module 703 is used for adjusting the standard waveform in response to the triggering operation of the waveform adjustment item to obtain an adjusted waveform;

[0086] The standard waveform and the adjusted waveform are waveform data required for testing a target device.

[0087] Optionally, the waveform adjustment item includes a first waveform adjustment item and / or a second waveform adjustment item, the first waveform adjustment item is used to adjust frame data of the standard waveform, and the second waveform adjustment item is used to adjust physical layer signal characteristics of the standard waveform.

[0088] Optionally, the waveform parameter to be adjusted indicated by the first waveform adjustment item is related to the protocol frame format of the target communication protocol, and the waveform parameter to be adjusted indicated by the second waveform adjustment item is related to the consistency test content of the target communication protocol.

[0089] Based on the above embodiment, optionally, the second generation module 703 is specifically used to pop up a parameter setting interface in response to the waveform adjustment item, wherein the parameter setting interface includes reference information of the waveform parameters to be adjusted; obtain input parameter information for the waveform parameters to be adjusted input by the user through the parameter setting interface; adjust the standard waveform based on the input parameter information to obtain an adjusted waveform.

[0090] On the basis of the above embodiments, optionally, the second generation module 703 is also specifically used to determine the number of points included in the expected edge according to the set edge time and waveform sampling rate; determine the jitter time difference between the expected edge and the ideal edge in the standard waveform according to the set deterministic jitter component, random jitter component and the number of edges included in the standard waveform; determine the point number difference between the expected edge and the ideal position based on the waveform sampling rate and the jitter time difference; determine the level values ​​of the remaining points in the expected edge based on the number of points included in the expected edge, the point number difference and the level values ​​of the key points in the expected edge; and obtain the adjusted waveform based on the level values ​​of each point in the expected edge covering the level values ​​of the corresponding points in the standard waveform.

[0091] Based on the above embodiment, optionally, the second generation module 703 is also specifically used to determine the target number of points that need to be delayed for one of the channels of the standard waveform as a reference, according to the waveform sampling rate and the set channel delay time; delete the target number of points at the front of the channel, and add the target number of points at the end of the channel.

[0092] Based on the above embodiment, optionally, the device further includes: a sending module.

[0093] The sending module is used to transmit the standard waveform and the adjusted waveform to the target device according to a specified format.

[0094] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 8 As shown, the device includes a processor 80, a memory 81, an input device 82 and an output device 83; the number of the processor 80 in the device can be one or more. Figure 8 A processor 80 is taken as an example; the processor 80, memory 81, input device 82 and output device 83 in the device can be connected by a bus or other means. Figure 8 The example of connecting through bus is taken in the following.

[0095] The memory 81, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the waveform data generation method for testing in the embodiment of the present application (for example, the first generation module 701, the display module 702 and the second generation module 703 in the waveform data generation device for testing). The processor 80 executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory 81, that is, realizes the above-mentioned waveform data generation method for testing.

[0096] The memory 81 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created during the waveform data generation process for testing, etc. In addition, the memory 81 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 81 may further include a memory remotely arranged relative to the processor 80, and these remote memories may be connected to the device / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0097] The input device 82 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 83 may include a display device such as a display screen.

[0098] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0099] Generate a standard waveform that conforms to the target communication protocol according to the waveform parameters for the target communication protocol input by the user;

[0100] Displaying a waveform editing interface, the waveform editing interface including waveform adjustment items, the waveform adjustment items being used to adjust the protocol characteristics of the standard waveform;

[0101] In response to the triggering operation of the waveform adjustment item, adjusting the standard waveform to obtain an adjusted waveform;

[0102] The standard waveform and the adjusted waveform are waveform data required for testing a target device.

[0103] The waveform data generating device, electronic device, and storage medium provided in the above embodiments can execute the waveform data generating method for testing provided in any of the above embodiments, and have the corresponding functional modules and beneficial effects of executing the method. For technical details not described in detail in the above embodiments, please refer to the waveform data generating method for testing provided in any of the above embodiments.

[0104] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0105] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for generating waveform data for testing, characterized in that: include: Generate a standard waveform that conforms to the target communication protocol according to the waveform parameters for the target communication protocol input by the user; Displaying a waveform editing interface, the waveform editing interface including waveform adjustment items, the waveform adjustment items being used to adjust the protocol characteristics of the standard waveform; In response to the triggering operation of the waveform adjustment item, adjusting the standard waveform to obtain an adjusted waveform; The standard waveform and the adjusted waveform are waveform data required for testing a target device.

2. The method according to claim 1, characterized in that The waveform adjustment item includes a first waveform adjustment item and / or a second waveform adjustment item, the first waveform adjustment item is used to adjust the frame data of the standard waveform, and the second waveform adjustment item is used to adjust the physical layer signal characteristics of the standard waveform.

3. The method according to claim 2, characterized in that The waveform parameter to be adjusted indicated by the first waveform adjustment item is related to the protocol frame format of the target communication protocol, and the waveform parameter to be adjusted indicated by the second waveform adjustment item is related to the consistency test content of the target communication protocol.

4. The method according to claim 1, characterized in that: The step of adjusting the standard waveform in response to the triggering operation of the waveform adjustment item to obtain an adjusted waveform includes: In response to the waveform adjustment item, a parameter setting interface pops up, wherein the parameter setting interface includes reference information of the waveform parameters to be adjusted; Acquiring input parameter information for the waveform parameter to be adjusted input by the user through the parameter setting interface; The standard waveform is adjusted based on the input parameter information to obtain an adjusted waveform.

5. The method according to claim 4, characterized in that In a case where the waveform parameters to be adjusted are jitter parameters and slope parameters, adjusting the standard waveform based on the input parameter information to obtain an adjusted waveform includes: According to the set edge time and waveform sampling rate, determine the number of points included in the expected edge; Determining a jitter time difference between the expected edge and an ideal edge in the standard waveform according to a set deterministic jitter component, a random jitter component and the number of edges included in the standard waveform; Determining the difference in number of points between the expected edge and an ideal position based on the waveform sampling rate and the jitter time difference; Determine the level values ​​of the remaining points in the expected edge based on the number of points included in the expected edge, the point number difference and the level value of the key point in the expected edge; Based on the level value of each point in the expected edge covering the level value of the corresponding point in the standard waveform, an adjusted waveform is obtained.

6. The method according to claim 4, characterized in that In the case where the waveform parameter to be adjusted is a channel parameter, adjusting the standard waveform based on the input parameter information to obtain an adjusted waveform includes: Taking one of the channels of the standard waveform as a reference, and according to the waveform sampling rate and the set channel delay time, determining the target number of points that need to be delayed in the channel; Delete the target number of points at the front of the channel and add the target number of points at the back of the channel.

7. The method according to any one of claims 1 to 6, characterized in that Also includes: The standard waveform and the adjusted waveform are transmitted to the target device in a specified format.

8. A waveform data generating device for testing, characterized in that: include: A first generating module, configured to generate a standard waveform conforming to the target communication protocol according to waveform parameters for the target communication protocol input by a user; A display module, used to display a waveform editing interface, wherein the waveform editing interface includes waveform adjustment items, and the waveform adjustment items are used to adjust the protocol characteristics of the standard waveform; A second generating module, configured to adjust the standard waveform in response to a triggering operation of the waveform adjustment item to obtain an adjusted waveform; The standard waveform and the adjusted waveform are waveform data required for testing a target device.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Cited By

  • Adjusting method and device for transmitted waveform in acoustic experiment, medium and product

    CN119380608A

  • Dynamic adjustment method and device for equipment parameters, equipment and storage medium

    CN120295537A