Parallel data expansion method of data expander

By adopting a parallel data expansion method in the data expander, combining data item screening and mask matrix construction, the problems of low data expansion efficiency and large resource utilization in the existing technology are solved, and efficient and flexible data expansion is achieved, suitable for high-speed Digital circuit system.

CN119089855APending Publication Date: 2024-12-06UESTC (SHENZHEN) ADVANCED RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411181691.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

The existing run decoding technology can only handle a single run within each clock cycle, which limits the efficiency of data expansion and is difficult to meet the needs of modern high-speed data processing. In addition, the parallelization method will greatly increase the use of hardware resources, resulting in limited resources. question.

Method used

Through a parallel data expansion method of a data expander, parameters are set, counters are created, multiple parallel data items are cached and processed, and data item filtering and mask matrix construction is used to optimize hardware resource usage and achieve efficient data expansion.

Benefits of technology

It realizes data expansion with high flexibility, high throughput and low resource usage, and is suitable for high-speed digital circuit systems, reducing timing convergence difficulty and resource usage, and improving the maximum clock frequency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089855A_ABST
    Figure CN119089855A_ABST
Patent Text Reader

Abstract

The invention discloses a parallel data expansion method of a data expander. The method comprises the following steps: firstly, setting parameters of the data expander and creating a counter; then multiple paths of parallel data items are input into the data expander and cached, then the multiple data items which are input in parallel and carry data and the number of repetition times are expanded into data which are output in parallel with the fixed bit width through the data expander, and the method is particularly suitable for being used in various high-speed digital circuit systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of digital circuits, and more specifically, relates to a parallel data expansion method of a data expander. Background Art

[0002] Data expansion is a technique for expanding a data item with data and a repetition number into data repeated at the set repetition number. Since digital circuits can perform efficient parallel data processing, the application of high-speed data processing using digital circuits is very widespread. When performing data expansion in digital circuits, a common method is to use run-length decoding technology, which is usually implemented through a state machine.

[0003] However, existing run-length decoding techniques have some limitations. Specifically, traditional run-length decoding methods based on state machines or counters can only process a single run in each clock cycle, which limits the efficiency of data expansion and is difficult to meet the needs of modern high-speed data processing. Efficiency can be improved through parallelization, but this will greatly increase the use of hardware resources, which are limited. Summary of the invention

[0004] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a parallel data expansion method for a data expander, so that parallel data items with data and length are expanded into outputs of a fixed number of data, while having the performance of high flexibility, high throughput and low resource usage.

[0005] To achieve the above object of the invention, the present invention provides a parallel data expansion method of a data expander, characterized in that it comprises the following steps:

[0006] (1) Set the parameters of the data expander;

[0007] (2) Create a counter and initialize the counter value to 0;

[0008] (3) Input multiple parallel data items to the data expander and cache them;

[0009] Input multiple parallel data items to the data expander, and then cache them into two groups through registers in the order of input. The two groups of cached data serve as the data items to be expanded in one round of the data expander. Each group contains N in The index values ​​of the two groups of cache data items are recorded as 0 to 2*N. in -1;

[0010] (4) Set the expansion round i of the data expander, initialize i=1, set the number of expansions per round j, initialize j=1;

[0011] (5) Calculate the sum of the lengths of the two groups of cached data items in the register during the i-th round of expansion of the data expander, respectively, and denote them as l 1st,i and l 2nd,i :

[0012]

[0013] Among them, l i,1 (k) and l i,2 (k) respectively represent the length value of the k-th data item in the two groups of cache data in the register during the i-th round of expansion;

[0014] (6) Calculate the starting position and the ending position of the data expander when it is expanded for the jth time in the i-th round;

[0015] (6.1) Set the overflow length l when the data expander expands the data in the first round overflow = 0, the starting position p of the first expansion of the first round start =0;

[0016] (6.2) Calculate the starting position p of the data expander at the jth expansion in the i-th round. start,ij :

[0017] p start,ij = l overflow,i +cnt ij *N out

[0018] Among them, cnt ij is the count value of the counter at the jth expansion in the i-th round, N out is the number of output bits of the expander, l overflow is the starting point position p start The overflow length l compared to the length of the first set of data items overflow :

[0019]

[0020] Among them, p start,(i-1)last Indicates the starting point of the last expansion in the i-1th round, l 1st,i-1 Indicates the sum of the lengths of the first set of data items cached in the register during the i-1th round of expansion;

