# Patent application title: RECONFIGURABLE TWO'S-COMPLEMENT AND SIGN-MAGNITUDE CONVERTER

##
Inventors:
Kiran Gunnam (San Jose, CA, US)

Assignees:
LSI Corporation

IPC8 Class: AG06F738FI

USPC Class:
714752

Class name: Pulse or data error handling digital data error correction forward correction by block code

Publication date: 2010-02-18

Patent application number: 20100042892

## Inventors list |
## Agents list |
## Assignees list |
## List by place |

## Classification tree browser |
## Top 100 Inventors |
## Top 100 Agents |
## Top 100 Assignees |

## Usenet FAQ Index |
## Documents |
## Other FAQs |

# Patent application title: RECONFIGURABLE TWO'S-COMPLEMENT AND SIGN-MAGNITUDE CONVERTER

##
Inventors:
Kiran Gunnam

Agents:
MENDELSOHN, DRUCKER, & ASSOCIATES, P.C.

Assignees:
LSI Corporation

Origin: PHILADELPHIA, PA US

IPC8 Class: AG06F738FI

USPC Class:
714752

Patent application number: 20100042892

## Abstract:

In one embodiment, a reconfigurable two's-complement-to-sign-magnitude
(2TSM) converter has two five-bit non-reconfigurable 2TSM converters and
is selectively configurable to operate in a five-bit mode or a ten-bit
mode. In five-bit mode, the first and second non-reconfigurable 2TSM
converters concurrently convert first and second five-bit messages,
respectively, from two's-complement-to-sign-magnitude format. In the
ten-bit mode, the first and second non-reconfigurable 2TSM converters
concurrently convert first and second halves of a ten-bit message,
respectively, from two's-complement-to-sign-magnitude format. The
reconfigurable 2TSM converter then generates a ten-bit sign-magnitude
message based on the conversions of the two non-reconfigurable 2TSM and a
carry-over bit. In another embodiment, a reconfigurable
sign-magnitude-to-two's-complement (SMT2) converter comprises the
reconfigurable 2TSM described above. The reconfigurable SMT2 is
selectively configurable to operate in (i) a five-bit mode to convert two
five-bit messages concurrently and (ii) a ten-bit mode to convert one
ten-bit message at a time.## Claims:

**1.**An apparatus comprising a reconfigurable converter (e.g., 1000, 1100) adapted to convert a multi-bit value between sign-magnitude format and two's-complement format, wherein:the reconfigurable converter is selectively configurable to operate in a first operating mode, in which the multi-bit value has a first number of bits; andthe reconfigurable converter is selectively configurable to operate in a second operating mode, in which the multi-bit value has a second number of bits different from the first number of bits.

**2.**The apparatus of claim 1, wherein the reconfigurable converter comprises hardware (e.g., 1002, 1004, 1008, 1010, 1012, 1014, 1016) that is used in both the first and second operating modes.

**3.**The apparatus of claim 1, wherein:the second number of bits is an integer multiple M of the first number of bits; andin the first operating mode, the reconfigurable converter is adapted to convert concurrently M times as many multi-bit values as in the second operating mode.

**4.**The apparatus of claim 3, wherein M=

**2.**

**5.**The apparatus of claim 1, wherein:the reconfigurable converter comprises a first non-reconfigurable converter (e.g., 1002, 1004, 1016) and a second non-reconfigurable converter (e.g., 1002, 1010, 1012); andeach non-reconfigurable converter is adapted to process a set of bits having the first number of bits.

**6.**The apparatus of claim 5, wherein:in the first operating mode:the reconfigurable converter receives first and second multi-bit values (e.g., Q[4:0], Q[9:5]), each multi-bit value having the first number of bits;the first non-reconfigurable converter converts the first multi-bit value to generate a first converted multi-bit value (e.g., |Q

_{1}|[4:0]) concurrently with the second non-reconfigurable converter converting the second multi-bit value to generate a second converted multi-bit value (e.g., |Q

_{2}|[9:5]); andin the second operating mode:the reconfigurable converter receives a third multi-bit value (e.g., Q[9:0]) having the second number of bits; andthe first non-reconfigurable converter converts a set of least significant bits (LSBs) of the third multi-bit value (e.g., Q[4:0]) to generate a set of LSBs (e.g., |Q

_{1}|[4:0]) for a third converted multi-bit value (e.g., |Q|[9:0]) concurrently with the second non-reconfigurable converter converting a set of most significant bits (MSBs) of the third multi-bit value (e.g., Q[9:5]) to generate a set of MSBs (e.g., |Q

_{2}|[9:5]) for the third converted multi-bit value.

**7.**The apparatus of claim 1, wherein the reconfigurable converter comprises:at least one inverter (e.g., 1002) adapted to invert a first set of bits (e.g., Q[4:0]) and a second set of bits (e.g., Q[9:5]), each set of bits having the first number of bits, to generate a first set of inverted bits (e.g., I[4:0]) and a second set of inverted bits (e.g., I[9:5]);a first adder (e.g., 1004) adapted to add a value of one to the first set of inverted bits to generate a first set of adjusted bits (e.g., I'[4:0]);a first multiplexer (e.g., 1014) adapted to select, based on a mode control signal (e.g., 1006), either (i) an MSB of the first set of bits (e.g., Q[4]) or (ii) an MSB of the second set of bits (e.g., Q[9]) as an output of the first multiplexer;a second multiplexer (e.g., 1016) adapted to select, based on the output of the first multiplexer, either (i) the first set of adjusted bits or (ii) the first set of bits to be a first set of output bits (e.g., |Q

_{1}|[4:0]);a third multiplexer (e.g., 1008) adapted to select, based on the mode control signal, either (i) an MSB of the first set of adjusted bits or (ii) a value of one as an output of the third multiplexer;a second adder (e.g., 1010) adapted to add the output of the third multiplexer to the second set of inverted bits to generate a second set of adjusted bits (e.g., I'[9:5]); anda fourth multiplexer (e.g., 1012) adapted to select, based on a value of an MSB of the second set of bits (e.g., Q[9]), either (i) the second set of adjusted bits or (ii) the second set of bits to be a second set of output bits (e.g., |Q

_{1}|[9:5]) as an output of the fourth multiplexer.

**8.**The apparatus of claim 7, wherein the at least one inverter, the first and second adders, the first, second, third, and fourth multiplexers form a reconfigurable two's-complement-to-sign-magnitude (2TSM) converter adapted to convert the multi-bit value from the two's-complement format to the sign-magnitude format.

**9.**The apparatus of claim 8, wherein the reconfigurable converter is a reconfigurable sign-magnitude-to-two's-complement (SMT2) converter adapted to convert the multi-bit value from the sign-magnitude format to the two's-complement format, wherein the reconfigurable SMT2 converter comprises:the reconfigurable 2TSM converter adapted to receive the multi-bit value in the sign-magnitude format and generate a converted multi-bit value [e.g., J[9:0]; andlogic circuitry adapted to receive (i) the multi-bit value in the sign-magnitude format and (ii) the converted multi-bit value and generate a multi-bit value in the two's-complement format.

**10.**The apparatus of claim 7, wherein, in the first operating mode:the first set of bits is a first multi-bit value having the first number of bits;the second set of bits is a second multi-bit value having the first number of bits;the mode control signal is set such that (i) the MSB of the first set of bits is selected by the first multiplexer and (ii) the value of one is selected by the third multiplexer;the first set of output bits is a first converted multi-bit value corresponding to the first multi-bit value; andthe second set of output bits is a second converted multi-bit value corresponding to the second multi-bit value.

**11.**The apparatus of claim 7, wherein, in the second operating mode:the first set of bits is a set of LSBs of the multi-bit value having the second number of bits;the second set of bits is a set of MSBs of the multi-bit value;the mode control signal is set such that (i) the MSB of the second set of bits is selected by the first multiplexer and (ii) the MSB of the first set of adjusted bits is selected by the third multiplexer;the first set of output bits is a set of LSBs of a converted multi-bit value corresponding to the multi-bit value; andthe second set of output bits is a set of MSBs of the converted multi-bit value.

**12.**The apparatus of claim 1, wherein:the multi-bit value is a message comprising a hard-decision bit and at least one confidence-value bit; andthe apparatus is a node unit of a reconfigurable error-correction (EC) decoder.

**13.**The apparatus of claim 12, wherein the reconfigurable EC decoder is a low-density parity-check (LDPC) decoder.

**14.**The apparatus of claim 1, wherein the reconfigurable converter is a two's-complement-to-sign-magnitude (2TSM) converter adapted to convert the multi-bit value from the two's-complement format to the sign-magnitude format.

**15.**The apparatus of claim 1, wherein the reconfigurable converter is a sign-magnitude-to-two's-complement (SMT2) converter adapted to convert the multi-bit value from the sign-magnitude format to the two's-complement format.

**16.**A method for converting a multi-bit value between sign-magnitude format and two's-complement format, the method comprising:(a) selecting an operating mode for a reconfigurable converter;(b) if a first operating mode is selected, then operating the reconfigurable converter in the first operating mode, in which the multi-bit value has a first number of bits; and(c) if a second operating mode is selected, then operating the reconfigurable converter in the second operating mode, in which the multi-bit value has a second number of bits different from the first number of bits.

**17.**The method of claim 16, wherein:the second number of bits is an integer multiple M of the first number of bits; andin the first operating mode, the method is adapted to convert concurrently M times as many multi-bit values as in the second operating mode.

**18.**The method of claim 16, wherein:in the first operating mode, the method comprises:(a) receiving at the reconfigurable converter first and second multi-bit values (e.g., Q[4:0], Q[9:5]), each multi-bit value having the first number of bits;(b) converting the first multi-bit value to generate a first converted multi-bit value (e.g., |Q

_{1}|[4:0]) while separately converting the second multi-bit value to generate a second converted multi-bit value (e.g., |Q

_{2}|[9:5]); andin the second operating mode, the method comprises:(c) receiving a third multi-bit value (e.g., Q[9:0]) having the second number of bits; and(d) converting a set of least significant bits (LSBs) of the third multi-bit value (e.g., Q[4:0]) to generate a set of converted LSBs (e.g., |Q

_{1}|[4:0]) for a third converted multi-bit value (e.g., |Q|[9:0]) while separately converting a set of most significant bits (MSBs) of the third multi-bit value (e.g., Q[9:5]) to generate a set of converted MSBs (e.g., |Q

_{2}|[9:5]) for the third converted multi-bit value.

**19.**The method of claim 16, wherein the method converts the multi-bit value from the two's-complement format to the sign-magnitude format.

**20.**The method of claim 16, wherein the method converts the multi-bit value from the sign-magnitude format to the two's-complement format.

## Description:

**CROSS**-REFERENCE TO RELATED APPLICATIONS

**[0001]**This is a continuation of co-pending application Ser. No. 12/420,535, filed on Apr. 8, 2009 as attorney docket no. 08-0242, which claims the benefit of the filing date of U.S. provisional application No. 61/089,297, filed on Aug. 15, 2008 as attorney docket no. 08-0241, the teachings of both of which are incorporated herein by reference in their entirety.

**[0002]**The subject matter of this application is related to U.S. patent application Ser. No. 12/113,729 filed May 1, 2008, U.S. patent application Ser. No. 12/113,755 filed May 1, 2008, U.S. patent application Ser. No. 12/323,626 filed Nov. 26, 2008, U.S. patent application Ser. No. 12/401,116 filed Mar. 10, 2009, PCT patent application no. PCT/US08/86523 filed Dec. 12, 2008, and PCT patent application no. PCT/US08/86537 filed Dec. 12, 2008, the teachings all of which are incorporated herein by reference in their entirety.

**[0003]**The subject matter of this application is also related to PCT patent application no. PCT/US09/39918 filed Apr. 8, 2009, PCT application no. PCT/US09/39279 filed on Apr. 2, 2009, and U.S. patent application Ser. No. 12/420,535 filed Apr. 8, 2009.

**BACKGROUND OF THE INVENTION**

**[0004]**1. Field of the Invention

**[0005]**The present invention relates to signal processing, and, in particular, to error-correction encoding and decoding techniques such as low-density parity-check (LDPC) encoding and decoding.

**[0006]**2. Description of the Related Art

**[0007]**In decoding a codeword, an LDPC decoder may encounter one or more trapping sets that prevent the decoder from properly decoding the codeword. Trapping sets, which represent subgraphs in a Tanner graph of an LDPC code, typically have a strong influence on error-floor characteristics of the LDPC code because a trapping set may force the decoder to converge to an incorrect result. To improve error-floor characteristics, an LDPC decoder may employ different techniques to break dominant trapping sets (i.e., trapping sets typically having the most significant influence on error floor characteristics). These dominant trapping sets vary widely based on the operating conditions of the decoder, such as decoder alphabet, decoder algorithm, decoder check-node unit update, channel conditions, and signal conditions.

**SUMMARY OF THE INVENTION**

**[0008]**In one embodiment, the present invention is an apparatus comprising a reconfigurable converter adapted to convert a multi-bit value between sign-magnitude format and two's-complement format. The reconfigurable converter is selectively configurable to operate in a first operating mode, in which the multi-bit value has a first number of bits. The reconfigurable converter is also selectively configurable to operate in a second operating mode, in which the multi-bit value has a second number of bits different from the first number of bits. In another embodiment, the present invention is a method for operating a reconfigurable converter.

**BRIEF DESCRIPTION OF THE DRAWINGS**

**[0009]**Other aspects, features, and advantages of the present invention will become more fully apparent from the following detailed description, the appended claims, and the accompanying drawings in which like reference numerals identify similar or identical elements.

**[0010]**FIG. 1 shows one implementation of a parity-check matrix that may be used to implement a regular, quasi-cyclic (QC) low-density parity-check (LDPC) code;

**[0011]**FIG. 2 shows a simplified block diagram of one implementation of an LDPC decoder that may be used to decode a signal encoded using an H-matrix such as the H-matrix of FIG. 1;

**[0012]**FIG. 3 shows a simplified block diagram of one implementation of a 72-way cyclic shifter that may be used to implement each cyclic shifter of FIG. 2;

**[0013]**FIG. 4 shows a simplified block diagram of one implementation of a check-node unit (CNU) that may be used to implement each CNU of the LDPC decoder of FIG. 2;

**[0014]**FIG. 5 shows a simplified block diagram of a two's-complement-to-sign-magnitude (2TSM) converter that may be used to implement the 2TSM converter of the CNU of FIG. 4;

**[0015]**FIG. 6 shows a simplified block diagram of one implementation of a variable-node unit (VNU) that may be used to implement each VNU of the LDPC decoder of FIG. 2;

**[0016]**FIG. 7 graphically illustrates a timing diagram for the LDPC decoder of FIG. 2;

**[0017]**FIG. 8 shows a simplified block diagram of an LDPC decoder according to one embodiment of the present invention that may be used to decode a signal encoded using an H-matrix such as the H-matrix 100 of FIG. 1;

**[0018]**FIG. 9 shows a simplified block diagram of a reconfigurable CNU according to one embodiment of the present invention that may be used to implement each reconfigurable CNU of the reconfigurable CNU arrays of the LDPC decoder of FIG. 8;

**[0019]**FIG. 10 shows a simplified block diagram of a reconfigurable two's-complement-to-magnitude (2TM) converter according to one embodiment of the present invention that may be used to implement the reconfigurable 2TM converter of the reconfigurable CNU of FIG. 9;

**[0020]**FIG. 11 shows a simplified block diagram of a reconfigurable sign-magnitude-to-two's-complement (SMT2) converter according to one embodiment of the present invention that may be used to implement the reconfigurable SMT2 converter of the reconfigurable CNU of FIG. 9;

**[0021]**FIG. 12 shows a simplified block diagram of a reconfigurable minimum operator 1200 according to one embodiment of the present invention that may be used to implement the reconfigurable minimum operators of the reconfigurable CNU of FIG. 9;

**[0022]**FIG. 13 shows a simplified block diagram of a reconfigurable adder according to one embodiment of the present invention;

**[0023]**FIG. 14 shows a simplified block diagram of a reconfigurable cyclic shifter according to one embodiment of the present invention that may be used to implement each reconfigurable cyclic shifter of the LDPC decoder of FIG. 8;

**[0024]**FIG. 15 shows a simplified block diagram of a five-bit message reordering block according to one embodiment of the present invention that may be used to implement the five-bit message reordering block of the reconfigurable cyclic shifter of FIG. 14;

**[0025]**FIG. 16 shows a simplified block diagram of a ten-bit message reordering block according to one embodiment of the present invention that may be used to implement the ten-bit message reordering block of the reconfigurable cyclic shifter of FIG. 14;

**[0026]**FIG. 17 shows a simplified block diagram of a message separator according to one embodiment of the present invention that may be used to implement the message separator of the reconfigurable cyclic shifter of FIG. 14;

**[0027]**FIG. 18 shows a simplified block diagram of an output message reordering block according to one embodiment of the present invention that may be used to implement the output message reordering block of the reconfigurable cyclic shifter of FIG. 14; and

**[0028]**FIG. 19 graphically illustrates a timing diagram for the ten-bit precision mode of the LDPC decoder of FIG. 8.

**DETAILED DESCRIPTION**

**[0029]**Reference herein to "one embodiment" or "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase "in one embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments necessarily mutually exclusive of other embodiments. The same applies to the term "implementation."

**[0030]**Low-Density Parity Check (LDPC) Code

**[0031]**FIG. 1 shows one implementation of a parity-check matrix 100 that may be used to implement a regular, quasi-cyclic (QC) LDPC code. Parity-check matrix 100, commonly referred to as an H-matrix, comprises 40 circulants B

_{j,k}that are arranged in r=4 rows of circulants (i.e., block rows) where j=1, . . . , r and c=10 columns of circulants (i.e., block columns) where k=1, . . . , c. A circulant is a sub-matrix that is either an identity matrix or is obtained by cyclically shifting an identity matrix, and a quasi-cyclic LDPC code is an LDPC code in which all of the sub-matrices are circulants. In H-matrix 100, each circulant B

_{j,k}is a p×p sub-matrix that may be obtained by cyclically shifting a single p×p identity matrix. For purposes of this discussion, assume that p=72 such that H-matrix 100 has p×r=72×4=288 total rows and p×c=72×10=720 total columns. Since each circulant B

_{j,k}is a permutation of an identity matrix, the hamming weight (i.e., the number of entries having a value of one) of each column in a circulant and the hamming weight of each row in a circulant are both equal to 1. Thus, the total hamming weight w

_{r}for each row of H-matrix 100 is equal to 1×c=1×10=10, and the total hamming weight w

_{c}for each column of H-matrix 100 is equal to 1×r=1×4=4. Each of the 288 rows of H-matrix 100 corresponds to an m

^{th}check node, where m ranges from 0, . . . , 287, and each of the 720 columns corresponds to an n

^{th}variable node (also referred to as a bit node), where n ranges from 0, . . . , 719. Further, each check node is connected to w

_{r}=10 variable nodes as indicated by the 1s in a row, and each variable node is connected to w

_{c}=4 check nodes as indicated by the 1s in a column. H-matrix 100 may be described as a regular LDPC code since all rows of H-matrix 100 have the same hamming weight w

_{r}and all columns of H-matrix 100 have the same hamming weight w

_{c}.

**[0032]**Five-Bit LDPC Decoder

**[0033]**FIG. 2 shows a simplified block diagram of one implementation of an LDPC decoder 200 that may be used to decode codewords encoded using an H-matrix such as H-matrix 100 of FIG. 1. For each codeword received, LDPC decoder 200 receives 720 soft values (e.g., log-likelihood ratios (LLR)) L

_{n}.sup.(0) from a soft detector such as a soft-output Viterbi detector and stores these soft values L

_{n}.sup.(0) in soft-value memory 202. Each soft value L

_{n}.sup.(0) corresponds to one bit of the codeword, and all of the soft values L

_{n}.sup.(0) comprise the same (i.e., a fixed) number of bits. Each codeword is decoded iteratively using a message-passing algorithm, where all of the messages comprise the same (i.e., fixed) number of bits as the 720 soft values L

_{n}.sup.(0). For this discussion, assume that each message, including each soft value L

_{n}.sup.(0), comprises five bits.

**[0034]**In general, LDPC decoder 200 decodes the 720 soft values L

_{n}.sup.(0) (i.e., messages) using a block-serial message-passing schedule. The messages are updated using (i) 288 five-bit check-node units (CNUs) 210, where each CNU 210 performs check-node updates for one row (i.e., the m

^{th}check node) of H-matrix 100 and (ii) 72 five-bit variable-node units (VNUs) 204, where each VNU 204 performs the variable-node updates for ten columns (i.e., the n

^{th}variable nodes) of H-matrix 100. CNUs 210(0), . . . , 210(287) perform the check-node (i.e., row) updates for the 288 rows of H-matrix 100, one block column at a time, such that the check-node updates for the first block column (i.e., circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}) are performed, followed by the check-node updates for the second block column (i.e., circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}), followed by the check-node updates for the third block column (i.e., circulants B

_{1,3}, B

_{2},3, B

_{3,3}, and B

_{4},3), and so forth. VNUs 204(0), . . . , 204(71) then perform the variable-node (i.e., column) updates for the 720 columns of H-matrix 100, one block column at a time, such that the variable-node updates for the first block column (i.e., circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}) are performed, followed by the variable-node updates for the second block column (i.e., circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}), followed by the variable-node updates for the third block column (i.e., circulants B

_{1,3}, B

_{2},3, B

_{3,3}, and B

_{4},3), and so forth. An iteration is complete after all check-node updates and variable-node updates have been performed.

