Low power operation of an address interleaver

A first interleaved address generator is configured to generate a first interleaved address, and a second interleaved address generator is configured to generate a second interleaved address substantially concurrently with the first interleaved address generator generating the first interleaved address. A controller is configured to disable the second interleaved address generator from generating the second interleaved address if the second interleaved address is not needed to produce a continuous stream of interleaved addresses.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to the field of turbo coding, and more particularly, a low power operation of address interleaving in the turbo coding process.

2. Description of Related Art

Turbo coding is one of the most important components for data transmission in the third generation (3G) wireless standards such as the Universal mobile telephone standard (UMTS). Turbo coding provides forward error correction with exceptional coding gain, and provides for almost error-free data transmissions for all but the lowest signal-to-noise ratio (SNR) environments. The key component of the turbo coding structure is the interleaver which permutes the data sequence between the two constituent decoders. Research has shown that the overall performance of turbo codes are directly related to the “randomness” of the interleaver between the blocks.

The 3GPP standard defines the interleaver for turbo codes as a function based on the block sizes in the range of 40 to 5114 bits. The 3GPP interleaver uses a basic block interleaver structure with a complex inter-row and intra-row permutation to generate a pseudo-random interleaving pattern. While these permutations provide excellent algorithmic performance, they severely complicate the hardware implementation of the interleaver.

One possible architecture for a hardware address interleaver is to use a large memory which contains the entire address interleaving sequence. Thus the turbo components simply access the memory to retrieve the next interleaved address. This is the most straightforward implementation, but the entire table must be recalculated when the block size changes. While the overhead in loading the table may be acceptable for a mobile terminal, infrastructure turbo decoders may need to deal with multiple block sizes, one right after another.

An alternative to using a large memory based hardware address interleaver in a turbo decoder, is to generate an interleaved address on the fly. However, when an invalid address is generated, a discontinuous stream of interleaved addresses is created. Namely, there will be a cycle of operation in which no valid address is generated.

SUMMARY OF THE INVENTION

The present invention provides a method and apparatus for generating interleaved addresses on the fly in which a continuous stream of interleaved addresses is produced. Furthermore, the present invention provides a low power consumption method and apparatus for producing the continuous stream of interleaved address.

The low power interleaved address generation architecture of the present invention includes a first interleaved address generator and a second interleaved address generator operating concurrently. A controller controls a selector to selectively output the first and second interleaved addresses such that for each cycle of operation, a valid interleaved address is output. The controller also disables the second interleaved address generator when the second interleaved address is not needed to produce a continuous stream of interleaved addresses. In this manner, power consumption is reduced while still producing a continuous stream of interleaved addresses.

DETAILED DESCRIPTION OF EMBODIMENTS

Initially, the general methodology of generating an interleaved address will be described followed by a description of the general architecture for generating the interleaved address. Next, a description of the methodology for generating an interleaved address will be described. Further, an embodiment for implementing the methodology will be described. Another architecture, one for generating both a current and a next interleaved address will then be described. Afterwards, a low power interleaver architecture for generating a continuous stream of valid interleaved addresses will be described, followed by a description of a general architecture for providing a continuous stream of valid addresses.

General Methodology for Generating an Interleaved Address

A method for producing an interleaved address may include several steps. An exemplary method includes the steps of formatting the input data bits into a rectangular matrix, performing intra-row and inter-row permutations on the rectangular matrix, and outputting the bits from the rectangular matrix with pruning.

The first step is to format the input bits into a rectangular matrix. If K is the number of inputs bits in the data block to encode (i.e., the block size), the first item that needs to be found is the number of rows, R, in the basic block interleaver structure. Equation (1) demonstrates the selection process for R, wherein one of three values, 5, 10 or 20 is selected.

The number of columns in the block interleaver is determined by calculating the minimum prime number that can solve equation (2).

Then, the number of columns in the table can be computed based on the prime number as seen in equation (3).