[0021] (6.3) Calculate the end point position p of the data expander at the jth expansion in the i-th round. end,ij :

[0022] p end,ij =p start,ij +N out

[0023] (7) Calculate the target value of the counter when the i-th round is unfolded;

[0024] (7.1) Calculate the retention length l during the i-th round of expansion remain,i ;

[0025] Use the sum of the lengths of the first set of cached data items l 1st,i Subtract the overflow length l overflow,i The remaining unexpanded length of the first group of cached data items is recorded as the retained length l remain,i ;

[0026] l remain,i = l 1st,i -l overflow,i

[0027] (7.2), the retained length l remain,i Divide by the number of output bits of the expander N out , take the quotient and find the remainder, and then use the quotient as l remain,i High remain_High,i , and take the remainder as l remain,i The low position remain_Low,i ;

[0028]

[0029] (7.3) Calculate the target value cnt of the counter when the i-th round is unfolded target,i ;

[0030]

[0031] (8) Determine whether the counter's count value cnt reaches the count target value cnt target , if cnt<cnt target , then go to step (9); otherwise, go to step (10);

[0032] (9) The data expander performs the i-th round of data expansion;

[0033] (9.1) Read two sets of cache data and then splice them into one set of data, denoted as L i (k), k=0,1,2,…,2*N in ;

[0034] (9.2), calculate L i (k) The offset value of each data item;

[0035]

[0036] Among them, |L i (k)| represents data L i(k) The length of the k-th data item, offset i (k) represents data L i (k) is the offset value of the k-th data item;

[0037] (9.3) Calculate the index value i corresponding to the end point position when the i-th round is expanded for the jth time. end,ij ;

[0038] i end,ij =min{k|offset i (k+1)>p end,ij}

[0039] (9.4) Calculate the index values ​​corresponding to the starting and ending positions of the selected data items during the j-th expansion of the i-th round;

[0040]

[0041] i selected_end,ij =i selected_start,ij +N select -1

[0042] Among them, i selected_start,ij 、i selected_end,ij Respectively represent the index values ​​corresponding to the starting position and the end position of the filtered data item, N select To filter the number of data items;

[0043] (9.5), the data L i (k), according to the index value i selected_start,ij and i selected_end,ij , from 2N in Filter out all data items at the corresponding index position from the data items as the data items for the jth expansion in the i-th round;

[0044] (9.6) Calculate the offset value of each filtered data item selected,ij (p);

[0045]

[0046] Where p = 1, 2, ..., N select ;

[0047] (9.7) Calculate the enable signal of each filter data item ij (p);

[0048]

[0049] Among them, True represents enabling data items, and False represents disabling data items;

[0050] (9.8) According to the offset value and enable signal of each filtered data item, construct an N select Row N out The column mask matrix M;

[0051] Among them, each element of the mask matrix M is 0 or 1. When the element m in the pth row and qth column of the mask matrix M is pq Satisfy: enable ij (p) is True and offset selected,ij (p)≤q<offset selected,ij (p+1), m pq The value is 1, otherwise the value is 0;

[0052] (9.9) Take out the data corresponding to the element 1 in each column of the mask matrix M, and then concatenate them in order to obtain a length of N out , and serves as the output data of the data expander after the j-th expansion in the i-th round;

[0053] (9.10) After the jth expansion is completed, add 1 to the count value of the counter, then set j=j+1, and return to step (6.2) to perform the next round of data expansion;

[0054] (10) Clear the count value of the counter; set i=i+1, and then control the data expander to overwrite the first set of cache data with the second set of cache data in the register, and then continue to receive the input multi-channel parallel data items and cache them to obtain a new second set of cache data, and then re-mark the index values ​​of the two sets of cache data items to 0~2*N in -1; finally, return to step (5).

[0055] The object of the invention of the present invention is achieved in this way:

[0056] A parallel data expansion method of a data expander of the present invention first sets the parameters of the data expander and creates a counter; then inputs multiple parallel data items into the data expander and caches them, and then the data expander realizes the expansion of multiple parallel input data items with data and repetition times into fixed bit width parallel output data, which is particularly suitable for use in various high-speed digital circuit systems.

[0057] At the same time, the parallel data expansion method of a data expander of the present invention also has the following beneficial effects:

[0058] (1) The present invention takes into account the usage of hardware resources and proposes methods such as data item screening and interval mask construction, which effectively optimizes the design's demand for hardware resource usage.