**[0035]**Initially, the 720 five-bit soft values L

_{n}.sup.(0) are provided to four multiplexers 206(0), . . . , 206(3) at a rate of 72 soft values L

_{n}.sup.(0) per clock cycle such that each multiplexer 206 receives all 72 soft values L

_{n}.sup.(0) in the set. Each multiplexer 206 also receives 72 five-bit variable-node messages (herein referred to as Q messages) from VNUs 204(0), . . . , 204(71), which are generated as discussed in further detail below. During the first iteration, multiplexers 206(0), . . . , 206(3) select the sets of 72 five-bit soft values L

_{n}.sup.(0) that they receive to output to 72-way cyclic shifters 208(0), . . . , 208(3), respectively. The initial Q messages, which are not selected, may be Q messages generated for a previously considered codeword. During subsequent iterations, multiplexers 206(0), . . . , 206(3) select the sets of 72 five-bit Q messages that they receive from VNUs 204(0), . . . , 204(71) to output to 72-way cyclic shifters 208(0), . . . , 208(3), respectively. For the following discussion, it will be understood that any reference to Q messages, applies to soft values L

_{n}.sup.(0) during the first iteration.

**[0036]**Cyclic shifters 208(0), . . . , 208(3) cyclically shift the sets of 72 five-bit Q messages that they receive based on a cyclic-shift signal that may be received from, for example, controller 214. The cyclic-shift signal corresponds to cyclic-shift factors of the circulants of H-matrix 100 of FIG. 1. For example, during the first clock cycle of an iteration, cyclic shifters 208(0), . . . , 208(3) may shift their respective sets of 72 five-bit Q messages based on the shift factors of circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}of H-matrix 100 of FIG. 1, respectively. During the second clock cycle of an iteration, cyclic shifters 208(0), . . . , 208(3) shift their respective sets of 72 five-bit Q messages based on the shift factors of circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}, respectively. Cyclic shifters 208(0), . . . , 208(3) then provide their respective 72 cyclically shifted five-bit Q messages to CNUs 210(0), . . . , 210(287), such that each CNU 210 receives a different one of the Q messages.

**[0037]**FIG. 3 shows a simplified block diagram of one implementation of a 72-way cyclic shifter 300 that may be used to implement each of cyclic shifters 208(0), . . . , 208(3) of FIG. 2. Barrel shifter 300 has seven stages (i.e., Stages 0, . . . ,6), each of which is capable of providing two different shift factors based on a seven-bit cyclic-shift signal (e.g., SHIFT[0], . . . , SHIFT[6]) received from, for example, controller 214 of FIG. 2. Stage 0 is capable of shifting by a factor of 0 or 1, Stage 1 is capable of shifting by a factor of 0 or 2, Stage 2 is capable of shifting by a factor of 0 or 4, and so on, where Stage i is capable of shifting by a factor of 0 or 2

^{i}. Each stage comprises 72 multiplexers, which perform cyclic shifting based on the shift signal.

**[0038]**As an example of a shift operation, suppose that the desired shift factor is 3. This shift factor may be obtained by (i) asserting (i.e., setting equal to 1) the first and second bits (i.e., SHIFT[0] and SHIFT[1], respectively) of the cyclic-shift signal and (ii) deasserting (i.e., setting equal to 0) the third to seventh bits (i.e., SHIFT[2] to SHIFT[6], respectively) of the cyclic-shift signal such that the seven-bit cyclic-shift signal is equal to 1100000. Cyclic shifter 300 receives 72 five-bit messages (i.e., 360 bits). The five-bit messages are provided to multiplexers 302(0), . . . , 302(71) of Stage 0, such that (i) the upper inputs of multiplexers 302(0), . . . , 302(71) receive messages Q

_{1}(i.e., bits [4:0]), Q

_{2}(i.e., bits [9:5]), . . . , Q

_{72}(i.e., bits [359:355]), respectively, and (ii) the lower inputs of multiplexers 302(0), . . . , 302(71) receive messages Q

_{2}(i.e., bits [9:5]), . . . , Q

_{72}(i.e., bits [359:355]), and Q

_{1}(i.e., bits [4:0]), respectively. By asserting SHIFT[0], the lower input values of Stage 0 are output from multiplexers 302(0), . . . , 302(71) such that the input values are shifted by one.

**[0039]**The upper inputs of multiplexers 304(0), . . . , 304(71) of Stage 1 receive Stage 0 output values STG0[0], . . . , STG0[71], respectively, and the lower inputs of multiplexers 304(0), . . . , 304(71) receive Stage 0 output values STG0[2], . . . , STG0[71], STG0[0], STG0[1], respectively. By asserting SHIFT[1], Stage 0 output values STG0[2], . . . , STG0[71], STG0[0], STG0[1] (i.e., the lower inputs of Stage 1), respectively, are output from multiplexers 304(0), . . . , 304(71), such that the Stage 0 output values are shifted by 2. The Stage 1 output values are then sequentially processed by Stages 2, . . . , 6, each of which provides a shift factor of 0.

**[0040]**Referring back to FIG. 2, each CNU 210 (i) receives a number of five-bit Q messages equal to the hamming weight w

_{r}of a row of H-matrix 100 (e.g., 10) at a rate of one Q message per clock cycle and (ii) generates w

_{r}five-bit check-node messages (herein referred to as R messages). Each R message may be generated using a suitable check-node algorithm, such as the offset min-sum algorithm, characterized by Equations (1), (2), and (3) shown below:

**R mn**( i ) = δ mn ( i ) max ( κ mn ( i ) - β , 0 ) ( 1 ) κ mn ( i ) = R mn ( i ) = min n ' .di-elect cons. N ( m ) / n Q n ' m ( i - 1 ) ( 2 ) δ mn ( i ) = ( n ' .di-elect cons. N ( m ) / n sign ( Q n ' m ( i - 1 ) ) ) , ( 3 ) ##EQU00001##

**where**(i) R

_{mn}.sup.(i) represents the R message corresponding to m

^{th}check node (i.e., row) and the n

^{th}variable node (i.e., column) of H-matrix 100 of FIG. 1 for the i

^{th}iteration, (ii) Q

_{nm}.sup.(i-1) represents the Q message corresponding to the n

^{th}variable node and the m

^{th}check node of H-matrix 100 for the (i-1)

^{th}iteration, (iii) the function sign indicates that the multiplication operation (i.e., Π) is performed on the signs of the Q

_{nm}.sup.(i-1) messages, and (iv) β is an offset value that varies with code parameters. Suppose that n' is a variable node in the set N(m)/n of all variable nodes connected to the m

^{th}check node except for the n

