Low density parity check (LDPC) decoder and minimum value searching method
By using a flattened minimum and calculation engine in the LDPC decoder, the input value is converted into a single-hot vector to find the minimum value first, which solves the problem of too long calculation time in the prior art and realizes efficient decoding of high-speed communication .
Patent Information
- Application Number
- CN202411065373.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-05-15
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-08
AI Technical Summary
The use of linear or tree-like minimum value comparison methods in existing LDPC decoders results in too long calculation time and cannot meet the efficient decoding requirements of high-speed communication.
Using a flattened minimum sum calculation engine, converts the input value into a one-hot vector, and selects all values at once to find the minimum value first, reducing the overall calculation time.
Quickly find the minimum value, the second minimum value or the offset minimum value is achieved through flat design, which significantly improves the calculation speed of the LDPC decoder and meets the efficient decoding needs of high-speed communication.
Smart Images

Figure CN118921070A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to communication decoding technology, in particular to a low density parity check (LDPC) decoder and a minimum value searching method. Background Art
[0002] Low-Density Parity-Check (LDPC) codes are used as error correction codes for passive optical networks (PON), Ethernet, and other data communication protocols because the error correction capability of LDPC is quite close to the theoretical maximum, the Shannon limit. A common algorithm used to perform decoding and error correction is the min-sum algorithm.
[0003] One way to implement the minimum sum engine is to compare the current minimum value with a value to be compared to find a new minimum value, and iteratively complete the comparison of all the values to be compared. However, this method (using linear minimum comparison / multiplexer) is quite slow because each comparison requires a comparator and a multiplexer to complete the calculation, thus requiring a number of comparators and multiplexers that is linear in the number of values to be compared.
[0004] Another implementation of the min-sum engine is to compare every two values to be compared in a tree-like manner to obtain the minimum value (first level), and then compare every two of the minimum values again (second level), and perform the tree reduction to the final result. Although this method (using a tree-like minimum value comparison / multiplexer) is faster than the first method (using a linear minimum value comparison / multiplexer), the tree structure results in the need for a number of layers that is the log-base-2 of the number of values to be compared. For example, 17 to 32 values to be compared will require five layers of comparators and multiplexers. Pipelining between layers does not help speed up the instruction cycle because the final result is needed for the next round of calculations. If the tree is pipelined, the first stage of the tree must wait until the last stage of the tree completes the first round of iterations before starting the second round of iterations. Therefore, the overall calculation time remains the same. Summary of the invention
[0005] In view of this, an embodiment of the present invention proposes a low-density parity check (LDPC) decoder and a method (using a linear minimum comparison / multiplexer) to perform calculations through a flat structure to increase the speed of calculations.
[0006] In view of this, an embodiment of the present invention proposes a low-density parity check LDPC decoder and an LDPC decoding method (using a flattened min-sum computation engine), which flattens all values in a set into one-hot vectors to select all values at once and preferentially decode the minimum value, thereby reducing the overall computation time. This solves the problem of excessively long overall computation time caused by iteratively comparing two values in a linear or tree-like manner.
[0007] The LDPC decoder includes a storage unit and at least one operation engine. The storage unit stores the LDPC matrix. The operation engine executes the LDPC decoding algorithm to estimate a decoding result for a codeword according to the LDPC matrix. The operation engine includes a minimum value search unit to output the minimum value search result according to the complex input value when the LDPC decoding algorithm executes the minimum value search operation. The minimum value search unit executes: converting these input values into complex single-hot vectors, each single-hot vector has a plurality of single-hot bits, and these single-hot bits in the same single-hot vector correspond to non-repeating single-hot bit indexes respectively; establishing a plurality of first vectors, each first vector non-repeatingly corresponds to a target bit index in these single-hot bit indexes, and each first vector presents the result of performing an OR operation between these single-hot bits on the target bit index in these single-hot vectors; and according to these single-hot bit indexes, from low to high, these first vectors are preferentially decoded to obtain the minimum value, and this minimum value is the target bit index corresponding to the first first vector whose value is 1, wherein the minimum value search result includes this minimum value.
[0008] The minimum value search method is performed by an LDPC decoder and is suitable for outputting a minimum value search result according to a complex input value. The minimum value search method includes: converting these input values into a complex Sudoku vector, each of which has a complex Sudoku bit, and these Sudoku bits in the same Sudoku vector correspond to non-repeating Sudoku bit indexes respectively; establishing a complex first vector, each of which corresponds to a target bit index in these Sudoku bit indexes without repetition, and each first vector presents the result of performing an OR operation between these Sudoku bits on the target bit index in these Sudoku vectors; and according to these Sudoku bit indexes, from low to high, preferentially decoding these first vectors to obtain a minimum value, the minimum value being the target bit index corresponding to the first first vector whose value is 1, wherein the minimum value search result includes this minimum value.
[0009] According to some embodiments of the present invention, the LDPC decoder and a minimum value search method can quickly find the minimum value, the second minimum value and / or the minimum value after offset processing through flattening design, which can meet the efficient decoding requirements of high-speed communication. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 FIG. 4 is a schematic diagram of the architecture of an LDPC decoder according to an embodiment of the present invention.
[0011] Figure 2 It is a partial schematic diagram of an LDPC matrix according to an embodiment of the present invention.
[0012] Figure 3 Flow chart of an LDPC decoding algorithm according to an embodiment of the present invention.
[0013] Figure 4 This is a flow chart (1) of a minimum value search algorithm according to an embodiment of the present invention.
[0014] Figure 5 FIG. 4 is a schematic diagram of one-hot vector conversion according to an embodiment of the present invention.
[0015] Figure 6 This is a flow chart (II) of a minimum value search algorithm according to an embodiment of the present invention.
[0016] Figure 7 This is a flow chart of a second minimum value search algorithm according to an embodiment of the present invention.
[0017] Figure 8 This is a flow chart (III) of a minimum value search algorithm according to an embodiment of the present invention.
[0018] Symbols and Markings
[0019] 100:LDPC Decoder
[0020] 110: Storage unit
[0021] 120: Flattened Minimum and Calculation Engine
[0022] 130: Computing Engine
[0023] 131: Minimum value search unit
[0024] 140: Codeword
[0025] 150:Decoding result
[0026] 200:LDPC matrix
[0027] 300: One-hot vector
[0028] 310: Single hot spot
[0029] 400: One-hot index
[0030] 500:Sequence
[0031] G, G[0]~G
[23] : input value
[0032] S31~S34: Steps
[0033] S41~S46: Steps
[0034] S61~62: Steps
[0035] S71~72: Steps DETAILED DESCRIPTION
[0036] Reference Figure 1 , is a schematic diagram of the architecture of an LDPC decoder 100 according to an embodiment of the present invention. The LDPC decoder 100 includes a storage unit 110 and a flattened minimum sum calculation engine 120 to perform the LDPC decoding method. The storage unit 100 stores the LDPC matrix 200 (such as Figure 2 ). The flattened minimum sum calculation engine 120 is a block having a plurality of operation engines 130. After obtaining a codeword 140, the operation engine 130 executes an LDPC decoding algorithm to estimate a decoding result 150 for the codeword 140 according to the LDPC matrix. The minimum value search unit 131 in the operation engine 130 flattens all values in the set into a one-hot vector to select and preferentially decode all values at once to find the minimum value, rather than iteratively comparing two values in a linear or tree-like manner.
[0037] Reference Figure 2 , which is a partial schematic diagram of an LDPC matrix 200 according to an embodiment of the present invention. Here, taking the LDPC matrix 200 used in 25G PON (passive optical network) as an example, the LDPC matrix 200 is a 17664x3072 sparse matrix composed of a 69x12 array of 256x256 sub-matrices. Figure 2 Each grid shown represents a sub-matrix. These sub-matrices are either zero-matrix or shifted identity matrix. Figure 2 The blank cells in the illustrated LDPC matrix 200 represent a zero matrix. Figure 2 The grids marked with numbers in the LDPC matrix 200 shown are represented as a shifted unit matrix, and the numbers shown represent the amount of shift of the unit matrix. For example, if the marked number is "0", it means that this sub-matrix is the unit matrix, and if the marked number is "5", it means that each row of the unit matrix is circularly shifted to the right by 5 elements. Figure 2 Only a specific example is provided to illustrate the LDPC matrix 200 according to an embodiment of the present invention. The LDPC matrix 200 is not limited to the number of rows and columns in this example, nor is it limited to the positions and translations of the sub-matrices in the example.
[0038] Each row of the LDPC matrix 200 is considered as a variable node, and each of the variable nodes corresponds to each bit of the codeword 140. Each column of the LDPC matrix 200 is considered as a check node, and each check node corresponds to a check equation. The element "1" in the LDPC matrix 200 indicates that the check node in the column is connected to the variable node in the row. The LDPC decoding algorithm is based on an iterative belief propagation algorithm, and the variable nodes and the check nodes transmit their calculated update information to each other through the connection.
[0039] Reference Figure 3 , which is a flow chart of the LDPC decoding algorithm of an embodiment of the present invention. Step S31 is an initialization step, which initializes the information of the variable node and the check node. Step S32 is a check node update step, in which the check node is updated according to the information of the variable node to which it is connected. Step S33 is a variable node update step, in which the variable node is updated according to the information of the check node to which it is connected. Step S34 is a termination judgment step, which judges whether the termination condition is met. If so, the process ends; if not, it returns to step S32 and continues to the next iteration.
[0040] Refer to Formula 1 and Formula 2, which are the initialization expressions of step S31. The variable nodes perform information initialization according to Formula 1, and the check nodes perform information initialization according to Formula 2. Wherein, i represents the number of iterations. N is the total number of variable nodes, and M is the total number of check nodes. n represents the number of the nth variable node, and m represents the number of the mth check node. N m Represents the set of all variable nodes connected to the mth check node. n Represents the set of all check nodes connected to the nth variable node. Represents the information passed from the nth variable node to the mth check node in the kth iteration. Represents the information passed from the mth check node to the nth variable node in the kth iteration. n The intrinsic information of the nth variable node is used to express the posterior probability that the bit of the codeword 140 corresponding to the variable node is 1 or 0. represents any one, ∈ represents belongs to. In some embodiments, the intrinsic information is a log-likelihood ratio (LLR).
[0041]
[0042] Refer to Formula 3, which is the update expression of the check node in step S32. Wherein, Π is the product symbol. sgn() is the sign function, which returns 0, 1 or -1 according to whether the value in the function is 0, positive or negative. min() is the minimum function. N m\n Represents the set of all variable nodes connected to the mth check node except variable node n.
[0043]
[0044] Refer to Formula 4, which is the update expression of the variable node in step S33. Wherein, ∑ is a summation symbol. n\m Represents the set of all check nodes connected to the nth variable node except check node m.
[0045]
[0046] In step S34, a hard decision is performed to decode and determine whether the termination condition is met. If the condition is met, the process ends. The termination condition is that the decoding result 150 is correct or the number of iterations exceeds the threshold. Refer to equations 5 and 6, which are expressions for hard decisions. Among them, equation 5 calculates the posterior probability λ of each variable node n According to the calculation result of formula 5, the bit value z corresponding to each variable node is determined using formula 6. n , that is, the decoding result 150 (sequence z1, z2, …, z n ). Formula 7 is used to confirm whether the decoding result 150 is correct (if it satisfies Formula 7, it is correct), where H represents the LDPC matrix 200, z T represents the decoding result 150 (sequence z1, z2, ..., z n ) is the transpose of .
[0047]
[0048] H T =0 (Formula 7)
[0049] According to the above description (such as Equation 3 and Equation 4), during the iteration process, The sum of information The minimum value is found from them, so the LDPC decoding algorithm described here is called the minimum sum algorithm. In the update operation of the check node (Formula 3), it is necessary to perform a minimum value search operation to obtain the minimum value from the variable node set N m\Find the minimum value among the intrinsic information corresponding to n. Therefore, if Figure 1 As shown, each operation engine 130 includes a minimum search unit 131, so that when the LDPC decoding algorithm performs a minimum search operation, the minimum search units 131 perform a minimum search procedure according to the complex input value (here, the variable node set N m\ n) outputs a minimum value search result. In some embodiments, each input value is the intrinsic information of the corresponding variable node (such as log-likelihood ratio).
[0050] In some embodiments, the number of computing engines 130 is determined based on the number of rows of the sub-matrix. Figure 2 For example, the number of operation engines 130 is 256. Each operation engine 130 corresponds to a row (check node) in the sub-matrix and performs a corresponding update operation (Formula 3). Therefore, these operation engines 130 can process the operation of 256 rows (also called a layer) in parallel at a time, and thus process all layers of the LDPC matrix 200 in batches (such as Figure 2 After the minimum value search unit 131 is plural, it can process the minimum value search process corresponding to each row in the same layer of the LDPC matrix 200 in parallel. That is, one minimum value search unit 131 processes the minimum value search calculation corresponding to one row.
[0051] Similarly, in some embodiments, the flattened minimum sum calculation engine 120 also includes other calculation engines ( Figure 2 Not shown), all variable nodes are updated in parallel in batches, which will not be repeated here.
[0052] In some embodiments, multiple straight rows in the LDPC matrix 200 are combined into a row group. Figure 2As shown, there is at most one non-zero matrix on each horizontal column of the 67th and 68th rows, so they can be merged into a row group. Similarly, the 65th and 66th rows can also be merged into another row group. Due to the sparse characteristics of the LDPC matrix 200, the number of vertical rows can be greatly reduced after being merged into row groups. Generally speaking, after being merged into row groups, the number of vertical rows can be reduced to about 20 (mid-twenties), such as 23 to 27. In this way, the number of input values to be executed for the minimum search operation can be reduced, but the present invention does not require the number of input values to be less than 30. Since there is only one "1" on each column in a translated unit matrix, for a minimum search unit 131, each row group corresponds to at most one input value. That is, the number of input values processed by the minimum search unit 131 in a minimum search operation is at most equal to the number of row groups. In some embodiments, the number of input values processed by a minimum search unit 131 is in the range of 23 to 69.
[0053] Reference Figure 4 , which is a flowchart of a minimum value search algorithm according to an embodiment of the present invention (I). Step S41 is a one-hot vector conversion step, which converts multiple input values G into one-hot vectors 300 respectively, such as Figure 5 shown. Figure 5 FIG. 3 is a schematic diagram of a one-hot vector 300 conversion according to an embodiment of the present invention. In some embodiments, the bit width of each input value G is 4 bits or 5 bits to achieve a balance between error correction capability and logic quantity. Figure 5 The system is illustrated with 24 5-bit input values G[0] to G
[23] , but the number of input values G and the number of bits are not limited to this. Each one-hot vector 300 has multiple digital elements (hereinafter referred to as "one-hot bits 310"), and these one-hot bits 310 in the same one-hot vector 300 correspond to non-repeating one-hot bit indexes 400. Here, the one-hot bit index 400 is "0" to "31", which is equivalent to the number represented in the one-hot vector 300. Taking the input value G[0] as an example, it is converted into a one-hot vector 300 composed of one-hot bits 310 such as F
[744] , ...F
[168] , F
[144] , F
[120] , F
[96] , F
[72] , F
[48] , F
[24] , and F[0]. The one-hot bit 310 marked with a solid bold frame has a value of 1, and the one-hot bit 310 without a bold frame has a value of "0". For example, the value of the input value G[4] is "6". After it is converted into a one-hot vector 300, the value of the one-hot bit 310 of F
[148] is "1", and the one-hot bit index 400 corresponding to the one-hot bit 310 of F
[148] is "6".
[0054] Referring to program code 1, it is an implementation of the conversion of the one-hot vector 300. The input values G[0]-G
[23] are compared with the one-hot bit index 400 one by one, and if the two are the same, the corresponding one-hot bit 310 is set to "1".
[0055] Program code 1:
[0056] F[0]=(G[0]==0);
[0057] F[1] = (G[1] == 0);
[0058] …
[0059] F
[23] =(G
[23] ==0);
[0060] F
[24] =(G[0]==1);
[0061] …
[0062] F
[767] =(G
[23] ==31);
[0063] It should be noted that although Figure 5 The relationship between the input value G and the one-hot vector 300 is expressed in the form of a two-dimensional array. However, F[0] to F
[767] is actually a one-dimensional array, that is, a flattened vector. For the convenience of subsequent description, "0" to "767" are defined as flattened bit indices. These flattened bit indices correspond one-to-one to the one-hot bits 310 of the one-hot vector 300. The flattened vector has a connected complex sequence 500, each sequence 500 corresponds to Figure 5 Each row shown. Each sequence 500 includes the unique bits 310 at the same unique bit index 400 in these unique hot vectors 300. For example, Figure 5 The sequence 500 indicated in FIG. 5 includes the one-hot bits 310 (F
[96] to F
[119] ) corresponding to the one-hot bit index 400 of 4 in each one-hot vector 300. The one-hot bits 310 included in these sequences 500 are arranged in the same arrangement order. Figure 5 As shown, the unique hot bits 310 included in these sequences 500 are arranged in order from top to bottom, and the arrangement order of these sequences 500 is consistent with the index order of the input values G[0]~G
[23] . These sequences 500 are arranged in ascending order according to their corresponding unique hot bit indexes 400. For example, the sequence 500 including the unique hot bits 310 of F[0]~F
[23] has a corresponding unique hot bit index 400 of "0"; the sequence 500 including the unique hot bits 310 of F
[24] ~F
[47] has a corresponding unique hot bit index 400 of "1", and so on.
[0064] Merge References Figure 4 , Figure 5 and program code 2. Step S42 is to establish a plurality of first vectors. Each first vector corresponds to one of these unique-hot bit indices 400 (hereinafter referred to as "target bit index") without duplication. For example, the unique-hot bit index 400 corresponding to the first vector First_vector[0] is "0", the unique-hot bit index 400 corresponding to the first vector First_vector[1] is "1", and so on. Each first vector presents the result of performing an OR operation between these unique-hot bits 310 at the target bit index in these unique-hot vectors 300. For example, the first vector First_vector[0] presents the result of an OR operation between the unique-hot bits 310 (F[0]~F
[23] ) whose unique-hot bit index 400 is 0. Therefore, if a first vector is "1", it means that at least one unique-hot vector 300 whose unique-hot bit 310 corresponding to the target bit index is "1".
[0065] Program code 2:
[0066] First_vector[0]=F[0]||F[1]||...F
[23] ;
[0067] First_vector[1]=F
[24] ||F
[25] ||...F
[47] ;
[0068] …
[0069] First_vector
[31] =F
[744] ||F
[755] ||…F
[767]
[0070] Merge References Figure 4 , Figure 5 and program code 3. Step S43 is to give priority to decoding the minimum value from these first vectors. Specifically, according to these unique hot bit indexes 400, from low to high (here from "0" to "31"), the minimum value is given priority to decoding these first vectors. The minimum value is the target bit index corresponding to the first first vector whose value is "1". Figure 5 For example, the one-hot bit index 400 corresponding to the first vector whose value is "1" is "1", so the minimum value included in the minimum value search result is "1".
[0071] Program code 3:
[0072] foreach bit(0..31)last if(First_vector[bit]);
[0073] Min_value = bit;
[0074] Merge References Figure 5 , Figure 6 And program code 4. Figure 6 This is a flow chart (two) of the minimum value search calculation of one embodiment of the present invention. This process is used to find out which of the aforementioned minimum values is in the input value G. In step S61, a second vector is established. Each second vector corresponds to one of the one-hot vectors 300 (hereinafter referred to as the "target one-hot vector") without duplication. Each second vector presents the result of performing an OR operation between the multiple judgment results generated by performing a logical judgment on each unique hot bit 310 in the target one-hot vector. Among them, the logical judgment is the intersection of the first condition and the second condition. The first condition is that the unique hot bit 310 subjected to the logical judgment is "1". The second condition is that in the flattened vector, these unique hot bits 310 at these flattened bit indices that are smaller than the flattened bit index of the unique hot bit 310 subjected to the logical judgment are all "0". Taking the second vector Second_vector[0] as an example, a logical judgment is performed on each unique hot bit 310 (F[0], F
[24] , F
[48] , ..., F
[744] ) in the corresponding one-hot vector 300. For example, for F
[24] , the first condition is to determine whether F
[24] is "1", and the second condition is to determine whether F[23:0] are all "0". If both conditions are true, it means that F
[24] in F[24:0] is the first unique hot bit 310 that is "1". The input value G[0] corresponding to the unique hot bit vector 300 where this unique hot bit 310 is located is the input value with the minimum value. In addition, since there is no flattened bit index smaller than the flattened bit index of F[0], only the first condition is determined for F[0], that is, whether F[0] is 1.
[0075] Program code 4:
[0076] Second_vector[0]=F[0]||F
[24] &&(F[23:0]==0)||F
[48] &&(F[47:0]==0)…F
[744] &&(F[743:0]==0);
[0077] Second_vector[1]=F[1]||F
[25] &&(F[24:0]==0)||F
[49] &&(F[48:0]==0)…F
[745] &&(F[744:0]==0);
[0078] Second_vector[2]=F[2]||F
[26] &&(F[25:0]==0)||F
[50] &&(F[49:0]==0)…F
[746] &&(F[745:0]==0);
[0079] …
[0080] Second_vector
[23] =F
[23] ||F
[47] &&(F[46:0]==0)||F
[71] &&(F[70:0]==0)…F
[767] &&F[766:0]==0;
[0081] Merge References Figure 5 , Figure 6 and program code 5. Step S62 is to preferentially decode the index of the input value G corresponding to the minimum value from these second vectors (hereinafter referred to as "input value index"), so as to include this input value index in the minimum value search result. Specifically, according to the arrangement order of the unique hot bits 310 in the sequence 500 (that is, the arrangement order of the input value G), the input value index corresponding to the minimum value is preferentially decoded for these second vectors. The input value index is a sequential index of the arrangement order corresponding to the first second vector whose logical judgment is true. Figure 5 In the example, the unique hot bit 310 of F
[24] is the minimum value. Therefore, after the aforementioned step S61, the logic judgment of the second vector Second_vector[0] is true (expressed as "1"), and it is the first second vector whose logic judgment is true. Therefore, the input value index of the minimum value is "0" (that is, the index value of this second vector is also the same as the corresponding input value index).
[0082] Program code 5:
[0083] foreach bit(0..23)last if(Second_vector[bit]);
[0084] Min_index = bit;
[0085] In some embodiments, the LDPC decoding algorithm uses a variation of the aforementioned minimum sum algorithm, such as a normalized min-sum algorithm, an offset min-sum algorithm, etc., which uses a second minimum value in addition to the minimum value. In one example, when the input values G[2] and G[5] are both "3", and the other input value G is "4", the minimum value is "3" and the second minimum value is also "3". In another example, when the input value G[1] is "2", when the input value G[0] is "4", and the other input value G is greater than "4", the minimum value is "2" and the second minimum value is "4". Next, it is described how to obtain the second minimum value through the aforementioned flattened vector to provide a minimum value search result including the second minimum value.
[0086] Merge References Figure 5 , Figure 7 And program code 6, Figure 7 This is a flow chart of the second minimum value search operation of an embodiment of the present invention. In step S71, a plurality of third vectors are established. Each third vector corresponds to a unique bit index 400 (i.e., a target bit index) without duplication. The third vector presents the intersection of the plurality of results generated by performing a logical judgment on the unique bit 310 at the target bit index of the one-hot vector 300. The logical judgment is the intersection of the third condition and the fourth condition. The third condition is that the unique bit 310 subjected to the logical judgment is "1". The fourth condition is that in the flattened vector, the unique bits 310 at the flattened bit indexes smaller than the flattened bit index of the unique bit 310 subjected to the logical judgment are not all "0". Taking the third vector Third_vector[2] as an example, a logical judgment is performed on each unique bit 310 (F
[48] to F
[71] ) in the one-hot vector 300 at its corresponding unique bit index 400 ("2"). For example, for F
[50] , the third condition is to determine whether F
[50] is "1", and the fourth condition is to determine whether F[49:0] are not all "0". If both conditions are true, it means that F
[49] in F[50:0] is the second "1" unique hot bit 310. In addition, since there is no flattened bit index smaller than the flattened bit index of F[0], the determination of F[0] is omitted in the third vector Third_vector[0].
[0087] Program code 6:
[0088] Third_vector[0]=F[1]&&! (F[0]==0)||F[2]&&! (F[1:0]==0)||…F
[23] &&! (F[22:0]==0);
[0089] Third_vector[1]=F
[24] &&! (F[23:0]==0)||F
[25] &&! (F[24:0]==0)…F
[47] &&! (F[46:0]==0);
[0090] …
[0091] Third_vector
[31] =F
[744] &&! (F[743:0]==0)||F
[745] &&! (F[744:0]==0)||…F
[767] &&! (F[766:0]==0);
[0092] Merge References Figure 5 , Figure 7and program code 7. Step S72 is to preferentially decode the second minimum value from the third vectors. Specifically, according to the unique hot bit indexes 400, from low to high, the second minimum value is preferentially decoded from the third vectors. The second minimum value is the target bit index corresponding to the third vector whose first logical judgment is true. Figure 5 In the example, the unique hot bit 310 of F
[50] is the second minimum value. Therefore, after the aforementioned step S71, the logic judgment of the third vector Third_vector[2] is true (represented as "1"), and it is the first third vector whose logic judgment is true. Therefore, the second minimum value is "2" (i.e., the corresponding target bit index is also the same as the index value of this third vector).
[0093] Program code 7:
[0094] foreach bit(0..31)last if(Third_vector[bit]);
[0095] Third_min_value=bit;
[0096] In some embodiments, the minimum value used in some variations of the minimum sum algorithm (such as the aforementioned compensated minimum sum algorithm) is offset processed. That is, the minimum value included in the minimum value search result is the minimum value that has been offset processed. Next, how to offset the minimum value found above is described.
[0097] Merge References Figure 5 , Figure 8 And program codes 8 to 10, Figure 8 This is a flowchart (3) of the minimum value search calculation of an embodiment of the present invention. After the first vector is obtained according to the aforementioned step S43, the offset processing from step S44 to step S46 is performed. Here, the offset is taken as 1 as an example, but the present invention is not limited to this.
[0098] In step S44, for the first vector (here First_vector[1:0]) whose one-hot bit index 400 is below the offset, the first value (bit_no_offset) is preferentially decoded, as shown in program code 8. The first value (bit_no_offset) is the one-hot bit index 400 corresponding to the first vector whose value is "1". If the first vector First_vector[0] is "1", the first value (bit_no_offset) is "0". If the first vector First_vector[0] is "0" and the first vector First_vector[1] is "1", the first value (bit_no_offset) is "1".
[0099] Program code 8:
[0100] foreach bit_no_offset(0..1)last if(First_vector[bit_no_offset]);
[0101] In step S45, for the other first vectors of the one-hot bit index 400, that is, the first vectors whose one-hot bit index 400 is not below the offset (here First_vector[31:2]), the second value (bit_offset) is preferentially decoded, as shown in program code 9. The second value (bit_offset) is the one-hot bit index 400 corresponding to the first first vector whose value is "1" minus the offset. For example, when the first vector First_vector[2] is "0" and the first vector First_vector[3] is "1", the second value (bit_offset) is 2.
[0102] Program code 9:
[0103] foreach bit_offset(1..30)last if(First_vector[bit_offset+1]);
[0104] In step S46, an OR operation is performed on the first vector (First_vector[1:0]) below the offset of the one-hot bit index 400. If the operation result is "1", it means that the minimum value appears in these first vectors, and the first value is used as the minimum value after the offset processing. If the operation result is "0", it means that the minimum value appears in other first vectors, and the second value is used as the minimum value after the offset processing.
[0105] Program code 10:
[0106] Min_value_with_offset=(First_vector[0]||First_vector[1])? bit_no_offset:bit_offset;
[0107] Compared to using the program code 11 to compare logic, Figure 8 By performing the offset process according to the first vector created from the flattened vector, it is possible to increase the processing speed by utilizing the flattened structure.
[0108] Program code 11:
[0109] Min_value_with_offset=Min_value>1? Min_value–1:Min_value;
[0110] The LDPC decoder and minimum value search method proposed in some embodiments of the present invention can quickly find the minimum value, the second minimum value and / or the minimum value after offset processing through a flattened design without iterative comparison in a linear or tree-based manner, thereby meeting the efficient decoding requirements of high-speed communications.
Claims
1. A minimum value search method, adapted to output a minimum value search result according to a plurality of input values, the minimum value search method comprising: Convert the input value into a plurality of Sudoku vectors, each of which has a plurality of Sudoku bits, and the Sudoku bits in the same Sudoku vector respectively correspond to a non-repeating Sudoku bit index; Creating a plurality of first vectors, each of which corresponds to a target bit index in the one-hot bit index without duplication, and each of which represents a result of performing an OR operation between the one-hot bits at the target bit index in the one-hot vector; and According to the one-hot bit index, the first vector is preferentially decoded from low to high bits to obtain a minimum value, the minimum value being the target bit index corresponding to the first first vector whose value is 1, wherein the minimum value search result includes the minimum value.
2. The minimum value search method as described in claim 1, wherein the one-hot vector is in a flattened vector, the flattened vector has a plurality of flattened bit indices, the flattened bit indices correspond one-to-one to the one-hot bits of the one-hot vector, the flattened vector comprises a plurality of connected sequences, each of the sequences comprises the one-hot bits at the same one-hot bit index in the one-hot vector, the one-hot bits included in the sequences are arranged in the same arrangement order, and the sequences are arranged in ascending order according to their corresponding one-hot bit indices.
3. The minimum value search method as claimed in claim 2, further comprising: Establishing a plurality of second vectors, wherein each of the second vectors corresponds to a target one-hot vector in the one-hot vector without duplication, and each of the second vectors presents a result of performing an OR operation between a plurality of judgment results generated by performing a logic judgment on each one-hot bit in the target one-hot vector, wherein the logic judgment is an intersection of a first condition and a second condition, the first condition being that the one-hot bit subjected to the logic judgment is 1, and the second condition being that the one-hot bits at the flattened bit index smaller than the flattened bit index of the one-hot bit subjected to the logic judgment in the flattened vector are all 0; and According to the arrangement order, the second vector is preferentially decoded to obtain an input value index corresponding to the minimum value, the input value index being a sequential index of the arrangement order corresponding to the first second vector for which the logical judgment is true, wherein the minimum value search result also includes the input value index.
4. The minimum value search method as claimed in claim 2, further comprising: Establishing a plurality of third vectors, wherein each of the third vectors corresponds to the target bit index in the one-hot bit index without duplication, and the third vector presents the intersection of a plurality of results generated by performing a logic judgment on the one-hot bit at the target bit index of the one-hot vector, wherein the logic judgment is the intersection of a third condition and a fourth condition, the third condition being that the one-hot bit subjected to the logic judgment is 1, and the fourth condition being that the one-hot bits at the flattened bit index smaller than the flattened bit index of the one-hot bit subjected to the logic judgment in the flattened vector are not all 0; and According to the one-hot bit index, the third vector is preferentially decoded from low to high bits to obtain a second minimum value, the second minimum value being the target bit index corresponding to the first third vector for which the logic judgment is true, wherein the minimum value search result also includes the second minimum value.
5. The minimum value searching method as claimed in claim 1, further comprising: An offset process is performed on the minimum value, wherein the minimum value included in the minimum value search result is the minimum value after the offset process.
6. The minimum value searching method as claimed in claim 1, wherein the offset processing comprises: For the first vector whose one-hot bit index is below the offset, preferentially decode a first value, where the first value is the one-hot bit index corresponding to the first first vector whose value is 1; For other first vectors, preferentially decode a second value, where the second value is the one-hot bit index corresponding to the first first vector whose value is 1 minus the offset; and An OR operation is performed on the first vector with the unique hot bit index below the offset, wherein if the operation result is 1, the first value is used as the minimum value processed by the offset, and if the operation result is 0, the second value is used as the minimum value processed by the offset.
7. The minimum value searching method as claimed in claim 1, wherein each of the input values is a log-likelihood ratio.
8. The minimum value searching method as claimed in claim 1, wherein each of the input values is 4 bits or 5 bits.
9. The minimum value searching method as claimed in claim 1, wherein the number of the input values is in the range of 23 to 69.
10. The minimum value search method as claimed in claim 1, wherein the decoder comprises a plurality of minimum value search units to execute the minimum value search method and perform parallel processing corresponding to each row located at the same layer in a low density parity check matrix.
11. A low-density parity check (LDPC) decoder, executing the minimum value searching method as claimed in any one of claims 1 to 10.
