GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > RIM / V2-0-1

Constituent: rim     Tag: rad750


Interface   Data Structures   File List   Data Fields   Globals  

RIM_latp.c File Reference

Functions for performing LATp operations. More...

#include "RIM_p.h"
#include "RIM_number.ic"
#include "RIM_AG_init_p.h"
#include "RIM_AG_fldEnums_p.h"
#include "RIM_AG_regEnums_p.h"
#include "RIM_AG_number_p.h"
#include "RIM/RIM_msgs.h"

Include dependency graph for RIM_latp.c:


Data Structures

struct  LoadParm
 Functions and resources used to load LAT registers. More...
struct  ReadParm
 Functions and resources used to read LAT registers. More...

Enumerations

enum  { RIM_TFE_MODE = 4 }
 TFE mode register ID - defined here to avoid dependence on LEM. More...

Functions

static unsigned traverseRead (RIM *rim, ReadParm *rParm, RIM_type type, unsigned *index, RIM_addr *addr, unsigned depth, const RIM_map *ignore)
static unsigned traverseLoad (RIM *rim, LoadParm *lParm, RIM_type type, unsigned *index, RIM_addr *addr, unsigned depth)
static unsigned loadLayerSplit (void *param, RIM_loadFn **loadFn, const RIM_addr *addr, short low, short high)
static unsigned loadSimple (RIM *rim, LoadParm *lParm, RIM_type type)
static unsigned loadTracker (RIM *rim, LoadParm *lParm, RIM_type type)
static unsigned loadCpt (RIM *rim, LoadParm *lParm, RIM_type type, unsigned index, const RIM_addr *addr)
static unsigned readSimple (RIM *rim, ReadParm *rParm, RIM_type type, const RIM_map *ignore)
static unsigned readSplit (RIM *rim, ReadParm *rParm, const RIM_map *ignore)
static unsigned readTracker (RIM *rim, ReadParm *rParm, RIM_type type, const RIM_map *ignore)
static unsigned readCpt (RIM *rim, ReadParm *rParm, RIM_type type, unsigned index, const RIM_addr *addr)
static void fixSplit (short *low, short *high)
unsigned RIM_read (RIM *rim, void *param, RIM_readFn **readFn, RIM_decodeFn **decodeFn, const RIM_map *ign)
 Populate the RIM structure with the current state of the LAT.
unsigned RIM_load (RIM *rim, void *param, RIM_loadFn **loadFn)
 Load the LAT with the configuration held in a RIM structure.
unsigned RIM_loadAfeConfig (RIM *rim, unsigned int mask, unsigned int value0, unsigned int value1, unsigned int rcMask, unsigned int feMask, void *param, RIM_loadFn **loadFn)
 Load the AFE configuration register.
unsigned RIM_loadCfeConfig0 (RIM *rim, unsigned int mask, unsigned int value, void *param, RIM_loadFn **loadFn)
 Load CFE configuration register 0.
unsigned RIM_loadCfeConfig1 (RIM *rim, unsigned int mask, unsigned int value0, unsigned int value1, unsigned int cMask, void *param, RIM_loadFn **loadFn)
 Load CFE configuration register 1.
unsigned RIM_loadTfeDac (RIM *rim, unsigned int mask, unsigned int value, int nLow, int nHigh, void *param, RIM_loadFn **loadFn)
 Load the TFE DAC register.
unsigned RIM_loadSplit (RIM *rim, int nLow, int nHigh, void *param, RIM_loadFn **loadFn)
 Load TKR split values.
void RIM_setSplit (short *ptr, unsigned long long value, unsigned uid)
 Decode the result item used to populate a split.
void RIM_checkSplit (short *ptr, unsigned long long value, unsigned uid)
 Decode a result item used to check a split.
void RIM_correct (RIM *orig, RIM *capt)
 Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed.

Detailed Description

Functions for performing LATp operations.

Author:
James Swain & Owen Saxton
Id
RIM_latp.c,v 1.3 2007/11/09 23:20:28 saxton Exp

Enumeration Type Documentation

anonymous enum
 

TFE mode register ID - defined here to avoid dependence on LEM.

Enumerator:
RIM_TFE_MODE  TFE mode register ID for LATp.


Function Documentation

void RIM_checkSplit short *  ptr,
unsigned long long  value,
unsigned  uid
 

Decode a result item used to check a split.

The read value of a TFE mode register is compared with the expected value and the split value set to indicate an error if it doesn't match

Parameters:
ptr Pointer to split registers instance
value Value read from the TFE mode register
uid The unique ID of the TFE mode register

void RIM_correct RIM orig,
RIM capt
 

Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed.

Parameters:
orig Orignal RIM
capt New copy of the RIM (probably captured from the LAT)

unsigned RIM_load RIM rim,
void *  param,
RIM_loadFn **  loadFn
 