^{th}variable node (i.e., n' ε N(m)/n). The CNU 210, corresponding to the m

^{th}check node (i.e., row), generates message R

_{mn}.sup.(i) based on all Q messages received during the previous (i-1)

^{th}iteration from the set N(m)/n. Thus, in the embodiment of FIG. 2, each R message is generated based on N(m)/n=nine Q messages (i.e., w

_{r}-1=10-1). Note that, for the first iteration, soft values L

_{n}.sup.(0) received from soft-value memory 202 are used in Equations (2) and (3) in lieu of the Q messages for the prior iteration (i.e., Q

_{n}'m.sup.(0)=L

_{n}'m.sup.(0).

**[0041]**The offset min-sum algorithm described in Equations (1), (2), and (3) may be simplified using a value-reuse technique. For example, during each iteration, each CNU 210 generates ten five-bit R messages, where each five-bit R message is generated using a set of N(m)/n=nine Q messages (one message is excluded as described above). For nine of these ten five-bit R messages, the minimum magnitude of the Q messages generated using Equation (2) will be the same. For one of these R messages, the minimum magnitude of the Q messages will be the second-smallest magnitude of the Q messages because the minimum magnitude of the Q messages will be excluded from the calculation as described above. Thus, it is not necessary to perform Equation (2) ten times for each CNU 210. Rather, each CNU 210 may store the two Q messages with the smallest magnitudes, and store an index value corresponding to the minimum magnitude that may be used to match the second-smallest magnitude with the correct R message (i.e., the R message that excludes the minimum magnitude).

**[0042]**FIG. 4 shows a simplified block diagram of one implementation of a CNU 400 that may be used to implement each CNU 210 of LDPC decoder 200 of FIG. 2. CNU 400 generates five-bit R messages using the offset min-sum algorithm described in Equations (1), (2), and (3) and the value reuse technique. The R messages are generated using a three-step process that may be performed over 22 clock cycles. During the first ten clock cycles of the i

^{th}iteration, CNU 400 receives ten five-bit Q messages, where one five-bit Q message is received during each clock cycle.

**[0043]**The ten five-bit Q messages are processed by M1_M2 finder 402, which determines the four-bit minimum (M1) and second minimum (M2) magnitudes of the ten Q messages and stores these values in partial state memory 404. In particular, during each of the first ten clock cycles, M1_M2 finder 402 receives a five-bit Q message in two's-complement format and generates a five-bit sign-magnitude value using two's-complement-to-sign-magnitude (2TSM) converter 410. The sign bit 436 of the sign-magnitude value is provided to sign processing logic 438, which (i) generates a product of the sign bits 436 of all ten Q messages and (ii) multiplies each Q sign bit 436 by the product to generate a different sign bit (i.e., sign bit 440) for each of the ten R messages. The four-bit magnitude |Q|[3:0] of the five-bit sign-magnitude value Q[4:0] is provided to multiplexer (MUX) 418 along with the four-bit minimum magnitude value M1 and the four-bit second minimum magnitude value M2 stored in partial state registers 420(0) and 420(1) of partial state memory 404, respectively. In addition, the four-bit magnitude value |Q|[3:0] is provided to flip-flop (FF) 412, which synchronizes the timing of CNU 400 with the clock signal of LDPC decoder 200.

**[0044]**FIG. 5 shows a simplified block diagram of a two's-complement-to-sign-magnitude (2TSM) converter 500 that may be used to implement 2TSM converter 410 of FIG. 4. 2TSM converter 500 receives a five-bit input Q message Q[4:0] in two's-complement format. The sign bit Q[4] is provided to the control port of MUX 506, and the remaining four bits Q[3:0] are provided to the upper input of MUX 506. In addition, the four remaining bits Q[3:0] are provided to inverter 502, which inverts all four bits. Adder 504 adds a value of 1 to the inverted bits I[3:0], and outputs a four-bit result I'[4:0] to the lower input of multiplexer 506. MUX 506 selects either the upper input Q[3:0] or the lower input I'[3:0] to output as four-bit magnitude value |Q|[3:0] based on the sign bit Q[4] of the input Q message. If the sign bit Q[4] has a value of 0, then the upper input Q[3:0] is output, and if the sign bit Q[4] has a value of 1, then the lower input I'[3:0] is output.

**[0045]**The input sign bit Q[4] and the four-bit magnitude value |Q|[3:0] represent the sign-magnitude value corresponding to the two's-complement input Q message Q[4:0]. For example, suppose that 2TSM converter 500 receives 00011 (+3 in two's-complement format). Since the sign bit Q[4] is 0, MUX 506 outputs magnitude value 0011, corresponding to the sign-magnitude value 00011. Now suppose that 2TSM converter 500 receives 11101 (-3 in two's-complement format). Inverter 502 inverts Q[3:0] bits 1101 to generate I[3:0] bits 0010, and adder 504 adds 1 to generate I'[3:0] bits 0011. Since the sign bit Q[4] is 1, MUX 506 outputs a magnitude value 0011, corresponding to the sign-magnitude value 10011.

**[0046]**Referring back to FIG. 4, minimum operator 414(0) compares the magnitude value |Q| to minimum magnitude value M1 stored in register 420(0). If the magnitude value |Q| is smaller than minimum magnitude value M1, then minimum operator 414(0) asserts control signal 416(0) (i.e., sets 416(0) equal to 1). Otherwise, minimum operator 414(0) de-asserts control signal 416(0) (i.e., sets 416(0) equal to 0). Similarly, minimum operator 414(1) compares the magnitude value |Q| to second minimum magnitude value M2 stored in register 420(1). If the magnitude value |Q| is smaller than M2, then control signal 416(1) is asserted. Otherwise, control signal 416(1) is de-asserted. To further understand the operation of MUX 418, consider the logic table of Table I for magnitude value |Q|.

**TABLE**-US-00001 TABLE I Multiplexer 418 Logic Table Control Signal Control Signal Output to Output to 416(0) 416(1) 420(0) 420(1) 0 (|Q| ≧ M1) 0 (|Q| ≧ M2) M1 M2 0 (|Q| ≧ M1) 1 (|Q| < M2) M1 |Q| 1 (|Q| < M1) 0 (|Q| ≧ M2) N/A N/A 1 (|Q| < M1) 1 (|Q| < M2) |Q| M1

**[0047]**Table I shows that, if control signals 416(0) and 416(1) are both de-asserted (i.e., |Q|≧M1 and M2), then magnitude value |Q| is discarded, and the previously stored minimum and second minimum magnitude values M1 and M2 are stored in M1 register 420(0) and M2 register 420(1), respectively. If control signal 416(0) is de-asserted and control signal 416(1) is asserted (i.e., M2≧|Q|≧M1), then (i) minimum magnitude value M1 is stored in M1 register 420(0), (ii) magnitude value |Q| is stored in M2 register 420(1), and (iii) previously stored second minimum magnitude value M2 is discarded. If control signals 416(0) and 416(1) are both asserted (i.e., |Q|<M1 and M2), then (i) magnitude value |Q| is stored in M1 register 420(0), (ii) the previously stored minimum value M1 is stored in M2 register 420(1), and (iii) the second minimum value M2 is discarded. In addition to storing magnitude value |Q| in M1 register 420(0), M1_index register 420(2) is enabled, counter value 424 (generated by counter 422) corresponding to the new minimum value M1 is stored in M1_index register 420(2), and the counter value previously stored in M1_index register 420(2) is discarded. Note that it is not possible that control signal 416(0) will be asserted and control signal 416(1) will be de-asserted because this would indicate that the magnitude value |Q| is smaller than minimum magnitude value M1 but larger than second minimum magnitude value M2. Also, before the first clock cycle, the minimum and second minimum magnitude values M1 and M2 are initialized to suitably large values (e.g., binary 1111), and M1_index is initialized to 0.

**[0048]**After all ten Q messages have been considered, processing logic 426 of final state processor 406 offsets four-bit minimum magnitude value M1 and four-bit second minimum magnitude value M2 by offset value β as shown in Equation (1) to generate four-bit offset minimum magnitude value M1' and four-bit offset second minimum magnitude value M2'. Processing logic 426 converts four-bit offset minimum magnitude value M1' into a five-bit positive two's-complement value by appending a positive sign bit to four-bit value M1' and storing the five-bit result (+M1') in register 428(0). Processing logic 426 also converts four-bit offset minimum magnitude value M1' into a five-bit negative two's-complement value by appending a negative sign bit to four-bit value M1' and storing the five-bit result (-M1') in register 428(1). In addition, if sign bit 440 from sign processing logic 438 is a positive sign bit (0), then processing logic 426 converts four-bit offset second minimum magnitude value M2' into a five-bit bit positive two's-complement value (+M2') for storage in register 428(2). If sign bit 440 from sign processing logic 438 is a negative sign bit (1), then processing logic 426 converts four-bit offset second minimum magnitude value M2' into a five-bit negative two's-complement value (-M2') for storage in register 428(2). Processing logic 426 may convert four-bit offset second minimum magnitude value M2' to two's-complement format using hardware similar to 2TSM converter 500 of FIG. 5. Register 428(3) of final state processor 406 stores the counter value M1_INDEX from M1_index register 420(2).

