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.h File Reference

Public definitions for the RIM (Register In-Memory) facility. More...

#include <stdlib.h>

Include dependency graph for RIM.h:

This graph shows which files directly or indirectly include this file:


Data Structures

struct  _Layer_addr
 Address of a TFE/SPT node. More...
struct  _ACD_addr
 Address of a ARC/AFE node. More...
struct  _TEM_addr
 Address of a TEM/TIC/CCC/TCC/CRC/TRC/CFE node. More...
union  _RIM_addr
 Union of all the address structures and an array, used for hierarchical leaf identification throughout RIM. More...
struct  _RIM_rqstInfo
 Information describing a read request. More...

Typedefs

typedef unsigned RIM_type
 Creates a new type used to identify components (TEM, TFE etc).
typedef RIM_ RIM
 Forward declaration of the RIM structure.
typedef RIM_map_ RIM_map
 Forward declaration of the RIM_map structure, a bit-map of all the LAT components.
typedef _Layer_addr Layer_addr
 Address of a TFE/SPT node.
typedef _ACD_addr ACD_addr
 Address of a ARC/AFE node.
typedef _TEM_addr TEM_addr
 Address of a TEM/TIC/CCC/TCC/CRC/TRC/CFE node.
typedef _RIM_addr RIM_addr
 Union of all the address structures and an array, used for hierarchical leaf identification throughout RIM.
typedef _RIM_rqstInfo RIM_rqstInfo
 Information describing a read request.
typedef void RIM_decodeFn (unsigned short *pkt, void *ptr, const RIM_rqstInfo *info)
 Function that Decodes the response from one type of LAT register.
typedef unsigned RIM_loadFn (void *param, const RIM_addr *addr, unsigned regId, const void *value)
 Function that Loads one type of LAT register.
typedef unsigned RIM_readFn (void *param, const RIM_addr *addr, unsigned regId, RIM_decodeFn *decodeFn, void *dst, const RIM_rqstInfo *info)
 Function that Reads one type of LAT register.
typedef unsigned RIM_expRecdCB (void *parm, unsigned type, int leng)
 Function called to start the export of a new record.
typedef unsigned RIM_expDataCB (void *parm, void *data, int leng)
 Function called to export data for a record.
typedef unsigned RIM_impRecdCB (void *parm, unsigned *type, int *leng)
 Function called to start the import of a new record.
typedef unsigned RIM_impDataCB (void *parm, void *data, int rLeng, int *leng)
 Function called to import data for a record.

Enumerations

enum  {
  LATC_MAJ = 15,
  LATC_MIN = 0
}
 Current version numbers.
enum  { RIM_MEM_ALIGN = sizeof(unsigned long long) }
 Memory alignment requirements on a memory block used for a RIM structure.
enum  { FIO_PERMS = 0666 }
 File permissions for output files.
enum  LATC_CTB_BASE_ID {
  LATC_SSR_APID = 0x3fd,
  LATC_CTB_MAP = 0,
  LATC_CTB_DATA = 128
}
 Contribution type base ID for the two types of LATC contributions.
enum  {
  RIM_BCAST_ADDR = 255,
  N_RIM_ADDR_CPTS = 4
}
 Constant values associated with addressing LAT component instances.
enum  { RIM_BAD_TYPE = -1 }
enum  {
  UID_INDEX = 0x0ffff,
  UID_IGN_ERROR = 0x10000,
  UID_SPT_HIGH = 0x20000,
  UID_SPT_TFE = 0x40000,
  UID_SPT_LAST = 0x80000
}
 Masks for fields in the read request uid value. More...

Functions

int RIM_checkBit (const RIM_map *map, RIM_type type, const RIM_addr *addr)
 Check a bit in the map.
void RIM_checkSplit (short *ptr, unsigned long long value, unsigned uid)
 Decode a result item used to check a split.
void RIM_clear (RIM *rim)
 Clear out the map and data portions of the RIM structure.
unsigned RIM_clearBit (RIM_map *map, RIM_type type, const RIM_addr *addr)
 Clear a bit in the map.
