Average sampling method, device, storage medium and electronic device based on FPGA
The FPGA-based average sampling method addresses low efficiency in oscilloscopes by dividing storage into segments for parallel processing, reducing processing time and improving response speed through alternating storage and reading, thereby enhancing user experience.
Patent Information
- Application Number
- CN202411350827.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing oscilloscopes face challenges in efficiently processing high-speed, high-frequency data streams due to low average sampling efficiency and serial processing bottlenecks, leading to prolonged processing times and reduced user experience.
An average sampling method and device based on FPGA that divides storage space into multiple segments, alternately stores and reads waveform data, and performs parallel averaging to reduce intermediate processing steps, leveraging the parallel processing capabilities of FPGA to enhance efficiency.
This approach significantly reduces processing time and improves response speed by avoiding serial processing bottlenecks, enabling faster average calculations and enhancing user experience through efficient data acquisition and processing.
Smart Images

Figure CN118858725B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of digital oscilloscopes, and in particular to an average sampling method, device, storage medium and electronic device based on FPGA. Background Art
[0002] In the field of modern electronic measurement and signal processing, oscilloscopes, as indispensable analysis tools, bear the important responsibility of monitoring and analyzing the waveform characteristics of electrical signals. With the rapid development of electronic technology, the complexity and diversity of the signals to be measured have increased dramatically. At the same time, with the continuous increase in sampling rates, the amount of data that oscilloscopes need to process has expanded dramatically. This trend has put forward higher requirements on the storage capacity and data processing capabilities of oscilloscopes, posing a significant challenge.
[0003] To meet this challenge, optimizing the oscilloscope's sampling strategy, enhancing its ability to process complex signals, and improving the efficiency and real-time performance of waveform capture have become the focus of research and development. By improving the sampling mode, the aim is to improve the oscilloscope's data processing efficiency in a high-speed sampling environment, ensuring that even in the face of large-scale, high-frequency data streams, it can maintain high-precision waveform reconstruction and analysis capabilities. Summary of the invention
[0004] The main purpose of the present invention is to provide an average sampling method, device, storage medium and electronic device based on FPGA, aiming to solve the technical problem of low average sampling efficiency in the prior art.
[0005] To achieve the above objectives, the present disclosure proposes an average sampling method based on FPGA, comprising:
[0006] Determine the storage space of the oscilloscope according to the preset average waveform amplitude, the storage space at least comprising a first segment storage area and a second segment storage area, the first segment storage area and the second segment storage area both comprising a plurality of storage segments;
[0007] Continuously sampling based on the oscilloscope to obtain waveform data, wherein the waveform data includes multiple waveforms corresponding to preset trigger conditions;
[0008] Based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments in the first segment storage area and the second segment storage area;
[0009] At the same time, alternately reading the waveform data stored in the first segment storage area and the second segment storage area;
[0010] The waveform data alternately read from the first segment storage area and the second segment storage area are averaged to obtain waveform data after the average processing.
[0011] Optionally, the step of performing averaging processing on the waveform data alternately read from the first segment storage area and the second segment storage area to obtain the waveform data after the averaging processing comprises:
[0012] Based on the preset trigger condition, determining a point data group corresponding to the target position point from the alternately read waveform data, the point data group including a plurality of point data corresponding to the plurality of waveforms at the target position point;
[0013] Parallel averaging is performed on multiple point data groups corresponding to multiple target position points to obtain waveform data after averaging.
[0014] Optionally, performing parallel averaging processing on a plurality of point data groups corresponding to a plurality of target position points to obtain waveform data after averaging processing includes:
[0015] Performing parallel superposition calculations on the multiple point data groups to obtain multiple data sums corresponding to the multiple point data groups;
[0016] Performing parallel average calculation on the multiple data sums to obtain multiple average values corresponding to the multiple data sums;
[0017] Waveform reconstruction is performed based on the multiple average values to obtain waveform data after averaging processing.
[0018] Optionally, determining the storage space of the oscilloscope according to a preset average waveform amplitude includes:
[0019] Get the external memory corresponding to the oscilloscope;
[0020] Dividing the external memory into storage areas to obtain a storage area set, wherein the storage area set includes at least two storage areas, a first storage area and a second storage area;
[0021] Determining the number of storage segments according to the average waveform amplitude;
[0022] Based on the number of storage segments, each storage area in the storage area set is divided into storage segments to obtain a segmented storage area set, wherein the segmented storage area set at least includes a first segmented storage area corresponding to the first storage area and a second segmented storage area corresponding to the second storage area, and each of the first segmented storage area and the second segmented storage area includes a plurality of storage segments;
[0023] The storage space of the oscilloscope is determined according to the segmented storage area set.
[0024] Optionally, based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments of the first segment storage area and the second segment storage area, including:
[0025] storing the plurality of waveforms obtained by the first round of continuous sampling by the oscilloscope in the plurality of storage segments included in the first segmented storage area;
[0026] When the first segmented storage area meets a preset storage condition, storing the plurality of waveforms obtained by the second round of continuous sampling by the oscilloscope in the plurality of storage segments included in the second segmented storage area;
[0027] When the second segmented storage area meets the preset storage condition, the plurality of waveforms obtained by the third round of continuous sampling by the oscilloscope are stored in the plurality of storage segments included in the first segmented storage area.
[0028] Optionally, the alternately reading the waveform data stored in the first segment storage area and the second segment storage area includes:
[0029] Reading the waveform data stored in the first segmented storage area to obtain a first waveform group;
[0030] After averaging the plurality of waveforms in the first waveform group, reading the waveform data stored in the second segmented storage area to obtain a second waveform group;
[0031] After averaging the plurality of waveforms in the second waveform group, the waveform data stored in the first segmented storage area is read to obtain a third waveform group.
[0032] Optionally, the continuously sampling based on the oscilloscope to obtain waveform data includes:
[0033] Based on the front-end ADC of the oscilloscope, analog signals are collected from the target signal source to obtain an initial digital signal; and
[0034] Converting the initial digital signal into a high-speed serial digital signal;
[0035] Based on the high-speed interface of FPGA, receiving the high-speed serial digital signal; and
[0036] According to a preset speed reduction condition, the high-speed serial digital signal is subjected to data speed reduction processing to obtain initial waveform data;
[0037] The initial waveform data is converted across clock domains to obtain the waveform data.
[0038] In addition, to achieve the above-mentioned purpose, the present disclosure further provides an average sampling device based on FPGA, and the average sampling device based on FPGA includes:
[0039] A determination module, used to determine the storage space of the oscilloscope according to a preset average waveform amplitude, wherein the storage space at least includes a first segment storage area and a second segment storage area, and the first segment storage area and the second segment storage area each include a plurality of storage segments;
[0040] A sampling module, used for performing continuous sampling based on the oscilloscope to obtain waveform data, wherein the waveform data includes a plurality of waveforms corresponding to a preset trigger condition;
[0041] A storage module, used for alternately storing the waveform data obtained by continuous sampling in a plurality of storage segments in the first segment storage area and the second segment storage area based on the FPGA;
[0042] A reading module, used for simultaneously and alternately reading the waveform data stored in the first segment storage area and the second segment storage area;
[0043] The processing module is used to perform average processing on the waveform data alternately read from the first segment storage area and the second segment storage area to obtain waveform data after average processing.
[0044] In addition, to achieve the above-mentioned purpose, the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and a processor executes the computer program to implement the above-mentioned FPGA-based average sampling method.
[0045] In addition, to achieve the above-mentioned purpose, the present disclosure also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the above-mentioned FPGA-based average sampling method.
[0046] Through the above technical solution, the storage space of the oscilloscope is divided into multiple storage segments according to the preset average waveform amplitude, and based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in the multiple storage segments of the first segmented storage area and the second segmented storage area. The multiple waveform data captured continuously are alternately stored in the divided multiple storage segments, and the waveform data stored in the first segmented storage area and the second segmented storage area are alternately read, thereby avoiding the serial processing bottleneck of "collecting one frame and storing one frame" in the traditional method, reducing the intermediate process of each waveform collection, each transmission, processing and calculation and then collecting, and improving the overall processing efficiency of the average sampling mode. On the other hand, based on the parallel average processing capability of the FPGA, it is possible to process the waveform data stored in multiple storage segments at the same time, and perform fast average calculation on the values at the same physical point position. This parallel processing method greatly shortens the average processing time and improves the response speed and calculation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on the structures shown in these drawings without paying any creative work.
[0048] Figure 1 A schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present disclosure;
[0049] Figure 2 A flowchart of an FPGA-based average sampling method according to an embodiment of the present disclosure;
[0050] Figure 3 A schematic diagram of alternately segmented storage of multiple waveforms involved in an embodiment of the present disclosure;
[0051] Figure 4 This is a schematic diagram of another FPGA-based average sampling process involved in the embodiment of the present disclosure;
[0052] Figure 5 A schematic diagram of a multi-waveform average calculation mode processing method involved in the embodiment of the present disclosure;
[0053] Figure 6 The present invention is a structural block diagram of an FPGA-based average sampling device involved in an embodiment of the present invention.
[0054] The realization of the objectives, functional features and advantages of the present disclosure will be further described in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0055] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.
[0056] Reference Figure 1 , Figure 1 The figure is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present disclosure.
[0057] Typically, the device includes: at least one processor 301, a memory 302, and an FPGA-based average sampling program stored in the memory 302 and executable on the processor 301, wherein the FPGA-based average sampling program is configured to implement the steps of the FPGA-based average sampling method as described above.
[0058] The processor 301 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 301 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 301 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 301 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. The processor 301 may also include an AI (Artificial Intelligence) processor, which is used to process operations related to the average sampling method based on FPGA, so that the average sampling method model based on FPGA can be trained and learned autonomously to improve efficiency and accuracy.
[0059] The memory 302 may include one or more storage media, which may be non-transitory. The memory 302 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory storage medium in the memory 302 is used to store at least one instruction, which is used to be executed by the processor 301 to implement the FPGA-based average sampling method provided in the method embodiment of the present disclosure.
[0060] In some embodiments, the terminal may further optionally include: a communication interface 303 and at least one peripheral device. The processor 301, the memory 302 and the communication interface 303 may be connected via a bus or a signal line. Each peripheral device may be connected to the communication interface 303 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 304, a display screen 305 and a power supply 306.
[0061] The communication interface 303 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 301 and the memory 302. In some embodiments, the processor 301, the memory 302, and the communication interface 303 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 301, the memory 302, and the communication interface 303 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0062] The radio frequency circuit 304 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 304 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 304 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 304 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 304 can communicate with other terminals through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 304 may also include circuits related to NFC (Near Field Communication), which is not limited in the present disclosure.
[0063] The display screen 305 is used to display the UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 305 is a touch display screen, the display screen 305 also has the ability to collect touch signals on the surface or above the surface of the display screen 305. The touch signal can be input to the processor 301 as a control signal for processing. At this time, the display screen 305 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 305 can be one, the front panel of the electronic device; in other embodiments, the display screen 305 can be at least two, respectively arranged on different surfaces of the electronic device or in a folding design; in some embodiments, the display screen 305 can be a flexible display screen, arranged on a curved surface or a folding surface of the electronic device. Even, the display screen 305 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 305 can be made of materials such as LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode, organic light-emitting diode).
[0064] The power supply 306 is used to power various components in the electronic device. The power supply 306 can be AC power, DC power, a disposable battery, or a rechargeable battery. When the power supply 306 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology. Those skilled in the art will understand that Figure 1 The structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0065] In addition, the embodiment of the present disclosure further proposes a storage medium, on which an FPGA-based average sampling program is stored, and when the FPGA-based average sampling program is executed by a processor, the steps of the FPGA-based average sampling method described above are implemented. Therefore, it will not be repeated here. In addition, the description of the beneficial effects of adopting the same method will not be repeated. For technical details not disclosed in the storage medium embodiment involved in the present disclosure, please refer to the description of the method embodiment of the present disclosure. As an example, the program instructions can be deployed to be executed on one device, or on multiple devices located at one location, or on multiple devices distributed at multiple locations and interconnected by a communication network.
[0066] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the above-mentioned program can be stored in a storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the above-mentioned storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0067] First of all, it should be understood that the average mode is used in the oscilloscope to achieve optimized analysis of signal characteristics by averaging the values of the same physical point position in multiple waveforms captured continuously. This technology is particularly suitable for scenarios where random noise, glitches or other irrelevant interference need to be filtered out from complex signals.
[0068] Specifically, when the oscilloscope is set to average mode, it will continuously capture multiple frames of waveform signals with the same trigger conditions. These waveform signals may be repetitive in time, but due to noise, interference or the instability of the signal itself, the details of each frame of the waveform may be different. By averaging the values of these waveforms at the same physical point (i.e., the corresponding point in time or space), the impact of random noise and glitch signals can be significantly reduced, thereby more clearly revealing the essential characteristics of the signal.
[0069] In the related art, average sampling mostly follows a common pattern: waveforms are collected one by one, stored, and then calculated and updated, and the values of multiple waveforms captured continuously at the same time (or physical) point are superimposed and averaged. Although this conventional average acquisition mode design is effective, it has obvious shortcomings in processing efficiency.
[0070] Specifically, in the traditional method, the segmented storage area needs to collect and store N waveforms one by one, and then perform data transmission, signal processing and waveform calculation at the back end. This serial processing process takes a long time for data transmission and signal processing, resulting in a slow overall response speed, especially when performing average calculations on a large number of waveforms (such as large N values). Each completed superposition average update of a waveform requires a complete collection, transmission, and calculation cycle, which significantly prolongs the overall processing time. For example, to achieve the average of 200 waveforms, this process needs to be repeated 200 times. This serial processing method of "collecting one frame and averaging one frame" significantly reduces the efficiency of average sampling, especially when the average number of frames is set high, the overall response of the system becomes slow and the calculation efficiency is low, which directly affects the smoothness of the user experience.
[0071] In view of this, the present disclosure provides an averaging sampling method, device, storage medium and electronic device based on FPGA, which improves the data processing capability of the oscilloscope, speeds up the response speed and optimizes the user experience through a parallel processing strategy based on FPGA.
[0072] Reference Figure 2 , Figure 2 The following is a flow chart of an FPGA-based average sampling method according to an embodiment of the present disclosure, including the following steps:
[0073] Step S11: according to a preset average waveform amplitude, determining the storage space of the oscilloscope, the storage space at least includes a first segment storage area and a second segment storage area, and the first segment storage area and the second segment storage area both include a plurality of storage segments.
[0074] Step S12: Perform continuous sampling based on an oscilloscope to obtain waveform data, where the waveform data includes multiple waveforms corresponding to preset trigger conditions.
[0075] Step S13: Based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments of the first segment storage area and the second segment storage area.
[0076] Step S14: Alternately reading the waveform data stored in the first segment storage area and the second segment storage area simultaneously.
[0077] Step S15: average processing is performed on the waveform data alternately read from the first segment storage area and the second segment storage area to obtain waveform data after average processing.
[0078] By dividing the storage space of the oscilloscope into multiple storage segments according to the preset average waveform amplitude, and based on FPGA, the waveform data obtained by continuous sampling is alternately stored in the multiple storage segments of the first segmented storage area and the second segmented storage area. The multiple waveform data captured continuously are alternately stored in the divided multiple storage segments, and the waveform data stored in the first segmented storage area and the second segmented storage area are alternately read, thereby avoiding the serial processing bottleneck of "collecting one frame and storing one frame" in the traditional method, reducing the intermediate process of each waveform collection, each transmission, processing and calculation and then collecting, and improving the overall processing efficiency of the average sampling mode. On the other hand, based on the parallel average processing capability of FPGA, it is possible to process the waveform data stored in multiple storage segments at the same time, and perform fast average calculation on the values at the same physical point position. This parallel processing method greatly shortens the average processing time and improves the response speed and calculation efficiency.
[0079] In a possible manner, continuous sampling is performed based on an oscilloscope to obtain waveform data, including:
[0080] The front-end ADC of the oscilloscope collects analog signals from the target signal source to obtain the initial digital signal; and
[0081] Converting the initial digital signal into a high-speed serial digital signal;
[0082] FPGA-based high-speed interface to receive high-speed serial digital signals; and
[0083] According to the preset speed reduction condition, the high-speed serial digital signal is subjected to data speed reduction processing to obtain initial waveform data;
[0084] The initial waveform data is converted across clock domains to obtain waveform data.
[0085] For example, the front-end ADC of the oscilloscope is first used to collect the analog signal generated by the target signal source (such as electronic equipment, sensor, etc.). The function of the ADC is to convert the continuous analog signal into a discrete digital signal for subsequent digital processing.
[0086] After the ADC converts the collected initial analog signals into digital signals, these digital signals may need to be further encoded into high-speed serial digital signals for transmission in the system. High-speed serial transmission technology can improve the rate and efficiency of data transmission, reduce the number of cables required for transmission, and reduce system complexity, so the initial digital signals can be converted into high-speed serial digital signals.
[0087] Then, since the rate of high-speed serial digital signals may be much higher than the tolerance of subsequent processing circuits, the FPGA can be used as a high-speed interface to receive high-speed serial digital signals from the ADC and reduce the speed of the received signals according to preset reduction conditions (such as signal frequency, sampling rate, etc.).
[0088] In a digital system, different parts may use different clock sources, which will cause uncertainty and timing problems when the signal is transmitted from one clock domain to another, so the initial waveform data can be converted across clock domains. Synchronizers (such as dual-trigger D flip-flops), asynchronous FIFOs (first-in, first-out queues), or other synchronization mechanisms can be used to ensure the correct transmission of data between different clock domains. After the cross-clock domain conversion, the waveform data is obtained.
[0089] In a possible manner, performing average processing on the waveform data alternately read from the first segment storage area and the second segment storage area to obtain the waveform data after average processing includes:
[0090] Based on a preset trigger condition, a point data group corresponding to a target position point is determined from the alternately read waveform data, wherein the point data group includes a plurality of point data corresponding to the target position point of a plurality of waveforms;
[0091] Parallel averaging is performed on multiple point data groups corresponding to multiple target position points to obtain waveform data after averaging.
[0092] It should be understood that the maximum number of target position points depends on the storage space of the oscilloscope and the performance configuration of its controller, such as the number of burst addresses. The target position point in the present disclosure can be multiple or one, which can be manually set according to the actual average sampling requirements, and the embodiments of the present disclosure are not limited to this.
[0093] For example, the present disclosure uses FPGA as the processing core to perform averaging processing on the input waveform data. Different from the traditional average acquisition mode, which acquires a waveform, stores it, calculates it, acquires another waveform, accumulates it, and averages it once, the acquisition process of the present disclosure is to first continuously acquire multiple waveforms, and then read them out in one go after the acquisition is completed. This reduces the intermediate process of each transmission, processing, and calculation before acquisition, and improves the processing efficiency of the overall average sampling mode.
[0094] Through the large-capacity segmented storage method, the storage space of the oscilloscope is divided into multiple equal storage segments. Each segment can store a triggered waveform, and multiple segments can store multiple waveforms with the same trigger condition. Multiple waveforms with the same trigger condition are continuously collected until all the set segments are collected and stored. All the stored waveform segments are sent to the back end for signal processing and waveform superposition and averaging operations to obtain waveform data after averaging processing.
[0095] Specifically, when the user specifies that N waveforms need to be averaged, the system first configures the front-end sampling device to store data in segments, with each storage area corresponding to a waveform data segment. When the N storage areas are all filled with sampled data, the system no longer processes a single waveform independently, but directly takes out the N data segments in parallel or sequentially, performs continuous accumulation operations, and then divides the accumulated result by N to calculate the average value.
[0096] This average sampling mode based on segmented storage avoids repeated average calculation processes, thereby significantly reducing the amount of calculation and processing time. Especially when the N value is large, that is, when the number of waveforms that need to be averaged is large, the efficiency advantage of this solution is particularly obvious.
[0097] In a possible manner, performing parallel averaging processing on multiple point data groups corresponding to multiple target position points to obtain waveform data after averaging processing includes:
[0098] Perform parallel superposition calculation on multiple point data groups to obtain the sum of multiple data corresponding to the multiple point data groups;
[0099] Perform parallel average calculation on the sums of multiple data to obtain multiple average values corresponding to the sums of the multiple data;
[0100] Waveform reconstruction is performed based on multiple average values to obtain waveform data after average processing.
[0101] For example, first, for multiple target position points, all relevant point data groups can be processed in parallel. Specifically, an independent adder or accumulator can be assigned to each point data group so as to calculate the sum of all point data groups at the same time.
[0102] In FPGA, this can be achieved by instantiating multiple adders or using lookup tables and parallel logic. Each adder is responsible for adding the data from different waveforms at the same position point to obtain the sum of the data at that position point.
[0103] After the data sums of all target position points are determined, these sums can be averaged. A divider or a shift operation can be used to calculate the average value of each position point in parallel, which is not limited in the embodiment of the present disclosure.
[0104] Finally, the averaged waveform data can be reconstructed based on the calculated multiple average values. Specifically, the average values of each position point can be arranged in their original order in the waveform to form new, averaged waveform data. In FPGA, the average values can be stored in an appropriate storage structure and then read as needed to reconstruct the waveform.
[0105] Among the possible ways, the storage space of the oscilloscope is determined according to the preset average waveform amplitude, including:
[0106] Get the external memory corresponding to the oscilloscope;
[0107] Dividing the external memory into storage areas to obtain a storage area set, wherein the storage area set includes at least two storage areas, a first storage area and a second storage area;
[0108] Determine the number of storage segments according to the average waveform amplitude;
[0109] Based on the number of storage segments, each storage area in the storage area set is divided into storage segments to obtain a segmented storage area set, wherein the segmented storage area set at least includes a first segmented storage area corresponding to the first storage area and a second segmented storage area corresponding to the second storage area, and the first segmented storage area and the second segmented storage area each include a plurality of storage segments;
[0110] The storage space of the oscilloscope is determined based on the set of segmented memory areas.
[0111] For example, the type (such as SD card, DDR memory, SRAM, etc.) and capacity of the external memory used by the oscilloscope can be determined first. In the present disclosure, the deep storage DDR3 SDRAM of the oscilloscope can be determined as the external memory. Then the external memory is divided into different storage areas to obtain a storage area set. In the present disclosure, the storage area set includes at least two storage areas: a first storage area and a second storage area.
[0112] Since users usually preset an average waveform amplitude number N, indicating how many waveform data are expected to be averaged. Based on this preset value N, it can be determined how many storage segments each storage area needs to be divided into. Each storage segment will be used to store a complete waveform data or a part of the waveform data, depending on the size of the storage segment and the sampling rate of the waveform data.
[0113] Then, according to the determined number of storage segments, the first storage area and the second storage area (and possible other storage areas) are divided. Each storage area will be equally divided into multiple storage segments so that each area equally supports the number of segments N set by the user for segmented storage, and the size of each storage segment should be sufficient to store a data point of a waveform. In this way, the first segmented storage area includes multiple storage segments, the second segmented storage area also includes multiple storage segments, and so on. In this way, alternating read and write operations can be performed through the two segmented storage areas to realize storage and reading ping-pong pipeline operations, thereby improving the acquisition storage and reading efficiency.
[0114] It is worth noting that the number of storage areas in the storage area set can be set based on factors such as data management, hardware limitations, performance optimization, and specific application scenarios. In actual applications, it is necessary to select a suitable area division strategy based on specific needs and conditions.
[0115] For example, if an application needs to frequently access different parts of the memory, and these access patterns are localized, the storage space can be divided into two or more storage areas for security or management purposes to store different types of data (such as user data and system data) in different areas, thereby achieving data isolation.
[0116] In addition, when the hardware design or operating system may limit the maximum size of a single memory area, in order to bypass these limitations, it may be necessary to divide the large memory block into multiple smaller areas. At this time, you can also choose to divide the storage space into multiple areas and allocate them to different subsystems or processes to effectively manage the address space.
[0117] Figure 3 FIG. 1 is a schematic diagram of alternately storing multiple waveforms in segments according to an embodiment of the present disclosure. Figure 3As shown, the present disclosure divides and segments the external DDR3 SDRAM memory into regions to obtain a first segment storage area and a second segment storage area. The first segment storage area includes n storage segments, and the second segment storage area also includes n storage segments.
[0118] For example, based on the first segmented storage area and the second segmented storage area, the PC user interface sets the trigger conditions and the average waveform amplitude, starts the acquisition, and the system sends the configuration information to the FPGA through the driver software. The system starts to continuously and intensively acquire multiple waveforms. The continuous multiple waveforms that meet the preset trigger conditions are triggered and stored in the first segmented storage area. When the storage in the first segmented storage area is completed, the storage completion status is returned to the PC, and the waveforms in the first segmented storage area are read into the back end for signal stitching processing and waveform averaging calculation.
[0119] While reading and processing the waveform in the first segmented storage area, a new round of waveform acquisition and storage will be placed in the second segmented storage area until it is full and the status is returned to the PC. After the PC completes the waveform processing and averaging operation in the first segmented storage area, it switches to the second segmented storage area to read the second round of continuous multiple waveforms. At this time, a new round of waveform acquisition and storage begins in the first segmented storage area. Similarly, the first segmented storage area and the second segmented storage area are alternately stored and retrieved, respectively, to achieve waveform acquisition and storage, waveform reading, and signal processing at the same time, thereby improving the overall efficiency of the system.
[0120] In a possible manner, based on FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments in a first segment storage area and a second segment storage area, including:
[0121] storing the plurality of waveforms obtained by the first round of continuous sampling by the oscilloscope in the plurality of storage segments included in the first segment storage area;
[0122] When the first segmented storage area meets the preset storage condition, the plurality of waveforms obtained by the second round of continuous sampling by the oscilloscope are stored in the plurality of storage segments included in the second segmented storage area;
[0123] When the second segmented storage area meets the preset storage condition, the plurality of waveforms obtained by the third round of continuous sampling by the oscilloscope are stored in the plurality of storage segments included in the first segmented storage area.
[0124] For example, in the present disclosure, the oscilloscope performs storage operations alternately between the first segment storage area and the second segment storage area for multiple waveforms obtained by continuous sampling. That is, the first round of sampling data is stored in the first segment storage area, the second round of sampling data is stored in the second segment storage area, the third round of sampling data is returned to the first segment storage area, and so on, to achieve alternating storage.
[0125] The multiple waveform data obtained in each round of continuous sampling are completely stored in the specified segmented storage area until the storage area meets the preset storage conditions (such as being full, reaching a specific number, etc.).
[0126] When the second segmented storage area also meets the storage conditions, the storage operation returns to the first segmented storage area to store the third round of sampling data, that is, the alternating storage is cyclic. Alternating storage allows new data to be written to another storage area while reading data from one storage area. This parallel processing method improves the efficiency of data acquisition and processing. By performing cyclic alternating storage in the first segmented storage area and the second segmented storage area, waveform data can be continuously acquired and stored.
[0127] In a possible manner, alternately reading the waveform data stored in the first segment storage area and the second segment storage area includes:
[0128] Reading the waveform data stored in the first segment storage area to obtain a first waveform group;
[0129] After averaging the plurality of waveforms in the first waveform group, the waveform data stored in the second segmented storage area is read to obtain a second waveform group;
[0130] After averaging the plurality of waveforms in the second waveform group, the waveform data stored in the first segmented storage area is read to obtain a third waveform group.
[0131] For example, in the present disclosure, the data of the first segmented storage area is first read, and after the data processing of the first segmented storage area is completed, the data of the second segmented storage area is read, and then the data of the first segmented storage area is read again, and so on, so as to realize the alternating reading operation. Then, the data read from each segmented storage area (i.e., each waveform group) is averaged. Similar to the alternating storage, after the reading and processing of the data of the second segmented storage area is completed, the process will return to the first segmented storage area again for a new round of reading and processing, thereby forming a cycle.
[0132] Figure 4 FIG. 1 is another schematic diagram of an average sampling process based on FPGA involved in the embodiment of the present disclosure. Figure 4 As shown in the figure, first, the FPGA receives the 20GSPS high-speed serial data captured by the front-end ADC, and then converts these data into 80 parallel 250Mbps data streams through internal processing. This parallel data stream is first written into a write buffer FIFO to achieve cross-clock domain conversion and ensure stable data transmission.
[0133] Next, the data is output from the FIFO and enters the multiple waveform alternating segment storage DDR control module. This module is responsible for managing the access process of DDR3 SDRAM, and through segment storage technology, it realizes the parallel pipeline writing and reading operations of waveform data. Specifically, according to the control logic, this module writes the waveform data into different segments of DDR3 SDRAM in an orderly manner, and can read data from these segments efficiently.
[0134] In the initial stage of data acquisition and storage, after the system starts, W_FIFO_1 first receives the first waveform data, and then sends it to the multiple waveforms alternate segment storage DDR control module after buffering, and finally stores it in the first segment storage area of the external DDR3. In this process, DDR3_CTRL_MODULE uses multiple MIG interface control cores to finely manage external storage.
[0135] It is worth noting that the system uses an alternating storage strategy to optimize performance. Specifically, when the data of W_FIFO_1 is being written to the first segment storage area of DDR3, W_FIFO_2 simultaneously receives new waveform data. This parallel operation effectively reduces the acquisition dead time and improves the data capture rate of the system. Once the data transmission of W_FIFO_1 is completed and successfully stored, the system seamlessly switches to W_FIFO_2 and continues the above process, while W_FIFO_1 starts a new round of data acquisition.
[0136] In addition, the data in the write cache is not only sent to the segment storage control module, but also provided to the trigger control module. This module generates trigger position information through data comparison and judgment, ensuring that multiple waveforms are stored under the same trigger condition, so as to facilitate the subsequent superposition and average calculation of multiple waveforms.
[0137] When the first segment storage area is full, the system will trigger a read operation. The reading process focuses on the same position point of multiple waveforms under the same trigger condition, and continuously reads N point data to R_FIFO_1 for superposition operation. At the same time, in order to maintain efficient processing, R_FIFO_2 is responsible for caching the next point data to be read S i (t1), R_FIFO_1 and R_FIFO_2 work alternately to ensure continuous reading and processing of data.
[0138] The superposition calculation module uses the parallel computing capability of FPGA to perform addition operations on N point data at one time to obtain the sum Ssum(t), and then divide it by N to calculate the average value. This process is carried out synchronously with the data reading process, which greatly improves the processing efficiency. Finally, the calculated average waveform data is sent to the subsequent module for caching for waveform reconstruction, and finally the waveform is displayed by the host computer IPC.
[0139] Thus, compared with the traditional method, the system first continuously and uninterruptedly collects all N waveform data, and then immediately starts the averaging process to complete the superposition and averaging calculation of all collected waveforms at one time. This parallel processing method is particularly advantageous when the N value is large, because it allows the average result of N waveforms to be obtained in a single processing cycle, thereby greatly shortening the processing time. Specifically, two processing cycles can update the average result of 2N waveforms, three cycles can complete the average update of 3N waveforms, and so on, achieving a leap in processing efficiency.
[0140] On the other hand, in the same period of time, due to the reduction of the repetition cycle required to process a single waveform, the system can capture and process more waveform data, and then update the average waveform results more frequently. This not only enhances the real-time performance of the oscilloscope, but also provides users with richer and more accurate waveform analysis data, which is an important technological breakthrough in the field of high-speed and high-precision waveform measurement.
[0141] In summary, the system achieves accurate capture, efficient storage and fast processing of high-speed serial data through efficient parallel processing and alternating storage strategies, providing strong technical support for waveform analysis and display.
[0142] Figure 5 FIG. 1 is a schematic diagram of a multi-waveform average calculation mode processing method involved in the embodiment of the present disclosure. Figure 5 As shown, S i (t) represents the waveform signal, i Indicates the number of segments, 0≤ i ≤n-1, n represents the average amplitude of the waveform set in the PC software interface, which is also the number of segments, and t represents the time sequence corresponding to each specific point in each waveform segment, which corresponds to the subsequent storage address.
[0143] For example, the first waveform is represented as: S0(t), 0≤t≤N, a waveform has a maximum of N points, DDR3 can read multiple points at a time, 16 points for one address, 8L for one burst, DDR3 can read 128 points at a time.
[0144] The sum of the same point in multiple frames of the first point S sum (1) and the average value S ave (1) can be expressed as:
[0145] S sum (1)=S0(1)+S1(1)+S2(1)+…+S n-1 (1)=
[0146] S ave (1) = S sum (1) / n
[0147] The sum of the same point in multiple frames of the second point S sum (2) and the average value S ave (2) can be expressed as:
[0148] S sum (2)=S0(2)+S1(2)+S2(2)+…+S n-1 (2)=
[0149] S ave (2) = S sum (2) / n
[0150] The sum of multiple images of the same point at the tth point S sum (t) and the average value S ave (t) can be expressed as:
[0151] S sum (t)=S0(t)+S1(t)+S2(t)+…+S n-1 (t)
[0152] S ave (t) = S sum (t) / n
[0153] For example, one address takes 128 points, and 128 points are calculated at one time. Since multiple waveforms are multiple repetitive periodic waveforms stored under the same trigger, at most 128 groups of point data corresponding to 128 time points in multiple waveforms can be read at the same time. Each group of point data includes the point data of each waveform in the multiple waveforms at a certain time point corresponding to the group of point data, and then the 128 groups of point data are averaged to obtain 128 average values.
[0154] The first segment storage area address Addr i ( x )1 can be calculated by the following formula:
[0155] Addr i ( x )1= i *one_seg_length+ x
[0156] in, i Indicates the number of segments, 0≤ i ≤n-1, x Represents the position of the midpoint of the waveform (from 0 to 127). If read in sequence, x It also means xreads, one_seg_length represents the address occupied by a waveform, that is, N / 8 addresses, which is equivalent to the offset of a segment. In the scenario described in the present disclosure, the DDR controller can step 8 addresses of data at a time, one address corresponds to 16 points, and 8 addresses correspond to 128 points, which is equivalent to reading 128 points at a time. If a waveform includes 10,000 points, the number of reads is approximately equal to 10,000 / 128 times.
[0157] This calculation means that you can multiply the segment number by the length of each segment and then add the position of the point within its segment to determine the first i segment waveform x The address of a point.
[0158] The second segment storage area address Addr i ( x ) can be calculated by the following formula:
[0159] Addr i ( x )2=big_seg_num+Addr i ( x )1
[0160] For the second segment storage area, a new variable big_seg_num is introduced, which can represent the starting address of a large segment (or a group of segments), or some form of offset. This value can be used to skip some of the previous data segments and directly locate the beginning of a specific group of waveforms. i and x Combine them according to the calculation method of the first segment storage area to get the i segment waveform x The relative address of each point is then added with big_seg_num to obtain the final absolute address. In the present disclosure, big_seg_num can be expressed as the offset of a segment storage area, and after adding big_seg_num, another segment storage area is jumped into, so that the alternating control of the two segment storage areas is realized.
[0161] Reference Figure 6 , Figure 6 This is a structural block diagram of an FPGA-based average sampling device involved in an embodiment of the present disclosure. Based on the same inventive concept as the above-mentioned embodiment, the device includes:
[0162] A determination module 10, for determining a storage space of the oscilloscope according to a preset average waveform amplitude, wherein the storage space at least includes a first segment storage area and a second segment storage area, and the first segment storage area and the second segment storage area each include a plurality of storage segments;
[0163] A sampling module 20, configured to perform continuous sampling based on the oscilloscope to obtain waveform data, wherein the waveform data includes a plurality of waveforms corresponding to a preset trigger condition;
[0164] A storage module 30, for alternately storing the waveform data obtained by continuous sampling in a plurality of storage segments of the first segment storage area and the second segment storage area based on the FPGA;
[0165] A reading module 40, configured to simultaneously and alternately read the waveform data stored in the first segment storage area and the second segment storage area;
[0166] The processing module 50 is used to perform average processing on the waveform data alternately read from the first segment storage area and the second segment storage area to obtain waveform data after average processing.
[0167] Optionally, the processing module 40 is used to:
[0168] Based on the preset trigger condition, determining a point data group corresponding to the target position point from the alternately read waveform data, the point data group including a plurality of point data corresponding to the plurality of waveforms at the target position point;
[0169] Parallel averaging is performed on multiple point data groups corresponding to multiple target position points to obtain waveform data after averaging.
[0170] Optionally, the processing module 40 is used to:
[0171] Performing parallel superposition calculations on the multiple point data groups to obtain multiple data sums corresponding to the multiple point data groups;
[0172] Performing parallel average calculation on the multiple data sums to obtain multiple average values corresponding to the multiple data sums;
[0173] Waveform reconstruction is performed based on the multiple average values to obtain waveform data after averaging processing.
[0174] Optionally, the determining module 10 is used to:
[0175] Get the external memory corresponding to the oscilloscope;
[0176] Dividing the external memory into storage areas to obtain a storage area set, wherein the storage area set includes at least two storage areas, a first storage area and a second storage area;
[0177] Determining the number of storage segments according to the average waveform amplitude;
[0178] Based on the number of storage segments, each storage area in the storage area set is divided into storage segments to obtain a segmented storage area set, wherein the segmented storage area set at least includes a first segmented storage area corresponding to the first storage area and a second segmented storage area corresponding to the second storage area, and each of the first segmented storage area and the second segmented storage area includes a plurality of storage segments;
[0179] The storage space of the oscilloscope is determined according to the segmented storage area set.
[0180] Optionally, the storage module 30 is used for:
[0181] storing the plurality of waveforms obtained by the first round of continuous sampling by the oscilloscope in the plurality of storage segments included in the first segmented storage area;
[0182] When the first segmented storage area meets a preset storage condition, storing the plurality of waveforms obtained by the second round of continuous sampling by the oscilloscope in the plurality of storage segments included in the second segmented storage area;
[0183] When the second segmented storage area meets the preset storage condition, the plurality of waveforms obtained by the third round of continuous sampling by the oscilloscope are stored in the plurality of storage segments included in the first segmented storage area.
[0184] Optionally, the reading module 40 is used to:
[0185] Reading the waveform data stored in the first segmented storage area to obtain a first waveform group;
[0186] After averaging the plurality of waveforms in the first waveform group, reading the waveform data stored in the second segmented storage area to obtain a second waveform group;
[0187] After averaging the plurality of waveforms in the second waveform group, the waveform data stored in the first segmented storage area is read to obtain a third waveform group.
[0188] Optionally, the sampling module 20 is used to:
[0189] Based on the front-end ADC of the oscilloscope, analog signals are collected from the target signal source to obtain an initial digital signal; and
[0190] Converting the initial digital signal into a high-speed serial digital signal;
[0191] Based on the high-speed interface of FPGA, receiving the high-speed serial digital signal; and
[0192] According to a preset speed reduction condition, the high-speed serial digital signal is subjected to data speed reduction processing to obtain initial waveform data;
[0193] The initial waveform data is converted across clock domains to obtain the waveform data.
[0194] It should be noted that, since the steps executed by the device of this embodiment are the same as the steps of the aforementioned method embodiment, its specific implementation method and the technical effects that can be achieved can refer to the aforementioned embodiment and will not be repeated here.
[0195] In addition, in one embodiment, an embodiment of the present disclosure further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory, and the computer program implements the steps of the method in the aforementioned embodiment when executed by the processor.
[0196] In addition, in one embodiment, an embodiment of the present disclosure further provides a computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method in the aforementioned embodiment are implemented.
[0197] In some embodiments, the computer readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or various devices including one or any combination of the above memories. The computer may be various computing devices including intelligent terminals and servers.
[0198] In some embodiments, executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0199] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0200] By way of example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one site, or on multiple computing devices distributed across multiple sites and interconnected by a communication network.
[0201] It should be noted that, in this article, the terms "include", "may include" or any other variations thereof are intended to cover non-exclusive inclusions, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0202] The serial numbers of the above-mentioned embodiments of the present disclosure are only for description and do not represent the advantages or disadvantages of the embodiments.
[0203] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as a read-only memory / random access memory, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a multimedia terminal device (which can be a mobile phone, a computer, a television receiver, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure.
[0204] The above descriptions are only optional embodiments of the present disclosure, and are not intended to limit the patent scope of the present disclosure. All equivalent structural transformations made using the contents of the present disclosure and the drawings under the inventive concept of the present disclosure, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present disclosure.
Claims
1. An average sampling method based on FPGA, characterized in that: include: Determine the storage space of the oscilloscope according to the preset average waveform amplitude, the storage space at least comprising a first segment storage area and a second segment storage area, the first segment storage area and the second segment storage area both comprising a plurality of storage segments; Continuously sampling based on the oscilloscope to obtain waveform data, wherein the waveform data includes multiple waveforms corresponding to preset trigger conditions; Based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments in the first segment storage area and the second segment storage area; At the same time, alternately reading the waveform data stored in the first segment storage area and the second segment storage area; Based on the preset trigger condition, determine a point data group corresponding to the target position point from the alternately read waveform data, wherein the point data group includes a plurality of point data corresponding to the plurality of waveforms at the target position point; perform parallel superposition calculation on the plurality of point data groups to obtain a plurality of data sums corresponding to the plurality of point data groups; Parallel average calculation is performed on the sums of the multiple data to obtain multiple average values corresponding to the sums of the multiple data; waveform reconstruction is performed based on the multiple average values to obtain waveform data after averaging processing.
2. The method according to claim 1, characterized in that Determining the storage space of the oscilloscope according to the preset average waveform amplitude includes: Get the external memory corresponding to the oscilloscope; Dividing the external memory into storage areas to obtain a storage area set, wherein the storage area set includes at least two storage areas, a first storage area and a second storage area; Determining the number of storage segments according to the average waveform amplitude; Based on the number of storage segments, each storage area in the storage area set is divided into storage segments to obtain a segmented storage area set, wherein the segmented storage area set at least includes a first segmented storage area corresponding to the first storage area and a second segmented storage area corresponding to the second storage area, and each of the first segmented storage area and the second segmented storage area includes a plurality of storage segments; The storage space of the oscilloscope is determined according to the segmented storage area set.
3. The method according to claim 1, characterized in that Based on the FPGA, the waveform data obtained by continuous sampling is alternately stored in a plurality of storage segments in the first segment storage area and the second segment storage area, including: storing the plurality of waveforms obtained by the first round of continuous sampling by the oscilloscope in the plurality of storage segments included in the first segmented storage area; When the first segmented storage area meets a preset storage condition, storing the plurality of waveforms obtained by the second round of continuous sampling by the oscilloscope in the plurality of storage segments included in the second segmented storage area; When the second segmented storage area meets the preset storage condition, the plurality of waveforms obtained by the third round of continuous sampling by the oscilloscope are stored in the plurality of storage segments included in the first segmented storage area.
4. The method according to claim 1, characterized in that: The alternately reading the waveform data stored in the first segment storage area and the second segment storage area includes: Reading the waveform data stored in the first segmented storage area to obtain a first waveform group; After averaging the plurality of waveforms in the first waveform group, reading the waveform data stored in the second segmented storage area to obtain a second waveform group; After averaging the plurality of waveforms in the second waveform group, the waveform data stored in the first segmented storage area is read to obtain a third waveform group.
5. The method according to claim 1, characterized in that The method of performing continuous sampling based on the oscilloscope to obtain waveform data includes: Based on the front-end ADC of the oscilloscope, analog signals are collected from the target signal source to obtain an initial digital signal; and Converting the initial digital signal into a high-speed serial digital signal; Based on the high-speed interface of FPGA, receiving the high-speed serial digital signal; and According to a preset speed reduction condition, the high-speed serial digital signal is subjected to data speed reduction processing to obtain initial waveform data; The initial waveform data is converted across clock domains to obtain the waveform data.
6. An average sampling device based on FPGA, characterized in that: include: A determination module, used to determine the storage space of the oscilloscope according to a preset average waveform amplitude, wherein the storage space at least includes a first segment storage area and a second segment storage area, and the first segment storage area and the second segment storage area each include a plurality of storage segments; A sampling module, used for performing continuous sampling based on the oscilloscope to obtain waveform data, wherein the waveform data includes a plurality of waveforms corresponding to a preset trigger condition; A storage module, used for alternately storing the waveform data obtained by continuous sampling in a plurality of storage segments in the first segment storage area and the second segment storage area based on the FPGA; A reading module, used for simultaneously and alternately reading the waveform data stored in the first segment storage area and the second segment storage area; A processing module, configured to determine, based on the preset trigger condition, a point data group corresponding to a target position point from the alternately read waveform data, wherein the point data group includes a plurality of point data corresponding to the plurality of waveforms at the target position point; and perform parallel superposition calculations on the plurality of point data groups to obtain a plurality of data sums corresponding to the plurality of point data groups; Parallel average calculation is performed on the sums of the multiple data to obtain multiple average values corresponding to the sums of the multiple data; waveform reconstruction is performed based on the multiple average values to obtain waveform data after averaging processing.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 5.
8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Seamless acquisition method based on DDR2SDRAM array segmented storage
CN103325426A
Method and apparatus for signal resampling
CN115587561A