**[0049]**During each of the next ten clock cycles, MUX 434 of R selector 408 outputs a five-bit R message based on (1) the positive value (+M1'), (2) the negative value (-M1'), (3) the positive or negative value (±M2'), (4) a comparison bit 432 from comparison operator 430, and (5) the corresponding sign bit 436 stored in sign processing logic 438. Each comparison bit 432 is generated by comparing current counter value 424 to the M1_index value stored in register 428(3). When the two are equal, comparison bit 432 is asserted, and when the two are not equal, comparison bit 432 is de-asserted. Each sign bit 440 may be generated as δ

_{mn}.sup.(i) using Equation (3), or alternatively, in the event that sign processing logic 438 is implemented using a FIFO, by multiplying a stored sign bit 436, as it is output from the FIFO, by the product of all sign bits 436 stored in sign processing logic 438. To further understand how R messages are output from MUX 434, consider the logic table of Table II.

**TABLE**-US-00002 TABLE II Multiplexer 434 Logic Table Comparison Bit 432 Sign Bit 440 Output 0 (A ≠ B) 0 +M1' 0 (A ≠ B) 1 -M1' 1 (A = B) 0 +M2' 1 (A = B) 1 -M2'

**[0050]**Table II shows that, if both comparison bit 432 and sign bit 440 are de-asserted, then the positive value (+M1') stored in register 428(0) will be output as the five-bit R message. If comparison bit 432 is de-asserted and sign bit 440 is asserted, then the negative value (-M1') stored in register 428(1) will be output as the five-bit R message. If comparison bit 432 is asserted and sign bit 440 is de-asserted, then the positive value (+M2') will have been stored in register 428(2) and will now be output as the five-bit R message. If both comparison bit 432 and sign bit 440 are asserted, then the negative value (-M2') will have been stored in register 428(3) and will now be output as the five-bit R message.

**[0051]**Referring back to FIG. 2, cyclic shifters 212(0), . . . , 212(3) cyclically shift the sets of 72 five-bit R messages that they receive according to the cyclic shifts of the circulants B

_{j,k}of H-matrix 100 of FIG. 1, which may be provided by controller 214. Essentially, cyclic shifters 212(0), . . . , 212(3) reverse the cyclic shifting of cyclic shifters 208(0), . . . , 208(3). This may be accomplished by using a cyclic shifter similar to that of cyclic shifter 300 of FIG. 3. However, rather than cyclically shifting the messages up as is performed by cyclic shifter 300, cyclic shifter 212(0), . . . , 212(3) may cyclic shift the messages down. Cyclic shifters 212(0), . . . , 212(3) then provide the 4×72 cyclically shifted five-bit R messages to VNUs 204(0), . . . , 204(71), such that each VNU 204 receives four of the R messages, one from each cyclic shifter 212. Each VNU 204 then updates each of the four five-bit Q messages that it generates as shown in Equation (4):

**Q n m**( i ) = L n ( 0 ) + m ' .di-elect cons. M ( n ) / m R m ' n ( i - 1 ) , ( 4 ) ##EQU00002##

**where m**' is a check node in the set M(n)/m of all check nodes connected to the n

^{th}variable node except the m

^{th}check node (i.e., m' ε M(n)/m). The n

^{th}variable node generates message Q

_{nm}.sup.(i) based on (i) all R messages received during the previous (i-1)

^{th}iteration from the set M(n)/m and (ii) an initial soft value L

_{n}.sup.(0) received from soft value memory 202 that corresponds to the n

^{th}variable node. Each VNU 204 outputs the four updated five-bit Q messages that it generates, such that a different one of the four messages is provided to a different corresponding MUX 206.

**[0052]**In addition to outputting four updated five-bit Q messages, each VNU 204 outputs (i) a seven-bit extrinsic LLR value, (ii) a hard-decision output bit, and (iii) an eight-bit P value. Each seven-bit extrinsic LLR value may be represented as shown in Equation (5):

**Extrinsic Value n**= m .di-elect cons. M ( n ) R mn ( i ) , ( 5 ) ##EQU00003##

**where m is a check node in the set M**(n) of all check nodes connected to the n

^{th}variable node (i.e., m εM(n)). Each eight-bit P value may be generated using Equation (6) as follows:

**P n**= L n ( 0 ) + m .di-elect cons. M ( n ) R mn ( i ) , and ( 6 ) ##EQU00004##

**each hard**-decision bit {circumflex over (x)}

_{n}may be generated based on Equations (7) and (8) below:

{circumflex over (x)}

_{n}=0 if P

_{n}≧0 (7)

{circumflex over (x)}

_{n}=1 if P

_{n}<0 (8)

**P**

_{n}is determined for each variable node by adding the extrinsic value from Equation (5) to the initial soft value L

_{n}.sup.(0) received from soft-value memory 202 that corresponds to the n

^{th}variable node. If P

_{n}is greater than or equal to zero, then the hard-decision bit {circumflex over (x)}

_{n}is set equal to zero, as shown in Equation (7). If P

_{n}is less than zero, then the hard-decision bit {circumflex over (x)}

_{n}is set equal to one, as shown in Equation (8).

**[0053]**A parity check is then performed, for example, by controller 214, using the hard-decision values to determine whether the decoding process is finished. In particular, if {circumflex over (x)}H

^{T}=0, where H

^{T}is the transpose of H-matrix 100 of FIG. 1 and {circumflex over (x)} is a 720-element vector formed from 720 hard-decision bits {circumflex over (x)}

_{n}output during ten clock cycles, then the decoding process is finished. If {circumflex over (x)}H

^{T}≠0, then a subsequent iteration is performed to generate a new set of extrinsic LLR values, P values, and hard decisions. If the decoding process does not end within a predefined number of iterations, then the decoding process is terminated and the received codeword has not been properly decoded.

**[0054]**FIG. 6 shows a simplified block diagram of one implementation of a VNU 600 that may be used to implement each VNU 204 of LDPC decoder 200 of FIG. 2. During each iteration, except for the initial iteration, VNU 600 receives four five-bit R messages R

_{1}, R

_{2}, R

_{3}, and R

_{4}and a five-bit soft value L

_{n}.sup.(0) and generates (i) four five-bit Q messages Q

_{1}, Q

_{2}, Q

_{3}, Q

_{4}, (ii) a five-bit P value, (iii) a hard-decision output value {circumflex over (x)}

_{n}, and (iv) a five-bit extrinsic LLR value. Initially, the four five-bit R messages R

_{1}, R

_{2}, R

_{3}, and R

_{4}, received in two's-complement format, are added together to generate the five-bit extrinsic LLR value as shown in Equation (5) using two adder stages. The first adder stage comprises (i) adder 602(0), which adds messages R

_{1}and R

_{2}(i.e., R

_{1}+R

_{2}), and (ii) adder 602(1), which adds messages R

_{3}and R

_{4}(i.e., R

_{3}+R

_{4}). The second adder stage comprises adder 604, which adds (i) the sum of messages R

_{1}and R

_{2}to (ii) the sum of messages R

_{3}and R

_{4}to generate the extrinsic LLR value (i.e., R

_{1}+R

_{2}+R

_{3}+R

_{4}).

**[0055]**The seven-bit extrinsic LLR value may be normalized and truncated (NORM & TRUNC component 606), saturated (SAT component 612), and output from VNU 600. Normalization and truncation component 606 and saturation component 612 are employed to ensure that the number of bits used to represent a message remains constant. Normalization may be applied, for example, by dividing a message by a factor of two. Truncation may be applied, for example, by deleting the least significant bit (LSB). Saturation may be performed to maintain a message within a specified range, such that if the message is out of the specified range, the message is mapped to a value within the specified range.

**[0056]**The normalized, truncated extrinsic LLR value is also used to generate a P value and hard-decision output value {circumflex over (x)}

_{n}. In particular, the normalized, truncated extrinsic LLR value is provided to a third adder stage that comprises adder 610. Adder 610 generates an eight-bit value P as shown in Equation (6) by adding the normalized, truncated extrinsic LLR value to the five-bit soft value L

_{n}.sup.(0) (i.e., P=R

_{1}+R

_{2}+R

_{3}+R

_{4}+L

_{n}.sup.(0)). The sign bit (i.e., the most-significant bit) of P is then used to generate the hard-decision value {circumflex over (x)}

_{n}. If the sign bit of P is 0, then P≧0 and the hard-decision value is 0, as shown in Equation (7). If the sign bit of P is 1, then P<0 and the hard-decision value is 1, as shown in Equation (8).

**[0057]**The four five-bit R messages R

_{1}, R

_{2}, R

_{3}, and R

_{4}are also normalized and truncated (components 608(0), . . . , 608(3)) and provided to a fourth adder stage comprising adders 614(0), . . . , 614(3), such that each normalized, truncated R message is provided to a different adder 614. Each adder 614 generates a Q message as shown in Equation (4) based on (i) the R message that it receives and (ii) the value P generated by adder 610. In particular, message Q

_{1}is generated by subtracting message R

_{1}from P (i.e., Q

_{1}=R

_{1}+R

_{2}+R

_{3}+R

_{4}+L

_{n}.sup.(0)-R

_{1}), message Q

_{2}is generated by subtracting message R

_{2}from P (i.e., Q

_{2}=R

_{1}+R

_{2}+R

_{3}+R

_{4}+L

_{n}.sup.(0)-R

_{2}), message Q

_{3}is generated by subtracting message R

_{3}from P (i.e., Q

_{3}=R

_{1}+R

_{2}+R

_{3}+R

_{4}+L

_{n}.sup.(0)-R

_{3}), and message Q

_{4}is generated by subtracting message R

_{4}from P (i.e., Q

_{4}=R

_{1}+R

_{2}+R

_{3}+R

_{4}+L

_{n}.sup.(0)-R

_{4}). Messages Q

_{1}, Q

_{2}, Q

_{3}, and Q

_{4}may then be saturated (SAT component 616(0), . . . , 616(3)) in a manner similar to that described above in relation to SAT component 612 and output as five-bit Q messages. Note that each VNU 204 may also be implemented using fewer adder stages than that of VNU 600 as taught in U.S. patent application Ser. No. 12/323,626 filed Nov. 26, 2008, the teachings of which are incorporated herein by reference in their entirety.

**[0058]**FIG. 7 graphically illustrates a timing diagram 700 for LDPC decoder 200 of FIG. 2. For this diagram, suppose that LDPC decoder 200 implements CNUs such as CNU 400 of FIG. 4. As shown, during the first ten clock cycles of the i

^{th}iteration, partial state (PS) processing (e.g., 404) of each CNU 210 generates and stores minimum magnitude value M1 and second minimum magnitude value M2. During the 11

^{th}and 12

^{th}iterations, final state (FS) processing (e.g., 406) of each CNU 210 generates and stores the (1) positive value (+M1'), (2) the negative value (-M1'), and (3) the positive or negative value (±M'). During the 13

^{th}to 22

^{nd}clock cycles, R selector 408 of each CNU 210 selects and outputs the updated five-bit R messages to VNUs 204(0), . . . , 204(71), which generate the updated five-bit Q messages during the same ten clock cycles. Note that cyclic shifters 208(0), . . . , 208(3), cyclic shifters 212(0), . . . , 212(3), and multiplexers 206(0), . . . , 206(3) merely direct the messages to the corresponding CNUs 210 or VNUs 204, and consequently, they add insignificant delays to the timing diagram. Further, note that, since partial state processing 404 and final state processing 406 of each CNU 210 are performed during different sets of clock cycles, each CNU 210 may process portions of two different iterations at the same time. For example, during the 13

^{th}to 22

^{nd}clock cycles, as R selector 408 selects and outputs the updated five-bit R messages to VNUs 204(0), . . . , 204(71) for the i

^{th}iteration, partial state processing 404 may be implemented for the (i+1)

^{th}iteration.

**[0059]**Error-floor characteristics of an LDPC decoder may be improved by changing the decoder alphabet. The decoder alphabet refers to characteristics of the messages processed by the LDPC decoder including, for example, number of bits per message, dynamic range, resolution and saturation, truncation, rounding methods, whether the messages are represented as fixed point or floating point, and whether the messages have uniform or non-uniform quantization. Typically, the trapping sets for a particular decoder alphabet are different from those of other decoder alphabets. Thus, different trapping sets may be obtained by, for example, changing the number of bits used to represent the LDPC decoder messages (i.e., changing the decoder precision). In particular, increasing the decoder precision (i.e., increasing the number of bits) typically lowers the impact of trapping sets, thereby improving error-floor characteristics. However, increasing the decoder precision also typically decreases the throughput of the LDPC decoder.

**[0060]**One method to achieve the advantages of both a lower-precision decoder (e.g., higher throughput) and a higher-precision decoder (e.g., improved error-floor characteristics) is to construct a reconfigurable LDPC decoder that is capable of selectively processing messages of two or more different precisions. For example, a reconfigurable LDPC decoder may be constructed with two distinct sets of hardware: one set of hardware that decodes codewords using five-bit messages and another set of hardware that decodes codewords using ten-bit messages. Normally, the LDPC decoder may be operated in a five-bit precision mode that processes five-bit messages to achieve a higher throughput. If the LDPC decoder is unable to correctly decode codewords due to one or more trapping sets, then the decoder is changed in real time to a ten-bit precision mode that processes ten-bit messages, in order to improve the probability that the codewords will be decoded correctly.

**[0061]**Instead of implementing two distinct sets of hardware, chip area can be reduced by implementing a reconfigurable LDPC decoder according to an exemplary embodiment of the present invention using a single set of hardware that may be selectively reconfigured in real time to process either five-bit messages or ten-bit messages. The chip area for such an implementation may be approximately the same as that for a single ten-bit decoder. To further understand how reconfigurable LDPC decoders of the present invention may be implemented, one exemplary embodiment is discussed below.

**[0062]**Reconfigurable LDPC Decoder

**[0063]**FIG. 8 shows a simplified block diagram of an LDPC decoder 800 according to one embodiment of the present invention, which may be used to decode codewords encoded using an H-matrix such as H-matrix 100 of FIG. 1. LDPC decoder 800 has reconfigurable variable-node unit (VNU) array 804, reconfigurable cyclic shifters 810(0), . . . , 810(3) and 816(0), . . . , 816(3), and reconfigurable check-node unit (CNU) arrays 812(0), . . . , 812(3), all of which may be reconfigured in real time to process either five-bit messages in a five-bit precision mode or ten-bit messages in a ten-bit precision mode. In one possible implementation of LDPC decoder 800, reconfigurable VNU array 804 comprises 36 reconfigurable VNUs, each of which may be configured as (i) two five-bit VNUs in five-bit precision mode for a total of 72 VNUs or (ii) one ten-bit VNU in ten-bit precision mode for a total of 36 VNUs.

**[0064]**In addition, reconfigurable shifters 810(0), . . . , 810(3) and 816(0), . . . , 816(3) may each be configured as (i) a 72-by-72 five-bit cyclic shifter in five-bit precision mode that shifts 72 five-bit messages per clock cycle or (ii) a 72-by-72 ten-bit cyclic shifter in ten-bit precision mode that shifts 36 ten-bit messages per clock cycle. Furthermore, each reconfigurable CNU array 812 comprises 36 reconfigurable CNUs, each of which may be configured as (i) two five-bit CNUs in five-bit precision mode or (ii) two ten-bit CNUs in ten-bit precision mode, such that, in both modes, each reconfigurable CNU array 812 may be configured as a total of 72 CNUs. In five-bit precision mode, each reconfigurable CNU performs the updates for two check nodes (i.e., rows) at the same time. In ten-bit precision mode, each reconfigurable CNU performs the updates for two check nodes (i.e., rows) such that the updates alternate in time (i.e., updates for the first row are performed, followed by updates for the second row, followed by updates for the first row, and so on). Exemplary embodiments of these reconfigurable components are provided below in relation to FIGS. 9-18.

**[0065]**In general, in the five-bit precision mode, LDPC decoder 800 receives 720 five-bit soft values L

_{n}.sup.(0) from a soft detector such as a soft-output Viterbi detector and stores these soft values L

_{n}.sup.(0) in soft-value memory 802. The 720 five-bit soft values L

_{n}.sup.(0) are decoded iteratively in five-bit precision mode in a manner similar to that of LDPC decoder 200 of FIG. 2 using a block-serial message-passing schedule. In so doing, reconfigurable CNU arrays 812(0), . . . , 812(3), each configured as 72 five-bit CNUs, perform the check-node (i.e., row) updates for the 288 rows of H-matrix 100, one block column at a time. For example, reconfigurable CNU arrays 812(0), . . . , 812(3) perform the check-node updates for circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}, respectively, followed by the check-node updates for circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}, respectively, followed by the check-node updates for B

_{1,3}, B

_{2},3, B

_{3,3}, and B

_{4},3, respectively, and so forth. Reconfigurable VNU array 804, configured as 72 five-bit VNUs, then performs the variable-node (i.e., column) updates for the 720 columns of H-matrix 100, one block column at a time. For example, reconfigurable VNU array 804 performs the variable-node updates for circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}, followed by the variable-node updates for circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}, followed by the variable-node updates for B

_{1,3}, B

_{2},3, B

_{3,3}, and B

_{4},3, and so forth. Similar to LDPC decoder 200 of FIG. 2, an iteration of the five-bit precision mode is complete after all check-node updates and variable-node updates have been performed. Note that buffers 808(0), . . . , 808(3) and 814(0), . . . , 814(3) need not be used in the five-bit precision mode.

**[0066]**If LDPC decoder 800 is not able to correctly decode the codeword in the five-bit precision mode, then the soft Viterbi detector is instructed to generate and provide 720 ten-bit soft values L

_{n}.sup.(0), which are subsequently stored in soft-value memory 802. LDPC decoder 800 is then reconfigured into the ten-bit precision mode in real time, and the 720 ten-bit soft values L

_{n}.sup.(0) are decoded using a modified block-serial message-passing schedule. In so doing, the check-node (i.e., row) updates for H-matrix 100 of FIG. 1 are performed one-half of a block column at a time. For example, CNU arrays 812(0), . . . , 812(3) perform the check-node updates for the first half (i.e., the first 36 rows) of each circulant in the first block column (i.e., the first half of circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}), respectively, followed by the check-node updates for the second half (i.e., the second 36 rows) of each circulant in the first block column, respectively, followed by the first half (i.e., the first 36 rows) of each circulant in the second block column (i.e., the first half of circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}), respectively, followed by the check-node updates for the second half (i.e., the second 36 rows) of each circulant in the second block column, respectively, and so forth. The variable-node (i.e., column) updates for H-matrix 100 are then performed one-half of a block column at a time. For example, reconfigurable VNU array 804 performs the variable-node updates for the first half (i.e., the first 36 columns) of the first block column (i.e., circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}), followed by the variable-node updates for the second half (i.e., the second 36 columns) of the first block column, followed by the variable-node updates for the first half (i.e., the first 36 columns) of the second block column (i.e., circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}), followed by the variable-node updates for the second half (i.e., 36 columns) of the second block column, and so forth. An iteration, which is performed over approximately twice as many clock cycles as an iteration of the five-bit precision mode, is complete after all check-node updates and variable-node updates have been performed.

**[0067]**Initially, in ten-bit precision mode, the 720 ten-bit soft values L

_{n}.sup.(0) are provided, 36 soft values L

_{n}.sup.(0) per clock cycle, to four multiplexers (MUX) 806(0), . . . , 806(3), such that each multiplexer 806 receives all 36 ten-bit soft values L

_{n}.sup.(0). Each multiplexer 806 also receives 36 ten-bit variable-node messages (herein referred to as Q messages) from reconfigurable VNU array 804, which are generated as discussed in further detail below. During the first iteration, multiplexers 806(0), . . . , 806(3) select the sets of 36 ten-bit soft values L

_{n}.sup.(0) that they receive to output to buffers 808(0), . . . , 808(3), respectively. The initial Q messages, which are not output during the first iteration, may be Q messages generated for a previously considered codeword. During subsequent iterations, multiplexers 806(0), . . . , 806(3) select the sets of 36 ten-bit Q messages that they receive from reconfigurable VNU array 804 to output to buffers 808(0), . . . , 808(3), respectively. For the following discussion, it will be understood that any reference to Q messages, applies to soft values L

_{n}.sup.(0) during the first iteration. Each buffer 808 accumulates 72 ten-bit Q messages at a rate of 36 ten-bit Q messages per clock cycle. Once 72 Q messages have been received, the buffer 808 outputs the 72 ten-bit Q messages to its corresponding reconfigurable cyclic shifter 810 and begins receiving a new set of 72 Q messages.

**[0068]**Reconfigurable cyclic shifters 810(0), . . . , 810(3) cyclically shift the sets of 72 ten-bit Q messages that they receive, 36 ten-bit Q messages at a time, based on a cyclic-shift signal that may be received from, for example, controller 818, and provide their cyclically shifted values to reconfigurable CNU arrays 812(0), . . . , 812(3), respectively. The cyclic-shift signal corresponds to cyclic-shift factors of the circulants of H-matrix 100 of FIG. 1. For example, during the first clock cycle of an iteration, reconfigurable cyclic shifters 810(0), . . . , 810(3) may shift 36 of the 72 ten-bit Q messages that they receive from buffers 808(0), . . . , 808(3), respectively, based on the shift factors of the first 36 rows of circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}of H-matrix 100 of FIG. 1, respectively. During the second clock cycle, reconfigurable cyclic shifters 810(0), . . . , 810(3) may shift 36 of the 72 ten-bit Q messages that they receive from buffers 808(0), . . . , 808(3), respectively, based on the shift factors of the second 36 rows of circulants B

_{1,1}, B

_{2},1, B

_{3,1}, and B

_{4,1}, respectively. During the third clock cycle, reconfigurable cyclic shifters 810(0), . . . , 810(3) may shift 36 of the 72 ten-bit Q messages that they receive from multiplexers 806(0), . . . , 806(3), respectively, based on the shift factors of the first 36 rows of circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}, respectively. During the fourth clock cycle, reconfigurable cyclic shifters 810(0), . . . , 810(3) may shift 36 of the 72 ten-bit Q messages that they receive from buffers 808(0), . . . , 808(3), respectively, based on the shift factors of the second 36 rows of circulants B

_{1,2}, B

_{2},2, B

_{3,2}, and B

_{4,2}, respectively. In this manner, all 720 ten-bit Q messages are cyclically shifted during the first 20 clock cycles of an iteration.

**[0069]**Each reconfigurable CNU of each reconfigurable CNU array 812 performs the updates for two check nodes (i.e., rows) such that the updates alternate in time (i.e., updates for the first row are performed, followed by updates for the second row, followed by updates for the first row, and so on). In so doing, each reconfigurable CNU receives a number of ten-bit Q messages equal to the hamming weight w

_{r}of two rows of H-matrix 100 (e.g., 2×10=20) at a rate of one Q message per clock cycle. The messages received during the odd-numbered clock cycles (i.e., 1, 3, . . . , 19) correspond to a first check node (i.e., row), and the messages received during the even-numbered clock cycles (i.e., 2, 4, . . . , 20) correspond to a second check node (i.e., row). Each reconfigurable CNU then generates 2×w

