GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-11-5 > eds / mv2304
Defines | |
#define | PARITY_K_EVEN 0x6996 |
A vector of bits whose bit number (counting from least significant bit = 0) gives the even parity of a nibble of that bit number. | |
#define | PARITY_4(_nibble) ((PARITY_K_EVEN >> ((_nibble) & 0xf)) & 1) |
Returns 0 if the parity of _nibble is even, 1 if the parity is odd. | |
#define | PARITY_8(_byte) PARITY_4 ( ((_byte ) >> 4) ^ (_byte )) |
Returns 0 if the parity of _byte is even, 1 if the parity is odd. | |
#define | PARITY_16(_hword) PARITY_8 ( ((_hword) >> 8) ^ (_hword)) |
Returns 0 if the parity of _hword is even, 1 if the parity is odd. | |
#define | PARITY_32(_word) PARITY_16( ((_word ) >> 16) ^ (_word )) |
Returns 0 if the parity of _word is even, 1 if the parity is odd. | |
#define | PARITY_64(_ll) PARITY_32( ((_ll ) >> 32) ^ (_ll )) |
Returns 0 if the parity of _ll is even, 1 if the parity is odd. | |
#define | PARITY_K_ODD 0x9669 |
A vector of bits whose bit number (counting from least significant bit = 0) gives the odd parity of a nibble of that bit number. | |
#define | PARITY_ODD4(_nibble) ((PARITY_K_ODD >> ((_nibble) & 0xf)) & 1) |
Returns 0 if the parity of _nibble is odd, 1 if the parity is even. | |
#define | PARITY_ODD8(_byte) PARITY_ODD4 ( ((_byte ) >> 4) ^ (_byte )) |
Returns 0 if the parity of _byte is odd, 1 if the parity is even. | |
#define | PARITY_ODD16(_hword) PARITY_ODD8 ( ((_hword) >> 8) ^ (_hword)) |
Returns 0 if the parity of _hword is odd, 1 if the parity is even. | |
#define | PARITY_ODD32(_word) PARITY_ODD16( ((_word ) >> 16) ^ (_word )) |
Returns 0 if the parity of _word is odd, 1 if the parity is even. | |
#define | PARITY_ODD64(_ll) PARITY_ODD32( ((_ll ) >> 32) ^ (_ll )) |
Returns 0 if the parity of _ll is odd, 1 if the parity is even. | |
Functions | |
int | PARITY_calc8 (unsigned char byte) |
int | PARITY_calc16 (unsigned short int hword) |
int | PARITY_calc32 (unsigned int word) |
int | PARITY_calc64 (unsigned long long int ll) |
int | PARITY_calc8N (const unsigned char *bytes, int nbytes) |
int | PARITY_calc16N (const unsigned short int *hwords, int nhwords) |
int | PARITY_calc32N (const unsigned int *words, int nwords) |
int | PARITY_calc64N (const unsigned long long int *lls, int nlls) |
int | PARITY_calcOdd8 (unsigned char byte) |
int | PARITY_calcOdd16 (unsigned short int hword) |
int | PARITY_calcOdd32 (unsigned int word) |
int | PARITY_calcOdd64 (unsigned long long int ll) |
int | PARITY_calcOdd8N (const unsigned char *bytes, int nbytes) |
int | PARITY_calcOdd16N (const unsigned short int *hwords, int nhwords) |
int | PARITY_calcOdd32N (const unsigned int *words, int nwords) |
int | PARITY_calcOdd64N (const unsigned long long int *lls, int nlls) |
CVS $Id: PARITY.h,v 1.1 2009/05/07 00:33:59 russell Exp $
#define PARITY_K_EVEN 0x6996 |
A vector of bits whose bit number (counting from least significant bit = 0) gives the even parity of a nibble of that bit number.
Idx Parity Index Parity Index Parity Index Parity C 0 8 1 4 1 0 0 D 1 9 0 5 0 1 1 E 1 A 0 6 0 2 1 F 0 B 1 7 1 3 0 0x 6 9 9 6
Referenced by PARITY__calc16(), PARITY__calc16N(), PARITY__calc32(), PARITY__calc32N(), PARITY__calc64(), PARITY__calc64N(), PARITY__calc8(), and PARITY__calc8N().
#define PARITY_K_ODD 0x9669 |
A vector of bits whose bit number (counting from least significant bit = 0) gives the odd parity of a nibble of that bit number.
Idx Parity Index Parity Index Parity Index Parity C 1 8 0 4 0 0 1 D 0 9 1 5 1 1 0 E 0 A 1 6 1 2 0 F 1 B 0 7 0 3 1 0x 9 6 6 9