unsigned RIM_clearByTWR (RIM_map *map, RIM_type type, unsigned twr)
void RIM_clearMap (RIM_map *map)
 Clear the map.
int RIM_compare (const RIM *this, const RIM *that, RIM_map *map)
 Compare all the nodes of this and that, marking differences in the map.
int RIM_compareType (const char *string, RIM_type type)
 Compare string with the name of a type.
RIMRIM_construct (void *buffer)
 Initialise a block of memory as a RIM object.
RIM_mapRIM_constructMap (void *buffer)
 Initialise the supplied memory as a RIM_map object.
unsigned RIM_contrast (const RIM *this, const RIM *that, const RIM_map *map, RIM_type *r_type, RIM_addr *r_addr)
 Compare all the nodes of this and that, that are not marked to be ignored.
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.
int RIM_countMap (const RIM_map *map, RIM_type type)
 Count the number of set bits in the map.
void RIM_dataMasks (RIM *rim, unsigned *dfTpres, unsigned *exTypes)
 Get summary of data types present in a RIM.
unsigned RIM_export (RIM *rim, unsigned typMask, RIM_expRecdCB recdRtn, RIM_expDataCB dataRtn, void *parm)
 Export RIM data as a series of records.
unsigned RIM_exportMap (RIM_map *map, RIM_expRecdCB recdRtn, RIM_expDataCB dataRtn, void *parm)
 Export RIM map data as a series of records.
unsigned RIM_get (const RIM *rim, RIM_type type, const RIM_addr *addr, int regId, void *value)
 Put the contents of the requested register and field into value.
unsigned RIM_getAddress (RIM_addr *addr, unsigned index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.
unsigned RIM_getAddrRng (const char *string, RIM_addr *addr)
 Finds the address range associated with the type identifed by the string.
unsigned RIM_getIndex (const RIM_addr *addr, unsigned *index, RIM_type type)
 Convert hierarchical bit addressing to flat addressing.
unsigned RIM_getLayerID (const char *name, unsigned *layer)
 Convert a layer name to a layer ID.
unsigned RIM_getLayerName (unsigned layer, char *name)
 Form the layer name from the layer ID.
unsigned RIM_import (RIM *rim, int swap, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm)
 Import RIM data as a series of records.
unsigned RIM_importMap (RIM_map *map, int swap, RIM_impRecdCB recdRtn, RIM_impDataCB dataRtn, void *parm)
 Import RIM map data as a series of records.
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_loadSplit (RIM *rim, int nLow, int nHigh, void *param, RIM_loadFn **loadFn)
 Load TKR split values.
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.
RIM_type RIM_lookupType (const char *string)
 Hunt through the list of component types and return the index of the input string.
unsigned RIM_nameType (char *string, RIM_type type)
 Place the four-character string describing this type into name.
unsigned RIM_nTypes (void)
 Return the number of component types within the LAT register description.
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_set (RIM *rim, RIM_type type, const RIM_addr *addr, int regId, const void *value)
 Set the value of a register.
unsigned RIM_setBit (RIM_map *map, RIM_type type, const RIM_addr *addr)
 Set a bit in the map.
void RIM_setSplit (short *ptr, unsigned long long value, unsigned uid)
 Decode the result item used to populate a split.
size_t RIM_sizeof (void)
 Calculate the footprint of the RIM structure.
size_t RIM_sizeofMap (void)
 Calculate the total size of a RIM_map object.

Detailed Description

Public definitions for the RIM (Register In-Memory) facility.

Author:
James Swain & Owen Saxton
Id
RIM.h,v 1.3 2007/11/09 22:44:51 saxton Exp

Typedef Documentation

typedef struct _RIM_rqstInfo RIM_rqstInfo
 

Information describing a read request.

This is used mainly in handling read errors, but is also used when processing registers read during a read of the splits

This structure should really be private to RIM, since the information it contains is essentially held in escrow by LATC and returned in the event that the response to a read command contains an error. However, the additional scaffold required to support an opaque handle just seems like overkill.


Enumeration Type Documentation

anonymous enum
 

Masks for fields in the read request uid value.

Enumerator:
UID_INDEX  Index of component.
UID_IGN_ERROR  Ignore any read errors.
UID_SPT_HIGH  Set if high side split; otherwise low.
UID_SPT_TFE  Set if reading TFE; otherwise TRC.
UID_SPT_LAST  Set if last read of the group.


Function Documentation

int RIM_checkBit const RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Check a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to check
Return values:
0 if the bit is clear
1 if the bit is set

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_clear RIM rim  ) 
 

