Comparison tree-based rolling data stream digital comparison and coordinate capture device and method
By adopting a rolling data stream digital comparison and coordinate capture device based on comparison tree in data stream processing, the problem of real-time processing of large-scale data streams in the prior art is solved, efficient and stable data processing and coordinate capture are achieved, and hardware complexity and resource utilization are reduced.
Patent Information
- Application Number
- CN202411675959.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-11-22
AI Technical Summary
The prior art is difficult to meet the needs of large-scale and rapidly changing data flows in real time, and the hardware design is complex and resource occupancy is high, making it difficult to achieve efficient and stable data processing.
The digital comparison and coordinate capture device of the rolling data stream based on the comparison tree are adopted to realize real-time processing and coordinate capture of the data stream through the coordinated work of the input processing module, the subgroup comparison module and the global comparison module. The device uses a comparison tree structure for hierarchical comparison and coordinate capture, reducing hardware complexity and improving processing efficiency.
It significantly improves the real-time processing speed of data streams, reduces processing delays, reduces hardware design complexity and cost, improves the stability and reliability of the system, and achieves efficient and stable data processing.
Smart Images

Figure CN119621310A_ABST
Abstract
Description
Technical Field
[0001] The invention proposes a rolling data stream digital comparison and coordinate capture device and method based on a comparison tree, belonging to the field of digital integrated circuits. Background Art
[0002] Rolling data stream processing plays a key role in a variety of real-time data analysis scenarios, including sensor network monitoring, financial market analysis, communication packet processing, and video stream processing. These applications require the system to be able to compare, filter, and locate large amounts of data that continuously appear in the data stream in real time in order to capture key data points and their coordinate information.
[0003] There are two main types of data stream processing solutions. The first is the traditional buffer-based data stream processing solution, which mainly relies on a large-capacity buffer. The implementation of this solution usually stores data in batches before reading and processing it in batches. This solution has a simple structure and can reduce the real-time computing pressure during data processing. The disadvantage is that the processing delay is high when facing large-scale and rapidly changing data streams, which cannot meet the needs of real-time processing. In addition, the storage space of the buffer is limited, and the continuous growth of the data stream may cause the buffer to overflow or reduce the processing efficiency.
[0004] The second solution uses a parallel processing architecture to process input data in parallel through multiple processing units. Each unit includes an independent data processing module. This solution can significantly improve the processing speed of the system, and effectively utilize hardware resources to achieve efficient computing and improve system throughput. The disadvantage is that the hardware complexity is high, and the dependencies between multiple data blocks may cause synchronization delays and data conflicts. Summary of the invention
[0005] In order to ensure that the real-time processing requirements can be met and high processing efficiency can be maintained while reducing the complexity of hardware design and optimizing hardware resources, the present invention proposes a rolling data stream digital comparison and coordinate capture device and method based on a comparison tree.
[0006] The technical solution adopted by the device of the present invention is as follows:
[0007] A rolling data stream digital comparison and coordinate capture device based on a comparison tree, the device includes an input processing module, a subgroup comparison module and a global comparison module, the input processing module is connected to the subgroup comparison module, and the subgroup comparison module is connected to the global comparison module; the input processing module is used to receive input data, perform bit expansion according to the parity of the data, and trigger a row comparison enable signal to provide data to be compared and its X-coordinate offset information; the subgroup comparison module performs local extreme value judgment on the received data subgroup based on the comparison tree structure, and captures and outputs the corresponding coordinate information at the same time; the global comparison module is used to summarize the local extreme value information of each data subgroup, and determine the global extreme value and its corresponding coordinate of the entire data stream through a continuous comparison process. The present invention also provides a method for a rolling data stream digital comparison and coordinate capture device based on a comparison tree, the method comprising the following steps:
[0008] S1, perform data processing, the input processing module receives the input data datain and the input data valid signal datain_vld, performs bit expansion according to the parity of the data, triggers the row comparison enable, and records the X-coordinate intergroup position offset intergroup_offset of the data to be compared;
[0009] S2, the subgroup comparison module receives the to-be-compared data cmp_data, the row comparison enable cmp_start and the X-coordinate intergroup position offset intergroup_offset output by the input processing module, and performs local extreme value judgment on the received data group based on the comparison tree structure according to the above information, and simultaneously captures the corresponding coordinate information in parallel;
[0010] S3, the global comparison module receives the two-dimensional array extreme_group that can represent the local extreme value information of each group in a single row and the corresponding one-dimensional array extreme_group_vld that represents the global comparison trigger information output by the sub-group comparison module in step S2; when the trigger signal is written into the one-dimensional array extreme_group_vld in sequence, the global extreme value of the entire data stream and its corresponding coordinates are obtained through the continuous comparison process of the local extreme values.
[0011] The advantages of the present invention compared to the prior art are:
[0012] (1) The device of the present invention uses a comparison tree structure to process data streams. Through hierarchical comparison and coordinate capture, highly parallel processing and streamlining of grouped data are achieved, greatly improving the real-time processing speed of data streams. This structure can process large-scale and rapidly changing data streams in real time, significantly reducing processing delays, thereby better meeting the needs of real-time data analysis.
[0013] (2) Unlike the traditional architecture that relies on a large number of parallel processing units, the comparison tree structure of the present invention 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 efficient processing.
[0014] (3) The present invention ensures the continuity and stability of data processing by designing a subgroup comparison module and a global comparison module. The subgroup comparison module can quickly identify local extreme values and capture related coordinates, while the global comparison module is responsible for summarizing these local information and determining global extreme values. This structure effectively reduces the dependencies and conflicts between data blocks, improves the overall throughput of the system, and ensures the realization of fully pipelined processing.
[0015] (4) The present invention simplifies the complex data stream processing process and enhances the positioning accuracy through the process of layered processing and step-by-step comparison. The row-by-row scrolling and step-by-step comparison process of the 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 can accurately reflect its relative position in the global data stream. This method greatly improves the accuracy and reliability of data processing while ensuring real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 is a block diagram of a hardware device in Embodiment 1 of the present invention;
[0017] Figure 2 is a functional block diagram of maximum pooling in Embodiment 2 of the present invention;
[0018] Figure 3 is a data flow diagram of a hardware device in Embodiment 2 of the present invention;
[0019] Figure 4 is a comparison tree structure diagram of the comparison tree submodule in Embodiment 2 of the present invention;
[0020] Figure 5 It is a data comparison timing diagram of the hardware device in embodiment 2 of the present invention. DETAILED DESCRIPTION
[0021] Example 1
[0022] This embodiment provides a digital comparison and coordinate capture device for scrolling data streams based on a comparison tree structure, and its device block diagram is as follows: Figure 1As shown, it includes an input processing module, a subgroup comparison module and a global comparison module, the input processing module is connected to the subgroup comparison module, and the subgroup comparison module is connected to the global comparison module; the data size output by the upper device is m×n, each p data is a data group, each row contains q data groups, where q is m / p, and a single pulse and a single data group are output row by row; the input processing module is used to receive input data, perform bit expansion according to the parity of the data, and trigger a row comparison enable signal to provide data to be compared and its X-coordinate offset information; the subgroup comparison module performs local extreme value judgment on the received data group based on the comparison tree structure, and captures and outputs the corresponding coordinate information at the same time; the global comparison module is used to summarize the local extreme value information of each subgroup, and determine the global extreme value and its corresponding coordinate of the entire data stream through a continuous comparison process.
[0023] In this embodiment, the input processing module includes 2 digital input signals and 3 digital output signals, wherein the 2 digital input signals are input data datain and input data valid signal datain_vld, respectively, and the 3 digital output signals include data to be compared cmp_data, row comparison enable cmp_start and X coordinate intergroup 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 to process the input data, perform parity bit extension, and record the number of a group of data under a single clock cycle as p. When p is an odd number, the register automatically fills the high bit of the input data with zero, and outputs the data to be compared cmp_data after merging; 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, and represents the X coordinate intergroup position offset intergroup_offset of the input data in a single row.
[0024] The subgroup comparison module includes 3 digital input signals and 2 digital output signals, wherein the 3 digital input signals are the data to be compared cmp_data, the row comparison enable cmp_start and the position offset between X coordinate groups intergroup_offset, and the 2 digital output signals include a two-dimensional array extreme_group that can represent the local extreme value information of each group of a single row and the corresponding one-dimensional array extreme_group_vld that represents the global comparison trigger information, and each data bit of the one-dimensional array extreme_group_vld is a global comparison trigger signal that lasts for 1 clock cycle. The subgroup comparison module specifically includes k comparison tree submodules, a coordinate capture submodule and a register group, wherein k is the total number of columns / the number of columns processed by a single comparison tree submodule; each comparison tree submodule outputs the extreme value of each adjacent pair of data in a single group to the coordinate capture submodule after the first level comparison judgment, and the coordinate capture submodule outputs the corresponding coordinates in parallel, which are combined and stored in the first level register of the comparison tree submodule in the format of {X coordinate, Y coordinate, extreme value}, for subsequent comparison judgment by the comparison tree submodule.
[0025] The comparison tree submodule is based on the comparison tree structure, which specifically includes a comparison logic module, a D flip-flop, a multi-level comparator and a register. Each level of the comparison logic module contains a group of comparators working in parallel. Through the multi-level comparison logic, the input data is recursively reduced step by step and the extreme value is finally output. Specifically, the first comparison tree submodule transmits the trigger signal cmp_en_next of the next comparison tree submodule to the D flip-flop 1 according to the row comparison enable cmp_start, and enters the first-level comparison judgment, divides each adjacent two data to be compared into a pair, and compares them in parallel, and the result of each pair of comparisons is transferred to the first-level register for storage; in the next clock cycle, the comparison tree submodule enters the second-level comparison judgment, and after comparing the data bits in the first-level register in parallel pair by pair, the result is transferred to the second-level register for storage, and at the same time, the second comparison tree submodule enters the first-level comparison judgment in the second comparison tree submodule according to the signal cmp_en_next; and so on, until the comparison judgment of the first comparison tree submodule is completed, its internal D flip-flop 2 outputs a global comparison trigger signal lasting for 1 clock cycle, which is transferred 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 is transferred to the lowest bit of the global comparison module extreme_group. In the subsequent k-1 clock cycles, each group of data extreme values output by each comparison tree submodule and its corresponding global comparison trigger signal are obtained in turn in each clock cycle and transmitted to the corresponding data bits of extreme_group and extreme_group_vld respectively.
[0026] The coordinate capture submodule includes three digital input signals and two digital output signals. The three digital input signals are the intergroup position offset of the X coordinate group, intergroup_offset, the row comparison enable cmp_start, and the trigger signal of the next comparison tree submodule output by each comparison tree submodule, cmp_en_next. The two digital output signals are the two-dimensional array coord_X representing the X coordinate and the 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 first coordinate capture submodule selects according to the row comparison enable cmp_start and the result of the first comparison tree submodule 1-level comparison judgment, and 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 comparison tree submodule 1-level comparison judgment, and the output is a one-dimensional array intragroup_offset representing the intra-group position offset information of the comparison result, and according to the three X-coordinate related signals of the one-dimensional array intragroup_offset, the X-coordinate inter-group 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, i.e., coord_X, is determined, and the two-dimensional array coord_X is p×intergroup_offset+intragroup_offset; the counter counts the number of received data rows to represent the Y coordinate coord_Y of the input data.
[0027] The global comparison module includes 2 digital input signals and 1 digital output signal, wherein the 2 digital input signals are a two-dimensional array extreme_group that can represent the local extreme value information of each group of a single row and the corresponding one-dimensional array extreme_group_vld that represents the global comparison trigger information, and the digital output signal is a signal frame_data containing the global extreme value and its 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 that complete the sub-group comparison according to the one-dimensional array extreme_group_vld, and its counting cycle 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); S3 (global output state); the global comparison module is first in the S0 standby state, and selects to enter the S1 first group reading state according to the lowest bit of the counter and the extreme_group_vld signal, and 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 after each comparison, as the updated global extreme value for the next comparison, and repeats the reading and comparison process until the comparison of the last row is completed, enters the S3 global output state, and obtains the global extreme value and its coordinate output.
[0028] This embodiment also provides a method for implementing the above hardware device, which includes the following steps:
[0029] S1, perform data processing, the input processing module receives the input data datain and the input data valid signal datain_vld, performs bit expansion according to the parity of the data, triggers the row comparison enable, and records the X-coordinate intergroup position offset intergroup_offset of the data to be compared;
[0030] S2, the subgroup comparison module receives the to-be-compared data cmp_data, the row comparison enable cmp_start and the X-coordinate intergroup position offset intergroup_offset output by the input processing module, and performs local extreme value judgment on the received data group based on the comparison tree structure according to the above information, and simultaneously captures the corresponding coordinate information in parallel;
[0031] S3, the global comparison module receives the two-dimensional array extreme_group that can represent the local extreme value information of each group in a single row and the corresponding one-dimensional array extreme_group_vld that represents the global comparison trigger information output by the sub-group comparison module in step S2; when the trigger signal is written into the one-dimensional array extreme_group_vld in sequence, the global extreme value of the entire data stream and its corresponding coordinates are obtained through the continuous comparison process of the local extreme values.
[0032] Example 2
[0033] The hardware device of Example 1 is designed as a maximum pooling layer device that can extract the maximum value of a specified window in real time. This embodiment gives examples of relevant parameters and indicators: the data size output by the upper-level device is 1920×1080, with a partition size of 120×120, a total of 16×9 partitions, and the design requirement is to extract the maximum value of each partition and its corresponding relative coordinates in real time; every 15 data is a data group, each partition contains 8 data groups per row, and each data is 8 bits. The upper-level device outputs the data stream line by line with a clock frequency of 100MHZ and 120 bits per beat; the input processing module receives 120 bits of data in a single pulse. The functions implemented in this embodiment are as follows: Figure 2 As shown, the output data requirement is the maximum value of 16×9 partitions and their corresponding relative coordinates.
[0034] The specific block diagram of the data comparison and coordinate capture device provided in this embodiment is as follows: Figure 3 As shown, each row contains 8 data groups according to each partition. Figure 3 Each subgroup comparison module includes 8 comparison tree submodules and a coordinate capture module; since there are 16×9 partitions in this embodiment that need to perform data comparison and coordinate capture, Figure 3 A memory Memory is added to the global comparison module, and the extreme value of a single row of a single partition is temporarily stored according to the read enable rd_en and write enable wr_en of the memory, and is read out one clock cycle in advance after the extreme value of the next row of the partition is ready.
[0035] The specific data comparison and coordinate capture process is as follows:
[0036] The first group of input data datain of the upper 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 a single pulse is 15 data, and 15 is an odd number, the input processing module performs bit expansion on the input data. The expanded 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, in the first clock cycle after the row comparison enable cmp_start is pulled high, the first-level comparison judgment is entered, and the adjacent 8 pairs of data are compared in parallel to obtain 0x0307_0a1a_1003_062e, and the number of data is 8; in the second clock cycle, the second-level comparison judgment is entered, and the 4 adjacent pairs of data of 0x0307_0a1a_1003_062e are compared in parallel to obtain 0x071a_102e, and the number of data is 4; in the third clock cycle, the third-level comparison judgment is entered, and the 2 adjacent pairs of data of 0x071a_102e are compared in parallel to obtain 0x1a2e, and the number of data is 2; in the fourth clock cycle, the fourth-level comparison judgment is entered, and a pair of data in 0x1a2e is compared to obtain 0x2e, as the local extreme value of the first group of data, and the lowest bit of the one-dimensional array extreme_group_vld maintains a high level for 1 clock cycle. At the same time, in the first clock cycle after the row comparison enable cmp_start is pulled high, the cmp_en_next of the first comparison tree submodule is pulled high for one clock cycle as the trigger signal of the second comparison tree submodule. The second group of input data datain is also compared with the first group of data until the local extreme value of the second group of data is obtained one beat slower than the first group of data. The second lowest bit of the one-dimensional array extreme_group_vld maintains a high level for one clock cycle. The coordinate capture process of the first coordinate capture submodule is carried out in parallel with the first-level comparison judgment of the first comparison tree submodule. At this time, the inter-group position offset intergroup_offset is 0, and the Y coordinate coord_Y is 0, which is represented as the first group of data in the first row. For the compared data 0x0307_0a1a_1003_062e, the intra-group position offset intragroup_offset is 0, 2, 4, 7, 8, 10, 12, 14 from low to high, and the number of data in each group p is 15, so The corresponding coordinates are (0,0), (2,0), (4,0), (7,0), (8,0), (10,0), (12,0), (14,0), and after combining with the data bits, they are (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 last three levels of comparison and judgment, only the data bits are compared, and the coordinate bits are stored following the data bits.
[0037] When the lowest bit of the one-dimensional array extreme_group_vld is pulled high, such as Figure 5As shown in the figure, wr_data is the register of the global comparison module, wr_data is updated to the first local extreme value of the first row, and (14,0,0x2e) is used as the initial global extreme value; when the second lowest bit of the one-dimensional array extreme_group_vld is pulled high, the sub-group comparison module obtains the local extreme value of the second group as (13,0,0x2f), and the global comparison module jumps to the global comparison state, compares 0x2e with 0x2f, and the register wr_data is updated to (13,0,0x2f); and so on, until all 8 local extreme values of the first row of the first partition are compared, and the ultimate value of the first row of the first partition is obtained. , pull the write enable wr_en high, store the extreme value into the memory, and continue the comparison process of the first row of the second partition until the comparison of the ultimate 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, pull the read enable rd_en high one clock cycle in advance, update the register wr_data to the ultimate value of the first row of the first partition taken out of the memory, and continue the comparison of the second row; until all 120×120 data of the first partition are compared, the global extreme value and corresponding coordinates of the first partition are obtained and output to the next level through frame_data, thereby forming a pipelined data processing flow.
[0038] The data comparison and coordinate capture device in this embodiment can efficiently cope with the real-time processing requirements of large-scale and rapidly changing rolling data streams, and is particularly suitable for application scenarios that require rapid analysis of large amounts 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 subgroup comparison module and a global comparison module, wherein the input processing module is connected to the subgroup comparison module, and the subgroup comparison module is connected to the global comparison module; The input processing module is used to receive input data, perform bit expansion according to the parity of the data, trigger a row comparison enable signal, and provide data to be compared and its X-coordinate offset information; The subgroup comparison module performs local extreme value judgment on the received data subgroup based on the comparison tree structure, and simultaneously captures and outputs corresponding coordinate information; The global comparison module is used to summarize the local extreme value information of each data subgroup and determine the global extreme value and its corresponding coordinates of the entire data stream through a continuous comparison process.
2. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 1, characterized in that: The input processing module includes 2 digital input signals and 3 digital output signals, wherein the 2 digital input signals are input data datain and input data valid signal datain_vld, respectively, and the 3 digital output signals include data to be compared cmp_data, row comparison enable cmp_start and X-coordinate intergroup position offset intergroup_offset.
3. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 2, characterized in that: The input processing module specifically includes a data register, a D flip-flop and a counter; the data register is used to process the input data, perform parity bit expansion, and record the number of a group of data in a single clock cycle as p. When p is an odd number, the data register automatically fills the high bit of the input data with zeros, and outputs the data to be compared after merging; 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 to represent the X-coordinate intergroup position offset intergroup_offset of the input data in a single row.
4. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 1, characterized in that: The subgroup comparison module includes three digital input signals and two digital output signals, wherein the three digital input signals are respectively the data to be compared cmp_data, the row comparison enable cmp_start and the X-coordinate intergroup position offset intergroup_offset, and the two digital output signals include a two-dimensional array extreme_group that can characterize each group of local extreme value information of a single row and a corresponding one-dimensional array extreme_group_vld that characterizes global comparison trigger information, and each data bit of the one-dimensional array extreme_group_vld is a global comparison trigger signal that lasts for 1 clock cycle.
5. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 4, characterized in that: The subgroup comparison module specifically includes k comparison tree submodules, a coordinate capture submodule and a register group, where k is the total number of columns / the number of columns processed by a single comparison tree submodule; each comparison tree submodule outputs the extreme value of each adjacent pair of data in a single group to the coordinate capture submodule after 1-level comparison judgment, and the coordinate capture submodule outputs one-to-one corresponding coordinates in parallel, which are combined in the format of {X coordinate, Y coordinate, extreme value} and stored for subsequent comparison judgment.
6. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 5, characterized in that: The comparison tree submodule specifically includes a comparison logic module, a D flip-flop, a multi-level comparator and a register. Each level of comparison logic includes a group of comparators working in parallel. Through the multi-level comparison logic, the input data is recursively reduced step by step, and an extreme value is finally output. Specifically, the first comparison tree submodule transmits a trigger signal cmp_en_next of the next comparison tree submodule to the first D flip-flop according to the row comparison enable cmp_start, and enters the first level comparison judgment, divides each adjacent two data to be compared into a pair, and compares them in parallel, and the result of each pair of comparisons is transferred to the first level register for storage; in the next clock cycle, the comparison tree submodule enters the second level comparison judgment, and after the data bits in the first level register are compared in parallel pair by pair, the results are transferred to the second level register for storage, and at the same time, the second comparison tree submodule enters the first level comparison judgment in the second comparison tree submodule according to the signal cmp_en_next; and so on, until the comparison judgment is completed, the extreme value of each group of data output by each comparison tree submodule is obtained in turn from the highest level register.
7. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 5, characterized in that: The coordinate capture submodule includes three digital input signals and two digital output signals, wherein the three digital input signals are respectively the X coordinate intergroup 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 respectively the two-dimensional array coord_X representing the X coordinate and the 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 first coordinate capture submodule selects according to the row comparison enable cmp_start and the result of the first comparison tree submodule 1 comparison judgment, and the second coordinate capture submodule The block selector selects according to 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 intra-group position offset information of the comparison result. According to the three X-coordinate related signals of the one-dimensional array intragroup_offset, the X-coordinate inter-group position offset intergroup_offset and the number of data in each group p, the two-dimensional array coord_X=p×intergroup_offset+intragroup_offset of the extreme value X coordinates of each pair of adjacent data in the group is determined; the counter counts the number of received data rows to represent the Y coordinate coord_Y of the input data.
8. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 1, characterized in that: The global comparison module includes 2 digital input signals and 1 digital output signal, wherein the 2 digital input signals are respectively a two-dimensional array extreme_group that can represent each group of local extreme value information of a single row and a corresponding one-dimensional array extreme_group_vld that represents global comparison trigger information, and the digital output signal is a signal frame_data containing global extreme values and their corresponding coordinate information.
9. The rolling data stream digital comparison and coordinate capture device based on comparison tree according to claim 8, characterized in that: 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 that complete the sub-group comparison according to the one-dimensional array extreme_group_vld, and its counting cycle 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; 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 after each comparison, as the updated global extreme value for the next comparison, repeats the reading and comparison process until the comparison of the last row is completed, enters the S3 global output state, and obtains the global extreme value and its coordinate output.
10. A method for utilizing the rolling data stream digital comparison and coordinate capture device based on comparison tree as claimed in claim 1, characterized in that: The method comprises the following steps: S1, perform data processing, the input processing module receives the input data datain and the input data valid signal datain_vld, performs bit expansion according to the parity of the data, triggers the row comparison enable, and records the X-coordinate intergroup position offset intergroup_offset of the data to be compared; S2, the subgroup comparison module receives the to-be-compared data cmp_data, the row comparison enable cmp_start and the X-coordinate intergroup position offset intergroup_offset output by the input processing module, and performs local extreme value judgment on the received data group based on the comparison tree structure according to the above information, and simultaneously captures the corresponding coordinate information in parallel; S3, the global comparison module receives the two-dimensional array extreme_group that can represent the local extreme value information of each group in a single row and the corresponding one-dimensional array extreme_group_vld that represents the global comparison trigger information output by the sub-group comparison module in step S2; when the trigger signal is written into the one-dimensional array extreme_group_vld in sequence, the global extreme value of the entire data stream and its corresponding coordinates are obtained through the continuous comparison process of the local extreme values.
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
Digital hardware implementation architecture based on image fusion algorithm and method thereof
CN117522709A
Computation apparatus, method, system, circuit, and device, and chip
US20240184521A1
System and method for algorithmic TCAM packet classification
US8856203B1
Cited By
Data partitioning method and device, electronic equipment and storage medium
CN121116195A