NM
Size: a a a
NM
A
VL
// Note: If the following code is not optimized by compiler, it
// can be replaced with the following:
// if (syndrome & ((1 << 30) | (1 << 31)))
if (syndrome == 0xffffffff
|| syndrome == (1 << 30)
|| syndrome == (1 << 31)) {
// Bits 30 and 31 (30* and 29*) can't be incorrect
// if previous word wad decoded correctly
bad++;
return false;
}
MK
¥
/*
The following code was used to generate the syndromes table
void generate_syndromes() {
unsigned long syndromes[64];
memset(syndromes, 0xff, sizeof(syndromes));
syndromes[0] = 0;
for (int i = 0; i < 32; i++) {
long bit = 1UL << i;
long syndrome = GpsParity::calcParity(bit);
syndromes[syndrome & 0x3f] = bit;
}
printf("static long syndromes[64] = {\n");
for (int i = 0; i < 64; i+=4) {
printf(" ");
for (int j = 0; j < 4; j++)
printf(" 0x%08x,", syndromes[i+j]);
printf("\n");
}
printf("};\n");
}
*/
VL
A
A
VL
A
AP
A
VL
A
VL
VL
¥