Changed NID error detection and correction (edac) to using Berlekemp Massey 63-bit block decoder for the BCH(63,16,11) code so that we can correct up to 11 bit errors in a NID (versus previous 2).

This commit is contained in:
dennis.sheirer
2015-01-04 15:29:34 +00:00
parent bb27d5cb42
commit 84261a4be9
7 changed files with 145 additions and 74 deletions

View File

@@ -220,6 +220,36 @@ public class BitSetBuffer extends BitSet
return sb.toString();
}
/**
* Returns this bitset as an array of integer ones and zeros
*/
public int[] toIntegerArray()
{
int[] values = new int[ mSize ];
for (int i = nextSetBit( 0 ); i >= 0 && i < mSize; i = nextSetBit( i+1 ) )
{
values[ i ] = 1;
}
return values;
}
/**
* Returns this bitset as a reversed bit order array of integer ones and zeros
*/
public int[] toReverseIntegerArray()
{
int[] values = new int[ mSize ];
for (int i = nextSetBit( 0 ); i >= 0 && i < mSize; i = nextSetBit( i+1 ) )
{
values[ mSize - i - 1 ] = 1;
}
return values;
}
/**
* Returns a boolean array from startIndex to end of the bitset