GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> QSE / V2-3-0 > qse / sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

QDF_tkr_err.c File Reference

Decodes the TKR data when in the encoded in standard fashion for the erroring towers. More...

#include "QSE/QDF_tkr.h"
#include "QSE/QDF_exc.h"
#include "QSE/QSE_tkr.h"
#include "QDF_tkr_def.h"
#include "QDF_err_def.h"
#include "QDF_esb_def.h"
#include "QDF_exc_def.h"
#include "LSE/CDF_tkrdef.h"
#include "EDS/FFS.h"
#include "LDT/BFU.h"
#include "LDT/BWU.h"
#include "LDT/BIT.h"
#include "PBS/PARITY.ih"
#include "dprintf.h"

Defines

#define tkr_err_lzs_declare(_statement)
#define tkr_err_lzs_val_set(_val)
#define tkr_err_lzs_val_get()
#define tkr_err_lzs_header_print()
#define tkr_err_lzs_cc_print(_cc, _mismatch)
#define tkr_err_lzs_cnts_print(_zleading, _first, _from_data)
#define tkr_err_lzs_newline_print()
#define tkr_err_lzs_footer_print()

Functions

static __inline BFU header_unpack (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, const QDF_errTem *err_tem, unsigned int tag, const unsigned int *src, const unsigned int max, BFU bfu)
static __inline BFU header_unpack_nto_rcs (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, const unsigned int *src, const unsigned int max, BFU bfu)
 Fills in the status of the RCs on non timed out RCs.
static __inline BFU header_unpack_to_rcs (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, unsigned int xlist, unsigned int ccs, int nccs, const unsigned int *src, const unsigned int max, BFU bfu)
 Fills in the status of the RCs on timed out CCs.
static __inline
unsigned int 
header_flip_gtccs (const unsigned char *map, unsigned int gtccs)
 Flips the even and odd bits of a gtcc bit mask (right justified).
static __inline void header_fill_accepts_tos (unsigned int *accepts, unsigned int *tos, unsigned int ccs)
static __inline BFU lzs_unpack (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, const unsigned int *src, unsigned int max, BFU bfu)
 Fills in the leading zero counts for timed-out CCs. The leading zero count is the number zero bits before encountering the stop bit on the GTRC for RC=1.
static BFU lzs_unpack_cnt (unsigned short int *cnt, int offset, const unsigned int *src, unsigned int max, BFU bfu)
 Unpacks the leading zero count from the bit stream.
static __inline BFU lzs_fill_cnts (unsigned short int(*cnts)[8], const unsigned int *src, unsigned int max, BFU bfu)
 Creates a template for the RCs setting the first RC to the value in the input bit stream and 12 for the others.
static __inline BFU data_unpack (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, const unsigned int *src, unsigned int max, BFU bfu)
 Unpacks the data portion of GTRC commands. This includes
  • tag error words
  • strip addresses
  • TOT.

static __inline BFU tots_unpack (QDF_tkrCtx *ctx, QDF_tkrTwrErrTimeout *twr, const unsigned int *src, unsigned int max, BFU bfu)
 Unpacks the TOTs.
static __inline BFU tkr_err_unpack_zcopy (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, QDF_tkrTwrErrZcopy *twr, const unsigned int *src, const unsigned int max, BFU bfu)
 Decodes an erroring TKR tower that is encoded in the TIMEOUT style.
static __inline BFU tkr_err_unpack_to (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, QDF_tkrTwrErrTimeout *twr, const QDF_errTem *err, const unsigned int *src, const unsigned int max, BFU bfu)
 Decodes an erroring TKR tower that is encoded in the TIMEOUT style.
BFU QDF_tkrErrDecode (QDF_tkrCtx *ctx, QDF_tkrEvt *evt, const unsigned int *src, const unsigned int max, BFU bfu)
 Decodes the TKR error blocks.

Variables

static const
unsigned char 
FlipReverse4 [16]
 Lookup table to reverse a 4-bit field.


Detailed Description

Decodes the TKR data when in the encoded in standard fashion for the erroring towers.

Author:
JJRussell - russell@slac.stanford.edu

   CVS $Id: QDF_tkr_err.c,v 1.1 2009/05/01 00:23:03 russell Exp $

Function Documentation

static __inline BFU data_unpack ( QDF_tkrCtx ctx,
QDF_tkrTwrErrTimeout twr,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
) [static]

Unpacks the data portion of GTRC commands. This includes

Returns:
The unpacking context
Parameters:
ctx The static tracker unpacking context.
twr The data to be filled in for this erring tower
src The decoding source array.
max The maximum legitimate bit position in src
bfu The decoding context.

static __inline unsigned int header_flip_gtccs ( const unsigned char *  map,
unsigned int  gtccs 
) [static]

Flips the even and odd bits of a gtcc bit mask (right justified).

Returns:
The flipped bit mask
Parameters:
map The map used to flip the header. This is strictly a bow to efficiency. By providing this as an argument instead of an internal static, it prevents the reestablishment of the address on each call. (Likely only effective on a machine with lots of registers.)
gtccs The 8-bit value to bit-reverse.

