GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> EDS / V2-12-1 > eds / rhel6-32


Interface   Data Structures   File List   Data Fields   Globals  

EBF_matchPvt.h File Reference

Defines the matching criteria used in checking that the values the EBW and ESW of each contributor are as expected. Doing this check goes a long ways in verifing that the event is structurally sound. It does not look at the data within a contributor. More...

#include <EDS/EBF_match.h>
#include <EDS/EBF_cid.h>
#include <EDS/EBF_ebw.h>
#include <EDS/EBF_esw.h>

Classes

struct  _EBF_matchDb
 The database defining the expected values to be used when matching the EBW and ESW. More...
struct  _EBF_match_LpwAssumptionChecks
 This is a dummy structure used to check optimization assumptions. More...

Defines

#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.

Typedefs

typedef struct _EBF_matchDb EBF_matchDb
 Typedef for struct _EBF_matchDb.

Functions

static __inline int parityOdd16Calc (unsigned short int hword)
 Calculates the odd parity over the 16 bits in the specified half word.
static __inline unsigned int EBF__matchEbwCheck (unsigned int ebw, unsigned int ebw_expected)
 Returns a value indicating which fields of the EBW failed to match their expected values.
static __inline unsigned int EBF__matchEswCheck (unsigned int esw, unsigned int esw_expected, unsigned int cid, unsigned int dgn_ids)
 Returns a value indicating which fields of the ESW failed to match their expected values.

Variables

EBF_matchDb EBF_MatchDb
 Holds the information that can be used to get the expected values for the ESW and EBW.


Detailed Description

Defines the matching criteria used in checking that the values the EBW and ESW of each contributor are as expected. Doing this check goes a long ways in verifing that the event is structurally sound. It does not look at the data within a contributor.

Author:
JJRussell - russell@slac.stanford.edu
    CVS $Id: EBF_matchPvt.h,v 1.3 2011/03/25 22:16:56 russell Exp $

Define Documentation

#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.

This is a bit vector whose bit number gives the odd parity of that bit number, The array is indexed by left shifting by the bit number. This array is used to return a 0 if the parity is ODD and a 1 if the parity is EVEN.
The following table maps a number idx into an even parity. The bottom line is the hex number representing the parity bit array.

       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
  

Referenced by PARITY__calcOdd16(), PARITY__calcOdd16N(), PARITY__calcOdd32(), PARITY__calcOdd32N(), PARITY__calcOdd64(), PARITY__calcOdd64N(), PARITY__calcOdd8(), PARITY__calcOdd8N(), and parityOdd16Calc().


Function Documentation

static __inline unsigned int EBF__matchEbwCheck ( unsigned int  ebw,
unsigned int  ebw_expected 
) [static]

Returns a value indicating which fields of the EBW failed to match their expected values.

Returns:
The mismatched fields
Parameters:
ebw The Event Builder Word
ebw_expected The template of the static fields that are expected

References EBF_EBW_V_PARITY, and parityOdd16Calc().

Referenced by EBF_dirCompose().

static __inline unsigned int EBF__matchEswCheck ( unsigned int  esw,
unsigned int  esw_expected,
unsigned int  cid,
unsigned int  dgn_ids 
) [static]

Returns a value indicating which fields of the ESW failed to match their expected values.

Returns:
The mismatched fields
Parameters:
esw The Event Summary Word
esw_expected The template of the static fields that are expected
cid The CID of this contributor
dgn_ids The set of expected diagnostic bits for all contributors.

References EBF_ESW_M_DGNBLK, and EBF_ESW_V_DGNBLK.

Referenced by EBF_dirCompose().

int parityOdd16Calc ( unsigned short int  hword  )  [static]

Calculates the odd parity over the 16 bits in the specified half word.

Returns:
The odd parity, either 0 or 1, over the 16 bits the specified half word.
Parameters:
hword The half word (short int) to calculate the parity of.

References PARITY_K_ODD.

Referenced by EBF__matchEbwCheck().


Generated on Thu Sep 27 13:51:02 2012 by  doxygen 1.5.8