# Vivado Design Suite Reed-Solomon Decoder

in the description of Reed-Solomon Decoder v9.0 p 20

ERR_CNT Element

The ERR_CNT element gives the number of errors, erasures, and punctures that were corrected. The width of the element depends on the input parameters n and k. The width is equal to the number of binary bits required to represent (n-k). If n-k = 16, for example, the ERR_CNT element is five bits wide

Could someone explain me the example. 'If n-k = 16, for example, the ERR_CNT element is five bits wide'.

I thought it will be 8=(n-k)/2

EDIT 1: In the example n-k =16, then the number of errors ( error correction capability) is (n-k)/2 or I can compute it as 2*e+E<=(n-k), where e - errors, E- erasures

• I don't understand where your 8(n-k)/2 comes from? Could you explain why you think that would be the case? Nov 27, 2020 at 9:11
• @MarcusMüller i have edited and added some information Nov 27, 2020 at 10:00
• By the way, you linked to the encoder, not the decoder documentation. Nov 27, 2020 at 11:08
• @MarcusMüller fixed Nov 27, 2020 at 13:11
• I doubt very much that the Reed-Solomon decoder can fix punctures (which are generally defined as non-transmission of selected parity check symbols resulting in a received codeword of length $<n$), and it is worth noting that there is no rule that requires the number of erasures to be no more than $n-k$; the demodulator may well decide that more symbols than $n-k$ symbols are best sent to the decoder as erasures. So, ERR_CNT most likely contains the sum of the number of errors and number of erasures after a successful decoding (which, with high probability, is a correct decoding). Nov 28, 2020 at 16:04

$$\left\lfloor\frac{n-k}2\right\rfloor$$ is the maximum number of bit errors that we can guarantee a code can correct for a binary channel.
You'll also find that a RS code can correct up to $$n-k$$ erasures – and my guess is that they made the count of that and the count of corrected errors the same width for design consistency reasons, and maybe to make different decoder IP interchangeable.