_{r}ten-bit check-node messages (herein referred to as R messages) at a rate of one R message per clock cycle using a suitable check-node algorithm, such as the offset min-sum algorithm, characterized by Equations (1), (2), and (3). Each R message generated during an odd-numbered clock cycle is based on nine of the ten R messages received during the odd-numbered clock cycles, and each R message generated during an even-numbered clock cycle is based on nine of the ten R messages received during the even-numbered clock cycles. Similar to CNUs 210(0), . . . , 210(287) of FIG. 2, the R messages may be generated using a value-reuse technique.

**[0070]**The R messages generated by reconfigurable CNU arrays 812(0), . . . , 812(3) are provided to buffers 814(0), . . . , 814(3), respectively. In a manner similar to buffers 808(0), . . . , 808(3), each buffer 814 accumulates 72 ten-bit R messages at a rate of 36 ten-bit R messages per clock cycle. Once 72 R messages have been received, the buffer 814 outputs the 72 ten-bit R messages to its corresponding reconfigurable cyclic shifter 816 and begins receiving a new set of 72 R messages. Each reconfigurable cyclic shifter 816 receives 72 ten-bit R messages at a time and cyclically shifts 36 of the 72 R messages at a time according to the cyclic shifts of the circulants of H-matrix 100 of FIG. 1, which may be provided by controller 818.

**[0071]**Reconfigurable cyclic shifters 816(0), . . . , 816(3) provide the sets of 4×36 cyclically shifted R messages to reconfigurable VNU array 804, which comprises 36 reconfigurable VNUs, where each is configured as one ten-bit VNU (i.e., for a total of 36 VNUs). The 4×36 cyclically shifted R messages are provided such that each reconfigurable VNU receives four of the R messages. Each reconfigurable VNU performs the four updates for one variable node (i.e., column) of H-matrix 100 of FIG. 1 to generate four updated ten-bit Q messages in a manner similar to that discussed above in relation to Equation (4). In addition each reconfigurable VNU generates (i) a 12-bit extrinsic LLR value, (ii) a hard-decision output bit, and (iii) a 13-bit P value in a manner similar to that discussed above in relation to Equations (5) through (8). A parity check is then performed using the hard-decision values in a manner similar to that discussed above in relation to LDPC decoder 200 of FIG. 2.

**[0072]**To further understand the operation of the reconfigurable components of LDPC decoder 800, one embodiment of a reconfigurable CNU, one embodiment of a reconfigurable VNU, and one embodiment of a reconfigurable cyclic shifter are discussed below.

**[0073]**Reconfigurable Check-Node Unit (CNU)

**[0074]**FIG. 9 shows a simplified block diagram of a reconfigurable CNU 900 according to one embodiment of the present invention that may be used to implement each reconfigurable CNU of each reconfigurable CNU array 812 of FIG. 8. In five-bit precision mode, reconfigurable CNU 900 is configured as two five-bit CNUs, such that it performs updates for two check nodes (i.e., rows) of H-matrix 100 of FIG. 1 at the same time. Initially, reconfigurable CNU 900 receives 20 five-bit Q messages, ten corresponding to each check node, and generates 20 five-bit R messages, ten corresponding to each check node, per iteration. For the following discussion, it will be understood that any reference to Q messages, applies to soft values L

_{n}.sup.(0) during the first iteration.

**[0075]**The 20 five-bit Q messages are received over ten clock cycles such that two five-bit Q messages, corresponding to two different check nodes (i.e., rows) of H-matrix 100 of FIG. 1, are received during each of the ten clock cycles. The 20 five-bit Q messages are provided to M1_M2 finder 902, and the sign bits 934 of all 20 five-bit Q messages are provided to sign processing logic 936. Sign processing logic 936 (i) generates a first product of the Q sign bits 934 of all ten Q messages corresponding to the first check node, (ii) generates a second product of the Q sign bits 934 of all ten Q messages corresponding to the second check node, (iii) multiplies each Q sign bit 934 corresponding to the first check node by the first product to generate a different sign bit (i.e., sign bit 938) for each of 10 R messages generated for the first check node, and (iv) multiplies each Q sign bit 934 corresponding to the second check node by the second product to generate a different sign bit (i.e., sign bit 938) for each of 10 R messages generated for the second check node.

**[0076]**M1_M2 finder 902 processes the 20 five-bit Q messages to determine (i) minimum (M1(1)) and second minimum (M2(1)) magnitudes for the ten five-bit Q messages corresponding to the first check node and (ii) minimum (M1(2)) and second minimum (M2(2)) magnitudes for the ten five-bit Q messages corresponding to the second check node. The minimum (M1(1)) and second minimum (M2(1)) magnitudes for the ten five-bit Q messages corresponding to the first check node are stored in partial state registers 922(0) and 922(1) of partial state memory 904, respectively, and the minimum (M1(2)) and second minimum (M2(2)) magnitudes for the ten five-bit Q messages corresponding to the second check node are stored in partial state registers 924(0) and 924(1), respectively.

**[0077]**During each of the first ten clock cycles, M1_M2 finder 902 receives two five-bit Q messages Q

_{1}and Q

_{2}in two's-complement format and generates four-bit first and second magnitude values |Q

_{1}| and |Q

_{2}| in sign-magnitude format using reconfigurable two's-complement-to-magnitude (2TM) converter 910, which is configured as two five-bit 2TM converters. An embodiment of a reconfigurable 2TM converter is discussed below in relation to FIG. 10. The first and second magnitude values |Q

_{1}| and |Q

_{2}| are provided to (i) minimum selection network 920 and (ii) flip-flop (FF) 912. Flip-flop 912, which synchronizes the timing of CNU 900 with the clock signal of reconfigurable LDPC decoder 800, provides the first and second magnitude values |Q

_{1}| and |Q

_{2}| to both reconfigurable minimum operators 914(0) and 914(1), each of which is configured as two five-bit minimum operators. An embodiment of a reconfigurable minimum operator is discussed below in relation to FIG. 12.

**[0078]**Reconfigurable minimum operator 914(0) compares (i) the first magnitude value |Q

_{1}| to minimum magnitude value M1(1) stored in M1(1) register 922(0) and (ii) the second magnitude value |Q

_{2}| to minimum magnitude value M1(2) stored in M1(2) register 924(0). Initially, the minimum magnitude values M1(1) and M1(2) may be set to suitably large values. If the first magnitude value |Q

_{1}| is smaller than minimum magnitude value M1(1), then minimum operator 914(0) asserts control signal 916(0) (i.e., sets 916(0) equal to 1). Otherwise, minimum operator 914(0) de-asserts control signal 916(0) (i.e., sets 916(0) equal to 0). Similarly, if the second magnitude value |Q

_{2}| is smaller than minimum magnitude value M1(2) stored in M1(2) register 924(0), then minimum operator 914(0) asserts control signal 916(1). Otherwise, minimum operator 914(0) de-asserts control signal 916(1). Minimum operator 914(1) compares the first and second magnitude values |Q

_{1}| and |Q

_{2}| to second minimum magnitude values M2(1) and M2(2) stored in M2 registers 922(1) and 924(1), respectively, in a similar manner, and outputs control signals 918(0) and 918(1) to minimum selection network 920. Minimum selection network 920 selects values to store in registers 922 and 924 based on the signals received from reconfigurable minimum operators 914(0) and 914(1). To further understand the operation of minimum selection network 920 in five-bit precision mode, consider Table III.

**TABLE**-US-00003 TABLE III Minimum Selection Network 920 Logic Table for Partial State Memory 922 Control Signal Control Signal Output Output 916(0) 918(0) to 922(0) to 922(1) 0 (|Q

_{1}| ≧ M1(1)) 0 (|Q

_{1}| ≧ M2(1)) M1(1) M2(1) 0 (|Q

_{1}| ≧ M1(1)) 1 (|Q

_{1}| < M2(1)) M1(1) |Q

_{1}| 1 (|Q

_{1}| < M1(1)) 0 (|Q

_{1}| ≧ M2(1)) N/A N/A 1 (|Q

_{1}| < M1(1)) 0 (|Q

_{1}| < M2(1)) |Q

_{1}| M1(1)

**[0079]**Table III shows a logic table for minimum selection network 920 for selecting the minimum M1(1) and second minimum M2(1) values corresponding to a first check node (i.e., row) to store in partial state registers 922(0) and 922(1), respectively. Note that a similar table may be generated based on control signals 916(0) and 918(0) to select minimum M1(2) and second minimum M2(2) values to store in partial state registers 924(0) and 924(1), respectively. As shown in Table III, if control signals 916(0) and 918(0) are both de-asserted (i.e., |Q

_{1}|≧both M1(1) and M2(1)), then minimum magnitude value M1(1) and second minimum value M2(1) are stored in M1(1) register 922(0) and M2(1) register 922(1), respectively, and first magnitude value |Q

_{1}| is discarded. If control signal 916(0) is de-asserted and control signal 918(0) is asserted (i.e., M2(1)≧|Q

_{1}|>M1(1)), then (i) minimum magnitude value M1(1) is stored in M1(1) register 922(0), (ii) first magnitude value |Q

_{1}| is stored in M2(1) register 922(1), and (iii) previously stored second minimum magnitude value M2(1) is discarded. If control signals 916(0) and 918(0) are both asserted (i.e., |Q

_{1}|<M1(1) and M2(1)), then (i) magnitude value |Q

_{1}| is stored in M1(1) register 922(0), (ii) the previously stored minimum value M1(1) is stored in M2(1) register 922(1), and (iii) the previously stored second minimum value M2(1) is discarded. Whenever a new magnitude value |Q

_{1}| is stored in M1(1) register 922(0), M1_index register 922(2) is enabled, counter value GV corresponding to the new minimum value M1(1) is stored in M1_index register 922(2), and the counter value previously stored in M1_index register 922(2) is discarded. In addition, the counter value previously stored in M1(1)_index register 922(2) is replaced with a counter value corresponding to new minimum magnitude value M1(1). Note that it is not possible that control signal 916(0) will be asserted and control signal 918(0) will be de-asserted because this would indicate that first magnitude value |Q

_{1}| is smaller than minimum magnitude value M1(1) but larger than second minimum magnitude value M2(1).

**[0080]**After all 20 ten-bit Q messages have been considered (i.e., ten for each check node), the contents of registers 922(0), . . . , 922(2) and 924(0), . . . , 924(2) of partial state memory 904 are provided to registers 926(0), . . . , 926(2) and 928(0), . . . , 928(2) of final state memory 906, respectively. Moving the contents of partial state memory 904 to final state memory 906 allows M1_M2 finder 902 and partial state memory 904 to begin processing Q messages for a subsequent iteration. R selection network 930 of R selector 908 outputs two five-bit R messages, one for each check node (i.e., row), per clock cycle, where each R message is based on (1) a minimum magnitude value (i.e., M1(1) or M1(2)), (2) a second minimum magnitude value (i.e., M2(1) or M2(2)), (3) a comparison of the index value for the minimum magnitude (i.e., M1(1)_index or M1(2)_index) to the counter, and (4) a sign bit 938 from sign processing logic 936. Each sign bit 938 may be generated in a manner similar to that shown in Equation (3), or alternatively, in the event that sign processing logic 936 is implemented using a FIFO, by subtracting a sign bit 934 stored in sign processing logic 936 corresponding to either the first or second check node from the sum stored in sign processing logic 936 that corresponds to the same check node. To further understand how R messages are output from R selection network 930 consider Table IV.

**TABLE**-US-00004 TABLE IV R Selection Network 930 Logic Table Comparison of R Selection Network 930 M1(1)_Index to Counter Sign Bit 938 Output 0 (M1(1)_Index ≠ Counter) 0 R

_{1}= +M1(1) 0 (M1(1)_Index ≠ Counter) 1 R

_{1}= -M1(1) 1 (M1(1)_Index = Counter) 0 R

_{1}= +M2(1) 1 (M1(1)_Index = Counter) 1 R

_{1}= -M2(1)

**[0081]**Table IV shows a logic table for selecting five-bit R messages corresponding to the first check node (i.e., row) considered by reconfigurable CNU 900. Note that a similar logic table may be generated for selecting five-bit R messages corresponding to the second check node considered by reconfigurable CNU 900. As shown, if both (i) M1(1)_index is not equal to the counter value and (ii) sign bit 938 is de-asserted, then the positive M1(1) value will be output as the five-bit R

_{1}message. If (i) M1(1)_index is not equal to the counter value and (ii) sign bit 938 is asserted, then the negative M1(1) value will be output as the five-bit R

_{1}message. If (i) M1(1)_index is equal to the counter value and (ii) sign bit 938 is de-asserted, then the positive M2(1) value will be output as the five-bit R

_{1}message. If (i) M1(1)_index is equal to the counter value and (ii) sign bit 938 is asserted, then the negative M2(1) value will be output as the five-bit R

_{1}message. After the five-bit R messages are output from R selection network 930, the R messages may be offset by a value β as shown in Equation (1) and converted from sign-magnitude format to two's-complement format using reconfigurable SMT2 converter 932.

**[0082]**In ten-bit precision mode, reconfigurable CNU 900 also performs updates for two check nodes (i.e., rows) of H-matrix 100 of FIG. 1. However, rather than performing two updates at a time, as is done in five-bit precision mode, the updates are performed one at a time in alternating (i.e., ping-pong) fashion, wherein an update for the first check node is performed, followed by an update for the second check node, followed by an update for the first check node, and so on.

**[0083]**Initially, reconfigurable CNU 900 receives 20 five-bit Q messages, ten corresponding to each check node, and generates 20 five-bit R messages, ten corresponding to each check node, per iteration. The Q messages are received, one message per clock cycle, in alternating fashion such that a message for the first check node is received, followed by a message for the second check node, followed by a message for the first check node, and so on. The 20 ten-bit Q messages are provided to M1_M2 finder 902, and the sign bits 934 of the 20 ten-bit Q messages are provided to sign processing logic 936. Sign processing logic 936 (i) generates a first product of the sign bits 934 of all ten Q messages corresponding to the first check node, (ii) generates a second product of the sign bits 934 of all ten Q messages corresponding to the second check node, (iii) multiplies each Q sign bit 934 corresponding to the first check node by the first product to generate a different sign bit (i.e., sign bit 938) for each of 10 R messages generated for the first check node, and (iv) multiplies each Q sign bit 934 corresponding to the second check node by the second product to generate a different sign bit (i.e., sign bit 938) for each of 10 R messages generated for the second check node.

**[0084]**M1_M2 finder 902 processes the 20 ten-bit Q messages in alternating fashion to determine (i) minimum (M1(1)) and second minimum (M2(1)) magnitudes for the ten ten-bit Q messages corresponding to the first check node and (ii) minimum (M1(2)) and second minimum (M2(2)) magnitudes for the ten ten-bit Q messages corresponding to the second check node. The minimum (M1(1)) and second minimum (M2(1)) magnitudes for the ten Q messages corresponding to the first check node are stored in partial state registers 922(0) and 922(1) of partial state memory 904, respectively, and the minimum (M1(2)) and second minimum (M2(2)) magnitudes for the ten Q messages corresponding to the second check node are stored in partial state registers 924(0) and 924(1), respectively.

**[0085]**During each of the first 20 clock cycles, M1_M2 finder 902 receives one ten-bit Q message (e.g., Q

_{1}or Q

_{2}) corresponding to either the first or second check node in two's-complement format and generates a magnitude value (e.g., |Q

_{1}| or |Q