Clear out the map and data portions of the RIM structure.

Parameters:
rim Pointer to the RIM object to clear

unsigned RIM_clearBit RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Clear a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to clear
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPEUNKN if the type does not exist
RIM_MAPNONE if there is no sub-map corresponding to this type
RIM_ADDRBCST if the address contains a mixture of broadcast and singlecast addresses
RIM_ADDRRNGE if any component of the address is out of range
RIM_ADDRINDX if the final index exceeds the total number of bits in the map

void RIM_clearMap RIM_map map  ) 
 

Clear the map.

Parameters:
map Structure being manipulated

int RIM_compare const RIM this,
const RIM that,
RIM_map map
 

Compare all the nodes of this and that, marking differences in the map.

If a node is NULL, then the default node is used.

Parameters:
this First in-memory configuration structure
that Second in-memory configuration structure
map Indicates which nodes are different
Returns:
Number of different nodes

int RIM_compareType const char *  string,
RIM_type  type
 

Compare string with the name of a type.

Parameters:
string Name of a component type
type Type to compare to
Return values:
-1 If the type is unknown (exceeds the range of acceptable types)
0 If the type is known, and the name matches the string
1 If the type is known, and the name does not match the string

RIM* RIM_construct void *  buffer  ) 
 

Initialise a block of memory as a RIM object.

Parameters:
buffer Pointer to uninitialised memory to use for the RIM structure
Returns:
The address of the initialised RIM structure, or NULL if the buffer is misaligned

RIM_map* RIM_constructMap void *  buf  ) 
 

Initialise the supplied memory as a RIM_map object.

Parameters:
buf Block of memory, at least as large as RIM_sizeofMap, to initalise as a RIM_map object
Returns:
Pointer to an initialised RIM_map object

unsigned RIM_contrast const RIM this,
const RIM that,
const RIM_map ign,
RIM_type r_type,
RIM_addr r_addr
 

Compare all the nodes of this and that, that are not marked to be ignored.

If a node is NULL then the default node is used.

Parameters:
this First in memory configuration model
that Second in memory configuration model
ign Pointer to a bit-map of sections of the LAT to ignore
r_type Location to fill with the type of the first different node (can be NULL if not interested)
r_addr Pointer to an address structure to populate with the first different node (can be NULL if not interested)
Return values:
RIM_SUCCESS If the two in-memory models are functionally identical
RIM_DIFFER If the two in-memory models are different

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)

int RIM_countMap const RIM_map map,
RIM_type  type
 

Count the number of set bits in the map.

Parameters:
map Structure being manipulated
type Identifies map to count
Returns:
Number of bits set in the map, or -1 for an illegal type

void RIM_dataMasks RIM rim,
unsigned *  dfTypes,
unsigned *  exTypes
 

Get summary of data types present in a RIM.

This routine returns two bitmasks indicating what kinds of data are present in the specified RIM structure. The first indicates the types with default data present, while the second indicates which types have exception data. The principle use of this routine is to avoid creating empty sets of exported data.

Parameters:
rim Pointer to the in-memory model data
dfTypes The address of an integer to receive the bitmask of types with default data present.
exTypes The address of an integer to receive the bitmask of types with exception data present.

unsigned RIM_export RIM rim,
unsigned  typMask,
RIM_expRecdCB  recdRtn,
RIM_expDataCB  dataRtn,
void *  parm
 

Export RIM data as a series of records.

This routine provides a general way to export the data from a RIM structure. The data are presented as a series of records to the supplied callback routines. One routine is called at the start of each record to receive the record type and length of the data in the record. The second routine is called to receive data for the record, and is called as many times as necessary to receive all the data.

