Variable encoding and decoding, Rs encoder, Variable encoding and decoding –3 – Altera Reed-Solomon Compiler User Manual
Page 21: Rs encoder –3, Variable encoding and

Chapter 3: Functional Description
3–3
RS Encoder
December 2014
Altera Corporation
Reed-Solomon Compiler
User Guide
To use shortened codewords with the Altera RS encoder and decoder, you use IP
Toolbench to set the codeword length to the correct value, in the example, 204.
Variable Encoding and Decoding
Under normal circumstances, the encoder and decoder allow variable encoding and
decoding—you can change the number of symbols per codeword (N) using sink_eop,
but not the number of check symbols while decoding.
1
However, you cannot change the length of the codeword, if you turn on the erasure-
supporting option.
If you turn on the variable option, you can vary the number of symbols per codeword
(using the numn signal) and the number of check symbols (using the numcheck signal),
in real time, from their minimum allowable values up to their selected values, even
with the erasures-supporting option turned on.
shows the
variable option signals.
RS Encoder
The sink_sop signal starts a codeword; sink_eop signals its termination. An asserted
sink_val
indicates valid data. The sink_sop is only valid when sink_val is asserted.
1
Only assert sink_val one clock cycle after the encoder asserts sink_ena.
By de-asserting sink_ena, the encoder signals that it cannot sink more incoming
symbols after sink_eop is signalled at the input. During this time it is generating the
check symbols for the current codeword.
encoder. The example shows a codeword with eight information symbols and five
check symbols.
The numcheck input is latched inside the encoder when sink_sop is asserted.
Figure 3–2. Encoder Timing
clk
sink_ena
sink_val
sink_sop
sink_eop
rsin[8:1]
source_ena
source_val
source_sop
source_eop
rsout[8:1]
01 02 03 04 05 06 07 08 09
09
10 11 12 13
14 15 16
01 02 03 04 05 06 07 08 P1 P2 P3 P4 P5 09 10
12
11 12 13 14 15 16 P6 P7 P8 P9