_{2}|) using reconfigurable 2TM converter 910, which is configured as a ten-bit 2TM converter. The ten-bit magnitude value (e.g., |Q

_{1}| or |Q

_{2}|) is provided to (i) minimum selection network 920 and (ii) flip-flop (FF) 912. Flip-flop 912 provides the ten-bit magnitude value (e.g., |Q

_{1}| or |Q

_{2}|) to both reconfigurable minimum operators 914(0) and 914(1), each of which is configured as one ten-bit minimum operator.

**[0086]**Reconfigurable minimum operator 914(0) compares magnitude values |Q

_{1}| corresponding to the first check node to minimum magnitude value M1(1) stored in register 922(0) and magnitude values |Q

_{2}| corresponding to the second check node to a minimum magnitude value M1(2) stored in register 924(0). If a magnitude value |Q

_{1}| corresponding to the first check node is smaller than minimum magnitude value M1(1) or if a magnitude value |Q

_{2}| corresponding to the second check node is smaller than minimum magnitude value M1(2), then minimum operator 914(0) asserts control signal 916(2) (i.e., sets 916(2) equal to 1). Otherwise, minimum operator 914(0) de-asserts control signal 916(2) (i.e., sets 916(2) equal to 0). In a similar manner, minimum operator 914(1) compares magnitude values |Q

_{1}| and |Q

_{2}| corresponding to the first and second check nodes to second minimum magnitude values M2(1) and M2(2) stored in M2 registers 922(1) and 924(1), respectively, and outputs control signal 918(2) based on the comparison to minimum selection network 920.

**[0087]**Minimum selection network 920 selects magnitude values (M1(1), M1(2), M2(1), M2(2)) and index values (M1(1)_index, M1(2)_index) to store in partial state registers 922 and 924. Selection may be made in a manner similar to that performed by minimum selection network 920 when operating in the five-bit precision mode. In so doing, selection may be made using a logic table similar to that of Table III. However, unlike the five-bit precision mode, in ten-bit precision mode, values are provided to only one bank of registers (i.e., 922 or 924) per clock cycle.

**[0088]**After all 20 Q messages have been considered (i.e., ten for each check node), the contents of registers 922(0), . . . , 922(2) and 924(0), . . . , 924(2) of partial state memory 904 are provided to registers 926(0), . . . , 926(2) and 928(0), . . . , 928(2) of final state memory 906, respectively. R selection network 930 of R selector 908 outputs one ten-bit R message per clock cycle. The ten-bit R messages are output in alternating fashion such that an R message for the first check node is output, followed by an R message for the second check node, followed by an R message for the first check node, and so on. Each ten-bit R message, which may be generated in a manner similar to that of the five-bit precision mode, is based on (1) a minimum magnitude value (i.e., M1(1) or M1(2)), (2) a second minimum magnitude value (i.e., M2(1) or M2(2)), (3) a comparison of the index value for the minimum magnitude (i.e., M1(1)_index or M1(2)_index) to the counter, and (4) a sign bit 938 from sign processing logic 936. In so doing, each ten-bit R message may be generated and output based on a logic table similar to Table IV.

**[0089]**After the ten-bit R messages are output from R selection network 930, a sign bit 938 from sign processing logic 936 is added to each ten-bit R message such that each ten-bit R message is represented in sign-magnitude format, and the resulting sign-magnitude R messages are converted to two's-complement format using reconfigurable sign-magnitude-to-two's-complement (SMT2) converter 932. Note that the ten-bit R messages may be offset by a value β as shown in Equation (1) either before or after conversion to two's-complement format. An embodiment of a reconfigurable minimum operator is discussed below in relation to FIG. 17.

**[0090]**FIG. 10 shows a simplified block diagram of a reconfigurable 2TM converter 1000 according to one embodiment of the present invention that may be used to implement reconfigurable 2TM converter 910 of FIG. 9. In the five-bit precision mode, reconfigurable 2TM converter 1000 receives ten bits Q[9:0], comprising a first five-bit Q message Q[4:0] in serial with a second five-bit Q message Q[9:5]. In this mode, reconfigurable 2TM converter 1000 acts as two 2TM converters that convert two five-bit Q messages from two's-complement format into magnitude values in sign-magnitude format, where the sign bits are always equal to zero. The first 2TM converter comprises inverter 1002, adder 1004, and multiplexer 1016, and the second 2TM converter comprises inverter 1002, adder 1010, and multiplexer 1012. Multiplexers 1008 and 1014 are used to switch between the five-bit precision mode and the ten-bit precision mode as discussed below.

**[0091]**Inverter 1002 inverts both five-bit messages Q[9:5] and Q[4:0], and provides (i) the first inverted five-bit message I[4:0] to adder 1004 and (ii) the second inverted five-bit message I[9:5] to adder 1010. Adder 1004 adds a value of 1 to the first inverted five-bit message I[4:0] to generate a six-bit value I'[5:0]. The resulting sixth bit I'[5] is provided to the upper input of multiplexer 1008, and the remaining five bits I'[4:0] are provided to the lower input of multiplexer 1016. Multiplexer 1016, which receives the first input Q message Q[4:0] via its upper input, selects either the first inverted five-bit message I'[4:0] or the first input Q message Q[4:0] to output as the five-bit first magnitude |Q

_{1}|, based on a control signal received from multiplexer 1014. Multiplexer 1014, which receives (i) the sign bit Q[4] of the first input Q message via its lower input, (ii) the sign bit Q[9] of the second input Q message via its upper input, and (iii) a control signal 1006, which is set to 1 (e.g., by controller 818 of FIG. 8) for five-bit precision mode, selects the sign bit Q[4] of the first input Q message as the control signal for multiplexer 1016. If the sign bit Q[4] of the first input Q message has a value of 0, then the first input Q message is output as the first magnitude |Q|, and if the sign bit Q[4] of the first input Q message has a value of 1, then the output of adder 1004 is output as the first magnitude |Q

_{1}|.

**[0092]**Adder 1010 adds a value received from multiplexer 1008 to the second inverted five-bit message I[9:5]. Multiplexer 1008, which receives (i) a value of 1 via its lower input, (ii) the sixth bit I'[5] from adder 1004 via its upper input, and (iii) control signal 1006, which is set to 1 for five-bit precision mode, selects the value of 1 to output to adder 1010. Adder 1010 adds the value of 1 to the second inverted five-bit message I[9:5] and outputs the result I'[9:5] to the lower input of multiplexer 1012. Multiplexer 1012, which receives the second input Q message Q[9:5] via its upper input, selects either the first inverted five-bit message I[9:5] or the first input Q message Q[9:5] to output as the second magnitude |Q

_{2}|, based on the sign bit Q[9] of the second input Q message. If the sign bit Q[9] has a value of 0, then the second input Q message Q[9:5] is output as the second magnitude value |Q

_{2}|, and if the sign bit has a value of 1, then the output I'[9:5] of adder 1010 is output as the second magnitude value |Q

_{2}|. The two five-bit magnitude values |Q

_{1}| and |Q

_{2}| are output in serial.

**[0093]**In the ten-bit precision mode, reconfigurable 2TM converter 1000 receives one ten-bit Q message Q[9:0]. The ten-bit Q message is divided into two sets of five bits Q[9:5] and Q[4:0], and each set is processed separately before being output in serial as one magnitude value |Q|. Inverter 1002, adder 1004, and multiplexer 1016 process the first set of five bits in a manner similar to that of the first five-bit Q message described above in relation to the five-bit precision mode. However, in ten-bit precision mode, control signal 1006 is set to 0. As a result, multiplexer 1014 selects the sign bit Q[9] of the ten-bit input Q message to output to multiplexer 1016, and multiplexer 1016 selects either its upper input or its lower input based on the sign bit Q[9] of the ten-bit input Q message. If the sign bit Q[9] has a value of 0, then the first set of five input bits Q[4:0] is output as the first half of the ten-bit magnitude value |Q|, and if the sign bit (Q[9]) has a value of 1, then the output I'[4:0] of adder 1004 is output as the first half of the ten-bit magnitude value |Q

_{1}|.

**[0094]**Inverter 1002, adder 1010, and multiplexer 1012 process the second set of five bits Q[9:5] in a manner similar to that of the second five-bit Q message described above in relation to the five-bit precision mode. However, since control signal 1006 is set to 0, multiplexer 1008 selects the sixth bit I'[5] from adder 1004 to output to adder 1010. The sixth bit is a carry-over bit that indicates whether, after adding the value of 1 to the first set of five bits I[4:0], a value of 1 should to be carried over to the second set of five-bits I[9:5]. For example, suppose that the first set of five bits I[4:0] output from inverter 1002 is 01010 and the second set of five bits I[9:5] output from inverter 1002 is 11111. After adding a 1 to the first set of five bits I[4:0], adder 1004 outputs a six-bit value I'[5:0] equal to 100000. The sixth bit I'[5] is then carried over such that it is added to the second set of five bits I[9:5] (01010) to obtain a value I'[9:5] of 01011. After the output of multiplexer 1008 is added to the second set of five bits I[9:5], the result I'[9:5] is provided to multiplexer 1012, which selects an output value |Q

_{2}| based on the tenth bit Q[9] in a manner similar to that described above in relation to the five-bit precision mode. The two sets of five bits are output in serial as one ten-bit magnitude value |Q| such that the first value |Q

_{1}| is output before the second value |Q

_{2}|.

**[0095]**FIG. 11 shows a simplified block diagram of a reconfigurable SMT2 converter 1100 according to one embodiment of the present invention that may be used to implement reconfigurable SMT2 converter 932 of FIG. 9. Reconfigurable SMT2 converter 1100 converts R messages from sign-magnitude format to two's-complement format. In so doing, reconfigurable SMT2 converter 1100 employs reconfigurable 2TM converter 1102 which may be implemented using reconfigurable 2TM converter 1000 of FIG. 10. Reconfigurable 2TM converter 1000, which in addition to converting two's-complement values into magnitude values in sign-magnitude format as described above, may also be used to convert sign-magnitude values into magnitude values in two's-complement format.

**[0096]**In the five-bit precision mode, reconfigurable SMT2 converter 1100 receives ten bits R[9:0], comprising a first five-bit R message R[4:0] in serial with a second five-bit R message R[9:5]. Reconfigurable SMT2 converter 1100 acts as two SMT2 converters to convert two five-bit R messages at the same time. The first five-bit R message R[4:0] is provided to multiplexer 1110 such that the most significant bit (MSB) R[4] is provided to the control port and the remaining four bits R[3:0] are provided to the upper input. Multiplexer 1110 also receives via its lower input a four-bit value J[3:0] that is obtained by (i) converting the first five-bit R message R[4:0] from sign-magnitude format into a five-bit magnitude value J[4:0] in two's-complement format using reconfigurable 2TM 1102 and (ii) dropping the MSB J[4] of the five-bit magnitude value J[4:0]. If the MSB R[4] of the first five-bit R message has a value of 1, then the lower input of multiplexer 1110 is output as the first two's-complement R message K[3:0] to first data port D1 of multiplexer 1120. Otherwise, the upper input of multiplexer 1110 is output as the first two's-complement R message K[3:0] to first data port D1.

**[0097]**The second five-bit R message R[9:5] is provided to multiplexer 1104 such that the MSB R[9] is provided to the control port and all five bits R[9:5] are provided to the upper input. Multiplexer 1104 also receives via its lower input a five-bit value J[9:5] that is obtained by (i) converting the second five-bit R message (R[9:5]) from sign-magnitude format into a five-bit magnitude value J[9:5] in two's-complement format using reconfigurable 2TM 1102 and (ii) replacing the MSB J[9] of the five-bit magnitude value J[9:5] with a value of 1. If the MSB of the second five-bit R message R[9] has a value of 1, then the lower input of multiplexer 1104 is output as the second two's-complement R message K[9:5] to first data port D1 of multiplexer 1120. Otherwise, the upper input of multiplexer 1104 is output as the second two's-complement R message K[9:5] to first data port D1. First data port D1 of multiplexer 1120 receives the (i) the output of multiplexer 1110, (ii) the MSB R[4] of the first R message, which serves as the sign bit for the first two's-complement R message, and (iii) the output of multiplexer 1104. Control signal 1006, which is provided to the first enable port E1 of multiplexer 1120, has a value of 1 in five-bit precision mode, and thus, the input of first data port D1 is output from multiplexer 1120.

**[0098]**In ten-bit precision mode, reconfigurable SMT2 converter 1100 receives ten bits R[9:0], comprising a one ten-bit R message R[9:0]. The ten-bit R message R[9:0] is provided to both (i) the third data port D3 of multiplexer 1120 and (ii) reconfigurable 2TM converter 1102. Reconfigurable 2TM converter 1102 converts the ten-bit R message R[9:0] into a ten-bit magnitude value J[9:0] in two's-complement format. The MSB J[9] of the ten-bit magnitude value J[9:0] is replaced by a value of 1, and the resulting ten-bit two's-complement value J[9:0] is provided to the second data port D2 of multiplexer 1120.

**[0099]**Multiplexer 1120 selects either the second data port D2 or third data port D3 to output based on control signals 1116 and 1118 received at second enable port E2 and third enable port E3, respectively. Control signal 1116 is generated by (i) inverting control signal 1006, which is set to 0 in ten-bit precision mode, using inverter 1106 and (ii) applying the inverse of control signal 1006 to AND gate 1108 along with the MSB R[9] of the received ten-bit R message R[9:0]. Control signal 1118 is generated by (i) inverting the MSB R[9] of the received ten-bit R message R[9:0] using inverter 1112, and (ii) applying the inverted MSB R[9] to AND gate 1114 along with inverted control signal 1006 received from inverter 1106. If control signal 1116 has a value of 1, then second enable port E2 is enabled, and second data port D2 is output as the ten-bit two's-complement R message. If control signal 1118 is has a value of 1, then third enable port E3 is enabled, and third data port D3 is output as the ten-bit two's-complement R message. Note that second and third enable ports E2 and E3 will not be enabled at the same time.

**[0100]**FIG. 12 shows a simplified block diagram of a reconfigurable minimum operator 1200 according to one embodiment of the present invention that may be used to implement reconfigurable minimum operators 914(0) and 914(1) of FIG. 9. In the five-bit precision mode, reconfigurable minimum operator 1200, which is configured as two five-bit minimum operators (i.e., minimum operators 1204 and 1206), receives (i) a first set of ten bits A[9:0], comprising a first five-bit message A[4:0] in serial with a second five-bit message A[9:5], and (ii) a second set of ten bits B[9:0], comprising a third five-bit message B[4:0] in serial with a fourth five-bit message B[9:5]. The first through fourth five-bit messages may be, for example, a first input Q message, a second input Q message, a minimum value M1(1) stored in M1(1) register 922(0), and a minimum value M1(2) stored in M1(2) register 940(0), respectively.

**[0101]**Minimum operator 1204 compares the first five-bit message A[4:0] to the third five-bit message B[4:0] and outputs a value C1 based on the comparison. If the first five-bit message A[4:0] is less than the third five-bit message B[4:0], then minimum operator 1204 outputs a value of C1 equal to 1. Otherwise, minimum operator 1204 outputs a value of C1 equal to 0. Similarly, minimum operator 1206 compares the second five-bit message A[9:5] to the fourth five-bit message B[9:5] and outputs a value C2 based on the comparison. If the second five-bit message A[9:5] is less than the fourth five-bit message B[9:5], then minimum operator 1206 outputs a value of C2 equal to 1. Otherwise, minimum operator 1206 outputs a value of C2 equal to 0. AND gate 1208, comparer 1202, and OR gate 1210 are not used in the five-bit precision mode.