Parameters:
rim RIM structure to use as a source
typMask Mask of component types to write out. If the default (DFT) bit is set, the default data for all types is exported in addition to the data indicated by the other type bits.
recdRtn Routine to be called at the start of each record to be exported.
dataRtn Routine to be called for each block of data to be exported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS if all goes well

unsigned RIM_exportMap RIM_map map,
RIM_expRecdCB  recdRtn,
RIM_expDataCB  dataRtn,
void *  parm
 

Export RIM map data as a series of records.

This routine provides a general way to export the data from a RIM map structure. The data are presented as a series of records to the supplied callback routines. One routine is called at the start of each record to receive the record type and length of the data in the record. The second routine is called to receive data for the record, and is called as many times as necessary to receive all the data.

Parameters:
map RIM map structure to use as a source
recdRtn Routine to be called at the start of each record to be exported.
dataRtn Routine to be called for each block of data to be exported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS if all goes well

unsigned RIM_get const RIM rim,
RIM_type  type,
const RIM_addr addr,
int  regId,
void *  value
 

Put the contents of the requested register and field into value.

Parameters:
rim In memory configuration structure to be interogated
type Type of data sought
addr Address of the leaf requested
regId Register to get, as LAT hardware ID
value Location to put the contents of the target field
Return values:
RIM_SUCCESS if all the parameters are in bounds and the data is successfully retrieved.
RIM_TYPEUNKN if type is not a valid RIM_type
RIM_CPTNONE if the requested type has no real data
RIM_ADDRBCST if the address contains a mixture of broadcast and unicast components
RIM_ADDRRNGE if any component of the address is outside the allowable range for this type
RIM_BADREGID if regId is outside the acceptable range of register IDs for this type
RIM_NOTSET if the requested node has not been previously set
RIM_BADREGID The register ID was unrecognized

unsigned RIM_getAddress RIM_addr addr,
unsigned  index,
RIM_type  type
 

Convert hierarchical bit addressing to flat addressing.

Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->RIM converter, but is documented here since it is a storage convention.

Parameters:
addr Address to convert
index Index corresponding to address
type Type of address to convert
Return values:
RIM_SUCCESS if the address is successfully converted to an index
RIM_ADDRRNGE if any component of the address is outside the allowable range for this type

unsigned RIM_getAddrRng const char *  string,
RIM_addr addr
 

Finds the address range associated with the type identifed by the string.

Parameters:
string Identifies the address range required
addr Pointer to address stucture to populate with the address range
Return values:
RIM_SUCCESS If the string is a good type name.
RIM_TYPESTR If the string does not match a known type

unsigned RIM_getIndex const RIM_addr addr,
unsigned *  index,
RIM_type  type
 

Convert hierarchical bit addressing to flat addressing.

Note that GTFEs are usually referred to as being part of an X or Y layer. This identification is converted to an absolute layer number and stored in the rc space by addr->rc = (layerNumber << 1) | isYlayer. This conversion is performed by the XLM->binary converter, but is documented here since it is a storage convention.

Parameters:
addr Address to convert
type Type of address to convert
index Index corresponding to address
Return values:
RIM_SUCCESS if the address is successfully converted to an index
RIM_ADDRBCST if the address contains a mixture of broadcast and unicast components
RIM_ADDRRNGE if any component of the address is outside the allowable range for this type

unsigned RIM_getLayerID const char *  name,
unsigned *  layer
 

Convert a layer name to a layer ID.

A three-character layer name of the form [sign][xory][index] is converted to a layer ID.

Parameters:
name The address of the three-byte layer name.
layer Location to store the layer ID
Return values:
RIM_SUCCESS If the layer ID was successfully found
RIM_ADDRLSIG If the layer sign is nonsensical
RIM_ADDRLXY If the layer xy value is nonsensical
RIM_ADDRLIND If the layer index is nonsensical

unsigned RIM_getLayerName unsigned  layer,
char *  name
 

Form the layer name from the layer ID.

The name has the form [sign][xory][index], e.g. +y5, -x1.

Parameters:
layer ID of the layer to name
name The address of a 4-byte array to hold the layer name (3 bytes) plus the trailing null.
Return values:
RIM_SUCCESS If the layer is located
RIM_ADDRLAYR If the layer is out of range

