Decoder, Decoder -2 – Altera Reed-Solomon II MegaCore Function User Manual
Page 18

Figure 3-2: Encoder Timing—One Channel
Shows the timing diagram of the RS II encoder 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
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 236 237 238 239
1
2 3 4
0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 234235 236 237 238 239 1 114 61 30 244 75 1 2
The
in_startofpacke
t signal starts a codeword; the
in_endofpacket
signals its termination. An
asserted
in_valid
signal indicates valid data. The
in_startofpacket
signal is only valid when you assert
the
in_valid
signal. For a 1-channel codeword, assert the
in_startofpacket
and
in_endofpacket
signals for one clock cycle. The encoder uses backpressure by deasserting the
in_ready
signal when it
receives the
in_endofpacket
signal. During this time, the encoder signals that it cannot accept more
incoming symbols and generates the check symbols for the current codeword. The IP core does not verify
if the number of symbols (N) exceeds the maximum symbols per codeword. You must ensure that the
codeword sent to the core has a valid N. The
reset_reset_n
signal is active low and you can assert this
signal asynchronously. However, you have to deassert the
reset_reset_n
signal synchronously with the
clk_clk
signal.
Shortened Codewords
The RS II IP core supports shortened codewords. A shortened codeword contains fewer symbols than the
maximum value of N, which is 2M –1, where N is the total number of symbols per codeword and M is the
number of bits per symbol. A shortened codeword is mathematically equivalent to a maximum-length
code with the extra data symbols at the start of the codeword set to 0. For example, (204,188) is a
shortened codeword of (255,239). Both of these codewords use the same number of check symbols, 16. To
use shortened codewords with the decoder, use the parameter editor to set the codeword length to the
correct value; for the encoder assert endofpacket once it generates enough symbols.
Decoder
When the decoder receives the encoded codeword, it uses the check symbols to detect errors and correct
them.
3-2
Decoder
UG-01090
2015.05.01
Altera Corporation
Reed-Solomon II IP Core Functional Description