Load the LAT with the configuration held in a RIM structure.

Parameters:
rim Pointer to the RIM structure to populate from the LAT
param Pointer passed through to the loadRegFn
loadFn Type ordered array of pointers to functions that load the LAT registers

unsigned RIM_loadAfeConfig RIM rim,
unsigned int  mask,
unsigned int  value0,
unsigned int  value1,
unsigned int  rcMask,
unsigned int  feMask,
void *  param,
RIM_loadFn **  loadFn
 

Load the AFE configuration register.

The AFE configuration register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

Parameters:
rim Pointer to the cached in-memory model of the LATC registers
mask Mask of bits to be changed from the configuration.
value0 The value to be masked and merged with the configuration value for front-ends not selected by the RC and FE masks.
value1 The value to be masked and merged with the configuration value for front-ends selected by the RC and FE masks.
rcMask Mask of bits, one per RC, specifying which RCs are selected.
feMask Mask of bits, one per FE, specifying which FEs within selected RCs are selected.
param Parameter to be passed to the load routine.
loadFn Type ordered array of pointers to functions that load the LAT registers
Return values:
RIM_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

unsigned RIM_loadCfeConfig0 RIM rim,
unsigned int  mask,
unsigned int  value,
void *  param,
RIM_loadFn **  loadFn
 

Load CFE configuration register 0.

CFE configuration register 0 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

Parameters:
rim Pointer to the cached in-memory model of the LATC registers
mask Mask of bits to be changed from the configuration.
value The value to be masked and merged with the configuration value.
param Parameter to be passed to the load routine.
loadFn Type ordered array of pointers to functions that load the LAT registers
Return values:
RIM_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

unsigned RIM_loadCfeConfig1 RIM rim,
unsigned int  mask,
unsigned int  value0,
unsigned int  value1,
unsigned int  cMask,
void *  param,
RIM_loadFn **  loadFn
 

Load CFE configuration register 1.

CFE configuration register 1 is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

Parameters:
rim Pointer to the cached in-memory model of the LATC registers
mask Mask of bits to be changed from the configuration.
value0 The value to be masked and merged with the configuration value for front-ends whose bit is clear in the column mask.
value1 The value to be masked and merged with the configuration value for front-ends whose bit is set in the column mask.
cMask Mask of bits, one per column, specifying which value is to be used for loading the config register.
param Parameter to be passed to the load routine.
loadFn Type ordered array of pointers to functions that load the LAT registers
Return values:
RIM_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

unsigned RIM_loadSplit RIM rim,
int  nLow,
int  nHigh,
void *  param,
RIM_loadFn **  loadFn
 

Load TKR split values.

The tracker RC and FE registers are loaded to reflect the given split values.

Parameters:
rim RIM structure containing the values to load onto the LAT
nLow Number of TFEs to talk on the low side, or -1 if the configured values are to be used.
nHigh Number of TFEs to talk on the high side, or -1 if the configured values are to be used.
param Parameter to be passed to the load function.
loadFn Type ordered array of pointers to functions that load the LAT registers
Return values:
RIM_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

unsigned RIM_loadTfeDac RIM rim,
unsigned int  mask,
unsigned int  value,
int  nLow,
int  nHigh,
void *  param,
RIM_loadFn **  loadFn
 

Load the TFE DAC register.

The TFE DAC register is loaded with a modified version of the value from the LAT configuration, with the specified bits replaced.

Parameters:
rim Pointer to the cached in-memory model of the LATC registers
mask Mask of bits to be changed from the configuration.
value The value to be masked and merged with the configuration value.
nLow Number of TFEs talking on the low side, or -1 if the configured values are being used.
nHigh Number of TFEs talking on the high side, or -1 if the configured values are being used.
param Parameter to be passed to the load routine.
loadFn Type ordered array of pointers to functions that load the LAT registers
Return values:
RIM_SUCCESS if all goes well
LEM_* if there is an error arising from one of the register load commands

unsigned RIM_read RIM rim,
void *  param,
RIM_readFn **  readFn,
RIM_decodeFn **  decodeFn,
const RIM_map ign
 

Populate the RIM structure with the current state of the LAT.

Parameters:
rim Pointer to the RIM structure to populate from the LAT
param Pointer passed through to the readRegFn
readFn Type ordered array of pointers to functions that read the LAT registers
decodeFn Type ordered array of pointers to functions that decode the register responses
ign Map of the sections of the LAT known to be bad or not present so can be ignored.

void RIM_setSplit short *  ptr,
unsigned long long  value,
unsigned  uid
 

Decode the result item used to populate a split.

The value from the TRC register is converted and assigned to the appropriate split register.

Parameters:
ptr Pointer to split registers instance
value Value read from the TRC register
uid The unique ID of the SPT register


Generated on Wed Nov 21 01:38:16 2007 by  doxygen 1.4.4