Figure 3-3: codeword decoding – Altera Reed-Solomon II MegaCore Function User Manual

Page 19

Advertising
background image

Figure 3-3: Codeword Decoding

1

238

Decoded Codeword

239

...

237

240

...

255

RS II Decoder

Encoded Codeword plus noise

...

...

The received encoded codeword may differ from the original codeword due to the noise in the channel.

The decoder detects errors using several polynomials to locate the error location and the error value.

When the decoder obtains the error location and value, the decoder corrects the errors in a codeword, and

sends the codeword to the output. As the number of errors increases, the decoder gets to a stage where it

can no longer correct but only detect errors, at which point the decoder asserts the

out_error

signal.

Table 3-1: Decoder Detection and Correction

Lists how the decoder corrects and detects errors (e) depending on the number of check symbols (R).

Number of Errors

Description

eR/2

Decoder detects and corrects errors.

R/2 ≤ eR

Decoder asserts error signal and can only detect

errors.

e >R

Unpredictable results.

For small numbers of check symbols, out_error is not always reliable. RS codewords have at least

d

different symbols: d = R + 1 A received packet containing e errors can be either the transmitted codeword

t1 with e errors, or another valid codeword t2 with de errors (if t2 exists). When e> R/2, the received

packet looks more like t2 than t1 (because de < e) so, the decoder outputs t2 and does not assert

out_error

. The probability that t2 exists is inferior or equal to the inverse of factorial of R/2. It decreases

exponentially as R increases, but is nonetheless significant for small numbers of check symbols.

Figure 3-4: Decoder Timing—One Channel

shows the timing diagram of the RS II decoder with one channel.

clk_clk

reset_reset_n

in_valid

in_startofpacket

in_endofpacket

in_data[7:0]

in_ready

out_valid

out_startofpacket

out_endofpacket

out_data[7:0]

out_ready

out_error

0

1

2

3

4

5

6

105 216 193 137 138 139 140 141 245 246 247 248 249 250 251 252 253 254 245 246 247 248 249 250 251 252

0

X

1

2

3

4

5

6

105 216 193 137 138 139 140 141

1

status_error_value[7:0]

0

0

0

0

0

status_num_error_symbol[3:0]

0

0

0

8

status_num_error_bit[6:0]

0

0

0

0

UG-01090

2015.05.01

Decoder

3-3

Reed-Solomon II IP Core Functional Description

Altera Corporation

Send Feedback

Advertising