**[0102]**Based on the value of C1, minimum selection network 920 of FIG. 9 may determine whether to replace, for example, minimum value M1(1) stored in M1(1) register 922(0) with the first input Q message A[4:0]. Similarly, based on the value of C2, minimum selection network 920 may determine whether to replace, for example, minimum value M1(2) stored in M1(2) register 924(0) with the second input Q message A[9:5].

**[0103]**In the ten-bit precision mode, reconfigurable minimum operator 1200, configured as one ten-bit minimum operator, receives (i) a first ten-bit message A[9:0], which may be an input Q message, and (ii) a second ten-bit message B[9:0], which may be a minimum value stored in M1(1) register 922(0). The first ten-bit message is divided into a first set of the five least significant bits (LSBs) A[4:0] and a second set of the five MSBs A[9:5]. Similarly, the second ten-bit message is divided into a first set of the five LSBs B[4:0] and a second set of the five MSBs B[9:5]. Minimum operator 1200 determines whether the first ten-bit message is less than the second ten-bit message by comparing (i) the five LSBs of the first and second ten-bit messages A[4:0] and B[4:0] to one another and (ii) the five MSBs of the first and second ten-bit messages A[9:5] and B[9:5] to one another.

**[0104]**Minimum operator 1204 determines whether the set of the five LSBs A[4:0] for the first ten-bit message is less than the set of the five LSBs B[4:0] for the second ten-bit message. If the set of five LSBs A[4:0] of the first ten-bit message is less than the set of five LSBs B[4:0] of the second ten-bit message, then minimum operator 1204 outputs a value C1 equal to 1. Otherwise, minimum operator 1204 outputs a value C1 equal to 0. Similarly, minimum operator 1206 compares the sets of five MSBs A[9:5] and B[9:5] for the first and second ten-bit messages, respectively. If the set of five MSBs A[9:5] of the first ten-bit message is less than the set of five MSBs A[9:5] of the second ten-bit message, then minimum operator 1206 outputs a value C2 equal to 1. Otherwise, minimum operator 1206 outputs a value C2 equal to 0. Comparer 1202 compares the set of five MSBs A[9:5] of the first ten-bit message to the set of five MSBs B[9:5] of the second ten-bit message to determine if they are equal. If they are not equal, then comparer 1202 outputs a value C3 equal to 0. Otherwise, comparer 1202 outputs a value C3 equal to 1.

**[0105]**To understand the operation of AND gate 1208, consider the logic table shown in Table V. As shown in rows one and two, when the sets of five MSBs A[9:5] and B[9:5] of the first and second ten-bit messages, respectively, are not equal (C3=0), AND gate 1208 outputs a value C4 equal to 0. As shown in row three, when the sets of five MSBs A[9:5] and B[9:5] of the first and second ten-bit messages, respectively, are equal (i.e., C3=1), and the set of five LSBs A[4:0] of the first ten-bit message is greater than or equal to the set of five LSBs B[4:0] of the second ten-bit message (i.e., C1=0), AND gate 1208 also outputs a value C4 of 0 as shown. In this case, the first ten-bit message A[9:0] is greater than or equal to the second ten-bit message B[9:0]. As shown in row four, when the sets of five MSBs A[9:5] and B[9:5] of the first and second ten-bit messages, respectively, are equal (i.e., C3=1) and the set of five LSBs A[4:0] of the first ten-bit message is less than or the set of five LSBs B[4:0] of the second ten-bit message (i.e., C1=1), AND gate 1208 outputs a value C4 equal to 1. In this case, the first ten-bit message A[9:0] is less than the second ten-bit message B[9:0].

**TABLE**-US-00005 TABLE V AND Gate 1208 Logic Table Input C3 Input C1 Output C4 0 (A[9:5] ≠ B[9:5]) 0 (A[4:0] ≧ B[4:0]) 0 0 (A[9:5] ≠ B[9:5]) 1 (A[4:0] < B[4:0]) 0 1 (A[9:5] = B[9:5]) 0 (A[4:0] ≧ B[4:0]) 0 (A[9:0] ≧ B[9:0]) 1 (A[9:5] = B[9:5]) 1 (A[4:0] < B[4:0]) 1 (A[9:0] < B[9:0])

**[0106]**To understand the operation of OR gate 1210, consider the logic table shown in Table VI. As shown in row one, when the set of five MSBs A[9:5] of the first ten-bit message is greater than or equal to the set of five MSBs B[9:5] of the second ten-bit message (C2=0), and value C4 is equal to 0, OR gate 1210 outputs a value C5 of 0 indicating that the first ten-bit message A[9:0] is greater than the second ten-bit message B[9:0]. As shown in row two, when the set of five MSBs A[9:5] of the first ten-bit message is greater than or equal to the set of five MSBs B[9:5] of the second ten-bit message (C2=0), and value C4 is equal to 1, OR gate 1210 outputs a value C5 of 1, indicating that the first ten-bit message A[9:0] is less than the second ten-bit message B[9:0]. As shown in rows three and four, when the set of five MSBs A[9:5] of the first ten-bit message is less than the set of five MSBs B[9:5] of the second ten-bit message (C2=1), OR gate 1210 outputs a value C5 of 1 indicating that the first ten-bit message A[9:0] is less than the second ten-bit message B[9:0]. Based on the value of C5, minimum selection network 920 of FIG. 9 determines whether to replace, for example, the minimum value stored in M1(1) register 922(0) with the received ten-bit Q message A[9:0].

**TABLE**-US-00006 TABLE VI OR Gate 1210 Logic Table Input C2 Input C4 Output C5 0 (A[9:5] ≧ B[9:5]) 0 0 (A[9:0] > B[9:0]) 0 (A[9:5] ≧ B[9:5]) 1 1 (A[9:0] < B[9:0]) 1 (A[9:5] < B[9:5]) 0 1 (A[9:0] < B[9:0]) 1 (A[9:5] < B[9:5]) 1 1 (A[9:0] < B[9:0])

**[0107]**Reconfigurable Variable-Node Unit

**[0108]**Each reconfigurable VNU of reconfigurable VNU array 804 may be configured in a manner similar to that of VNU 600 of FIG. 6. However, rather than using five-bit adders, such as adders 602(0), 602(1), 604, 610, and 614(0), . . . , 614(3), each of these adders may be replaced with a reconfigurable adder such as reconfigurable adder 1300 of FIG. 13.

**[0109]**FIG. 13 shows a simplified block diagram of a reconfigurable adder 1300 according to one embodiment of the present invention. In the five-bit precision mode, reconfigurable adder 1300 is configured as two five-bit adders, where adder 1302 is a first adder, and adder 1308 is a second adder. Reconfigurable adder 1304 receives (i) a first set of ten bits A[9:0], comprising a first five-bit message A[4:0] in serial with a second five-bit message A[9:5], and (ii) a second set of ten bits B[9:0], comprising a third five-bit message B[4:0] in serial with a fourth five-bit message B[9:5]. Adder 1302 adds the first five-bit message A[4:0] to the third five-bit message B[4:0] and outputs a first sum 1310 C[5:0] having six bits. The five LSBs of first sum 1310 are provided to the output of reconfigurable adder 1300 as C[4:0] and (ii) the MSB C[5] of first sum 1310 is provided to the upper input of AND gate 1306.

**[0110]**Inverter 1304 receives control signal 1006, which is set equal to 1 in five-bit precision mode, and outputs an inverted control signal 1006 (i.e., 0) to the lower input of AND gate 1306. Table VII shows a logic table for the operations of AND gate 1306. As shown, when reconfigurable adder 1300 is in five-bit precision mode (i.e., inverted control signal 1006=0), AND gate 1306 outputs a value of 0 to adder 1308. Adder 1308 sums (i) the second five-bit message A[9:5], (ii) the fourth five-bit message B[9:5], and (iii) the output of AND gate 1306, and provides a second sum D[9:5] to the output of reconfigurable adder 1300. Note that adding these values together may result in a value that has more than five bits. To produce five-bit outputs, the first sum C[4:0] and the second sum D[9:5] may be saturated (not shown). The first sum C[4:0] and the second sum D[9:5] are output in serial as E[9:0] such that the first sum C[4:0] is output before the second sum D[9:5].

**TABLE**-US-00007 TABLE VII AND Gate 1306 Logic Table Inverted Control MSB for Sum Signal 1006 1310 Output 0 0 0 0 1 0 1 0 0 1 1 1

**[0111]**In the ten-bit precision mode, reconfigurable adder 1300, configured as one ten-bit adder, receives (i) a first ten-bit message A[9:0] and (ii) a second ten-bit message B[9:0]. The first ten-bit message is divided into a set of the five LSBs A[4:0] and a set of the five MSBs A[9:5]. Similarly, the second ten-bit message is divided into a set of the five LSBs B[4:0] and a set of the five MSBs B[9:5]. Adder 1302 sums the two sets of five LSBs A[4:0] and B[4:0], and outputs a first sum 1310 C[5:0] having six bits. The five LSBs of first sum 1310 are provided to the output of reconfigurable adder 1300 as C[4:0], and the MSB C[5] of first sum 1310 is provided to the upper input of AND gate 1306. The MSB of first sum 1310 indicates whether a bit should be carried over from the sum of the LSBs to the sum of the MSBs.

**[0112]**Inverter 1304 receives control signal 1006, which is set to 0 in ten-bit mode, and outputs inverted control signal 1006 (i.e., 1) to the lower input of AND gate 1306. As shown in Table VI, when inverted control signal 1006 is 1, and the MSB of first sum 1310 (i.e., the carry-over bit) is equal to 0, then a value of 0 is provided to adder 1308. When inverted control signal 1006 is 1, and the MSB of first sum 1310 is equal to 1, then a value of 1 is provided to adder 1308. Adder 1308 sums (i) the set of five MSBs A[9:5] corresponding to the first ten-bit message, (ii) the set of five MSBs B[9:5] corresponding to the second ten-bit message, and (iii) the output of AND gate 1306, and provides a second sum D[9:5] to the output of reconfigurable adder 1300, such that the first sum C[4:0] and the second sum D[9:5] form a single ten-bit sum E[9:0].

**[0113]**Reconfigurable Cyclic Shifter

**[0114]**FIG. 14 shows a simplified block diagram of a reconfigurable cyclic shifter 1400 according to one embodiment of the present invention that may be used to implement each of reconfigurable cyclic shifters 810 and 816 of FIG. 8. Reconfigurable cyclic shifter 1400 may be configured as (i) a 72-by-72 five-bit cyclic shifter in five-bit precision mode that shifts 72 five-bit messages (i.e., 72 messages×5 bits/message=360 bits) per clock cycle or (ii) a 72-by-72 ten-bit cyclic shifter in ten-bit precision mode that shifts 36 ten-bit messages (i.e., 36 messages×10 bits/message=360 bits) per clock cycle. Thus, in both modes, reconfigurable cyclic shifter 1400 is capable of providing 72 degrees of shifting.

**[0115]**In five-bit precision mode, five-bit message reordering block 1404 receives 360 bits A[359:0] per clock cycle corresponding to 72 five-bit messages. The messages in each set of 72 five-bit messages are reordered by five-bit message reordering block 1404 as discussed below in relation to FIG. 15 to generate 360 bits B[359:0] corresponding to 72 five-bit reordered messages, which are split by message separator 1406 as discussed below in relation to FIG. 17 into 180 bits D[179:0] corresponding to a first subset of 36 five-bit reordered messages and 180 bits E[179:0] corresponding to a second subset of 36 five-bit reordered messages.

**[0116]**The first and second subsets of reordered messages are cyclically shifted by 36-by-36 five-bit cyclic shifters 1410 and 1408, respectively, to generate 180 bits F[179:0] corresponding to a first subset of 36 cyclically-shifted, five-bit messages and 180 bits G[179:0] corresponding to a second subset of 36 cyclically-shifted, five-bit messages, respectively. Cyclic shifters 1410 and 1408 may each be implemented in a manner similar to that of cyclic shifter 300 of FIG. 3. However, rather than performing 72 degrees of shifting, each cyclic shifter 1410 and 1408 provides only 36 degrees of shifting. For reconfigurable cyclic shifters 810(0), . . . , 810(3) of FIG. 8, cyclic shifters 1410 and 1408 may be implemented to perform, for example, cyclic up-shifting, and for reconfigurable cyclic shifters 816(0), . . . , 816(3), cyclic shifters 1410 and 1408 may be implemented to perform, for example, cyclic down-shifting. Note that cyclic shifters 1410 and 1408 together, without any additional hardware, do not perform 72 degrees of cyclic shifting. Five-bit message reordering block 1404 and message separator 1406 are employed to enable reconfigurable cyclic shifter 1400 to perform up to 72 degrees of cyclic shifting.

**[0117]**The first and second subsets of cyclically-shifted messages F[179:0] and G[179:0] are provided in serial to output message reordering block 1412 as one set of cyclically-shifted messages H[359:0], and output message reordering block 1412 outputs cyclically-shifted messages I[359:0] as discussed below in relation to FIG. 18. Note that, in five-bit precision mode, output message reordering block 1412 does not reorder the set of cyclically-shifted messages H[359:0]. Rather, the set of cyclically-shifted messages H[359:0] are output in the order in which they were received.

**[0118]**In ten-bit precision mode, ten-bit message reordering block 1402 receives 72 ten-bit messages (i.e., 720 bits A[719:0]) every two clock cycles. Ten-bit message reordering block 1402 reorders each set of 72 ten-bit messages as discussed below in relation to FIG. 16, and outputs first and seconds sets of 36 ten-bit reordered messages at a rate of one set (i.e., 360 bits C[359:0]) per clock cycle.

**[0119]**Message separator 1406 splits each set of 36 ten-bit reordered messages as discussed below in relation to FIG. 17 into (i) 180 bits D[179:0] corresponding to a first set of 36 five-bit reordered sub-messages that comprises the first five bits of each of the 36 ten-bit reordered messages from ten-bit message reordering block 1402 and (ii) 180 bits E[179:0] corresponding to a second set of five-bit reordered sub-messages that comprises the second five bits of each of the 36 ten-bit reordered messages from ten-bit message reordering block 1402.

**[0120]**The first and second sets of five-bit reordered sub-messages are cyclically shifted by 36-by-36 five-bit cyclic shifters 1410 and 1408, respectively, to generate 180 bits F[179:0] corresponding to a first set of 36 cyclically-shifted, five-bit sub-messages and 180 bits G[179:0] corresponding to a second set of 36 cyclically-shifted, five-bit sub-messages, respectively. The first and second sets of cyclically-shifted, five-bit sub-messages F[179:0] and G[179:0] are provided in serial to output message reordering block 1412 as one set of cyclically-shifted, five-bit sub-messages H[359:0]. Output message reordering block 1412 reorders the cyclically-shifted, five-bit sub-messages H[359:0] as discussed below in relation to FIG. 18 to reassemble the ten-bit messages that were split by message separator 1406, and outputs 36 cyclically-shifted, ten-bit messages I[H359:0]. The full set of 72 cyclically-shifted, ten-bit messages is generated over two clock cycles.