[0059] (2) The data expander can effectively reduce the difficulty of design timing convergence and improve the timing margin, thereby achieving the purpose of increasing the maximum clock frequency of the expander. It has the advantages of high flexibility, high clock frequency, and small resource usage, and is particularly suitable for use in various high-speed digital circuit systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 A flow chart of a parallel data expansion method of a data expander of the present invention;

[0061] Figure 2 A schematic diagram of an example structure of data item offset calculation in a parallel data expansion structure of an embodiment;

[0062] Figure 3 A schematic diagram of an example structure of data item screening in a parallel data expansion structure of an embodiment;

[0063] Figure 4 It is a schematic diagram of the data output process of the data item in the parallel data expansion structure of the embodiment; DETAILED DESCRIPTION

[0064] The specific implementation of the present invention is described below in conjunction with the accompanying drawings so that those skilled in the art can better understand the present invention. It should be noted that in the following description, when the detailed description of known functions and designs may dilute the main content of the present invention, these descriptions will be omitted here.

[0065] Example

[0066] Figure 1 The present invention is a flow chart of a parallel data expansion method of a data expander.

[0067] Next we combine Figure 1 A parallel data expansion method of a data expander of the present invention is described in detail. Figure 1 As shown, the specific steps include:

[0068] S1. Set the parameters of the data expander;

[0069] In this embodiment, the parameters of the data expander include: the data type of the input data item Bits (1 bit), the length of the input data item bit width w = 11, the number of input data items N in =8, output data type Bits (128 bits), output data number N out =128, number of data items to be screened N select =9, etc. These parameters are static parameters and cannot be modified after setting.

[0070] It should be noted that, since the remainder and quotient operations in the subsequent steps will consume a lot of resources, the number of outputs should be a power of 2, so as to use shifting instead of quotient and remainder operations to reduce resource usage.

[0071] S2. In this embodiment, since the data expander has a limited number of output data, it takes multiple clock cycles to expand the input data items. Therefore, the input buffer needs to be kept for a period of time to ensure that the input data items are completely expanded and output. This operation is implemented using a counter. Therefore, we first create a counter and initialize the counter value to 0.

[0072] S3, input multiple parallel data items to the data expander and cache them;

[0073] Input multiple parallel data items to the data expander, and then cache them into two groups through registers in the order of input. The two groups of cached data serve as the data items to be expanded in one round of the data expander. Each group contains N in = 8-way data items, the index values ​​of the two groups of cache data items are recorded as 0 to 15;

[0074] S4, set the expansion round i of the data expander, initialize i=1, set the number of expansions per round j, initialize j=1;

[0075] S5, respectively calculate the sum of the lengths of the two groups of cache data items in the register when the data expander expands the i-th round, and record them as l 1st,i and l 2nd,i :

[0076]

[0077] Among them, l 1,i (k) and l 2,i (k) respectively represent the length value of the k-th data item in the two groups of cache data in the register during the i-th round of expansion;

[0078] S6, calculating the starting position and the ending position of the data expander when the data expander is expanded for the jth time in the i-th round;

[0079] S6.1. Set the overflow length l of the data expander when expanding the data in the first round overflow = 0, the starting position p of the first expansion of the first round start =0;

[0080] S6.2. Calculate the starting position p of the data expander at the jth expansion in the i-th round. start,ij :

[0081] p start,ij = l overflow,i +cnt ij *N out

[0082] Among them, cnt ij is the count value of the counter at the jth expansion in the i-th round, N out is the number of output bits of the expander, N out =128; l overflow is the starting point position p start The overflow length l compared to the length of the first set of data items overflow :

[0083]

[0084] Among them, p start,(i-1)last Indicates the starting point of the last expansion in the i-1th round, l 1st,i-1 Indicates the sum of the lengths of the first set of data items cached in the register during the i-1th round of expansion;

[0085] S6.3. Calculate the end point position p of the data expander at the jth expansion in the i-th round. end,ij :

[0086] p end,ij =p start,ij +N out

[0087] S7, calculating the count target value of the counter when the i-th round is unfolded;

[0088] S7.1. Calculate the retention length l during the i-th round of expansion remain,i ;

[0089] Use the sum of the lengths of the first set of cached data items l 1st,i Subtract the overflow length l overflow,i The remaining unexpanded length of the first group of cached data items is recorded as the retained length l remain,i ;

[0090] l remain,i = l 1st,i -l overflow,i

[0091] S7.2, retain the length l remain,i Divide by the number of expander outputs N out =128, take the quotient and find the remainder, and then use the quotient as l remain,i High remain_High,i , and take the remainder as l remain,i The low position remain_Low,i ;

