Daim Ntawv Qhia Tus Neeg Siv
Table Of Contents
- BCH IP Core: User Guide
- Contents
- 1. About the BCH IP Core
- 2. BCH IP Core Getting Started
- 3. BCH IP Core Functional Description
- 4. Document Revision History
- A. BCH IP Core Document Archive
Shortened Codewords
The BCH 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, (220,136) is a shortened codeword
of (255,171). Both of these codewords use the same number of check symbols, 11. To
use shortened codewords with the decoder, use the parameter editor to set the
codeword length to the correct value.
3.2. BCH IP Core Decoder
When the decoder receives the encoded codeword, it uses the check symbols to detect
errors and correct them.
The received encoded codeword may differ from the original codeword because of
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.
If e<=t, the IP core can correct errors; if e > t, you see unpredictable results.
Figure 8. Decoder Timing
clk
reset
load
sop_in
eop_in
data_in[7:0]
ready
valid_out
sop_out
eop_out
data_out[7:0]
in_ready
number_errors
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
The codeword starts when you assert the load signal and the sop_in signal.The
decoder accepts the data at data_in as valid data. The codeword ends when you
assert the eop_in signal. For a 1-channel codeword, assert the sop_in and eop_in
signals for one clock cycle. When the decoder deasserts the ready signal, the decoder
cannot process any more data until it asserts the ready signal again.
At the output, the operation is identical. When the decoder asserts the valid_out
signal and the sop_out signal, the decoder provides valid data on data_out. The
decoder asserts the sop_out signal and the eop_out signal to indicate the start and
end of a codeword. The decoder automatically detects and corrects errors in a
codeword and asserts the number_of_errors signal when it encounters a non-
correctable codeword. The decoder outputs the full codeword including the check
symbols, which you should remove.
The ready signal indicates that the decoder can accept an incoming stream. On clk
rising edge, if the encoder ready signal is high, send input data stream via data_in
and assert load high to indicate valid input data. When valid_out is asserted high,
the output decoded word is valid at the data_out port. The number_of_errors
3. BCH IP Core Functional Description
683320 | 2017.11.06
Send Feedback
BCH IP Core: User Guide
19