353
11054A–ATARM–27-Jul-11
SAM9X25
28.5
Software Implementation
28.5.1
Remainder Substitution Procedure
The substitute function evaluates the polynomial remainder, with different values of the field
primitive elements. The finite field arithmetic addition operation is performed with the Exclusive
or. The finite field arithmetic multiplication operation is performed through the gf_log, gf_antilog
lookup tables.
The REM2NP1 and REMN2NP3 fields of the PMECC_REMx registers contain only odd remain-
ders. Each bit indicates whether the coefficient of the polynomial remainder is set to zero or not.
NB_ERROR_MAX defines the maximum value of the error correcting capability.
NB_ERROR defines the error correcting capability selected at encoding/decoding time.
NB_FIELD_ELEMENTS defines the number of elements in the field.
si[] is a table that holds the current syndrome value, an element of that table belongs to the field.
This is also a shared variable for the next step of the decoding operation.
oo[] is a table that contains the degree of the remainders.
int substitute()
{
int i;
int j;
for (i = 1; i < 2 * NB_ERROR_MAX; i++)
{
si[i] = 0;
}
for (i = 1; i < 2*NB_ERROR; i++)
{
for (j = 0; j < oo[i]; j++)
{
if (REM2NPX[i][j])
{
si[i] = gf_antilog[(i * j)%NB_FIELD_ELEMENTS] ^ si[i];
}
}
}
return 0;
}
28.5.2
Find the Error Location Polynomial Sigma(x)
The sample code below gives a Berlekamp iterative procedure for finding the value of the error
location polynomial.
The input of the procedure is the si[] table defined in the remainder substitution procedure.
Summary of Contents for SAM9X25
Page 26: ...26 11054A ATARM 27 Jul 11 SAM9X25...
Page 138: ...138 11054A ATARM 27 Jul 11 SAM9X25 138 11054A ATARM 27 Jul 11 SAM9X25...
Page 162: ...162 11054A ATARM 27 Jul 11 SAM9X25 162 11054A ATARM 27 Jul 11 SAM9X25...
Page 216: ...216 11054A ATARM 27 Jul 11 SAM9X25 216 11054A ATARM 27 Jul 11 SAM9X25...
Page 266: ...266 11054A ATARM 27 Jul 11 SAM9X25 266 11054A ATARM 27 Jul 11 SAM9X25...
Page 330: ...330 11054A ATARM 27 Jul 11 SAM9X25 330 11054A ATARM 27 Jul 11 SAM9X25...
Page 374: ...374 11054A ATARM 27 Jul 11 SAM9X25...
Page 468: ...468 11054A ATARM 27 Jul 11 SAM9X25 468 11054A ATARM 27 Jul 11 SAM9X25...
Page 532: ...532 11054A ATARM 27 Jul 11 SAM9X25 532 11054A ATARM 27 Jul 11 SAM9X25...
Page 692: ...692 11054A ATARM 27 Jul 11 SAM9X25 692 11054A ATARM 27 Jul 11 SAM9X25...
Page 777: ...777 11054A ATARM 27 Jul 11 SAM9X25 777 11054A ATARM 27 Jul 11 SAM9X25...
Page 886: ...886 11054A ATARM 27 Jul 11 SAM9X25 886 11054A ATARM 27 Jul 11 SAM9X25...
Page 962: ...962 11054A ATARM 27 Jul 11 SAM9X25 962 11054A ATARM 27 Jul 11 SAM9X25...
Page 1036: ...1036 11054A ATARM 27 Jul 11 SAM9X25 1036 11054A ATARM 27 Jul 11 SAM9X25...
Page 1128: ...1128 11054A ATARM 27 Jul 11 SAM9X25 1128 11054A ATARM 27 Jul 11 SAM9X25...
Page 1130: ...1130 11054A ATARM 27 Jul 11 SAM9X25...
Page 1132: ...1132 11054A ATARM 27 Jul 11 SAM9X25...
Page 1144: ...xii 11054A ATARM 27 Jul 11 SAM9X25...