Once these three variables are known, R, p and C, the data can be written into a block interleaver table in sequential order, row by row. Note that the last row written may only be partially filled, so the rest of the row is loaded with zeroes.

The next step is to compute the intra-row sequence. To do this, the primitive root associated with the precalculated value of p is selected from Table 1 below based on the value of p.

TABLE 1Prime numbers p and the associated primitive root vpvpvpvpvpv7345102155223112521051622221325210216522617362106172233192621131722372357712318224729275132191925631373133195253372821321924168314219343395156212

The values of p and ν serve to generate the intra-row permutation sequence s(i).
s(i)=[ν×s(i−1)]modp,i=1,2, . . . , (p−2),s(0)=1  (4)

Let q0be the 1stprime integer in the sequence {qj}. {qj} is generated as follows:
g.c.d.{qj,p−1}=1,qj>6,qj>q(j−1),  (5)where g.c.d. is the greatest common denominator

where these patterns are selected as follows based upon the current block size

Intra-row permutations are performed as follows:

where Uj(i) is the input bit position of the i-th output after the permutation of the j-th row.

end if

if (C=p+1) then
Uj(i)=s([i×rj]mod(p−1),i=0,1,2, . . . , (p−2).,Uj(p−1)=0 andUj(p)=p,where Uj(i) is the input bit position of the i-th output after the permutation of the j-th row.

end if

if (C=p−1) then
Uj(i)=s([i×rj]mod(p−1),i=0,1,2, . . . , (p−2).where Uj(i) is the input bit position of the i-th output after the permutation of the j-th row.

end if

The inter-row permutation based upon the pattern T(j) (j=0,1,2, . . . , R−1) is performed, where T(1) is the original row position of the j-th permuted row.

The final step concerns the pruning of addresses that resulted from the partially filled row mentioned previously. If the generated address is larger than the current block length then the generated address is discarded.

General Architecture for Generating an Interleaved Address

FIG. 1shows an overall architecture for the address interleaver structure. The other components forming the turbo decoder have not been show for the sake of clarity, and are well-known in the art. Accordingly, it will be appreciated, particularly from the description of the general methodology above and the following description, that the generation of the various inputs to this overall architecture are well-known. The architecture is partitioned into several sections, and follows closely from the 3GPP algorithm.

As shown, a first look-up table10stores the inter-row sequence numbers, and outputs one of the inter-row sequence numbers using a received row index j as an address. A mod computation device12generates an intra-row permutation address by computing (i*rj) mod (p−1). The intra-row permutation address, zero and p are supplied to a selector14. The selector14normally outputs the intra-row permutation address, but when the number of rows and columns equals the block size, the first and last column are swapped by the selector14when the last row is being processed to maintain relative ordering of the number patterns from block size to block size.

A second look-up table16stores the intra-row permutation sequences S (see equation 4), and outputs one of the intra-row permutation sequences using the output from the selector14as an address. A multiplier18receives the intra-row permutation sequence from the second look-up table16and an inter-row permutation pattern from a third look-up table20. The third look-up table20stores the inter-row permutation patterns discussed above, and outputs one of the inter-row permutation patterns based on the block size K.

The product generated by the multiplier18is a generated interleaved address. A comparator22makes sure the resulting address is within the range of K, the block size, and outputs a valid address signal if the interleaved address is in the range of K. If the address is outside the range, the interleaver architecture must wait another cycle to provide the next valid address. During the comparison operation, the generated interleaved address is stored in a register24that is clocked by a clock of the turbo decoder.

Performing the MOD Operation with Decomposition

As will be appreciated, the components forming the architecture ofFIG. 1are straightforward, consisting of either memories, registers, or simple arithmetic units. Of these components, the mod computation device12tends to have the greatest complexity and non-deterministic computation time. A methodology of performing the mod operation that reduces complexity and computation time will now be described.

For a given block size K, the mod divisor p−1 is fixed. Given this pseudo-static value for p−1, the properties of mod can be taken advantage of to provide a much simpler solution. Consider equation (7) below which shows that the mod of a number can be broken down into a summation of mod operations onto the individual components that make up the number. In this case, equation (7), breaks up the dividend into its binary components and computes the mod of each power of two number. Each of the individual results are summed together, and then a final mod operation is performed.

FIG. 2shows an architecture for implementing the mod decomposition of equation (7). As shown, a multiplier28multiplies the column index and the inter-row sequence number to produce a binary product y. As further shown, the power of two mod calculations are pre-computed and stored into registers30. These values are only changed when the block size changes, and only have to be downloaded at the beginning of the block. The binary product y represents the dividend of the mod operation. Each binary component (i.e., bit) is input along with a corresponding power of two mod value by an AND gate32. For example, the least significant binary component y0and the zeroth order power of two mod value are input by one of the AND gates32, the next significant binary component y1and the first order power of two mod value are input by the next AND gate32, etc. The AND gates32logically AND the inputs to generate intermediate mod values a0, a1, . . . ax−1, which are passed to a modulo summation block34.

FIG. 3illustrates the modulo summation block34in greater detail. As shown, the modulo summation block34has a tree structure to minimize the propagation delay. Namely, the modulo summation block34has a base level34, a number of intermediate levels42and a final level44. Each level includes one or more modulo adders36. Each modulo adder adds two input numbers together and generates the mod p−1 result of the sum. Accordingly, the base level40includes a modulo adder36for every two intermediate mod values a, the intermediate levels42include a modulo adder36for every two modulo adders36in the previous level, and the final level44includes a single modulo adder36. As will be appreciated, the number of intermediate levels42is a number necessary to generate two outputs to the final level44. When the modulo summation block34is used specifically with the 3GPP standard, the smallest possible value of p−1 is 6. Therefore, the first two intermediate mod values fromFIG. 2are at most 1 and 2 regardless of p−1 (i.e.,1MOD6=1,2MOD6=2) so a simple adder38can be used in place of a modulo adder36because the value is guaranteed to be in modulo p−1 arithmetic. For the purposes of example only, this has been illustrated inFIG. 3.

As discussed above, the modulo adders36perform two functions. First, they add the two input numbers together. Second, they check the sum and determines if the sum lies outside of the mod field. If so, the output value is wrapped around relative to the mod field.FIG. 4illustrates an embodiment of a modulo adder36. As shown, the modulo adder36includes an adder50adding inputs a and b, and a subtractor52subtracting the mod operand (e.g., p−1) from the sum of a+b. A selector54selectively outputs one of a+b and (a+b)−(p−1). A comparator56compares the value (p−1) to the sum a+b, and controls the selector54to output the sum a+b if the sum a+b is less than or equal to the value (p−1). Otherwise, the comparator56instructs the selector54to select the output of the subtractor52.

Continuous Address Generation

A problem with interleaved address generators is that occasionally they generate addresses that are outside the valid range of the block size. When an address is generated outside of the range, the architecture produces a flag which identifies if the output is invalid, and then the architecture must wait another clock cycle before the next sequential interleaved address is valid. Over a large block size, this can create a large overhead in the turbo decoding process.FIG. 5shows a simple example of the interleaving process and how invalid addresses are generated. Since the ranges of block sizes are continuous between 40 and 5114, the exact number of elements do not always fit exactly into the rectangular array defined by R and C. The values fill the array row by row, but the last row has some elements that are empty. In the process of interleaving, both the rows and columns are permutated based on the interleaving equations, and the empty cells are spread across a row. Thus when the interleaver starts to retrieve source addresses, occasionally it will generate an access to an empty cell.

With puncturing, the interleaver does not know that it has an invalid address until it has actually calculated the final address and compared the final address with the valid range of values. One solution is to make sure that the address generator is actually calculating both the current address and the next address at the same time. With both addresses available, the address interleaver first checks if the current generated address is valid. If the address is valid, the current address is used, but if the current address is not valid, the architecture can immediately substitute the next address. Because the interleaver proceeds in row-by-row basis, if the current address is invalid, the next address is guaranteed to be a valid address because all of the empty spaces come from the same row.

FIG. 6shows the address interleaver architecture that generates both the current and next address at the same time. InFIG. 6, selector14has been deleted for the sake of clarity. As shown, the first look-up table10generates the current inter-row sequence number using the current row index j as an address and a duplicate first look-up table10′ generates the next inter-row sequence number using the next row index j+1. The mod computation device12generates the current intra-row permutation address by computing (i*rj) mod (p−1). And, another mod computation device12′ generates the next intra-row permutation address by computing (i*rj+1) mod (p−1). The mod computation devices12and12′ employ the methodology and architecture discussed above with respect toFIGS. 2 and 3.

A second look-up table16′ stores the intra-row permutation sequences S (see equation 4). The second look-up table16′ is a two input port (A and B), two output port (A and B) memory, and outputs the current and next intra-row permutation sequences using the current and next intra-row permutation addresses, respectively. If a dual-port memory is not available a single memory can be used provided a double-rate clock is used to access the memory twice for every symbol required on the output, or two separate single port memories can be used. Multipliers18and18′ respectively receive the current and next intra-row permutation sequences from the second look-up table16′ and also receive an inter-row permutation pattern from the third look-up table20. The products generated by the multipliers18and18′ are current and next interleaved addresses, respectively. Accordingly, the architecture ofFIG. 6represents first and second interleaved address generators80and82that, in the embodiment ofFIG. 6, share a dual port memory; but as described above, the first and second interleaved address generators can be structurally independent.

A multiplexer or selector60receives the current and next interleaved addresses, and selectively outputs one of the current and next interleaved addresses based on output from the comparator22. The comparator22makes sure the current interleaved address is within the range of K, the block size, and outputs a valid address signal if the interleaved address is in the range of K. If valid, the output from the comparator22causes the multiplexer60to output the current interleaved address. If invalid, the output from the comparator60causes the multiplexer60to select the next interleaved address. Accordingly, processing time is reduced by not having to wait for the next valid interleaved address to be generated.

Low Power Continuous Address Generation

FIG. 7illustrates a low power address interleaver architecture according to an embodiment of the present invention that provides a continuous stream of valid interleaved addresses. As shown, the embodiment ofFIG. 7is the same as the embodiment ofFIG. 6except that the mod computation devices12and12′ and the second look-up table16′ have enable ports; a first register72and a second register74store outputs from the multipliers18and18′, respectively; the multiplexer60has been replaced with a multiplexer70; and a controller76receives the output from the multipliers18and18′ and controls operation of the multiplexer70, enablement of the first and second mod computation devices12and12′ and enablement of the second look-up table16′. Accordingly, for the sake of brevity, only these differences will be described in detail.

The controller76may enable and disable operation of the either or both of the mod computation devices12and12′ by sending control signals to the enable ports of the mod computation devices12and12′. The controller76may also enable and disable generation of the intra-row permutation sequences for output at either or both of the output ports of the second look-up table16′. By disabling, for example, the second mod computation device12′ and generation of the intra-row permutation sequence at port B of the second look-up table16′, the controller76disables generation of the second or next interleaved address output from the second multiplier18′. Accordingly, the controller76may selectively enable and disable generation of the first and second interleaved addresses. Stated another way, the controller76may selectively enable and disable the first and second interleaved address generators80and82generating the first and second interleaved addresses, respectively.

When the first and/or second interleaved address generators80and82are disabled, the components forming the disabled interleaved address generator do not operate and consume power. Accordingly, power consumption may be reduced by disabling the first and/or second interleaved address generators80and82when their operations is not required.

The multiplexer70receives the generated first interleaved address at its port B, the stored first interleaved address (which is a previous interleaved address with respect to the generated first interleaved address) at its port A, and the stored second interleaved address at its port C. The controller76controls whether the multiplexer70outputs the interleaved address at port A, port B or port C.

Next, an exemplary operation of the architecture ofFIG. 7for producing a continuous stream of interleaved address while reducing power consumption will be described with respect to table1illustrated inFIG. 8. During a first cycle of operation, the controller76enables operation of both the first and second interleaved address generators80and82. As shown inFIG. 8, the first and second interleaved addresses A0and A1are generated, where the second interleaved address A1is a next or subsequent interleaved address with respect to the first interleaved address A0. The order of the interleaved addresses is denoted by the numeral following the letter ‘A’ (for address). The controller76controls the multiplexer70to output the generated first interleaved address A0if the address is valid. As will be appreciated by those skilled in the art, because of the method of interleaved address generation described in detail above, at least the first two interleaved addresses A0and A1will be valid. The interleaved addresses A0and A1are also stored by the first and second registers72and74, respectively.

As a general rule, after the second interleaved address generator82generates one interleaved address, the controller76disables the second interleaved address generator82. Accordingly, in the second cycle (cycle1), the second interleaved address generator82is disabled and does not generate an interleaved address or consume power. The first interleaved address generator80, however, is enabled and generates interleaved address A2. The controller76controls the multiplexer70to output the interleaved address A1at its port C, which is the stored second interleaved address A1. Also in cycle1, the controller76, which incorporates the comparator22, determines if the interleaved address A2is valid.

In this exemplary embodiment, interleaved address A0-A6are assumed valid, and the first invalid interleaved address is interleaved address A7. Because the interleaved address generated in cycle2by the first interleaved address is valid, in the next cycle (cycle3), the second interleaved address generator82remains disabled and the first interleaved address generator80remains enabled. As a result, the first interleaved address generator80generates the interleaved address A3. Also, the controller76controls the multiplexer70to output the interleaved address at its port A, which is the stored first interleaved address A2. The operation of cycle3then repeats for cycles4-7.

However, in cycle7, the generated first interleaved address A7is invalid (the address A7is greater than the block size K). As a result, in cycle8the controller76enables the second interleaved address generator82. Namely, in the cycle subsequent to a cycle in which an invalid address was generated, the controller76enables the second interleaved address generator82. In cycle8, the first and second interleaved addresses are A8and A9, respectively, are generated. The controller76controls the multiplexer70to output the generated first interleaved address A8at its port B.

In the next cycle, cycle9, the operation of cycle1repeats. Namely, the controller76disables the second interleaved address generator82and controls the multiplexer70to output the stored second interleaved address A9at its port C. As will be appreciated, when an invalid address is determined, the controller76enables the second interleaved address generator82for one cycle. Because of the limited number of invalid addresses, the second interleaved address generator82remains idle and does not consume power for a large portion of the continuous on-the-fly interleaved address generation process. For the whole range of 3GPP block sizes of 40 to 5114, only 1.4% of the generated interleaved addresses are invalid. Consequently, the present invention achieves a great savings in power consumption by disabling the operation of the second interleaved address generator82when its operation is not needed to maintain a continuous stream of interleaved addresses.

The operation during cycle10is the same as described above with respect to cycle3. As will be appreciated, when an invalid address is generated by the first address generated in a given cycle, the operation will proceed as described above with respect to cycles8-10.

While the exemplary operation was described as selectively enabling and disabling the operation of the second interleaved address generator82, it will be appreciated that a similar operation may be conducted by enabling and disabling the first interleaved address generator80instead, or flipping between selectively enabling and disabling the first and second interleaved address generators80and82.

The invention being thus described, it will be obvious that the same may be varied in many ways. For example, by inserting additional registers into the embodiment ofFIG. 7(e.g., between the mod computation devices12and12′ and the second look-up table16′), pipelined generation of addresses can be achieved. It will be appreciated that the second address generator82will then remain enabled for additional cycles depending on the length of the pipeline. Such variations are not to be regarded as a departure from the spirit and scope of the invention, and all such modifications as would be obvious to one skilled in the art are intended to be included within the scope of the following claims.