
Implementation on the SC140 Core
Reed Solomon Encoder/Decoder on the StarCore SC140/SC1400 Cores, With Extended Examples, Rev. 1
Freescale Semiconductor
13
The encoding/decoding process for which the cycle count is to be determined is summarized as follows. The
encoder receives a message, a Reed-Solomon-compliant block of
K
= 239 bytes, and it produces an encoded block
of 255 bytes. The encoded block is transmitted through the channel to a receiver. The received block is passed to
the decoder where the four different stages of decoding are performed, as outlined in
Section 2.2
,
Reed-Solomon
Codes,
on page 6. First-order estimates for the cycle counts required for this encoding/decoding process are as
follows (see, for example, [5] and [6]):
1.
Encoding routine
∝
2NT
cycles.
Syndromes calculation
∝
2NT
cycles.
2.
3.
Berlekamp-Massey algorithm
∝
T
2
cycles.
Search of roots
∝
NT
cycles.
4.
5.
Forney algorithm
∝
T
2
cycles.
These are only initial estimates that do not account for any potential parallel processing. However, it clearly shows
that encoding, syndromes calculation, and roots search consume the most cycles in the Reed-Solomon algorithm.
The actual cycle counts depend both on the architecture and on the degree to which each routine can be separately
implemented in a parallelized fashion. The decoder output is one of the following:
For all-zero syndromes, the received block is identified as error-free and the program terminates.
If the degree of the error-location polynomial exceeds
T
,
or if the number of roots is not equal to the
degree of the error-location polynomial, the received block contains more than
T
erroneous symbols. A
flag is raised to indicate that errors are detected but are uncorrectable and the program terminates.
In every other case, the reconstructed encoded block is returned.
4.1 Polynomial Evaluation Over GF(256)
Evaluation of a polynomial
f(x)
of degree
D
at field point
α
p
has the most general form:
This form shows that the polynomial evaluation consists of a sequence of MAC (multiply-accumulate) operations.
In Reed-Solomon codes, a polynomial is typically evaluated at a set of points. For example, let us assume that we
evaluate the polynomial
f(x)
at field points
α
,
α
2
,
α
3
,....
, α
M
. This is conveniently represented in matrix form, as
multiplication of an
M
×
(D+
1
)
matrix. The elements,
α,
are raised to the appropriate powers, are multiplied by a
vector:
f
α
p
(
)
f
0
f
1
α
p
f
2
α
2
p
f
3
α
3
p
……
f
D
α
Dp
+
+
+
=
1
1
α
2
1
α
3
… …
1
α
M
α
α
2
α
2
α
3
…
α
M
α
3
α
2
α
3
…
α
M
…
α
D
α
2
α
3
…
(
)
2
(
)
3
…
(
)
D
(
)
2
(
)
3
…
…
(
)
D
(
)
2
(
)
3
… α
M
(
)
D
f
0
f
1
f
2
…
f
D
f
( )
f
α
2
(
f
α
3
(
…
f
α
M
(
)
)
)
=