When the encoder receives data symbols, it generates check symbols for a given codeword and sends the input codeword together with the check symbols to the output interface. The encoder uses backpressure on the upstream component when it generates the check symbols.
Figure 5. Encoder Timing—One ChannelShows the timing diagram of the RS II encoder with one channel.
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
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
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.