[ieee 2009 ieee international conference on network infrastructure and digital content (ic-nidc...
TRANSCRIPT
Proceedings of IC-NIDC2009
RS FAST DECODING IN FREQUENCY DOMAIN BASED ON DSP
Junying Sun1, Boli Liu2
1 Electronics Department. Vocational And Technical Education College, Hebei Teachers University, Shijiazhuang ,China
E-mail:[email protected] 2 Electronics Department, Vocational And Technical Education College,
Hebei Teachers University, Shijiazhuang ,China E-mail: [email protected]
Abstract
RS 255 223 is used as the outer code of concatenated system in CCSDS standard and its speed affects the speed of the whole system. This paper designs the decoder in frequency domain and introduces Good-Thomas prime factor algorithm to realize FFT of 255 point and 15 point, which impoves the decoding speed. The flow chart based on DSP is also presented.
Keywords: RS decoder; DSP; FFT; Good-Thomas algorithm
1 Introduction RS (Reed-Solomen) code is one of the most important and the most studying codes in Error control field. It has stronger error-connecting ability to correct random errors, burst errors and combined errors. The complexity of realizing RS code is mainly decided by the decoding process, and especially with the increase of the code-length, the time decode needs is longer and longer. So it is necessary to look for the fast decoding method of RS code. With fast Fourier transform the decoding algorithm in frequency in domain takes place of the method of chien search and calculating error value and avoids the division in finite domain, which improves the decoding speed greatly. In this paper, Good-Thomas FFT algorithm is used to have two prime factorizations on RS (255, 223) code, which decreases the numbers of multiplication in finite domain and addition and saves the instruction cycle.
2 The primary principle of RS decoding in frequency domain
Assume that 0(w w� 1w … 1 )nw � is n
dimension array of (2 )mGF in finite domain, and then, its discrete Fourier transform (DFT)
0(w w� 1w … 1 )nw � is also in (2 )mGF
domain. The relationship between them is as follows:
1
0
n ijj i
iW w�
�
�� � ( 0j � 1 … 1)n �
1
0
1
mod
n iji j
jw W
n p�
��
�� � ( 0i � 1 … 1)n �
where p is the character of (2 )mGF domain. Assume that t is the error-correcting ability of RS (n, k) code, 0(c c� 1c … 1 )nc � is a code
word which changes into the code word 0(r r�
1r … 1 )nr � through channel transmission,
0(e e� 1e … 1 )ne � is error pattern in channel and r = c + e which is changed into R=C+E after DFT, where R C E is respectively the frequency spectrum of r c e. Since that � �2 … �2t is the roots of the code polynomial c(x) so:
( ) ( ) ( )i i ir c e� � �� � = ( )ie � ( 0i � 1… 2 )t
That is, 1 1
0 0
n nij ijj j
j jr e� �
� �
� ��� � ( 0i � 1… 2 )t
i iR E� From adjoin calculation formula that
1( ) 0i i
is r r r� �� � � � … 1
1( )i n
nr � �
��
�1
0
n ijj
jr�
�
�� ( 0i � 1… 2 )t
We can know that the first 2t component products
in frequency spectrum are equal to the adjoin
formula of the received codes. Now the problem is
how to make sure the n-2t remained unknown
elements in E from the 2t known component
products. Assume that error happens in the place of
1l 2l … sl s�t , definite error-location ___________________________________ 978-1-4244-4900-2/09/$25.00 ©2009 IEEE
polynomial as 21 2( ) 1x x x� � �� � � � … s
s x��
and then ( )i� � � 0 1l 2l … sl . The
coefficient of �(x) is changed into the form of 255
dimensional vector that� = 1 1� … 5�
0 … 0 The result of IDFT to�is the sequence
� 0� 1� … 1n� � and i� 0
i � 1l 2l … sl . The error pattern is that
0(e e� 1e … 1)ne � , if ie 0 , the i-bit is right
and then 0i� ; otherwise, if 0ie , the i bit is
wrong and then 0i� � . Therefore : 0i ie� �
�i 0 1 … 1�n and E� =0 in
frequency domain, that is,
1
00
n
i l ii
E��
��
�� �l 0 1 … 1n �
0i� � i 1t � … 1n �
iE is (i � 1 2 … 2 )t And so we have the result:
lE1
t
i l ii
E� ��� �l 2 1t � … 1n �
From the linear recursive formula can calculate all components of E. Then calculate the error pattern e with IDFT to restore the original code words. The primary steps of RS decoding in frequency domain are summed up:
(1) Calculate the adjoin formula is i 1
2 … 2t
from the receiving code words.
(2) Calculate ( )x� using BM iterative algorithm.
(3) Calculate the frequency pattern E of error
patterns by ( )x� and s. (4) Calculate the inverse transformation e of E (5) According to the formula that r c e� � , in
the forth step of calculating IDFT we can use the formula that
1
0
n iji
jje E �
��
�� � = … 1
inE � �
� + 2nE �
i� �
+…+ 1E i� � + 0E ( 0i � 1 … 1)n � But this way needs calculate the more times’ multiplication and addition in finite domain, especially as the long code. Take RS (255, 223) code for example, once DFT process (as similar as IDFT) needs N2 =64516 times multiplication and 64770 times addition, which needs high calculation. A lot of references[1][2] present fast Fourier transform algorithm, and this paper uses Good-Thomas prime factorization algorithm with which the design of RS decoder in the reference [3] is
presented and in this paper RS decode in frequency domain on DSP is used. It is a process that one dimensional discrete Fourier transform of code of 255 point length is decomposed to two dimensional transform of 17×15 point. Specific is as follows:
if 1 2N N N� � , according to Chinese remainder
theorem 1N and 2N is co-prime and positive
integer 1t and 2t meet that :
1 1 2 2 1t N t N� � � � mod N As for N
255
1N 17 2N 15 1t 2t 8 make that
1i i mod 1N 2i i mod 2N ,
1 2j t j� � mod 1N 2 1j t j� � mod 2N
and then 1 2 2 2 1 1i i N t i N t� � � � � � mod N ,
1 2 2 1j j N j N� � � � mod N Good-Thomas algorithm can be presented as:
1 11 21 1 2 2 2 1
1 2 2 1 0 01 2( )mod
N Ni j N i j N
i iE j N j N N � �
� �� � � �
� �� �� �� � �
1 2 2 2 1 1( )mode i N t i N t N� � � � �
Note that: �
21, jjE NNjNjE mod)( 1221 ���
�21
, iie NtNitNie mod)( 112221 ����� and then the above formula can be written as :
,1 2j jE �
111 1 2
101
Ni j N
tii
e��
� �
�� 1
122 2 1
,1 1 202
Ni j N
ti i ii
e e��
� �
�� � 2
1i 1j 0 1 … 1N 1
2i 2j 0 1 … 2N 1
3 The realization of fast DFT algorithm
In the Good-Thomas algorithm above, the
calculation of1 2,j jE has two steps: first by type (2),
the factors of 2 1j N� � is certain as 2j is certain.
Therefore calculate respectively1tie 1i 0
1 … 1N 1 when 2j 0 1 … 2N 1
and store the order in the memory unit from 0x80 to
0x17E which occupy 255 words of space. Secondly
substitute 1tie into type (2) to calculate respectively
the value of ,01jE ,11j
E … , 11 2j NE � 1j
0 1 … 1N 1 .
As for RS code of 255 yards, with Good-Thomas
algorithm, calculating 1tie needs (N2-1)×N1×(N2-1)
=3332 times multiplication in finite domain and
3570 times addition, which is much less than
directly using DFT.
In the first step on solving1tie 1i 0 1 …
1N 1 , the prime factorization algorithm can be
used once more. The process is as follows:
2j 0 00te , ,0 0 0 1e e� � … ,0 14e�
01te , ,1 0 1 1e e� � … ,1 14e�
0
, ,16 16 0 16 1te e e� � � … ,16 14e�
2j 1 10te 17 17 2
, , ,0 0 0 1 0 2 ( )e e e� �� � � … 17 14
,0 14 ( )e ��
116te 17 17 2
, , ,16 0 16 1 16 2 ( )e e e� �� � � … 17 14
,16 14 ( )e ��
2j 2 20te 17 2 17 2 2
, ,0 0 0 1 ( ) , ( )0 2e e e� � �� � �… 17 14 2
,0 14 ( )e � �� 216te ,16 0e 17 2
,16 1 ( )e �� 17 2 2,16 0 ( )e � ��
� … 17 14 2,16 14 ( )e � ��
2j 14 140te ,0 0e 17 14
,0 1 ( )e �� 17 2 14,0 2 ( )e � ��
� … 17 14 14,0 14 ( )e � ��
1416te ,16 0e � 17 14
,16 1 ( )e � � 17 2 14,16 2 ( )e � �
� … 17 14 14,16 14 ( )e � ��
Note that e� ,0 0e ,0 1e … ,0 14e
E� 00te 1
0te … 140te
and then we can see that jE �14 17
0( )ij
ii
e ��
�� j
0 1 … 14
Therefore, solving E� can be seen as 15 point DFT
to e� , which only the original location of � is
replaced by 17� and it is decomposed to the two-
dimensional transform when 1N 5 2N 3 1t
2t 2 by Good-Thomas algorithm to solve E�
using type (1),(2). Then setting e� followed by
,1 0e ,1 1e … ,1 14e …… ,16 0e
,16 1e … ,16 14e can solve all the 1tie of RS
code of 255 length. In this way, calculating eti1
needs 1156 times multiplication over finite field,
1530 times addition and the CPU cycles to decode
are evaluated under CCS environment of DSP, as
shown in Table 1: The results show that all the FFT
process saves about 1/4 time compared with once
decomposition. Table 1
Without prime factorizations algorithm
Use prime factorizations algorithm for one time
Use prime factorizations algorithm for two times
2029015 421405 337842
In addition, the transformation relationship between
ie and ,1 2i ie , ,
1 2j jE and jE is that
1 2 2 2 1 1i i N t i N t� � � � � � mod N
1 2 2 1j j N j N� � � � mod N , and therefore,
the solution of ,1 2j jE still needs to restore the nature
order of jE and then output it . In this paper, store
the mapping relationship in advance calculated into
two tables (Table 2, Table 3) through which
transform is achieved.
Table 2 ,
1 2i ie ,0 0e ,0 1e … ,0 14e …… ,16 0e ,16 1e … ,16 14e
ie 0e 136e … 119e …… 135e 16e … 254e
Table 3 ,
1 2j jE ,0 0E ,0 1E … ,0 14E …… ,16 0E ,16 1E … ,16 14E
jE 0E 17E … 238E …… 240E 2E … 223E 4 The DSP design of RS decoder
As shown in Fig.1, the RS coder uses the DSP chip of TMS320VC5402 series and the output code words from decoder after multi-channel butter serial interface (McBSP) of DSP. When the BFSR pin receives frame synchronizing signal, under the function of the clock signal BCLKR the data input from the BDX pin. Because each RS code element is composed of eight-bit binary, the calculation of the whole decoding process is based on one byte and the received word length can be set to 8 in the serial receiving control register. When the 5402 receives a frame of data, McBSP sent interrupt request RINT through internal to DSP and inform it to the receiving buffer (its length is equal to a code of the code length). Until the buffer is full, it will enter the decoding program to decode and at the same time the receiving counter is cleared. Make the restored information code word copy to sent buffer and open the sent interrupt. The sent process is as same as the receiving but as output pins BFSX
and BCLKX are provided by DSP. It should be noted that, when the data sent finished, close the sent interrupt is needed. Otherwise DSP will still sent some useless data in response interrupt. Specific flow chart of main program is shown in Fig.2:
5 Conclusions
RS code plays an important role in correcting random errors and burst errors in digital communication and digital storage system. In this article, RS Decoding algorithm in frequency domain is discussed and the prime factorization algorithm is used during the process of the anti-Fourier transform. It will take a part of storage space to place intermediate results and conversion tables, but by comparing the computation and simulation results of the three kinds of DFT algorithm, the decoding speed is really be improved and the realization of the hardware circuit and software flow chart with DSP is presented.
References [1] T.K.TRUONG IRVING S. REED. A
Pipeline Design of Fast Prime Factor DFT on a Finite Field[J].IEEE TRANSACTION ON COMPUTER. 1988 37(3) 266-273
[2] NIE Hongguang, LI Yongmao. The Algorithm of High-Radix Transforms for Reed Solomon Codes Over Fermat Primes.[J]WUHAN University Journal. 2000 46(3) 362-364
[3] WANG JinXiang; ZHANG NaiTong. A VLSI Design Of pipeline S (255,223) Decoder[J] Journal Of Computer Research And Development. 2000, 37(1) 61-65
[4] TMS320C54x DSP Enhanced Peripherals. TI Reference set [M] 1999 5(6)