[0092]

[0093] S7.3, calculate the target value cnt of the counter when the i-th round is unfoldedtarget,i ;

[0094]

[0095] S8. Determine whether the count value cnt of the counter reaches the count target value cnt target , if cnt<cnt target , then go to step S9; otherwise, go to step S10;

[0096] S9, the data expander performs the i-th round of data expansion;

[0097] S9.1, read two sets of cache data and then splice them into one set of data, denoted as L i (k), k=0,1,2,…,2*N in ;

[0098] S9.2, offset value offset refers to the specific offset of the data item in the cache relative to the starting position 0, that is, the number of bits that the data item moves backward relative to the starting position of the cache, which is obtained by accumulating the length value in the data item. This value is used to determine the exact position of the data item in the data expansion, so as to facilitate subsequent data access and processing.

[0099] In this embodiment, the data item offset calculation example structure is as follows Figure 2 As shown, L i The calculation formula for the offset value of each data item in (k) is:

[0100]

[0101] Among them, |L i (k)| represents data L i (k) The length of the k-th data item, offset i (k) represents data L i (k) is the offset value of the k-th data item;

[0102] S9.3. Calculate the index value i corresponding to the end point position when the i-th round and the j-th expansion is performed. end,ij ;

[0103] i end,ij =min{k|offset i (k+1)>p end,ij}

[0104] S9.4, calculate the index values ​​corresponding to the starting position and the end position of the screening data item when the jth expansion in the i-th round;

[0105]

[0106] i selected_end,ij=i selected_start,ij +N select -1

[0107] Among them, i selected_start,ij 、i selected_end,ij Respectively represent the index values ​​corresponding to the starting position and end position of the filtered data items, and the number of filtered data items N select =9;

[0108] S9.5. Data L i (k), according to the index value i selected_start,ij and i selected_end,ij , from 2N in = All data items at the corresponding index position are selected from the 16 data items as the data items for the jth expansion in the i-th round. The length of these data items must be greater than or equal to the number of output data, 128;

[0109] In this embodiment, if Figure 3 As shown, the index values ​​corresponding to the starting position and the end position of the filtered data items are 1 to 9, indicating that 9 data items are filtered to enter the subsequent data expansion;

[0110] S9.6. Calculate the offset value of each filtered data item selected,ij (p);

[0111]

[0112] Where p = 1, 2, ..., 9;

[0113] S9.7, calculate the enable signal of each screening data item ij (p);

[0114]

[0115] Among them, True represents enabling data items, and False represents disabling data items;

[0116] S9.8, construct a mask matrix M with 9 rows and 128 columns according to the offset value and enable signal of each filtered data item;

[0117] Among them, each element of the mask matrix M is 0 or 1. When the element m in the pth row and qth column of the mask matrix M is pq Satisfy: enable ij (p) is True and offset selected,ij (p)≤q<offset selected,ij (p+1), m pq The value is 1, otherwise the value is 0;

[0118] S9.9. In this embodiment, if Figure 4 As shown, the data corresponding to the element 1 in each column of the mask matrix M is taken out, and then concatenated in sequence to obtain data items of length 128, which are used as the output data of the data expander after the jth expansion in the i-th round;

[0119] S9.10, after the j-th expansion is completed, the count value of the counter is increased by 1, and then j=j+1 is set, and the process returns to step S6.2 to perform the next round of data expansion;

[0120] S10, clear the count value of the counter; set i=i+1, and then control the data expander to overwrite the first set of cache data with the second set of cache data in the register, and then continue to receive and cache the input multi-channel parallel data items in order to obtain a new second set of cache data, and then re-mark the index values ​​of the two sets of cache data items as 0~15; finally, return to step S5.

[0121] Although the above describes the illustrative specific embodiments of the present invention to facilitate the understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.

Claims