unsigned RIM_import RIM rim,
int  swap,
RIM_impRecdCB  recdRtn,
RIM_impDataCB  dataRtn,
void *  parm
 

Import RIM data as a series of records.

This routine provides a general way to import data into a RIM structure. The data are received as a series of records from the supplied callback routines. One routine is called to position at the start of the next record to be imported and supplies the record type and data length. The second routine is called to retrieve data for the record, and is called as many times as necessary to retrieve all the data.

Parameters:
rim RIM structure to use as a source
swap If TRUE, the bytes of the imported data are to be swapped from big-endian to machine order.
recdRtn Routine to be called at the start of each record to be imported.
dataRtn Routine to be called for each block of data to be imported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS Success
RIM_RTYPUNKN Received a record with invalid record type
RIM_TYPEUNKN Received a record with invalid RIM type

unsigned RIM_importMap RIM_map map,
int  swap,
RIM_impRecdCB  recdRtn,
RIM_impDataCB  dataRtn,
void *  parm
 

Import RIM map data as a series of records.

This routine provides a general way to export the data from a RIM map structure. The data are presented as a series of records to the supplied callback routines. One routine is called at the start of each record to receive the record type and length of the data in the record. The second routine is called to receive data for the record, and is called as many times as necessary to receive all the data.

Parameters:
map RIM map structure to use as a source
swap If TRUE, the bytes of the imported data are to be swapped from big-endian to machine order.
recdRtn Routine to be called at the start of each record to be exported.
dataRtn Routine to be called for each block of data to be exported.
parm Parameter to pass to the callback routines.
Return values:
RIM_SUCCESS Success
RIM_RTYPUNKN Received a record with invalid record type
RIM_TYPEUNKN Received a record with invalid RIM type

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

RIM_type RIM_lookupType const char *  string  ) 
 

Hunt through the list of component types and return the index of the input string.

Parameters:
string String corresponding to one of the component types used in the LAT register description
Returns:
integer corresponding to the type identified by string or RIM_BAD_TYPE if the string does not match any on the list

unsigned RIM_nameType char *  string,
RIM_type  type
 

Place the four-character string describing this type into name.

Parameters:
type Type to be named
string Location to place name
Return values:
RIM_SUCCESS If the type is known to RIM
RIM_TYPEUNKN If the type is unknown

unsigned RIM_nTypes void   ) 
 

Return the number of component types within the LAT register description.

Returns:
Number of component types

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.

unsigned RIM_set RIM rim,
RIM_type  type,
const RIM_addr addr,
int  regId,
const void *  value
 

Set the value of a register.

Parameters:
rim In memory configuration structure to manipulated
type Type of data sought
addr Address of the leaf requested
regId Register to set, as a LAT hardware ID
value Ptr to value to set the register field to
Return values:
RIM_SUCCESS if all the parameters are in bounds and the data is successfully retrieved.
RIM_TYPEUNKN if type is not a valid RIM_type
RIM_CPTNONE if the requested type has no real data
RIM_ADDRBCST if the address contains a mixture of broadcast and unicast components
RIM_ADDRRNGE if any component of the address is outside the allowable range for this type
RIM_BADREGID if regId is outside the acceptable range of register IDs for this type

unsigned RIM_setBit RIM_map map,
RIM_type  type,
const RIM_addr addr
 

Set a bit in the map.

Parameters:
map Structure being manipulated
type Identifies map to manipulate
addr bit to set
Return values:
RIM_SUCCESS if everything goes well
RIM_TYPEUNKN if the type does not exist
RIM_MAPNONE if there is no sub-map corresponding to this type
RIM_ADDRBCST if the address contains a mixture of broadcast and unicast addresses
RIM_ADDRRNGE if any component of the address is out of range
RIM_ADDRINDX if the final index exceeds the total number of bits in the map

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

size_t RIM_sizeof void   ) 
 

Calculate the footprint of the RIM structure.

Returns:
Amount of memory required to hold the RIM structure

size_t RIM_sizeofMap void   ) 
 

Calculate the total size of a RIM_map object.

Returns:
Amount of memory required to accomodate a RIM_map object


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