A Method for Massive Waveform Data Acquisition and Processing Based on FPGA
By designing database tables in FPGA and amplifying the sampling signals step by step, the problem of lag in display of massive waveform data is solved, and the effect of rapid display and positioning is achieved.
Patent Information
- Application Number
- CN202310510136.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2043-05-08
AI Technical Summary
The existing technology has problems such as lag when processing massive waveform data and cannot be displayed quickly.
The database table is designed using FPGA, and the sampled signals are sorted and segmented according to the preset sampling period, total sampling bit width and sampling duration. The signal jump information is recorded step by step, and the waveform graph is drawn on the waveform interface, and a data index is created to quickly find the signal jump of the specified signal.
It realizes the rapid display and positioning of massive waveform data, and improves the real-time and response speed of data display.
Smart Images

Figure CN116227394B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of signal acquisition and processing, and in particular to a method for acquiring and processing a large amount of waveform data based on FPGA. Background Art
[0002] For large-scale chip design, whether it is software simulation or hardware simulation, the state of signals will be acquired during the simulation process, and corresponding waveform diagrams will be generated through the changes of signals within the simulation cycle to visually display the signal state comparison. However, as the simulation cycle becomes longer and the number of observed signals increases, a large amount of signal acquisition data will be generated, and it will become very difficult to effectively organize and view these acquisition data.
[0003] The existing solution is to save the waveform data as a waveform file in VCD (VCD: Value Change Dump) format during the simulation process. Currently, most simulation tools support viewing waveform files in VCD format and also support generating waveform files in VCD format during the simulation process. However, once the size of this format of waveform file exceeds several G to reach dozens of G or even hundreds of G, it will become very slow to open and parse the VCD format waveform file, and these simulation tools will become extremely stuck or even unusable. To solve this problem, in this application, database tables are used to store waveform data, and the waveform data is scaled to achieve fast display, positioning, and scaling of a large amount of waveform data. Summary of the Invention
[0004] Aiming at the problems of lag and inability to quickly display when dealing with a large amount of waveform data in the existing technical solutions, the purpose of the present invention is to provide a method for acquiring and processing a large amount of waveform data based on FPGA, and the method includes the following steps:
[0005] S1. Design database tables, and the number of database tables is the same as the number of sampling signals;
[0006] S2. Preset a sampling period, a total sampling bit width, and a sampling duration. Arrange multiple sampling signals in sequence according to the preset total sampling bit width, acquire the original waveform data of the multiple sampling signals with the preset sampling duration to obtain the sampling data of the multiple sampling signals, segment and process the sampling data according to the preset total sampling bit width, and obtain the sampling data corresponding to each sampling signal within the preset sampling duration among the multiple sampling signals;
[0007] S3. Arbitrarily select a sampling signal from the multiple sampling signals, and perform level amplification on the sampling data corresponding to the selected sampling signal within the preset sampling duration. After The signal jump information of the post - level - amplification sampled data within the corresponding time period is recorded in the database table corresponding to the selected sampling signal, and the waveform is plotted on the waveform interface;
[0008] S4. Determine according to the preset sampling period whether the time length of the post - level - amplification sampled data meets the requirements. If the time length of the post - level - amplification sampled data meets the requirements, end the step - by - step amplification, and obtain the database table and waveform diagram corresponding to the selected sampling signal;
[0009] S5. Select another sampling signal from multiple sampling signals until each of the multiple sampling signals has been selected. After being processed through steps S3 to S4, obtain multiple database tables and waveform diagrams corresponding to the multiple sampling signals, create a data index, and search for the signal jumps of the specified sampling signal in the database tables and waveform diagrams according to the data index.
[0010] Preferably, the fields of the database table in S1 include time_index, value, and level. Among them, time_index represents the primary key of the database table, which is the simulation time, value is the simulation value, and level is the amplification level.
[0011] Preferably, the sampled data in S2 is a 0, 1 sequence. In S2, the original waveform data of multiple sampling signals is collected with a preset sampling duration to obtain the sampled data of multiple sampling signals. Specifically, it means using FPGA as the acquisition tool to read the 0, 1 sequence from the DDR memory through the data exchange interface within the preset sampling duration.
[0012] Preferably, in S2, the sampled data is segmented and processed according to the preset total sampling bit width to obtain the sampled data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration. Specifically, it includes:
[0013] S21. Segment the sampled data according to the preset total sampling bit width to obtain multiple segments of sampled data;
[0014] S22. Arbitrarily select a segment of sampled data from the multiple segments of sampled data, and extract the sampled data of each sampling signal correspondingly from the selected sampled data according to the sorting and bit width of the multiple sampling signals;
[0015] S23. Select another segment of sampled data from the multiple segments of sampled data until each segment of the multiple segments of sampled data has been selected. After being processed through step S22, obtain the sampled data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration.
[0016] Preferably, in S3, the sampled data corresponding to the selected sampling signal within the preset sampling duration is Level amplification, and record the signal jump information of the sampled data after level amplification in the corresponding time period into the database table corresponding to the selected sampling signal, specifically including:
[0017] S31. The horizontal resolution of the preset waveform display window ;
[0018] S32. Perform level amplification on the sampling data corresponding to the selected sampling signal within the preset sampling duration , that is, divide the sampling data into segments;
[0019] S33. Check whether there is a signal jump in each of the segments of the sampling data within the time period, and save the signal jump information in the database table corresponding to the selected sampling signal.
[0020] Preferably, in S4, judge whether the time length of the sampled data after level amplification meets the requirements according to the preset sampling period, specifically including:
[0021] If the time length of the sampled data corresponding to after level amplification is greater than twice the preset sampling period T, the time length of the sampled data after level amplification does not meet the requirements;
[0022] If the time length of the sampled data corresponding to after level amplification is less than or equal to twice the preset sampling period T, the time length of the sampled data after level amplification meets the requirements.
[0023] Preferably, in S4, judge whether the time length of the sampled data after level amplification meets the requirements according to the preset sampling period. If the time length of the sampled data after level amplification does not meet the requirements, perform level amplification on the sampling data corresponding to the selected sampling signal within the preset duration, and execute step S3.
[0024] Preferably, in S5, create a data index, and search for the signal jump of the specified sampling signal in the database table according to the data index, specifically including:
[0025] S51. Establish a data index according to the fields time_index and level in the database table;
[0026] S52. Search for signal jumps of a specified sampling signal in the database table and the waveform diagram according to the data index.
[0027] The above method for collecting and processing a large amount of waveform data based on FPGA includes: first, designing a database table with the same number of database tables as the number of sampling signals; then sorting multiple sampling signals, collecting and processing the original waveform data of multiple sampling signals with a preset sampling duration to obtain the sampling data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration; then gradually amplifying the sampling data corresponding to each sampling signal within the preset sampling duration, checking for signal jumps in the gradually amplified sampling data, recording the signal jump information in the database table corresponding to each sampling signal, and drawing waveforms on the waveform interface to obtain the database table and waveform diagram corresponding to each sampling signal; finally, creating a data index and searching for signal jumps of a specified sampling signal in the database table and the waveform diagram according to the data index. By storing the sampling data of sampling signals in a database table and performing gradual amplification processing on the sampling data, rapid display, positioning, and scaling of a large amount of waveform data can be achieved. Description of the Drawings
[0028] Figure 1 is a flowchart of a method for collecting and processing a large amount of waveform data based on FPGA in an embodiment of the present invention;
[0029] Figure 2 is a schematic diagram of the acquisition process for acquiring original waveform data in an embodiment of the present invention;
[0030] Figure 3 is a waveform diagram drawn using a conventional method in an embodiment of the present invention;
[0031] Figure 4 is a schematic diagram of the relationship between the waveform and the display window in an embodiment of the present invention. Detailed Embodiments
[0032] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings.
[0033] A method for collecting and processing a large amount of waveform data based on FPGA specifically includes:
[0034] S1. Design a database table with the same number of database tables as the number of sampling signals;
[0035] S2. A preset sampling period, a total sampling bit width, and a sampling duration are set. Multiple sampling signals are arranged in sequence according to the preset total sampling bit width, and the original waveform data of the multiple sampling signals is collected with the preset sampling duration to obtain the sampling data of the multiple sampling signals. The sampling data is segmented and processed according to the preset total sampling bit width to obtain the sampling data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration.
[0036] S3. Arbitrarily select one sampling signal from the multiple sampling signals, and perform stage amplification on the sampling data corresponding to the selected sampling signal within the preset sampling duration. Record the signal transition information of the sampling data after stage amplification in the corresponding time period in the database table corresponding to the selected sampling signal, and draw a waveform on the waveform interface.
[0037] S4. Determine whether the time length of the sampling data after stage amplification meets the requirement according to the preset sampling period. If the time length of the sampling data after stage amplification meets the requirement, end the stage-by-stage amplification to obtain the database table and waveform diagram corresponding to the selected sampling signal.
[0038] S5. Select another sampling signal from the multiple sampling signals until each of the multiple sampling signals is selected. After processing through steps S3 to S4, obtain multiple database tables and waveform diagrams corresponding to the multiple sampling signals, create a data index, and search for the signal transitions of the specified sampling signal in the database table and waveform diagram according to the data index.
[0039] Specifically, refer to Figure 1 , Figure 1 which is the flowchart of a method for collecting and processing a large amount of waveform data based on FPGA in an embodiment of the present invention.
[0040] First, design the database table. The number of database tables is the same as the number of sampling signals, that is, there are as many corresponding database tables as there are sampling signals. The database table is used to record the change situation of the sampling values of the sampling signals, and only when the value of the sampling signal changes will it be recorded in the corresponding database table. For example, for a sampling signal with a bit width of 1 bit, the sampling value at 1 ns is 0, and for a sampling signal with a bit width of 16 bits, the sampling value at 2 ns is b1011110010111100. All sampling signals at all times after the sampling values change need to be saved, and these sampling data (that is, sampling values) will be saved in their respective corresponding database tables.
[0041] Next, preset the sampling period, the total sampling bit width within one sampling period, and the sampling duration (the sampling duration is N sampling periods T, and the sampling duration L = N * T). Sort multiple sampling signals. Assume that the total sampling bit width within one sampling period is 1024 bits. Sort multiple sampling signals. For example, the first sampling signal S1 is a one-bit signal and is placed in the first position among the 1024 bits. The second sampling signal S2 is an 8-bit signal and is placed in the 2nd to 9th positions among the 1024 bits. The remaining sampling signals are placed in order according to their different bit numbers in sequence; collect the original waveform data of multiple sampling signals within the preset duration L to obtain sampling data. Segment and process the sampling data according to the preset total sampling bit width to obtain the original sampling data corresponding to each sampling signal within the preset sampling duration; then arbitrarily select a sampling signal from multiple sampling signals, gradually amplify the original sampling data corresponding to it within the preset sampling duration, check the signal jump situation of the sampling data after gradual amplification according to whether the signal state changes. If a signal jump occurs, record the signal jump information in the database table corresponding to the selected sampling signal and draw a waveform on the waveform interface; then check whether the time length of the sampling data after gradual amplification meets the requirements. If the time length of the sampling data after gradual amplification meets the requirements, end the gradual amplification to obtain the database table and waveform diagram corresponding to the selected sampling signal; select another sampling signal from multiple sampling signals and process it using the same method as described above until all sampling signals are processed, and correspondingly obtain multiple database tables and waveform diagrams; finally, establish a data index and search for the signal jump of the specified sampling data in the database table and waveform diagram according to the data index.
[0042] This method can conveniently locate the simulation value of a certain bit in a certain sampling signal at a specific moment, rather than searching and locating through a file.
[0043] In one embodiment, the fields of the database table in S1 include time_index, value, and level. Among them, time_index represents the primary key of the database table, which is the simulation moment, value is the simulation value, and level is the amplification level.
[0044] Specifically, refer to Table 1, and Table 1 is the database table.
[0045] The fields in Table 1 include: time_index, value, and level. Among them, time_index represents the primary key of the table, which is the simulation moment, value is the simulation value, used to record the simulation value corresponding to the current simulation moment, and level is the amplification level, that is, the scaling level.
[0046] The database table is used to record the simulation time of the sampled signal, the simulation value at this simulation time, and the data scaling level. The simulation time refers to a certain moment within a simulation period. Each simulation time corresponds to a simulation value of 0 or 1, which is used to represent the simulation state, where 0 represents low level and 1 represents high level.
[0047] Table 1 Database Table
[0048]
[0049] In Table 1, for a certain sampled signal within a simulation period, when the simulation time is "2", the simulation value of this sampled signal is "0", and the amplification level is "2", indicating that when this sampled signal is at the simulation time of "2", the state after 2 - stage amplification is "low level".
[0050] In one embodiment, the sampled data in S2 is a 0, 1 sequence. In S2, the original waveform data of multiple sampled signals is collected with a preset sampling duration to obtain the sampled data of multiple sampled signals. Specifically, it means using an FPGA as the acquisition tool to read the 0, 1 sequence from the DDR memory through a data exchange interface within the preset sampling duration.
[0051] Specifically, refer to Figure 2 , Figure 2 which is the schematic diagram of the acquisition process for collecting the original waveform data in an embodiment of the present invention.
[0052] The original waveform data truly reflects the simulation value of the sampled signal at a certain simulation time. The simulation values are represented by 0, 1, Z, X respectively, which represent four simulation states of low level, high level, high impedance, and unknown in sequence.
[0053] Collecting the original waveform data of multiple sampled signals specifically means using multiple FPGAs as acquisition tools to read the 0, 1 sequence from the DDR memory respectively through a data exchange interface. For example:
[0054] 0111010010010010010010100100100101........010101.
[0055] In one embodiment, in S2, the sampled data is segmented and processed according to a preset total sampling bit width to obtain the sampled data corresponding to each sampled signal within the preset sampling duration for each of the multiple sampled signals. Specifically, it includes:
[0056] S21: Segment the sampled data according to the preset total sampling bit width to obtain multiple segments of sampled data;
[0057] S22. Arbitrarily select one segment of the multi-segment sampled data, and extract the sampled data of each sampling signal from the selected sampled data according to the sorting and bit width of the multiple sampling signals;
[0058] S23. Select another segment of the multi-segment sampled data again from the multi-segment sampled data until each segment of the multi-segment sampled data is selected. After being processed by step S22, the sampled data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration is obtained.
[0059] Specifically, assume that the total sampling bit width within one sampling period is 1024 bits. Before sampling, first sort the multiple sampling signals. For example, the first sampling signal S1 is a 1-bit signal and is placed at the first position among the 1024 bits. The second sampling signal S2 is an 8-bit signal and is placed at the 2nd to 9th positions among the 1024 bits. The remaining sampling signals are placed in sequence according to their different bit widths. The sampled data collected for the multiple sampling signals within the preset sampling duration L, that is, the 0, 1 sequence, is segmented into groups of 1024 bits each. Each 1024-bit 0, 1 sequence represents one sampling of the multiple sampling signals within one sampling period T. Thus, multiple 1024-bit 0, 1 sequences corresponding to the multiple sampling signals in multiple sampling periods are obtained; then, according to the sorting and bit width of the multiple sampling signals, the 0, 1 sequence corresponding to each sampling signal is extracted from each 1024-bit 0, 1 sequence. For example, the bit width of the first sampling signal S1 is 1 bit, and the bit width of the second sampling signal S2 is 8 bits. Taking the first 1024-bit 0, 1 sequence as an example, the first sampling signal S1 corresponds to the first bit among the 1024 bits, and the sampled data extracted is "0". The second sampling signal S2 corresponds to the 2nd to 9th bits among the 1024 bits, and the sampled data extracted is "10101010". In the same way, the 0, 1 sequences corresponding to other sampling signals can be obtained, which will not be elaborated here. The sampled data (that is, the extracted 0, 1 sequence) extracted for each sampling signal within each sampling period constitutes the sampled data corresponding to this sampling signal within the preset sampling duration L.
[0060] In one embodiment, in S3, the sampled data corresponding to the selected sampling signal within the preset sampling duration is amplified by levels, and the signal transition information of the sampled data after being
[0061] amplified by levels within the corresponding time period is recorded in the database table corresponding to the selected sampling signal, specifically including:
[0062] S31. Preset the horizontal resolution of the waveform display window ; Level amplification, that is, dividing the sampled data into segments;
[0063] S33. Check whether there is a signal jump in each segment of the segmented sampled data within the
[0064] time period, and record the signal jump information in the database table corresponding to the selected sampling signal. Figure 3 Specifically, refer to Figure 3 which is a waveform diagram drawn by a conventional method in an embodiment of the present invention.
[0065] Read the original waveform data from the memory, which can be read from the memory during the simulation process or uniformly read from the memory after meeting certain conditions. When the sampling signal is specifically a clock signal, since the clock signal changes in each sampling period, a record will be saved for the clock signal in each sampling period. In this way, the saved data will be extremely large.
[0066] The conventional method for drawing a waveform diagram is as follows: if the signal state of a certain sampling signal is 0 at a certain moment, draw a waveform like this " ", and if the signal state is 1 at a certain moment, draw a waveform like this " ". The drawn waveform diagram is as shown in Figure 3 which shows the waveform diagrams corresponding to different sampling signals (where CLK represents the clock signal). Figure 3 In Figure 3 , the abscissa represents the moment, and the corresponding serrated graph represents the high and low levels. As can be seen from Figure 3 , it is almost impossible to directly draw a waveform diagram for a large amount of original waveform data using the conventional method. For example, when previewing the waveform diagram of some signals from the 0 moment to the 100 million ns moment, in extreme cases, the waveform may need to be drawn hundreds of millions of times on the graphic display interface. Even with algorithm optimization, a large amount of calculation is required, which will cause obvious lags in the interface display and make it unusable.
[0067] Based on the above existing problems, it is necessary to process the large amount of original waveform data. Refer to Table 2, which shows the comparison of the drawing time-consuming at different magnification levels when the horizontal resolution of the waveform display window is fixed for waveform data in different time ranges.
[0068] Table 2
[0069]
[0070] As can be seen from Table 2, when refreshing the waveform data on the waveform display interface, if the data is too large (large data means waveform data over a longer time period), real-time refreshing cannot be achieved, while the smaller the waveform data (small data means waveform data over a shorter time period), the faster the refreshing, which is usually referred to as not being stuck. For existing general displays, the horizontal resolution of the waveform display window generally does not exceed 2000px, which means that a pixel point may represent the waveform data over a period of time. Based on this, when processing the sampled data collected in the application, the method is as follows:
[0071] See Figure 4 , Figure 4 is a schematic diagram showing the relationship between the waveform and the display window in an embodiment of the present invention.
[0072] Taking one of the multiple sampling signals as an example to illustrate the processing process:
[0073] First, preset the sampling duration to 100 million ns, and the horizontal resolution of the waveform display window is 2000px. Perform first-level amplification on the sampling data of a certain sampling signal within a duration of 100 million ns, that is, divide the sampling data within a duration of 100 million ns into 2000 segments, each segment corresponding to the original sampling data within a duration of 50000 ns. Record the signal jump information of these 2000 segments (only record when the signal state changes) in the database table corresponding to this sampling signal, and draw the waveform on the graphical interface. In this way, only recording at most 2000 signal jump information can meet the requirement of real-time viewing of this sampling signal. The signal jump information includes the simulation time, simulation value, and amplification level.
[0074] Taking the first segment after the sampling data of a certain sampling signal is divided into 2000 segments as an example, all the first-segment sampling data is drawn on the first pixel of the waveform display window. There were originally multiple sampling data in the first-segment sampling data, and after processing, there is only one data, and only one drawing is required.
[0075] Perform second-level amplification on the sampling data of the above sampling signal within a duration of 100 million ns, that is, divide the sampling data within a duration of 100 million ns into 4000 segments, each segment corresponding to the sampling data within a duration of 25000 ns. Record the signal jump information of these 4000 segments (only record when the signal state changes) in the database table corresponding to this sampling signal, and draw the waveform on the graphical interface.
[0076] And so on, perform successive amplification on the sampling data of the above sampling signal within a duration of 100 million ns, and record the signal jump information (only record when the signal state changes) in the database table corresponding to this sampling signal, and draw the waveform on the graphical interface.
[0077] During the process of gradually amplifying the sampled data, each time the jump information of 2000 segments of sampled signals is processed. This is to ensure the timeliness of querying and plotting the waveform diagram. Therefore, processing the sampled data of the sampled signal into multiples of 2000 segments according to the amplification level is the key to the amplification process. During the process of gradually amplifying the sampled data of the sampled signal within the preset sampling duration, the recorded signal jump information includes the simulation time, simulation value, and amplification level. In this way, when searching for data according to the amplification level and time range (the time range is from the starting simulation time to the ending simulation time), the amount of data to be processed each time will not exceed a fixed quantity (2000 segments), which not only ensures the waveform data is not distorted but also enables a quick response, greatly improving the real-time performance of data display.
[0078] In one embodiment, in S4, it is judged whether the time length of the sampled data after -level amplification meets the requirements according to the preset sampling period, specifically including:
[0079] If the time length of the sampled data corresponding to after -level amplification is greater than twice the preset sampling period T, the time length of the sampled data after -level amplification does not meet the requirements;
[0080] If the time length of the sampled data corresponding to after -level amplification is less than or equal to twice the preset sampling period T, the time length of the sampled data after -level amplification meets the requirements.
[0081] In one embodiment, in S4, it is judged whether the time length of the sampled data after -level amplification meets the requirements according to the preset sampling period. If the time length of the sampled data after -level amplification does not meet the requirements, the sampled data corresponding to the selected sampled signal within the preset duration is -level amplified, and step S3 is executed.
[0082] Specifically, it is judged whether the time length of the sampled data after -level amplification meets the requirements until the time length of the sampled data after -level amplification is less than or equal to twice the preset sampling period, that is, , the gradual amplification ends, and the database table and waveform diagram corresponding to the sampled signal are obtained. Otherwise, the sampled data corresponding to the selected sampled signal within the preset duration needs to be -level amplified, the signal jump information within the corresponding time period is recorded and the waveform is plotted on the waveform interface, and it is judged whether after Whether the time length of the sampled data after stage - by - stage amplification is less than or equal to twice the preset sampling period. If it is less than or equal to twice the preset sampling period, end the stage - by - stage amplification to obtain the database table and waveform diagram corresponding to the sampling signal.
[0083] In one embodiment, S5 creates a data index and searches for signal jumps of a specified sampling signal in the database table according to the data index. Specifically, it includes:
[0084] S51: Create a data index based on the fields time_index and level in the database table;
[0085] S52: Search for signal jumps of the specified sampling signal in the database table and waveform diagram according to the data index.
[0086] Specifically, the sampled data of each sampling signal is processed in stages and a data index is created. The data index includes the simulation time and amplification level of the sampled data. When searching for signal jumps of a specified sampling signal with the simulation time and amplification level as query conditions, only a fixed - size sampled data needs to be processed each time, and the processing time is controllable.
[0087] The above - mentioned method for collecting and processing massive waveform data based on FPGA first designs a database table, and the number of database tables is the same as the number of sampling signals; then sorts multiple sampling signals, collects and processes the original waveform data of multiple sampling signals with a preset sampling duration to obtain the sampled data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration; then amplifies the sampled data corresponding to each sampling signal within the preset sampling duration in stages, checks the signal jumps of the sampled data after stage - by - stage amplification, records the signal jump information in the database table corresponding to each sampling signal, and draws waveforms on the waveform interface to obtain the database table and waveform diagram corresponding to each sampling signal; finally, creates a data index and searches for signal jumps of a specified sampling signal in the database table and waveform diagram according to the data index. By storing the sampled data of sampling signals in a database table and performing stage - by - stage amplification processing on the sampled data, fast display, positioning, and scaling of massive waveform data can be achieved.
[0088] The above has introduced in detail a method for collecting and processing massive waveform data based on FPGA. Specific examples are used in this article to elaborate on the principle and implementation manner of the present invention. The description of the above embodiments is only used to help understand the core idea of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A method for collecting and processing a large amount of waveform data based on FPGA, characterized in that, The method includes: S1. Design database tables, where the number of the database tables is the same as the number of sampling signals; S2. Preset a sampling period, a total sampling bit width, and a sampling duration. Arrange multiple sampling signals in sequence according to the preset total sampling bit width, collect the original waveform data of the multiple sampling signals with the preset sampling duration to obtain the sampling data of the multiple sampling signals, segment and process the sampling data according to the preset total sampling bit width to obtain the sampling data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration; S3. Arbitrarily select one sampling signal from the multiple sampling signals, and perform stage amplification on the sampling data corresponding to the selected sampling signal within a preset sampling duration, and record the signal jump information of the sampling data after stage amplification within the corresponding time period in the database table corresponding to the selected sampling signal, and draw a waveform on the waveform interface; S4. Determine whether the time length of the sampled data after being amplified by the levels meets the requirement according to a preset sampling period. If the time length of the sampled data after being amplified by the levels meets the requirement, end the step-by-step amplification, and obtain the database table and waveform diagram corresponding to the selected sampling signal; S5. Select another sampling signal from the multiple sampling signals until each of the multiple sampling signals is selected. After being processed through steps S3 to S4, obtain multiple database tables and waveform diagrams corresponding to the multiple sampling signals, create a data index, and search for signal jumps of a specified sampling signal in the database tables and waveform diagrams according to the data index.
2. The method for collecting and processing massive waveform data based on FPGA according to claim 1, wherein In S1, the fields of the database table include time_index, value, and level, where time_index represents the primary key of the database table, which is the simulation time, value is the simulation value, and level is the amplification level.
3. The method for collecting and processing a large amount of waveform data based on FPGA according to claim 2, characterized in that, The sampling data in S2 is a 0, 1 sequence. Collecting the original waveform data of the multiple sampling signals with the preset sampling duration in S2 to obtain the sampling data of the multiple sampling signals specifically means using an FPGA as the acquisition tool to read the 0, 1 sequence from the DDR memory through a data exchange interface within the preset sampling duration.
4. The method for collecting and processing a large amount of waveform data based on FPGA according to claim 3, characterized in that Segmenting and processing the sampling data according to the preset total sampling bit width in S2 to obtain the sampling data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration specifically includes: S21. Segment the sampling data according to the preset total sampling bit width to obtain multiple segments of sampling data; S22. Arbitrarily select a segment of sampling data from the multiple segments of sampling data, and extract the sampling data of each sampling signal correspondingly from the selected sampling data according to the sorting and bit width of the multiple sampling signals; S23. Select another segment of sampling data from the multiple segments of sampling data until each segment of the multiple segments of sampling data is selected. After being processed through step S22, obtain the sampling data corresponding to each sampling signal among the multiple sampling signals within the preset sampling duration.
5. The method for collecting and processing a large amount of waveform data based on FPGA according to claim 4, wherein In S3, perform stage amplification on the sampled data corresponding to the selected sampling signal within the preset sampling duration, and record the signal jump information of the sampled data after stage amplification within the corresponding time period in the database table corresponding to the selected sampling signal, specifically including: S31, the horizontal resolution of the preset waveform display window ; S32. Perform level amplification on the sampling data corresponding to the selected sampling signal within the preset sampling duration , that is, divide the sampling data into segments; S33. Check whether there is a signal jump in each segment of the segment sampling data within the time period, and save the signal jump information in the database table corresponding to the selected sampling signal.
6. The method for collecting and processing a large amount of waveform data based on FPGA according to claim 5, characterized in that In step S4, it is judged whether the time length of the sampled data after being amplified by the preset sampling period meets the requirements, which specifically includes: If the time length corresponding to the sampled data after being amplified by -stage amplification is greater than twice the preset sampling period T, the time length of the sampled data after being amplified by -stage amplification does not meet the requirements; If the time length corresponding to the sampled data after being amplified by levels is less than or equal to twice the preset sampling period T, the time length of the sampled data after being amplified by levels meets the requirement.
7. The method for collecting and processing a large amount of waveform data based on FPGA according to claim 6, wherein In S4, it is judged according to a preset sampling period whether the time length of the sampled data after stage amplification meets the requirements. If the time length of the sampled data after stage amplification does not meet the requirements, the sampled data corresponding to the selected sampling signal within a preset time length is stage amplified, and step S3 is executed.
8. The method for acquiring and processing massive waveform data based on FPGA according to claim 7, characterized in that, Creating a data index in S5 and searching for signal jumps of a specified sampling signal in the database table according to the data index specifically includes: S51. Establish a data index according to the fields time_index and level in the database table; S52. Search for signal jumps of a specified sampling signal in the database table and waveform diagram according to the data index.
Citation Information
Patent Citations
Quick adjusting method for display waveform brightness of digital three-dimension oscilloscope
CN102075774A
Mass simulation waveform data slicing method for FPGA parallel simulation
CN114398217A