static __inline BFU header_unpack_nto_rcs ( QDF_tkrCtx ctx,
QDF_tkrTwrErrTimeout twr,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
) [static]

Fills in the status of the RCs on non timed out RCs.

Returns:
The unpacking context
Parameters:
ctx The static tracker unpacking context.
twr The data to be filled in for this erring tower
src The decoding source array.
max The maximum legitimate bit position in src
bfu The decoding context.

static __inline BFU header_unpack_to_rcs ( QDF_tkrCtx ctx,
QDF_tkrTwrErrTimeout twr,
unsigned int  xlist,
unsigned int  ccs,
int  nccs,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
) [static]

Fills in the status of the RCs on timed out CCs.

Returns:
The unpacking context
Parameters:
ctx The static tracker unpacking context.
twr The data to be filled in for this erring tower
xlist A bit mask indicating which exception conditions are present. This is a left justified mask.
  • Bit 0: RC0s with only timeouts
  • Bit 1: RC0s with DAV
  • Bit 2: RC0S with TAG_ERR
  • Bit 3: RC0S with ERROR
ccs A bit mask giving which CCs have timed-out. This is a left justified mask.
nccs The count of CCs that have timed-out i.e. the number of bits that are set in ccs.
src The decoding source array.
max The maximum legitimate bit position in src
bfu The decoding context.

static __inline BFU lzs_fill_cnts ( unsigned short int *  cnts[8],
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
) [static]

Creates a template for the RCs setting the first RC to the value in the input bit stream and 12 for the others.

Returns:
The unpacking context
Parameters:
cnts Pointer to the array of 8 RC leading counts to fill
bfu The bit stream decoding context
max The maximum bit offset allowed
src The underlying input buffer.

static __inline BFU lzs_unpack ( QDF_tkrCtx ctx,
QDF_tkrTwrErrTimeout twr,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
) [static]

Fills in the leading zero counts for timed-out CCs. The leading zero count is the number zero bits before encountering the stop bit on the GTRC for RC=1.

Returns:
The unpacking context
Parameters:
ctx The static tracker unpacking context.
twr The data to be filled in for this erring tower
src The decoding source array.
max The maximum legitimate bit position in src
bfu The decoding context.

static BFU lzs_unpack_cnt ( unsigned short int *  cnt,
int  offset,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
) [static]

Unpacks the leading zero count from the bit stream.

Returns:
The unpacking context
Parameters:
cnt Pointer to receive the unpacked count
offset An offset/biase to add onto the raw unpacked count. For the first RC, this is generally 63, and for subsequent RCs, this is generally 12.
src The underlying input buffer.
max The maximum bit offset allowed
bfu The bit stream decoding context

BFU QDF_tkrErrDecode ( QDF_tkrCtx ctx,
QDF_tkrEvt evt,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
)

Decodes the TKR error blocks.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The TKR compressed data decoding context
evt The TKR event block to fill in
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

static __inline BFU tkr_err_unpack_to ( QDF_tkrCtx ctx,
QDF_tkrEvt evt,
QDF_tkrTwrErrTimeout twr,
const QDF_errTem err,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
) [static]

Decodes an erroring TKR tower that is encoded in the TIMEOUT style.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The TKR compressed data decoding context
evt The TKR event block to fill in
twr The TKR tower to receive the decoded information
err Tke error block for this tower
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

static __inline BFU tkr_err_unpack_zcopy ( QDF_tkrCtx ctx,
QDF_tkrEvt evt,
QDF_tkrTwrErrZcopy twr,
const unsigned int *  src,
const unsigned int  max,
BFU  bfu 
) [static]

Decodes an erroring TKR tower that is encoded in the TIMEOUT style.

Returns:
The updated bit position and current deblocked 32-bit buffer
Parameters:
ctx The TKR compressed data decoding context
evt The TKR event block to fill in
twr The TKR tower to receive the decoded information
src The data source, i.e. the bit stream
max The maximum bit position
bfu The current bit position and temporary buffer

static __inline BFU tots_unpack ( QDF_tkrCtx ctx,
QDF_tkrTwrErrTimeout twr,
const unsigned int *  src,
unsigned int  max,
BFU  bfu 
) [static]

Unpacks the TOTs.

Returns:
The unpacking context
Parameters:
ctx The static tracker unpacking context.
twr The data to be filled in for this erring tower
src The decoding source array.
max The maximum legitimate bit position in src
bfu The decoding context.


Variable Documentation

static const char FlipReverse4[16] [static]

Initial value:

 
{ 
    0x0, 0x4, 0x8, 0xc, 0x1, 0x5, 0x9, 0xd,
    0x2, 0x6, 0xa, 0xe, 0x3, 0x7, 0xb, 0xf 
}
Lookup table to reverse a 4-bit field.


Generated on Thu Sep 2 14:54:55 2010 by  doxygen 1.5.3