The present invention relates to a method for generating address values for addressing a memory. More specifically, the address values are generated as they are needed for addressing the memory. The invention also relates to a device for generating address values for addressing a memory.
Interleaving/deinterleaving is used to render a bursty communication channel into a communication channel having seemingly independent errors. By interleaving data to be transmitted, error bursts due to the bursty channel are split up after deinterleaving and thus distributed over a wider range of received symbols. When the transmitted data are received and deinterleaved, a code suitable for correcting independent errors can be used to restore the data.
In the interleaver/deinterleaver, a memory is used for storing blocks of data to be interleaved/deinterleaved. The memory may be large, and it is therefore preferred to calculate the address pattern for addressing the memory on-the-fly, i.e. as the addresses are needed. Alternatively, the addresses may be kept in a table, which requires additional storage capacity.
The address patterns may be calculated using LFSR (Linear Feedback Shift Register) techniques. Typically, the LFSR is adapted to generate maximum length or PN (Pseudo Noise) sequences.
An address value may be provided by generating an address fragment, to which one or several most significant bits (MSB) are appended. However, it is a problem with such address generation techniques that the generated address may be out of range of the allowable addresses when the MSB is appended. If the generated address value is out of range it has to be discarded, and a new address value has to be generated instead. To make sure that all generated addresses are within range, all generated address value have to be compared to a maximum allowable value. Thus, a large number of unnecessary comparisons are made, which requires unnecessary time and processing capacity.
In the DVB (Digital Video Broadcasting) standard ETSI EN300744, v1.4.1, ETSI, January 2001, symbol interleaving from index q to index H(q) is defined. Both q and H(q) are composed of Nr bits. Calculation of H(q) includes generating an Nr−1 bit word Ri, which is a permuted version of R′i, the state of an LFSR.
Running the algorithm for symbol interleaving for i=0, 1, . . . Mmax−1, where Mmax is the length of the maximum length sequence output by the LFSR, will result in generation of all valid H(q) values, q=0, 1, . . . , Nmax−1, where Nmax is the number of addresses of the wanted interleaving sequence. Since Mmax>Nmax it has to be checked, for each generated H(q), that H(q) is valid, i.e. that H(q) is less than Nmax.
The most significant bit of H(q) does not depend on Ri, but toggles for every i. Since the maximum length sequence contains an odd number of states of the LFSR (2N
In the above-mentioned version of the DVB standard, two major modes are defined, the 8 k mode (Nr=13) and the 2 k mode (Nr=11). Also, a 4 k mode (Nr=12) is envisaged. The different modes may be summarized as:
In approximately 35% ((Mmax−Nmax) /Nmax) of the loop iterations H(q) has to be recomputed, since the calculated value is out of range (H(q)≧Nmax). This leads to a corresponding increase in execution time. However, as H(q) is compared in all generated loop iterations in the prior art, many unnecessary comparisons are made, resulting in non-optimal execution time and energy consumption.
The same problem occurs also in the deinterleaving process, wherein the mapping of the memory is the inverse of H(q).
What has been described above in relation to the DVB standard is also applicable to other interleaving schemes wherein appending one or several MSB to a generated address fragment will generate address values, which potentially are not within range, wherein a generated address value has to be checked to not exceed a maximum allowable value.
U.S. Pat. No. 6,314,534 B1 discloses a method and apparatus for address generation in an interleaver. An address is generated using a random address fragment and a bit reversed address fragment. It is a problem with this address generator in that the comparison to make sure that the address is within range is made every clock cycle. Thus, the execution time will be unnecessary long as addresses that are within range are compared.
U.S. Pat. No. 6,549,998 B1 discloses an interleaver for generating a valid interleaved address for each iteration. An address generator comprises two counters for addressing parallel lookup tables. A magnitude comparison is made to select the proper output. It is a problem with this address generator in that it comprises two counters, which makes it complicated. Furthermore, a comparison to make sure that the generated address is within range is made in each clock cycle. Also, as the address generator comprises two registers for storing tentative address values, an unnecessary amount of memory capacity is required.
It is an object of the invention to provide a method and a device for decreasing the processing capacity needed for generating address values based on address fragments to which at least one most significant bit (MSB) is appended.
The object of the invention is achieved by a method for generating an address value for addressing a memory. According to the method, consecutive address fragments, to which at least one most significant bit is to be appended, are generated. Only a fraction of the address fragments, which potentially will generate an address value out of range, is compared to a maximum allowable value. If the compared address fragment exceeds the maximum allowable value, the compared address fragment is discarded. However, if the compared address fragment does not exceed the maximum allowable value the compared address fragment is accepted.
The fraction of address values compared given a predetermined number of address values of an interleaving sequence is dependent on the number of MSBs. The fraction may e.g. be ½ if only one MSB is appended.
If necessary, the address fragments are permuted before or after being compared.
The address fragment following the compared address fragment is either generated in the same clock cycle as the compared address fragment, or in response to discarding or accepting the compared address fragment.
The next and second next address fragments following the compared address fragment may be generated by means of a feedback function.
The object of the invention is also achieved by a device for generating address values for addressing a memory. The device comprises a shift register having a predetermined number of registers for generating a maximum length pseudo noise (PN) sequence, i.e. consecutive address fragments. Comparator means is adapted to compare a fraction of the address fragments generated with a maximum allowable value. The compared address fragments will possibly generate address values out of range. A selector means is adapted to discard the compared address fragment if it exceeds the maximum allowable value, and to accept the compared address fragment otherwise.
A toggle means may be provided to append at least one bit being the most significant bit to any address fragment, or permuted address fragment, to generate the address value.
The device may be implemented by software comprising readable program means to be run by a processor. Alternatively, the device may be implemented as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
An interleaver for interleaving a block of data, comprising an interleaver memory and a device for generating address values according to the invention for addressing the memory also achieves the object of the invention.
A deinterleaver for interleaving a block of data, comprising a deinterleaver memory and a device for generating address values according to the invention for addressing the memory also achieves the object of the invention.
A communication apparatus for communicating data, comprising a memory and a device for generating address values according to the invention for addressing the memory also achieves the object of the invention.
Also, a software program product embodied on a computer readable medium comprising instructions for carrying out the method according to the invention when said product is run by a processor achieves the object of the invention.
Further embodiments of the invention are defined in the dependent claims.
It is an advantage of the invention that the processing capacity needed compared to address generation schemes known in the art is decreased. More specifically, the algorithm for generating address values presented in the ETSI standard mentioned above performs substantially more comparisons than according to the invention, resulting in non-optimal processing time and energy consumption. Thus, the present invention results in faster execution time, and since unnecessary operations are removed, decreased energy consumption.
It should be emphasized that the term “comprises/comprising” when used in this specification is taken to specify the presence of stated features, integers, steps or components but does not preclude the presence or addition of one or more other features, integers, steps, components or groups thereof.
Further objects, features and advantages of the invention will appear from the following detailed description of the invention, reference being made to the accompanying drawings, in which:
The mobile terminal 1 comprises a user interface for user interaction, which e.g. may comprise a microphone 2, a loudspeaker 3, a keypad 4 and a display 5. The mobile terminal 1 also comprises a communication interface including an antenna 6 for communicating with a mobile communication network 10, or other electronic equipment, over a wireless communication link 11. The communication interface may also be adapted to communicate with other networks, such as a network for digital video broadcasting DVB), wherein the mobile terminal 1 is adapted to communicate directly with the DVB network. The communication interface for communicating with a mobile communication network or a DVB network could also be adopted to only receive DVB transmissions. That is, the mobile terminal 1 is not necessarily connected to a network (such that the network is aware of the presence of the mobile terminal) since the DVB transmissions are broadcast and hence the communication is one-way only.
An interleaver address generator 40 is connected to the memory 31, and ensures that a proper address value is generated. The generated address value may be supplied to a controller 32, such as a central processing unit, which will address the memory and retrieve bits to be forwarded for transmission or use by other units of the terminal 1. Alternatively, the output of the address generator 40 is directly forwarded to the memory 31, which will output the data stored at the memory position corresponding to the specific address value.
The output terminals of the registers 110a-110d are also connected to a first address fragment calculation unit 140a, which is adapted to generate a consecutive next address fragment R′i+1 based on the present address fragment R′i by means of an address calculation or feedback function g(x). One scheme for calculating the next address fragment R′i+1 by means of g(x) is presented in the above-mentioned ETSI standard. However, other schemes are also possible as long as a next address fragment is generated. Output terminals of the first address fragment calculation unit 140a are operatively connected, by means of a bus, to a second permutation unit 130b. The second permutation unit 130b is adapted to permute the next address fragment R′i+1 to a permuted next address fragment Ri+1 according to the same principles as discussed in relation to the first permutation unit 130a.
Output terminals of the first address fragment calculation unit are also connected to a second address fragment calculation unit 140b. The second address fragment calculation unit 140b is adapted to calculate the second next address fragment R′i+2 based on the next address fragment R′i+1 by means of the address calculation function g(x). Output terminals of the second address calculation unit 140b are operatively connected to second input terminals of each multiplexor 120a-120d, wherein the values of the binary word R′i+2 may be fed back to the registers 110a-110d.
The present address fragment R′i, the next address fragment R′i+1 and the second next address fragment R′i+2 are available during the same clock cycle. Thus, at the input terminals of each multiplexor 120a-120d are the present value of each register 110a-110d, and the second next value as determined by the second address calculation unit 140b, available. Either of the present value or the second next value will be input to the registers in the next clock cycle, as will be described below.
Output terminals of the first and second permutation units 130a, 130b are connected to a selector unit 150. The selector unit 150 is adapted to select either the present permuted address fragment Ri or the next permuted address fragment Ri+1, which are both available at the same clock cycle, based on a control signal M received from a comparator 160.
A toggle unit 170 is adapted to concatenate or append one or several MSBs (Most Significant Bits) to the output from the selector 150. According to the above-mentioned standard, if the present address fragment Ri is output from the selector, a 1 is appended. If the next address fragment Ri+1 is output from the selector 150, 0 is appended. Thus, the complete address value H(q) for addressing the memory 31 is generated.
The present invention is not limited to a single bit as the MSB. One or several bits may be appended to the permuted address fragment to generate the address value. Then the toggle unit is adapted to toggle the MSBs between several values, some of which will generate address values out of range. Depending on the number of MSBs appended, only a fraction of the generated address values have to be compared, as will be described below. If one MSB is appended, every second address value may be out of range. However, if e.g. two MSBs are appended, the fraction could be ¼, ½, or ¾, depending on Nmax. In the case of more than one MSB, more than two address fragment calculation units 140a, 140b may also be needed. More specifically, up to 2(number of MSBs) address fragment calculation units may be needed. Furthermore, the comparator could be connected to more than one of the address fragment calculation units. More specifically, the comparator could be coupled to the fraction of the address fragment calculation units.
The address fragment R′i, may according to the above mentioned standard take the following values:
If Ri is within range, the comparator 160 outputs the control signal M with information to the selector 150 to output the compared permuted address fragment Ri. Also, the comparator 160 outputs a toggle control signal received by the toggle unit 170, which will append a 1 as the MSB of Ri. Furthermore, the comparator 160 outputs a shift register control signal E, which is received at a third input of the multiplexors 120a-120d. If the multiplexors 120a-120d receive the control signal E, the present values of the registers 110a-110d are maintained in the registers. During the next clock cycle, the comparator 160 instructs the selector 150 to output the next address fragment Ri+1 without making any comparison, and instructs the toggle unit to append a 0 as the MSB of Ri+1.
During the clock cycle following the outputting of the next address fragment Ri+1, the registers 110a-110d are updated with the second next address fragment R′i+2, and i is incremented by 2.
If a compared permuted address fragment is out of range, the comparator 160 outputs the control signal M with information to the selector 150 to output the next permuted address fragment Ri+1. Also, the comparator 160 instructs the toggle unit 170 to append a 0 as the MSB to the next permuted address fragment Ri+1. Furthermore, when the address fragment is out of range, the values of the registers 110a-110d are not withheld but updated during the next clock cycle.
The procedure of comparing every second address fragment, outputting or discarding the compared address value, and outputting the next address value is repeated until all values of i are iterated.
Thus, according to the embodiment of
If the present permuted address fragment Ri is odd and is determined to be within range, the comparator 260 will instruct the toggle unit 170 to append a 1 as the MSB. Also, the comparator may issue a data available signal, e.g. to the controller 32, when the address value is available at the output of the address generator. Then, the comparator is adapted to update the registers 110a-110d with the output of the first address fragment calculation unit. Thus each register 110a-110d will comprise the value for the next address fragment. During the next clock cycle, the next, even, permuted address fragment will be generated and the next even address value (having a 0 as MSB) is generated without any comparison.
If the present permuted address fragment Ri is odd and determined being out of range, the comparator 260 will not issue the data available signal until a new address value is generated. Thus no address value will be generated during the present clock cycle. In the following clock cycle, the next, even, permuted address fragment will be generated. The comparator 260 then directly without making any comparison instructs the toggle unit 170 to append a 0 as the MSB and issues the data available signal.
In the above embodiments, the three first address values, R′0=0, R′1=0, R′2=1, which gives H(0)=0, H(1)=2Nr−1, and H(2)<=2Nr−2, are taken care of separately, e.g. by the controller 32, since it is known beforehand that the resulting addresses are within range.
Furthermore, in the above embodiments the generated address fragments are permuted. However, permuting the address fragments may not be necessary if the registers are arranged to generate address fragments, to which an MSB directly may be appended to generate the address value. Also, appending the MSB may also not be necessary if the registers are arranged to generate the address values directly.
In step 401 the present (odd) address fragment (which is the second next address fragment from the previous cycle, except during the first cycle when the present odd address fragment is R′3) is loaded into the registers, and in step 402 the next (even) and second next address fragments are generated. If required, the present and next address fragments are permuted in step 403. In step 404 it is determined whether the odd permuted address fragment is within range. If the answer in step 404 is yes, a 1 is in step 405 appended as an MSB to the address fragment permuted in step 403. In step 406, the present values of the registers are withheld. The generated present (odd) address value is then output in step 407.
If the answer in step 404 is no, the procedure proceeds to step 408, wherein a 0 is appended as an MSB to the next (even) permuted address fragment. Then, the next address value is output in step 409.
In step 410 it is determined whether all possible address values have been generated. If not, the procedure returns to step 401. Otherwise, the procedure is ended.
The method according to the invention has been described in relation to a number of steps. Some of the steps are not necessary to carry out the method according to the invention depending on the specific embodiment. The permutation may e.g. not be executed in all embodiments of the invention. Furthermore, some of the steps may also be executed in a different order. The second next address fragment may e.g. be generated in step 401 when it is needed.
The present invention has been described in the above as applicable to generate and address value for addressing an interleaver memory, such that data written into the memory in linear order is read from the memory in an interleaved order. However, the invention is also applicable to generate address values for addressing a deinterleaver memory, such that data written into the memory in an interleaved order is read from the memory in a linear order. In such a case, the mapping process for generating the address values is the inverse of H(q).
The present invention has been described above with reference to specific embodiments. However, other embodiments than the above described are equally possible within the scope of the invention. Different method steps than those described above, performing the method by hardware or software, may be provided within the scope of the invention. The different features and steps of the invention may be combined in other combinations than those described. The invention is only limited by the appended patent claims.
Number | Date | Country | Kind |
---|---|---|---|
04005627 | Mar 2004 | EP | regional |
This application claims the benefit of U.S. Provisional Application No. 60/553,438, filed Mar. 16, 2004, the disclosure of which is fully incorporated herein by reference.
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/EP2005/002221 | 3/3/2005 | WO | 00 | 3/8/2007 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2005/091509 | 9/29/2005 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5128998 | Kurihara | Jul 1992 | A |
5687325 | Chang | Nov 1997 | A |
6314534 | Agrawal et al. | Nov 2001 | B1 |
6625234 | Cui et al. | Sep 2003 | B1 |
6891689 | Taguchi et al. | May 2005 | B2 |
Number | Date | Country |
---|---|---|
WO 0060751 | Oct 2000 | WO |
Number | Date | Country | |
---|---|---|---|
20070139428 A1 | Jun 2007 | US |
Number | Date | Country | |
---|---|---|---|
60553438 | Mar 2004 | US |