Rolling data stream digital comparison and coordinate capture apparatus and method based on comparison tree
By using a comparison tree-based rolling data stream digital comparison and coordinate capture device, the latency and hardware complexity issues of real-time processing of large-scale data streams are solved, achieving efficient and stable data stream processing and accurate data point positioning.
Patent Information
- Application Number
- CN202411675959.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2044-11-22
AI Technical Summary
Existing technologies struggle to meet real-time processing requirements when handling large-scale and rapidly changing data streams, exhibiting issues such as high processing latency, high hardware complexity, synchronization delays, and data conflicts.
A rolling data stream digital comparison and coordinate capture device based on a comparison tree is adopted, including an input processing module, a subgroup comparison module, and a global comparison module. Through hierarchical comparison and coordinate capture, highly parallel processing and pipelined processing of grouped data are achieved, reducing the number of hardware units and synchronization delay, and ensuring the continuity and stability of data processing.
It significantly improves the real-time processing speed of data streams, reduces hardware design complexity and cost, enhances system stability and throughput, and ensures the accuracy of data point positioning and processing precision.
Smart Images

Figure CN119621310B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application provides a rolling data stream digital comparison and coordinate capture device and method based on a comparison tree, and belongs to the field of digital integrated circuits. BACKGROUND
[0002] Rolling data stream processing plays a key role in various real-time data analysis scenarios, including sensor network monitoring, financial market analysis, communication data packet processing, and video stream processing. These applications require the system to compare, filter, and locate a large amount of data that continuously appears in the data stream in real time, in order to capture key data points and their coordinate information.
[0003] The current mainstream data stream processing scheme mainly includes two kinds. The first kind is a traditional buffer-based data stream processing scheme, which mainly relies on a large-capacity buffer. The data is usually stored in batches and then read and processed in batches. This scheme has the advantages of simple structure and reduced real-time operation pressure in the data processing process. However, it has the disadvantages of high processing delay when facing large-scale and rapidly changing data streams, and cannot meet the real-time processing requirements. In addition, the storage space of the buffer is limited, and the continuous growth of the data stream may cause buffer overflow or processing efficiency decline.
[0004] The second scheme adopts a parallel processing architecture, which processes input data through multiple processing units in parallel. Each unit includes an independent data processing module. This scheme can significantly improve the processing speed of the system, effectively utilize hardware resources for efficient computation, and improve the system throughput. However, it has the disadvantages of high hardware complexity and synchronization delay and data conflict problems caused by the dependency relationship between multiple data blocks. SUMMARY
[0005] In order to ensure that the real-time processing requirements can be met, the high processing efficiency is maintained, and the hardware design complexity is reduced and the hardware resource optimization is realized, the application provides a rolling data stream digital comparison and coordinate capture device and method based on a comparison tree.
[0006] The technical scheme of the device of the application is as follows:
[0007] The application discloses a rolling data stream digital comparison and coordinate capturing device based on a comparison tree, which comprises an input processing module, a sub-group comparison module and a global comparison module, wherein the input processing module is connected with the sub-group comparison module, and the sub-group comparison module is connected with the global comparison module; the input processing module is used for receiving input data, performing bit extension according to the parity of the data, and triggering a comparison enabling signal to provide comparison data and X coordinate offset information; the sub-group comparison module is used for judging local extreme values of the received data sub-group based on a comparison tree structure, and simultaneously capturing and outputting corresponding coordinate information; and the global comparison module is used for collecting local extreme value information of each data sub-group, and determining global extreme values of the whole data stream and corresponding coordinates through a continuous comparison process.
[0008] S1, data processing is performed, input data datain and an input data valid signal datain_vld are received by the input processing module, bit extension is performed according to the parity of the data, and a comparison enabling signal is triggered to record X coordinate inter-group position offset intergroup_offset of comparison data;
[0009] S2, the sub-group comparison module receives comparison data cmp_data, a row comparison enabling signal cmp_start and the X coordinate inter-group position offset intergroup_offset output by the input processing module, judges local extreme values of the received data group based on a comparison tree structure according to the above information, and simultaneously captures corresponding coordinate information in parallel;
[0010] S3, the global comparison module receives a two-dimensional array extreme_group capable of representing local extreme value information of each group of a single row and a one-dimensional array extreme_group_vld representing global comparison trigger information output by the sub-group comparison module in step S2; when trigger signals are written into the one-dimensional array extreme_group_vld in sequence, global extreme values of the whole data stream and corresponding coordinates are obtained through a continuous comparison process of the local extreme values.
[0011] Compared with the prior art, the application has the following advantages:
[0012] (1) The device adopts a comparison tree structure to process a data stream, realizes high parallel processing and pipelining of grouped data through hierarchical comparison and coordinate capturing, greatly improves real-time processing speed of the data stream, can realize real-time processing of large-scale and rapidly changing data streams, significantly reduces processing delay, and better meets real-time data analysis requirements.
[0013] (2) Unlike traditional architectures that rely on a large number of parallel processing units, the comparison tree structure of the present application effectively reduces the number of hardware units and synchronization delays through recursive comparison logic. This optimization not only reduces the complexity and cost of hardware design, but also improves the stability and reliability of the system, making the system more stable and reliable while maintaining high processing efficiency.
[0014] (3) The present application ensures the continuity and stability of data processing by designing sub-group comparison modules and global comparison modules. The sub-group comparison module can quickly identify local extreme values and capture relevant coordinates, while the global comparison module is responsible for summarizing these local information and determining the global extreme value. This structure effectively reduces the dependence and conflict between data blocks, improves the overall throughput of the system, and ensures the realization of complete pipelining processing.
[0015] (4) The present application simplifies the complex data flow processing process and enhances the positioning accuracy through the method of hierarchical processing and step-by-step comparison. The row-by-row rolling and step-by-step comparison process of input data makes the capture of local extreme values and the determination of global extreme values more accurate, ensuring that the positioning of each data point in the data stream accurately reflects its relative position in the global data stream. This method ensures real-time performance while greatly improving the accuracy and reliability of data processing. BRIEF DESCRIPTION OF DRAWINGS
[0016] Figure 1 is a block diagram of the hardware device in embodiment 1 of the present application;
[0017] Figure 2 is a functional block diagram of max pooling in embodiment 2 of the present application;
[0018] Figure 3 is a data flow diagram of the hardware device in embodiment 2 of the present application;
[0019] Figure 4 is a comparison tree structure diagram of the comparison tree submodule in embodiment 2 of the present application;
[0020] Figure 5 is a data comparison timing diagram of the hardware device in embodiment 2 of the present application. DETAILED DESCRIPTION
[0021] Embodiment 1
[0022] This embodiment provides a digital comparison and coordinate capture device for rolling data flow based on comparison tree structure, and the device block diagram is as follows Figure 1As shown, the input processing module, the sub-group comparison module and the global comparison module are connected, the input processing module and the sub-group comparison module are connected, and the sub-group comparison module is connected with the global comparison module; the data size of the output of the upper device is m*n, every p data is a data group, every row contains q data groups, wherein q is m / p, and single pulse single data group is output row by row; the input processing module is used for receiving input data, performing bit extension according to the parity of the data, and outputting a row comparison enable signal to provide comparison data and X coordinate offset information; the sub-group comparison module is based on the comparison tree structure to judge the local extreme value of the received data group, and simultaneously capture and output the corresponding coordinate information; the global comparison module is used for collecting the local extreme value information of each sub-group, and determining the global extreme value of the entire data stream and the corresponding coordinate through a continuous comparison process.
[0023] In the embodiment, the input processing module includes two digital input signals and three digital output signals, wherein the two digital input signals are input data datain and input data valid signal datain_vld, and the three digital output signals include comparison data cmp_data, row comparison enable cmp_start and X coordinate group position offset intergroup_offset. The input processing module specifically includes a data register, a D flip-flop and a counter. The data register is used for processing input data, performing parity bit extension, and recording the number of data groups in a single clock cycle as p. When p is an odd number, the register automatically fills zero in the high bit of the input data, and the combined output is the comparison data cmp_data. When p is an even number, the data register directly stores the input data. The input data valid signal datain_vld is transmitted to the D flip-flop and outputs the row comparison enable cmp_start. The counter counts the number of received data groups, representing the X coordinate group position offset intergroup_offset of the input data in a single row.
[0024] The sub-group comparison module includes 3 digital input signals and 2 digital output signals, wherein the 3 digital input signals are respectively the data to be compared cmp_data, the row comparison enable cmp_start and the X coordinate inter-group position offset intergroup_offset, and the 2 digital output signals include a two-dimensional array extreme_group capable of representing the local extreme value information of each group of a single row and a one-dimensional array extreme_group_vld representing the global comparison trigger information, and each data bit of the one-dimensional array extreme_group_vld is a global comparison trigger signal lasting 1 clock cycle. The sub-group comparison module specifically includes k comparison tree sub-modules, a coordinate capture sub-module and a register group, wherein k is the total column number / the number of columns processed by a single comparison tree sub-module; each comparison tree sub-module outputs the extreme value of each adjacent pair of data of a single group to the coordinate capture sub-module after 1-level comparison judgment, and the coordinate capture sub-module outputs the corresponding coordinates in parallel in the format of {X coordinate, Y coordinate, extreme value} and stores them in the 1-level register of the comparison tree sub-module for subsequent comparison judgment by the comparison tree sub-module.
[0025] The comparison tree sub-module is based on a comparison tree structure and specifically includes a comparison logic module, a D flip-flop, a multi-level comparator and a register. Each level of the comparison logic module includes a group of parallel working comparators, and through the multi-level comparison logic, the input data is gradually reduced recursively, and finally the extreme value is output. Specifically, the 1st comparison tree sub-module transmits the row comparison enable cmp_start to the D flip-flop 1 to output the trigger signal cmp_en_next of the next comparison tree sub-module and enters 1-level comparison judgment, divides each adjacent two of the data to be compared into a pair, performs comparison in parallel, and transmits the result of each pair of comparison to the 1-level register for storage; in the next clock cycle, the comparison tree sub-module enters 2-level comparison judgment, compares the data bits in the 1-level register in parallel and pair by pair, and transmits the result to the 2-level register for storage, while the 2nd comparison tree sub-module enters 1-level comparison judgment in the 2nd comparison tree sub-module according to the signal cmp_en_next; in this way, until the comparison judgment of the 1st comparison tree sub-module is completed, the D flip-flop 2 in the 1st comparison tree sub-module outputs a global comparison trigger signal lasting 1 clock cycle, which is transmitted to the lowest bit of the global comparison module extreme_group_vld signal, and the first group of data extreme values in the highest level register are transmitted to the lowest bit of the global comparison module extreme_group. In the subsequent k-1 clock cycles, each clock cycle obtains the data extreme value and the corresponding global comparison trigger signal output by each comparison tree sub-module in turn, and they are transmitted to the corresponding data bits of extreme_group and extreme_group_vld respectively.
[0026] The coordinate capture submodule includes 3 digital input signals and 2 digital output signals, wherein the 3 digital input signals are X coordinate intergroup position offset intergroup_offset, row comparison enable cmp_start and trigger signal cmp_en_next of the next comparison tree submodule output by each comparison tree submodule, and the 2 digital output signals are two-dimensional array coord_X representing X coordinate and Y coordinate coord_Y. The coordinate capture submodule specifically includes a signal selector and a counter, which are output in parallel with the comparison tree submodule; specifically, the selector of the 1st coordinate capture submodule selects according to the row comparison enable cmp_start and the result of the 1st comparison tree submodule 1st comparison judgment, the selector of the 2nd coordinate capture submodule selects according to the cmp_en_next output by the 1st comparison tree submodule and the result of the 2nd comparison tree submodule 1st comparison judgment, and the output is one-dimensional array intragroup_offset representing the comparison result of the intragroup position offset information, according to the three X coordinate related signals of the one-dimensional array intragroup_offset, the X coordinate intergroup position offset intergroup_offset and the number of data in each group p, the extreme value X coordinate of each pair of adjacent data in the group is determined, that is, coord_X, and the two-dimensional array coord_X is p*intergroup_offset+intragroup_offset; the counter counts the number of received data rows, representing the Y coordinate coord_Y of the input data.
[0027] The global comparison module includes two digital input signals and one digital output signal, wherein the two digital input signals are respectively a two-dimensional array extreme_group capable of representing local extreme value information of each group of a single row and a one-dimensional array extreme_group_vld representing global comparison trigger information, and the digital output signal is a signal frame_data including global extreme value and corresponding coordinate information. The global comparison module specifically includes a comparison logic module, a counter, a state machine and a register, wherein the counter counts the number of data rows completing subgroup comparison according to the one-dimensional array extreme_group_vld, and the counting period is the total number of data rows; the working states of the state machine include S0 (standby state), S1 (first group reading state), S2 (global comparison state) and S3 (global output state); the global comparison module is first in the S0 standby state, and is selected to enter the S1 first group reading state according to the counter and the lowest bit of the extreme_group_vld signal, and the register is updated to the first local extreme value of the first row as the initial global extreme value; then jumps to the S2 global comparison state, reads the value of the corresponding position of the two-dimensional array extreme_group according to the one-dimensional array extreme_group_vld, and the comparison logic module continuously compares the read data bit and the data in the register, and the comparison result is retained in the register as the updated global extreme value for the next comparison after each comparison, and the process of reading and comparing is repeated until the comparison of the last row is completed, and the S3 global output state is entered to obtain the global extreme value and the coordinate output.
[0028] The embodiment also provides an implementation method of the hardware device, and the method includes the following steps:
[0029] S1, data processing is performed, the input data datain and the input data valid signal datain_vld are received by the input processing module, bit extension is performed according to the parity of the data, and a row comparison enable is triggered, and the X coordinate group position offset intergroup_offset of the to-be-compared data is recorded;
[0030] S2, the subgroup comparison module receives the to-be-compared data cmp_data, the row comparison enable cmp_start and the X coordinate group position offset intergroup_offset output by the input processing module, and judges the local extreme value of the received data group based on the comparison tree structure according to the above information, and simultaneously and in parallel captures the corresponding coordinate information;
[0031] S3, the global comparison module receives the two-dimensional array extreme_group capable of representing each group of local extreme value information of a single row output by the sub-group comparison module in step S2 and the one-dimensional array extreme_group_vld representing the global comparison trigger information; when the trigger signal is written into the one-dimensional array extreme_group_vld, the global extreme value of the entire data stream and the corresponding coordinates are obtained through the continuous comparison process of the local extreme value.
[0032] Embodiment 2
[0033] The hardware device of embodiment 1 is designed as a max pooling layer device capable of realizing real-time extraction of the maximum value of a specified window. In this embodiment, the relevant parameters and indicators are exemplified as follows: the data size output by the upper device is 1920x1080, the size of 120x120 is a partition, there are 16x9 partitions in total, the design requirement is to extract the maximum value of each partition and the corresponding relative coordinates in real time; every 15 data is a data group, each row of each partition contains 8 data groups, each data is 8 bits, the upper device outputs the data stream row by row at a clock frequency of 100 MHZ, 120 bits per beat; the input processing module receives 120 bits of data under a single pulse, the function realized in this embodiment is as shown in Figure 2 The output data requirement is the maximum value of 16x9 partitions and the corresponding relative coordinates.
[0034] The specific block diagram of the data comparison and coordinate capture device provided in this embodiment is as shown in Figure 3 According to the fact that each row of each partition contains 8 data groups, Figure 3 Each sub-group comparison module contains 8 comparison tree sub-modules and a coordinate capture module; since there are 16x9 partitions in total in this embodiment, data comparison and coordinate capture are required, Figure 3 The global comparison module is increased with a memory Memory, which temporarily stores the extreme value of a single row of a single partition according to the read enable rd_en and the write enable wr_en of the memory, and reads out the extreme value in advance by one clock cycle after the extreme value of the next row of the partition is ready.
[0035] The specific data comparison and coordinate capture process is exemplified as follows:
[0036] The first group of the input data datain of the superior device is 0x03_0507_080a_181a_1001_0203_0506_072e, the input processing module receives the input data datain according to the signal datain_vld, since the next group of the single pulse is 15 data, 15 is an odd number, thus the input processing module performs bit extension on the input data, and the extended data to be compared cmp_data is 0x0003_0507_080a_181a_1001_0203_0506_072e, which is 16 data; at the same time, the row comparison enable cmp_start is triggered according to the signal datain_vld, as the trigger signal of the first comparison tree submodule and the first coordinate capture submodule, the recursive comparison process of the first comparison tree submodule is as follows Figure 4As shown, the row comparison enables cmp_start to be pulled high in the first clock cycle, and the 1st level comparison is entered. The adjacent 8 pairs of data are compared in parallel, and 0x0307_0a1a_1003_062e is obtained. The data number is 8. In the second clock cycle, the 2nd level comparison is entered. The adjacent 4 pairs of data of 0x0307_0a1a_1003_062e are compared in parallel, and 0x071a_102e is obtained. The data number is 4. In the third clock cycle, the 3rd level comparison is entered. The adjacent 2 pairs of data of 0x071a_102e are compared in parallel, and 0x1a2e is obtained. The data number is 2. In the fourth clock cycle, the 4th level comparison is entered. The 1 pair of data of 0x1a2e is compared, and 0x2e is obtained as the local extreme value of the 1st group data. The lowest bit of the one-dimensional array extreme_group_vld maintains high level for 1 clock cycle. At the same time, in the first clock cycle after the row comparison enables cmp_start is pulled high, the cmp_en_next of the 1st comparison tree submodule is pulled high for 1 clock cycle, which is the trigger signal of the 2nd comparison tree submodule. The 2nd group of input data datain is also compared in the same way as the 1st group of data, and the local extreme value of the 2nd group of data is obtained. The lowest 2 bits of the one-dimensional array extreme_group_vld maintain high level for 1 clock cycle. The coordinate capture process of the 1st coordinate capture submodule is parallel to the 1st level comparison of the 1st comparison tree submodule. At this time, the intergroup_offset is 0, and the Y coordinate coord_Y is 0, indicating the 1st group data of the 1st row. For the compared data 0x0307_0a1a_1003_062e, the intragroup_offset from low to high is 0, 2, 4, 7, 8, 10, 12, 14, and the number of data p of each group is 15. Therefore, the corresponding coordinates are (0, 0), (2, 0), (4, 0), (7, 0), (8, 0), (10, 0), (12, 0), (14, 0), and the combination of data bits is (0, 0, 0x03), (2, 0, 0x07), (4, 0, 0x0a), (7, 0, 0x1a), (8, 0, 0x10), (10, 0, 0x03), (12, 0, 0x06), (14, 0, 0x2e). In the next three levels of comparison, only the data bits are compared, and the coordinate bits follow the data bits to be stored.
[0037] When the lowest bit of the one-dimensional array extreme_group_vld is pulled high, Figure 5As shown, wr_data is the register of the global comparison module, wr_data is updated as the first local extreme value of the first row, and (14, 0, 0x2e) is taken as the initial global extreme value; when the lower 2 bits of the one-dimensional array extreme_group_vld are pulled high, the sub-group comparison module obtains the local extreme value of the second group as (13, 0, 0x2f), the global comparison module jumps to the global comparison state, 0x2e and 0x2f are compared, and the register wr_data is updated as (13, 0, 0x2f); in this way, until the comparison of the 8 local extreme values of the first row of the first partition is completed, the final extreme value of the first row of the first partition is obtained, the write enable wr_en is pulled high, the extreme value is stored in the memory, and the comparison process of the first row of the second partition is continued, until the comparison of the final extreme value of the first row of the 16th partition is completed; before the comparison of the first local extreme value of the second row of the first partition is completed, the read enable rd_en is pulled high one clock cycle in advance, the register wr_data is updated as the final extreme value of the first row of the first partition taken out from the memory, and the comparison of the second row is continued; until the comparison of the 120x120 data of the first partition is completed, the global extreme value of the first partition and the corresponding coordinates are obtained and output to the next stage through frame_data, and in this way, the data processing flow of pipelining is formed.
[0038] The data comparison and coordinate capture device in the embodiment can efficiently meet the real-time processing requirements of large-scale and rapidly changing rolling data streams, and is particularly suitable for application scenarios requiring rapid analysis of a large amount of data, such as sensor network monitoring, financial market analysis, communication data packet processing, and video stream processing.
Claims
1. A rolling data stream digital comparison and coordinate capture device based on a comparison tree, characterized in that, The device comprises an input processing module, a sub-group comparison module and a global comparison module, the input processing module and the sub-group comparison module are connected, and the sub-group comparison module is connected with the global comparison module; The input processing module is used for receiving input data, performing bit extension according to the parity of the data, and outputting a row comparison enable signal to provide the data to be compared and X coordinate offset information; The sub-group comparison module is used for judging local extreme values of the received data sub-groups based on a comparison tree structure, and simultaneously capturing and outputting corresponding coordinate information; The global comparison module is used for collecting local extreme value information of each data sub-group, and determining a global extreme value of the entire data stream and corresponding coordinates through a continuous comparison process; The sub-group comparison module specifically comprises k comparison tree sub-modules, a coordinate capture sub-module and a register group, wherein k is the total number of columns / the number of columns processed by a single comparison tree sub-module; each comparison tree sub-module outputs the extreme value of each adjacent pair of data to the coordinate capture sub-module after 1-level comparison judgment, and the coordinate capture sub-module outputs corresponding coordinates in parallel in the format of {X coordinate, Y coordinate, extreme value} and stores the coordinates for subsequent comparison judgment; The comparison tree sub-module specifically comprises a comparison logic module, a D flip-flop, a multi-level comparator and a register; each level of comparison logic comprises a group of comparators working in parallel; through the multi-level comparison logic, the input data is gradually reduced recursively, and finally the extreme value is output; specifically, the first comparison tree sub-module transmits the trigger signal cmp_en_next of the next comparison tree sub-module to the first D flip-flop according to the row comparison enable cmp_start, and enters 1-level comparison judgment; each adjacent two of the data to be compared are divided into a pair, and comparison is performed in parallel; the comparison result of each pair is transmitted to the 1-level register for storage; in the next clock cycle, the comparison tree sub-module enters 2-level comparison judgment; after the data bits in the 1-level register are compared in pairs in parallel, the result is transmitted to the 2-level register for storage, and the second comparison tree sub-module enters 1-level comparison judgment in the second comparison tree sub-module according to the signal cmp_en_next; in this way, until the comparison judgment is completed, the extreme value of each group of data output by the comparison tree sub-module is obtained from the highest level register in turn.
2. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 1, wherein, The input processing module comprises two digital input signals and three digital output signals, wherein the two digital input signals are input data datain and input data valid signal datain_vld, and the three digital output signals comprise data to be compared cmp_data, row comparison enable cmp_start and X coordinate inter-group position offset intergroup_offset.
3. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 2, wherein, The input processing module specifically comprises a data register, a D flip-flop and a counter; the data register is used for processing input data, performing parity bit extension, recording the number of a group of data under a single clock cycle as p, when p is an odd number, the data register automatically fills zeros in the high bits of the input data, and the combined output is the to-be-compared data cmp_data; when p is an even number, the data register directly stores the input data; the input data valid signal datain_vld is transmitted to the D flip-flop and outputs the row comparison enable cmp_start; the counter counts the number of groups of received data, representing the inter-group position offset intergroup_offset of the input data in the X coordinate of a single row.
4. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 1, wherein, The sub-group comparison module comprises three digital input signals and two digital output signals, wherein the three digital input signals are the to-be-compared data cmp_data, the row comparison enable cmp_start and the inter-group position offset intergroup_offset, and the two digital output signals comprise a two-dimensional array extreme_group representing the local extreme value information of each group in a single row and a one-dimensional array extreme_group_vld representing the global comparison trigger information, and each data bit of the one-dimensional array extreme_group_vld is a global comparison trigger signal lasting for one clock cycle.
5. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 1, wherein, The coordinate capture submodule comprises three digital input signals and two digital output signals, wherein the three digital input signals are the inter-group position offset intergroup_offset, the row comparison enable cmp_start and the trigger signal cmp_en_next of the next comparison tree submodule output by each comparison tree submodule, and the two digital output signals are a two-dimensional array coord_X representing the X coordinate and a Y coordinate coord_Y; the coordinate capture submodule specifically comprises a signal selector and a counter, and is output in parallel with the comparison tree submodule; specifically, the selector of the first coordinate capture submodule selects according to the row comparison enable cmp_start and the result of the first-level comparison judgment of the first comparison tree submodule, the selector of the second coordinate capture submodule selects according to the cmp_en_next output by the first comparison tree submodule and the result of the first-level comparison judgment of the second comparison tree submodule, and outputs a one-dimensional array intragroup_offset representing the group position offset information of the comparison result; according to the one-dimensional array intragroup_offset, the inter-group position offset intergroup_offset and the number of data p in each group, which are three X coordinate related signals, the two-dimensional array coord_X representing the extreme X coordinate of each pair of adjacent data in the group is determined; the counter counts the number of received data rows, representing the Y coordinate coord_Y of the input data.
6. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 1, wherein, The global comparison module includes two digital input signals and one digital output signal, wherein the two digital input signals are a two-dimensional array extreme_group representing each group of local extreme value information of a single row and a one-dimensional array extreme_group_vld representing global comparison trigger information, and the digital output signal is a signal frame_data including global extreme value and corresponding coordinate information.
7. The rolling data stream digital comparison and coordinate capture device based on a comparison tree according to claim 6, wherein, The global comparison module specifically includes a comparison logic module, a counter, a state machine and a register, wherein the counter counts the number of data rows completing sub-group comparison according to the one-dimensional array extreme_group_vld, and the counting period is the total number of data rows; the working states of the state machine include S0 standby state, S1 first group reading state, S2 global comparison state and S3 global output state; the global comparison module first enters the S1 first group reading state from the S0 standby state, updates the register to the first local extreme value of the first row as the initial global extreme value, then jumps to the S2 global comparison state, reads the value of the corresponding position of the two-dimensional array extreme_group according to the one-dimensional array extreme_group_vld, and the comparison logic module continuously compares the read data bit with the data in the register, and retains the comparison result in the register as the updated global extreme value for the next comparison after each comparison, and repeats the reading and comparison process until the comparison of the last row is completed, and enters the S3 global output state to obtain the global extreme value and the coordinate output.
8. The method of utilizing the rolling data stream digital comparison and coordinate capture apparatus based on a comparison tree as claimed in claim 1, wherein, The method includes the following steps: S1, data processing is performed, the input processing module receives input data datain and input data valid signal datain_vld, bit extension is performed according to the parity of the data, and a row comparison enable is triggered, and the X coordinate inter-group position offset intergroup_offset of the to-be-compared data is recorded; S2, the sub-group comparison module receives the to-be-compared data cmp_data, the row comparison enable cmp_start and the X coordinate inter-group position offset intergroup_offset output by the input processing module, and judges the local extreme value of the received data group based on the comparison tree structure according to the above information, and simultaneously and in parallel captures the corresponding coordinate information; S3, the global comparison module receives the two-dimensional array extreme_group representing each group of local extreme value information of a single row and the one-dimensional array extreme_group_vld representing global comparison trigger information output by the sub-group comparison module in step S2; when the trigger signal is sequentially written into the one-dimensional array extreme_group_vld, the global extreme value of the entire data stream and the corresponding coordinate are obtained through the continuous comparison process of the local extreme value.
Citation Information
Patent Citations
Periodic division-based time ordered access control method for periodic flow table
CN116633877A
Data acceleration method and system in heavy load scene, and storage medium
CN116804987A