1. A parallel data expansion method of a data expander, characterized in that: The following steps are involved: (1) Set the parameters of the data expander; (2) Create a counter and initialize the counter value to 0; (3) Input multiple parallel data items to the data expander and cache them; Input multiple parallel data items to the data expander, and then cache them into two groups through registers in the order of input. The two groups of cached data serve as the data items to be expanded in one round of the data expander. Each group contains N in The index values ​​of the two groups of cache data items are recorded as 0 to 2*N. in -1; (4) Set the expansion round i of the data expander, initialize i=1, set the number of expansions per round j, initialize j=1; (5) Calculate the sum of the lengths of the two groups of cached data items in the register during the i-th round of expansion of the data expander, respectively, and denote them as l 1st,i and l 2nd,i : Among them, l i,1 (k) and l i,2 (k) respectively represent the length value of the k-th data item in the two groups of cache data in the register during the i-th round of expansion; (6) Calculate the starting position and the ending position of the data expander when it is expanded for the jth time in the i-th round; (6.1) Set the overflow length l when the data expander expands the data in the first round overflow = 0, the starting position p of the first expansion of the first round start =0; (6.2) Calculate the starting position p of the data expander at the jth expansion in the i-th round. start,ij : p start,ij =l overflow,i +cnt ij *N out Among them, cnt ij is the count value of the counter at the jth expansion in the i-th round, N out is the number of output bits of the expander, l overflow is the starting point position p start The overflow length l compared to the length of the first set of data items overflow : Among them, p start,(i-1)last Indicates the starting point of the last expansion in the i-1th round, l 1st,i-1 Indicates the sum of the lengths of the first set of data items cached in the register during the i-1th round of expansion; (6.3) Calculate the end point position p of the data expander at the jth expansion in the i-th round. end,ij : p end,ij =p start,ij +N out (7) Calculate the target value of the counter when the i-th round is unfolded; (7.1) Calculate the retention length l during the i-th round of expansion remain,i ; Use the sum of the lengths of the first set of cached data items l 1st,i Subtract the overflow length l overflow,i The remaining unexpanded length of the first group of cached data items is recorded as the retained length l remain,i ; l remain,i =l 1st,i -l overflow,i (7.2), the retained length l remain,i Divide by the number of output bits of the expander N out , take the quotient and find the remainder, and then use the quotient as l remain,i High remain_High,i , and take the remainder as l remain,i The low position remain_Low,i ; (7.3) Calculate the target value cnt of the counter when the i-th round is unfolded target,i ; (8) Determine whether the counter's count value cnt reaches the count target value cnt target , if cnt<cnt target , then go to step (9); otherwise, go to step (10); (9) The data expander performs the i-th round of data expansion; (9.1) Read two sets of cache data and then splice them into one set of data, denoted as L i (k), k=0,1,2,…,2*N in ; (9.2), calculate L i (k) The offset value of each data item; Among them, |L i (k)| represents data L i (k) The length of the k-th data item, offset i (k) represents data L i (k) is the offset value of the k-th data item; (9.3) Calculate the index value i corresponding to the end point position when the i-th round is expanded for the jth time. end,ij ; i end,ij =min{k|offset i (k+1)>p end,ij } (9.4) Calculate the index values ​​corresponding to the starting and ending positions of the selected data items during the j-th expansion of the i-th round; i selected_end,ij =i selected_start,ij +N select -1 Among them, i selected_start,ij 、i selected_end,ij Respectively represent the index values ​​corresponding to the starting position and the end position of the filtered data item, N select To filter the number of data items; (9.5), the data L i (k), according to the index value i selected_start,ij and i selected_end,ij , from 2N in Filter out all data items at the corresponding index position from the data items as the data items for the jth expansion in the i-th round; (9.6) Calculate the offset value of each filtered data item selected,ij (p); Where p = 1, 2, ..., N select ; (9.7) Calculate the enable signal of each filter data item ij (p); Among them, True represents enabling data items, and False represents disabling data items; (9.8) According to the offset value and enable signal of each filtered data item, construct an N select Row N out The column mask matrix M; Among them, each element of the mask matrix M is 0 or 1. When the element m in the pth row and qth column of the mask matrix M is pq Satisfy: enable ij (p) is True and offset selected,ij (p)≤q<offset selected,ij (p+1), m pq The value is 1, otherwise the value is 0; (9.9) Take out the data corresponding to the element 1 in each column of the mask matrix M, and then concatenate them in order to obtain a length of N out , and serves as the output data of the data expander after the j-th expansion in the i-th round; (9.10) After the jth expansion is completed, add 1 to the count value of the counter, then set j=j+1, and return to step (6.2) to perform the next round of data expansion; (10) Clear the count value of the counter; set i=i+1, and then control the data expander to overwrite the first set of cache data with the second set of cache data in the register, and then continue to receive the input multi-channel parallel data items and cache them to obtain a new second set of cache data, and then re-mark the index values ​​of the two sets of cache data items to 0~2*N in -1; finally, return to step (5).