**[0121]**FIG. 15 shows a simplified block diagram of a five-bit message reordering block 1500 according to one embodiment of the present invention that may be used to implement five-bit message reordering block 1404 of reconfigurable cyclic shifter 1400 of FIG. 14. Five-bit message reordering block 1500 receives 360 bits A[359:0] corresponding to 72 five-bit messages. The 72 five-bit messages are provided to multiplexers 1502(0), . . . , 1502(71), such that (i) the lower inputs of multiplexers 1502(0), . . . , 1502(71) receive messages A[4:0], . . . , A[359:355], respectively, (ii) the upper inputs of multiplexers 1502(0), . . . , 1502(35) receive messages A[184:180]), . . . , A[359:355]), respectively, and (iii) the upper inputs of multiplexers 1502(36), . . . , 1502(71) receive messages A[4:0], . . . , A[179:175]), respective

**[0122]**Multiplexers 1502(0), . . . , 1502(71) select either their respective upper or lower inputs to output as reordered five-bit messages B[4:0], . . . , B[359:355], respectively, based on a 36-bit control signal (CTL[35:0]). The inputs may be selected such that all upper inputs, all lower inputs, or a combination of upper and lower inputs are output. Control signal (CTL[35:0]), which may be supplied from a controller such as controller 818 of FIG. 8 and which may be generated based on a desired cyclic shift, is provided such that multiplexers 1502(0), . . . , (35) receive CTL[0], . . . , CTL[35], respectively, and multiplexers 1502(36), . . . , 1502(71) also receive CTL[0], . . . , CTL[35], respectively.

**[0123]**FIG. 16 shows a simplified block diagram of a ten-bit message reordering block 1600 according to one embodiment of the present invention that may be used to implement ten-bit message reordering block 1402 of reconfigurable cyclic shifter 1400 of FIG. 14. Ten-bit message reordering block 1600 receives 720 bits A[719:0] corresponding to 72 ten-bit messages every two clock cycles. The ten-bit messages are provided to multiplexers 1602(0), . . . , 1602(35), such that (i) the lower inputs of multiplexers 1602(0), . . . , 1602(35) receive the first 36 ten-bit messages A[9:0], . . . , A[359:355], respectively, and (ii) the upper inputs of multiplexers 1602(0), . . . , 1602(35) receive the second 36 ten-bit messages A[369:360]), . . . , A[719:715], respectively. The 72 ten-bit messages are output over two clock cycles, such that 36 ten-bit messages are output during each of the two clock cycles. During the first of the two clock cycles, multiplexers 1602(0), . . . , 1602(35) select either their respective upper or lower inputs to output as reordered ten-bit messages C[9:0], . . . , C[359:350], respectively. Similar to five-bit reordering block 1500 of FIG. 15, the inputs may be selected such that all upper inputs, all lower inputs, or a combination of upper and lower inputs are output. During the second of the two clock cycles, the inputs of multiplexers 1602(0), . . . , 1602(35) that were not selected during the first clock cycle are output as reordered ten-bit messages C[9:0], . . . , C[359:350], respectively. Selection of outputs is based on 36-bit control signal CTL[35:0], which is provided such that multiplexers 1602(0), . . . , 1602(35) receive CTL[0], . . . , CTL[35], respectively.

**[0124]**FIG. 17 shows a simplified block diagram of a message separator 1700 according to one embodiment of the present invention that may be used to implement message separator 1406 of reconfigurable cyclic shifter 1400 of FIG. 14. Message separator 1406 has multiplexer 1702, which receives 72 five-bit messages B[359:0] via its lower input and 36 ten-bit messages C[359:0] via its upper input.

**[0125]**In five-bit precision mode, control signal 1006 is set to 1, and the 72 five-bit messages B[359:0] are output in alternating fashion to cyclic shifters 1410 and 1408 of FIG. 14. In particular, five-bit messages B[4:0], B[14:10], . . . , B[354:350] are provided as D[179:0] to cyclic shifter 1410 of FIG. 14, and five-bit messages B[9:5], B[19:15], . . . , B[359:355] are provided as E[179:0] to cyclic shifter 1408.

**[0126]**In ten-bit mode, control signal 1006 is set to 0, and the 36 ten-bit messages C[359:0] are output such that the first five bits of each ten-bit message (C[4:0], C[14:10], . . . , C[354:350]) are provided to cyclic shifter 1410 as D[179:0], and the second five bits of each ten-bit message (C[9:5], C[19:15], . . . , C[359:355]) are provided to cyclic shifter 1408 as E[179:0].

**[0127]**FIG. 18 shows a simplified block diagram of an output message reordering block 1800 according to one embodiment of the present invention that may be used to implement output message reordering block 1412 of reconfigurable cyclic shifter 1400 of FIG. 14. Output message reordering block 1800 receives 360 bits H[359:0] (i.e., 72 five-bit messages in five-bit precision mode or 36 ten-bit messages in ten-bit mode). The first five bits H[4:0] and the last five bits H[359:355] are provided to the output as I[4:0] and I[359:355], respectively. The remaining 350 bits H[354:5] are provided to (i) the lower input of multiplexer 1802 in the order in which they are received and (ii) the upper input of multiplexer 1802, such that groups of five bits from the first 175 bits H[179:5] are interleaved with groups of five bits from the second 175 bits H[354:180]. For example, bits H[184:180] are provided to multiplexer 1802, followed by bits H[9:5], followed by bits H[189:185], followed by bits H[14:10], and so on.

**[0128]**In five-bit precision mode, control signal 1006 is set to 1 such that the lower input H[354:5] of multiplexer 1802, which comprises 70 five-bit messages I[354:5], is output. The 70 five-bit messages I[354:5] are output with five-bit messages I[4:0] and I[359:355] such that the 72 five-bit messages are output as I[359:0].

**[0129]**In ten-bit precision mode, control signal 1006 is set to 0, such that the upper input of multiplexer 1802 is output. The upper input of multiplexer 1802, which comprises (i) 34 ten-bit messages I[349:10], (ii) a second half I[9:5] of the first ten-bit message, and (iii) a first half I[350:354] of the last ten-bit message is output with the first half I[4:0] of the first ten-bit message and the second half I[359:355] of the last ten-bit message, such that the 36 ten-bit messages are output as I[359:0]. Note that, in ten-bit precision mode, the 360 bits H[359:0] received by output message permutator 1800 are interleaved to reassemble the ten-bit messages, each of which was divided into two five-bit sub-messages by message separator 1406 of FIG. 14.

**[0130]**Timing for Reconfigurable LDPC Decoder 800

**[0131]**FIG. 19 graphically illustrates a timing diagram 1900 for the ten-bit precision mode of reconfigurable LDPC decoder 800 of FIG. 8. Suppose, for this diagram, that reconfigurable LDPC decoder 800 implements reconfigurable CNUs such as reconfigurable CNU 900 of FIG. 9. As shown, for the ith iteration, each reconfigurable CNU 900 performs partial state (PS) processing 904 during the first twenty clock cycles to generate and store minimum magnitude values M1(1) and M1(2) and second minimum magnitude values M2(1) and M2(2). During the 21st clock cycle, each reconfigurable CNU 900 transfers the minimum and second minimum magnitude values to final state (FS) memory 906. During the 22nd to 41st clock cycles, R selector processing 908 each reconfigurable CNU 900 selects the updated ten-bit R messages and outputs the ten-bit R messages to reconfigurable VNU array 804, which generates the updated ten-bit Q messages during the same 20 clock cycles. Note that, for simplicity, the delays of reconfigurable cyclic shifters 810(0), . . . , 810(3), reconfigurable cyclic shifters 816(0), . . . , 816(3), buffers 814(0), . . . , 814(3), and buffers 808(0), . . . , 808(3) are not shown. Buffers 814(0), . . . , 814(3), together, may add a add a total delay of approximately one clock cycle, and similarly, buffers 814(0), . . . , 814(3), together, may add a add a total delay of approximately one clock cycle. Further, note that, since partial state (PS) processing 904 and R selection processing 908 of each reconfigurable CNU 900 are performed over separate clock cycles, each reconfigurable CNU 900 may process two different iterations at the same time. For example, during the 22

^{nd}to 41

^{st}clock cycles, while each reconfigurable CNU 900 is selecting and outputting the updated ten-bit R messages for the i

^{th}iteration, the CNU may also be performing partial state (PS) processing 904 for the (i+1)

^{th}iteration.

**CONCLUSION**

**[0132]**Although the present invention has been described relative to the specific non-layered reconfigurable LDPC decoder configuration 800 of FIG. 8, the present invention is not so limited. Various embodiments of the present invention may also be envisioned for other LDPC decoder structures that employ message passing. For example, reconfigurable LDPC decoders of the present invention may be implemented without using cyclic shifters. In such embodiments, the messages may be passed between CNUs and VNUs through direct connections or using permutators that perform non-cyclic shifting. Further, the present invention may be implemented for other non-layered or layered decoder structures such that these other structures may be reconfigured in real time to process five-bit and ten-bit messages. In some reconfigurable LDPC decoder structures of the present invention, such as reconfigurable layered decoder structures, the reconfigurable LDPC decoder might not implement a separate reconfigurable VNU such as that described above in relation to reconfigurable adder 1300 of FIG. 13. Instead, the reconfigurable LDPC decoder might generate Q messages using one or more reconfigurable adders that are not grouped together as one identifiable reconfigurable VNU.

**[0133]**Further, although the present invention was described relative to the specific H-matrix 100 of FIG. 1, the present invention is not so limited. The present invention may be implemented for various H-matrices that are the same size or a different size than matrix 100 of FIG. 1. Such matrices may be, for example, cyclic, quasi-cyclic, non-cyclic, regular, or irregular H-matrices. In embodiments that are used to implement H-matrices that are a different size than H-matrix 100, the number of VNUs, fixed and adjustable permutators, and CNUs may vary according to the size of the H-matrix.

**[0134]**Yet further, although the specific embodiments of processing of LDPC decoder 800 were discussed (e.g., reconfigurable CNU 900 of FIG. 9, reconfigurable 2TM converter 1000 of FIG. 10, reconfigurable minimum operator 1200 of FIG. 12, reconfigurable adder 1300 of FIG. 13, reconfigurable cyclic shifter 1400 of FIG. 14), the present invention is not limited to embodiments that implement these reconfigurable components. Further embodiments of these and other reconfigurable components may be envisioned by one of ordinary skill in the art.

**[0135]**It will be further understood that various changes in the details, materials, and arrangements of the parts which have been described and illustrated in order to explain the nature of this invention may be made by those skilled in the art without departing from the scope of the invention as expressed in the following claims. For example, rather than receiving Q messages and outputting R messages using two's-complement format, CNU 900 may receive and output messages in another format such as sign-magnitude format. In such a case, two's-complement-to-sign-magnitude conversion may be performed by, for example, the VNUs. As another example, LDPC decoders of the present invention may process messages of sizes other than five and ten bits. Such embodiments may process messages of other sizes having a two-to-one ratio, such as four and eight bits, or messages of other sizes having a ratio N other than two-to-one.

**[0136]**Although embodiments of the present invention have been described in the context of LDPC codes, the present invention is not so limited. Embodiments of the present invention could be implemented for any code that can be defined by a graph, e.g., tornado codes and structured IRA codes, since graph-defined codes suffer from trapping sets.

**[0137]**Further, although the exemplary belief-propagation algorithm used above is the offset min-sum algorithm (OMS), the present invention is not so limited, and can be used with any suitable belief-propagation variant, e.g., sum-product algorithm (SPA) or the Bahl-Cocke-Jelinek-Raviv (BCJR) algorithm.

**[0138]**While the exemplary embodiments of the present invention have been described with respect to processes of circuits, including possible implementation as a single integrated circuit, a multi-chip module, a single card, or a multi-card circuit pack, the present invention is not so limited. As would be apparent to one skilled in the art, various functions of circuit elements may also be implemented as processing blocks in a software program. Such software may be employed in, for example, a digital signal processor, micro-controller, or general purpose computer.

**[0139]**The present invention can be embodied in the form of methods and apparatuses for practicing those methods. The present invention can also be embodied in the form of program code embodied in tangible media, such as magnetic recording media, optical recording media, solid state memory, floppy diskettes, CD-ROMs, hard drives, or any other machine-readable storage medium, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. The present invention can also be embodied in the form of program code, for example, whether stored in a storage medium, loaded into and/or executed by a machine, or transmitted over some transmission medium or carrier, such as over electrical wiring or cabling, through fiber optics, or via electromagnetic radiation, wherein, when the program code is loaded into and executed by a machine, such as a computer, the machine becomes an apparatus for practicing the invention. When implemented on a general-purpose processor, the program code segments combine with the processor to provide a unique device that operates analogously to specific logic circuits. The present invention can also be embodied in the form of a bitstream or other sequence of signal values electrically or optically transmitted through a medium, stored magnetic-field variations in a magnetic recording medium, etc., generated using a method and/or an apparatus of the present invention.

**[0140]**Unless explicitly stated otherwise, each numerical value and range should be interpreted as being approximate as if the word "about" or "approximately" preceded the value of the value or range.

**[0141]**The use of figure numbers and/or figure reference labels in the claims is intended to identify one or more possible embodiments of the claimed subject matter in order to facilitate the interpretation of the claims. Such use is not to be construed as necessarily limiting the scope of those claims to the embodiments shown in the corresponding figures.

**[0142]**It should be understood that the steps of the exemplary methods set forth herein are not necessarily required to be performed in the order described, and the order of the steps of such methods should be understood to be merely exemplary. Likewise, additional steps may be included in such methods, and certain steps may be omitted or combined, in methods consistent with various embodiments of the present invention.

**[0143]**Although the elements in the following method claims, if any, are recited in a particular sequence with corresponding labeling, unless the claim recitations otherwise imply a particular sequence for implementing some or all of those elements, those elements are not necessarily intended to be limited to being implemented in that particular sequence.

User Contributions:

comments("1"); ?> comment_form("1"); ?>## Inventors list |
## Agents list |
## Assignees list |
## List by place |

## Classification tree browser |
## Top 100 Inventors |
## Top 100 Agents |
## Top 100 Assignees |

## Usenet FAQ Index |
## Documents |
## Other FAQs |

User Contributions:

Comment about this patent or add new information about this topic:

People who visited this patent also read: | |

Patent application number | Title |
---|---|

20100054732 | Method and System for Monitoring and Servicing Devices Based on One-Wire Infrared Communication |

20100054731 | METHODS AND SYSTEMS FOR THE HIERARCHICAL MESH RESTORATION OF CONNECTIONS IN AN AUTOMATICALLY SWITCHED OPTICAL NETWORK |

20100054730 | PHOTO DEVELOPMENT APPARATUS AND METHOD FOR FABRICATING A COLOR FILTER SUBSTRATE USING THE SAME |

20100054729 | SECTOR BLADE DRIVING APPARATUS |

20100054728 | BLADE DRIVE DEVICE AND OPTICAL EQUIPMENT |