\hypertarget{RIM_8h}{
\section{RIM.h File Reference}
\label{RIM_8h}\index{RIM.h@{RIM.h}}
}
Public definitions for the RIM (Register In-Memory) facility.  


{\tt \#include $<$stdlib.h$>$}\par
\subsection*{Classes}
\begin{CompactItemize}
\item 
struct \hyperlink{struct__Layer__addr}{\_\-Layer\_\-addr}
\begin{CompactList}\small\item\em Address of a TFE/SPT node. \item\end{CompactList}\item 
struct \hyperlink{struct__ACD__addr}{\_\-ACD\_\-addr}
\begin{CompactList}\small\item\em Address of a ARC/AFE node. \item\end{CompactList}\item 
struct \hyperlink{struct__TEM__addr}{\_\-TEM\_\-addr}
\begin{CompactList}\small\item\em Address of a TEM/TIC/CCC/TCC/CRC/TRC/CFE node. \item\end{CompactList}\item 
union \hyperlink{union__RIM__addr}{\_\-RIM\_\-addr}
\begin{CompactList}\small\item\em Union of all the address structures and an array, used for hierarchical leaf identification throughout RIM. \item\end{CompactList}\item 
struct \hyperlink{struct__RIM__rqstInfo}{\_\-RIM\_\-rqstInfo}
\begin{CompactList}\small\item\em Information describing a read request. \item\end{CompactList}\end{CompactItemize}
\subsection*{Typedefs}
\begin{CompactItemize}
\item 
\hypertarget{RIM_8h_578d1975a05e3ce266f6693af764aa86}{
typedef unsigned \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type}}
\label{RIM_8h_578d1975a05e3ce266f6693af764aa86}

\begin{CompactList}\small\item\em Creates a new type used to identify components (TEM, TFE etc). \item\end{CompactList}\item 
\hypertarget{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{
typedef struct RIM\_\- \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM}}
\label{RIM_8h_2b448e9c87c572134b2e8a16a197c726}

\begin{CompactList}\small\item\em Forward declaration of the RIM structure. \item\end{CompactList}\item 
\hypertarget{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{
typedef struct RIM\_\-map\_\- \hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map}}
\label{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}

\begin{CompactList}\small\item\em Forward declaration of the RIM\_\-map structure, a bit-map of all the LAT components. \item\end{CompactList}\item 
\hypertarget{RIM_8h_fb148443630c494d2314340639c012d8}{
typedef struct \hyperlink{struct__Layer__addr}{\_\-Layer\_\-addr} \hyperlink{RIM_8h_fb148443630c494d2314340639c012d8}{Layer\_\-addr}}
\label{RIM_8h_fb148443630c494d2314340639c012d8}

\begin{CompactList}\small\item\em Address of a TFE/SPT node. \item\end{CompactList}\item 
\hypertarget{RIM_8h_e5c8b533e62a6fd75a689bce1b47c601}{
typedef struct \hyperlink{struct__ACD__addr}{\_\-ACD\_\-addr} \hyperlink{RIM_8h_e5c8b533e62a6fd75a689bce1b47c601}{ACD\_\-addr}}
\label{RIM_8h_e5c8b533e62a6fd75a689bce1b47c601}

\begin{CompactList}\small\item\em Address of a ARC/AFE node. \item\end{CompactList}\item 
\hypertarget{RIM_8h_2d6b76fce437cce2dafd8ff2b3e8f271}{
typedef struct \hyperlink{struct__TEM__addr}{\_\-TEM\_\-addr} \hyperlink{RIM_8h_2d6b76fce437cce2dafd8ff2b3e8f271}{TEM\_\-addr}}
\label{RIM_8h_2d6b76fce437cce2dafd8ff2b3e8f271}

\begin{CompactList}\small\item\em Address of a TEM/TIC/CCC/TCC/CRC/TRC/CFE node. \item\end{CompactList}\item 
\hypertarget{RIM_8h_aa53dcbb6a9bbd0888fd24f43d553c25}{
typedef union \hyperlink{union__RIM__addr}{\_\-RIM\_\-addr} \hyperlink{RIM_8h_aa53dcbb6a9bbd0888fd24f43d553c25}{RIM\_\-addr}}
\label{RIM_8h_aa53dcbb6a9bbd0888fd24f43d553c25}

\begin{CompactList}\small\item\em Union of all the address structures and an array, used for hierarchical leaf identification throughout RIM. \item\end{CompactList}\item 
typedef struct \hyperlink{struct__RIM__rqstInfo}{\_\-RIM\_\-rqstInfo} \hyperlink{RIM_8h_d69d48908c6bc796278b2189811a4ca0}{RIM\_\-rqstInfo}
\begin{CompactList}\small\item\em Information describing a read request. \item\end{CompactList}\item 
\hypertarget{RIM_8h_456edda1e1a3eccb960b1207956ee6a0}{
typedef void \hyperlink{RIM_8h_456edda1e1a3eccb960b1207956ee6a0}{RIM\_\-decodeFn} (unsigned short $\ast$pkt, void $\ast$ptr, const \hyperlink{struct__RIM__rqstInfo}{RIM\_\-rqstInfo} $\ast$info)}
\label{RIM_8h_456edda1e1a3eccb960b1207956ee6a0}

\begin{CompactList}\small\item\em Function that Decodes the response from one type of LAT register. \item\end{CompactList}\item 
\hypertarget{RIM_8h_40be2dd985735617fb38c2b637926f45}{
typedef unsigned \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} (void $\ast$param, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, unsigned regId, const void $\ast$value)}
\label{RIM_8h_40be2dd985735617fb38c2b637926f45}

\begin{CompactList}\small\item\em Function that Loads one type of LAT register. \item\end{CompactList}\item 
\hypertarget{RIM_8h_7d6044f709e901c43ff7ccac55ef050b}{
typedef unsigned \hyperlink{RIM_8h_7d6044f709e901c43ff7ccac55ef050b}{RIM\_\-readFn} (void $\ast$param, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, unsigned regId, \hyperlink{RIM_8h_456edda1e1a3eccb960b1207956ee6a0}{RIM\_\-decodeFn} $\ast$decodeFn, void $\ast$dst, const \hyperlink{struct__RIM__rqstInfo}{RIM\_\-rqstInfo} $\ast$info)}
\label{RIM_8h_7d6044f709e901c43ff7ccac55ef050b}

\begin{CompactList}\small\item\em Function that Reads one type of LAT register. \item\end{CompactList}\item 
\hypertarget{RIM_8h_bdc552e93b5e942176b14d6371f94bb6}{
typedef unsigned \hyperlink{RIM_8h_bdc552e93b5e942176b14d6371f94bb6}{RIM\_\-expRecdCB} (void $\ast$parm, unsigned type, int leng)}
\label{RIM_8h_bdc552e93b5e942176b14d6371f94bb6}

\begin{CompactList}\small\item\em Function called to start the export of a new record. \item\end{CompactList}\item 
\hypertarget{RIM_8h_13493529fee92f2c97e7ed60aae8100e}{
typedef unsigned \hyperlink{RIM_8h_13493529fee92f2c97e7ed60aae8100e}{RIM\_\-expDataCB} (void $\ast$parm, void $\ast$data, int leng)}
\label{RIM_8h_13493529fee92f2c97e7ed60aae8100e}

\begin{CompactList}\small\item\em Function called to export data for a record. \item\end{CompactList}\item 
\hypertarget{RIM_8h_4e7d8a31b796cf9730af53684d140440}{
typedef unsigned \hyperlink{RIM_8h_4e7d8a31b796cf9730af53684d140440}{RIM\_\-impRecdCB} (void $\ast$parm, unsigned $\ast$type, int $\ast$leng)}
\label{RIM_8h_4e7d8a31b796cf9730af53684d140440}

\begin{CompactList}\small\item\em Function called to start the import of a new record. \item\end{CompactList}\item 
\hypertarget{RIM_8h_b9894a0d0ed193d3c211b0fc61d14007}{
typedef unsigned \hyperlink{RIM_8h_b9894a0d0ed193d3c211b0fc61d14007}{RIM\_\-impDataCB} (void $\ast$parm, int iShrt, void $\ast$data, int rLeng, int $\ast$leng)}
\label{RIM_8h_b9894a0d0ed193d3c211b0fc61d14007}

\begin{CompactList}\small\item\em Function called to import data for a record. \item\end{CompactList}\end{CompactItemize}
\subsection*{Enumerations}
\begin{CompactItemize}
\item 
enum \{ \par
\textbf{LATC\_\-MAJ} =  15, 
\par
\textbf{LATC\_\-MIN} =  0
 \}
\begin{CompactList}\small\item\em Current version numbers. \item\end{CompactList}\item 
enum \{ \par
\hyperlink{RIM_8h_99fb83031ce9923c84392b4e92f956b57e93d8fa8688b1140f28bbcca0e2d415}{RIM\_\-OPT\_\-SWAP} =  0x01, 
\par
\hyperlink{RIM_8h_99fb83031ce9923c84392b4e92f956b5a7e1f99126d72445475d494831ff7cc4}{RIM\_\-OPT\_\-CURR} =  0x02
 \}
\begin{CompactList}\small\item\em Import options. \item\end{CompactList}\item 
enum \{ \textbf{RIM\_\-MEM\_\-ALIGN} =  sizeof(unsigned long long)
 \}
\begin{CompactList}\small\item\em Memory alignment requirements on a memory block used for a RIM structure. \item\end{CompactList}\item 
enum \{ \par
\textbf{RIM\_\-BCAST\_\-ADDR} =  255, 
\par
\textbf{N\_\-RIM\_\-ADDR\_\-CPTS} =  4
 \}
\begin{CompactList}\small\item\em Constant values associated with addressing LAT component instances. \item\end{CompactList}\item 
enum \{ \textbf{RIM\_\-BAD\_\-TYPE} =  -1
 \}
\item 
enum \{ \par
\hyperlink{RIM_8h_726ca809ffd3d67ab4b8476646f2663518a9f92a17ad2f14f2a4a407a34a1110}{UID\_\-INDEX} =  0x0ffff, 
\par
\hyperlink{RIM_8h_726ca809ffd3d67ab4b8476646f26635c08e4f543d741949e78757b1ec50859c}{UID\_\-IGN\_\-ERROR} =  0x10000, 
\par
\hyperlink{RIM_8h_726ca809ffd3d67ab4b8476646f26635e5cc94ab70a87cd120b7eca5d146db12}{UID\_\-SPT\_\-HIGH} =  0x20000, 
\par
\hyperlink{RIM_8h_726ca809ffd3d67ab4b8476646f266357971de8b22580c2c1c95d7e51c51e5d8}{UID\_\-SPT\_\-TFE} =  0x40000, 
\par
\hyperlink{RIM_8h_726ca809ffd3d67ab4b8476646f26635c862956ecda2975c563484b248de1d23}{UID\_\-SPT\_\-LAST} =  0x80000
 \}
\begin{CompactList}\small\item\em Masks for fields in the read request uid value. \item\end{CompactList}\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int \hyperlink{RIM_8h_e916a4c6f3708bc8d114d510008f12e1}{RIM\_\-checkBit} (const \hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Check a bit in the map. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_24501a5bac335d0a4ca05ca52845cdaa}{RIM\_\-checkSplit} (short $\ast$ptr, unsigned long long value, unsigned int uid)
\begin{CompactList}\small\item\em Decode a result item used to check a split. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_9542583e2681a7d5681158f59dd989a9}{RIM\_\-clear} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim)
\begin{CompactList}\small\item\em Clear out the map and data portions of the RIM structure. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_2edbf990904f05352afef16829d0a298}{RIM\_\-clearBit} (\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Clear a bit in the map. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_b2d9937e69a38207cad9b2b655428edf}{RIM\_\-clearMap} (\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map)
\begin{CompactList}\small\item\em Clear the map. \item\end{CompactList}\item 
int \hyperlink{RIM_8h_cb5c390646a42f66d9cfdb50e425d8c5}{RIM\_\-compare} (const \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim1, const \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim2, \hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map)
\begin{CompactList}\small\item\em Compare all the nodes of {\em rim1\/} and {\em rim2\/}, marking differences in {\em map\/}. \item\end{CompactList}\item 
int \hyperlink{RIM_8h_c4c862001b32f6ad2d7226d2d252fd06}{RIM\_\-compareType} (const char $\ast$string, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Compare string with the name of a type. \item\end{CompactList}\item 
\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$ \hyperlink{RIM_8h_48f1fc27dc9a90ae0097a089c07f2d69}{RIM\_\-construct} (void $\ast$buffer)
\begin{CompactList}\small\item\em Initialise a block of memory as a RIM object. \item\end{CompactList}\item 
\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$ \hyperlink{RIM_8h_9b47eae4434c81b75970ba29ac2902b3}{RIM\_\-constructMap} (void $\ast$buffer)
\begin{CompactList}\small\item\em Initialise the supplied memory as a RIM\_\-map object. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_73e4162ee97aeed85b7fa4b01fbbe1b2}{RIM\_\-contrast} (const \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim1, const \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim2, const \hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} $\ast$r\_\-type, \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$r\_\-addr)
\begin{CompactList}\small\item\em Compare all the nodes of {\em rim1\/} and {\em rim2\/}, that are not marked to be ignored. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_a8e76e0c1dd1cd8fc797513be2725e3d}{RIM\_\-correct} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$orig, \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$capt)
\begin{CompactList}\small\item\em Copy select portions of an original RIM into a copy, to ensure that the subsequent comparison will succeed. \item\end{CompactList}\item 
int \hyperlink{RIM_8h_7116862875423f008a1a8edec64cfec8}{RIM\_\-countMap} (const \hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Count the number of set bits in the map. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_3566fc4d9130f51cdd8a7eda3d012171}{RIM\_\-dataMasks} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int $\ast$dMask, unsigned int $\ast$eMask)
\begin{CompactList}\small\item\em Get summary of data types present in a RIM. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_588f9722fd7e300aa8a145e99fd2627f}{RIM\_\-export} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int typMask, \hyperlink{RIM_8h_bdc552e93b5e942176b14d6371f94bb6}{RIM\_\-expRecdCB} recdRtn, \hyperlink{RIM_8h_13493529fee92f2c97e7ed60aae8100e}{RIM\_\-expDataCB} dataRtn, void $\ast$parm)
\begin{CompactList}\small\item\em Export RIM data as a series of records. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_1cf019303d4a5796719127d050fa7a61}{RIM\_\-exportMap} (\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_bdc552e93b5e942176b14d6371f94bb6}{RIM\_\-expRecdCB} recdRtn, \hyperlink{RIM_8h_13493529fee92f2c97e7ed60aae8100e}{RIM\_\-expDataCB} dataRtn, void $\ast$parm)
\begin{CompactList}\small\item\em Export RIM map data as a series of records. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_d6acae40a94386291643f2fa42fd745c}{RIM\_\-get} (const \hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, int regId, void $\ast$value)
\begin{CompactList}\small\item\em Put the contents of the requested register and field into {\em value\/}. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_1f8ff9fd2bca009fc966a0125cd1a543}{RIM\_\-getAddress} (\hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, unsigned int index, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Convert flat addressing to hierarchical bit addressing. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_e59252ce9ce9544ed65d57f03f56151e}{RIM\_\-getAddrRng} (const char $\ast$string, \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Finds the address range associated with the type identifed by the string. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_5cabac0a9a770f1f6025da5ea1083a6f}{RIM\_\-getIndex} (const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, unsigned int $\ast$index, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Convert hierarchical bit addressing to flat addressing. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_589af03832ad1e942b81bf9f3b55431f}{RIM\_\-getLayerID} (const char $\ast$name, unsigned int $\ast$layer)
\begin{CompactList}\small\item\em Convert a layer name to a layer ID. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_3f075ec5553f4004f74fe0d3fac1fb08}{RIM\_\-getLayerName} (unsigned int layer, char $\ast$name)
\begin{CompactList}\small\item\em Form the layer name from the layer ID. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_5092ae512f130bf2fc787c6fb3a47926}{RIM\_\-import} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, int optns, unsigned short $\ast$versn, \hyperlink{RIM_8h_4e7d8a31b796cf9730af53684d140440}{RIM\_\-impRecdCB} recdRtn, \hyperlink{RIM_8h_b9894a0d0ed193d3c211b0fc61d14007}{RIM\_\-impDataCB} dataRtn, void $\ast$parm)
\begin{CompactList}\small\item\em Import RIM data as a series of records. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_6d56c1b9095af830b9b93f2c16822b2c}{RIM\_\-importMap} (\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, int optns, unsigned short $\ast$versn, \hyperlink{RIM_8h_4e7d8a31b796cf9730af53684d140440}{RIM\_\-impRecdCB} recdRtn, \hyperlink{RIM_8h_b9894a0d0ed193d3c211b0fc61d14007}{RIM\_\-impDataCB} dataRtn, void $\ast$parm)
\begin{CompactList}\small\item\em Import RIM map data as a series of records. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_600604fb11a89d7120fdc383ef702f97}{RIM\_\-load} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load the LAT with the configuration held in a RIM structure. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_83237b7ff2ac863b53ae0e1d01d47e91}{RIM\_\-loadAfeConfig} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int mask, unsigned int value0, unsigned int value1, unsigned int rcMask, unsigned int feMask, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load the AFE configuration register. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_e073368687d4d58b98e902fbcd79759b}{RIM\_\-loadCfeConfig0} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int mask, unsigned int value, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load CFE configuration register 0. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_c996815f2892728bc8c3402bf7eeb6f8}{RIM\_\-loadCfeConfig1} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int mask, unsigned int value0, unsigned int value1, unsigned int cMask, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load CFE configuration register 1. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_92cae81f707248fca5a8a187b7158a87}{RIM\_\-loadSplit} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, int nLow, int nHigh, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load TKR split values. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_d74a95cbf44ec12348575f1f4afb0091}{RIM\_\-loadTfeDac} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, unsigned int mask, unsigned int value, int nLow, int nHigh, void $\ast$param, \hyperlink{RIM_8h_40be2dd985735617fb38c2b637926f45}{RIM\_\-loadFn} $\ast$$\ast$loadFn)
\begin{CompactList}\small\item\em Load the TFE DAC register. \item\end{CompactList}\item 
\hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} \hyperlink{RIM_8h_0c8ce01846b056ca5c06efcab115986b}{RIM\_\-lookupType} (const char $\ast$string)
\begin{CompactList}\small\item\em Hunt through the list of component types and return the index of the input string. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_94e278b66927d9df7f7ffabf9dd21a08}{RIM\_\-nameType} (char $\ast$string, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type)
\begin{CompactList}\small\item\em Place the four-character string describing this type into {\em name\/}. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_b969895deba3cd20677c8e8ae2563c8f}{RIM\_\-nTypes} (void)
\begin{CompactList}\small\item\em Return the number of component types within the LAT register description. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_6033c521b3a275b9eba46857362d6223}{RIM\_\-read} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, void $\ast$param, \hyperlink{RIM_8h_7d6044f709e901c43ff7ccac55ef050b}{RIM\_\-readFn} $\ast$$\ast$readFn, \hyperlink{RIM_8h_456edda1e1a3eccb960b1207956ee6a0}{RIM\_\-decodeFn} $\ast$$\ast$decodeFn)
\begin{CompactList}\small\item\em Populate the RIM structure with the current state of the LAT. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_4ab0735e2b1e628c4f9de7ba09bd7ed2}{RIM\_\-set} (\hyperlink{RIM_8h_2b448e9c87c572134b2e8a16a197c726}{RIM} $\ast$rim, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr, int regId, const void $\ast$value)
\begin{CompactList}\small\item\em Set the value of a register. \item\end{CompactList}\item 
unsigned \hyperlink{RIM_8h_fa9b5493971570b4bcc9887eef485741}{RIM\_\-setBit} (\hyperlink{RIM_8h_5683ec066f5c5d208b486ffdedfd54f3}{RIM\_\-map} $\ast$map, \hyperlink{RIM_8h_578d1975a05e3ce266f6693af764aa86}{RIM\_\-type} type, const \hyperlink{union__RIM__addr}{RIM\_\-addr} $\ast$addr)
\begin{CompactList}\small\item\em Set a bit in the map. \item\end{CompactList}\item 
void \hyperlink{RIM_8h_35d3c6605acb4d7e9b04b9c9c5d4acb2}{RIM\_\-setSplit} (short $\ast$ptr, unsigned long long value, unsigned int uid)
\begin{CompactList}\small\item\em Decode the result item used to populate a split. \item\end{CompactList}\item 
size\_\-t \hyperlink{RIM_8h_7bbd90199cbe1d4ba7970a44cb5210d1}{RIM\_\-sizeof} (void)
\begin{CompactList}\small\item\em Calculate the footprint of the RIM structure. \item\end{CompactList}\item 
size\_\-t \hyperlink{RIM_8h_55dc1a1fdd8c0520d00fe7bc9804ef0d}{RIM\_\-sizeofMap} (void)
\begin{CompactList}\small\item\em Calculate the total size of a RIM\_\-map object. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Public definitions for the RIM (Register In-Memory) facility. 

\begin{Desc}
\item[Author:]James Swain \& Owen Saxton\end{Desc}
{\bf \$Id:} \hyperlink{RIM_8h}{RIM.h},v 1.10 2011/03/27 05:54:08 saxton Exp \$ 

\subsection{Typedef Documentation}
\hypertarget{RIM_8h_d69d48908c6bc796278b2189811a4ca0}{
\index{RIM.h@{RIM.h}!RIM\_\-rqstInfo@{RIM\_\-rqstInfo}}
\index{RIM\_\-rqstInfo@{RIM\_\-rqstInfo}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-rqstInfo}]{\setlength{\rightskip}{0pt plus 5cm}typedef struct {\bf \_\-RIM\_\-rqstInfo}  {\bf RIM\_\-rqstInfo}}}
\label{RIM_8h_d69d48908c6bc796278b2189811a4ca0}


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. 

\subsection{Enumeration Type Documentation}
\hypertarget{RIM_8h_99fb83031ce9923c84392b4e92f956b5}{
\subsubsection[{"@2}]{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}}
\label{RIM_8h_99fb83031ce9923c84392b4e92f956b5}


Import options. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{RIM\_\-OPT\_\-SWAP@{RIM\_\-OPT\_\-SWAP}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!RIM\_\-OPT\_\-SWAP@{RIM\_\-OPT\_\-SWAP}}\item[{\em 
\hypertarget{RIM_8h_99fb83031ce9923c84392b4e92f956b57e93d8fa8688b1140f28bbcca0e2d415}{
RIM\_\-OPT\_\-SWAP}
\label{RIM_8h_99fb83031ce9923c84392b4e92f956b57e93d8fa8688b1140f28bbcca0e2d415}
}]Swap data bytes. \index{RIM\_\-OPT\_\-CURR@{RIM\_\-OPT\_\-CURR}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!RIM\_\-OPT\_\-CURR@{RIM\_\-OPT\_\-CURR}}\item[{\em 
\hypertarget{RIM_8h_99fb83031ce9923c84392b4e92f956b5a7e1f99126d72445475d494831ff7cc4}{
RIM\_\-OPT\_\-CURR}
\label{RIM_8h_99fb83031ce9923c84392b4e92f956b5a7e1f99126d72445475d494831ff7cc4}
}]Allow only the current version. \end{description}
\end{Desc}

\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f26635}{
\subsubsection[{"@6}]{\setlength{\rightskip}{0pt plus 5cm}anonymous enum}}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f26635}


Masks for fields in the read request uid value. 

\begin{Desc}
\item[Enumerator: ]\par
\begin{description}
\index{UID\_\-INDEX@{UID\_\-INDEX}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!UID\_\-INDEX@{UID\_\-INDEX}}\item[{\em 
\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f2663518a9f92a17ad2f14f2a4a407a34a1110}{
UID\_\-INDEX}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f2663518a9f92a17ad2f14f2a4a407a34a1110}
}]Index of component. \index{UID\_\-IGN\_\-ERROR@{UID\_\-IGN\_\-ERROR}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!UID\_\-IGN\_\-ERROR@{UID\_\-IGN\_\-ERROR}}\item[{\em 
\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f26635c08e4f543d741949e78757b1ec50859c}{
UID\_\-IGN\_\-ERROR}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f26635c08e4f543d741949e78757b1ec50859c}
}]Ignore any read errors. \index{UID\_\-SPT\_\-HIGH@{UID\_\-SPT\_\-HIGH}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!UID\_\-SPT\_\-HIGH@{UID\_\-SPT\_\-HIGH}}\item[{\em 
\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f26635e5cc94ab70a87cd120b7eca5d146db12}{
UID\_\-SPT\_\-HIGH}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f26635e5cc94ab70a87cd120b7eca5d146db12}
}]Set if high side split; otherwise low. \index{UID\_\-SPT\_\-TFE@{UID\_\-SPT\_\-TFE}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!UID\_\-SPT\_\-TFE@{UID\_\-SPT\_\-TFE}}\item[{\em 
\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f266357971de8b22580c2c1c95d7e51c51e5d8}{
UID\_\-SPT\_\-TFE}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f266357971de8b22580c2c1c95d7e51c51e5d8}
}]Set if reading TFE; otherwise TRC. \index{UID\_\-SPT\_\-LAST@{UID\_\-SPT\_\-LAST}!RIM.h@{RIM.h}}\index{RIM.h@{RIM.h}!UID\_\-SPT\_\-LAST@{UID\_\-SPT\_\-LAST}}\item[{\em 
\hypertarget{RIM_8h_726ca809ffd3d67ab4b8476646f26635c862956ecda2975c563484b248de1d23}{
UID\_\-SPT\_\-LAST}
\label{RIM_8h_726ca809ffd3d67ab4b8476646f26635c862956ecda2975c563484b248de1d23}
}]Set if last read of the group. \end{description}
\end{Desc}



\subsection{Function Documentation}
\hypertarget{RIM_8h_e916a4c6f3708bc8d114d510008f12e1}{
\index{RIM.h@{RIM.h}!RIM\_\-checkBit@{RIM\_\-checkBit}}
\index{RIM\_\-checkBit@{RIM\_\-checkBit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-checkBit}]{\setlength{\rightskip}{0pt plus 5cm}int RIM\_\-checkBit (const {\bf RIM\_\-map} $\ast$ {\em map}, \/  {\bf RIM\_\-type} {\em type}, \/  const {\bf RIM\_\-addr} $\ast$ {\em addr})}}
\label{RIM_8h_e916a4c6f3708bc8d114d510008f12e1}


Check a bit in the map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Structure being manipulated\item[{\em type}]Identifies map to manipulate\item[{\em addr}]bit to check\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em 0}]if the bit is clear \item[{\em 1}]if the bit is set \end{description}
\end{Desc}


References checkBit(), and mapIndex().\hypertarget{RIM_8h_24501a5bac335d0a4ca05ca52845cdaa}{
\index{RIM.h@{RIM.h}!RIM\_\-checkSplit@{RIM\_\-checkSplit}}
\index{RIM\_\-checkSplit@{RIM\_\-checkSplit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-checkSplit}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-checkSplit (short $\ast$ {\em ptr}, \/  unsigned long long {\em value}, \/  unsigned int {\em uid})}}
\label{RIM_8h_24501a5bac335d0a4ca05ca52845cdaa}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]Pointer to split registers instance\item[{\em value}]Value read from the TFE mode register\item[{\em uid}]The unique ID of the TFE mode register \end{description}
\end{Desc}


References \_\-Layer\_\-addr::fe, \_\-RIM\_\-addr::lyr, RIM\_\-getAddress(), UID\_\-INDEX, and UID\_\-SPT\_\-HIGH.\hypertarget{RIM_8h_9542583e2681a7d5681158f59dd989a9}{
\index{RIM.h@{RIM.h}!RIM\_\-clear@{RIM\_\-clear}}
\index{RIM\_\-clear@{RIM\_\-clear}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-clear}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-clear ({\bf RIM} $\ast$ {\em rim})}}
\label{RIM_8h_9542583e2681a7d5681158f59dd989a9}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the RIM object to clear \end{description}
\end{Desc}


References RIM\_\-clearMap(), and RIM\_\-setReg().\hypertarget{RIM_8h_2edbf990904f05352afef16829d0a298}{
\index{RIM.h@{RIM.h}!RIM\_\-clearBit@{RIM\_\-clearBit}}
\index{RIM\_\-clearBit@{RIM\_\-clearBit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-clearBit}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-clearBit ({\bf RIM\_\-map} $\ast$ {\em map}, \/  {\bf RIM\_\-type} {\em type}, \/  const {\bf RIM\_\-addr} $\ast$ {\em addr})}}
\label{RIM_8h_2edbf990904f05352afef16829d0a298}


Clear a bit in the map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Structure being manipulated\item[{\em type}]Identifies map to manipulate\item[{\em addr}]bit to clear\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if everything goes well \item[{\em RIM\_\-TYPEUNKN}]if the type does not exist \item[{\em RIM\_\-MAPNONE}]if there is no sub-map corresponding to this type \item[{\em RIM\_\-ADDRBCST}]if the address contains a mixture of broadcast and singlecast addresses \item[{\em RIM\_\-ADDRRNGE}]if any component of the address is out of range \item[{\em RIM\_\-ADDRINDX}]if the final index exceeds the total number of bits in the map \end{description}
\end{Desc}


References clearBit(), and mapIndex().\hypertarget{RIM_8h_b2d9937e69a38207cad9b2b655428edf}{
\index{RIM.h@{RIM.h}!RIM\_\-clearMap@{RIM\_\-clearMap}}
\index{RIM\_\-clearMap@{RIM\_\-clearMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-clearMap}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-clearMap ({\bf RIM\_\-map} $\ast$ {\em map})}}
\label{RIM_8h_b2d9937e69a38207cad9b2b655428edf}


Clear the map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Structure being manipulated \end{description}
\end{Desc}


References clearMap().

Referenced by RIM\_\-clear().\hypertarget{RIM_8h_cb5c390646a42f66d9cfdb50e425d8c5}{
\index{RIM.h@{RIM.h}!RIM\_\-compare@{RIM\_\-compare}}
\index{RIM\_\-compare@{RIM\_\-compare}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-compare}]{\setlength{\rightskip}{0pt plus 5cm}int RIM\_\-compare (const {\bf RIM} $\ast$ {\em rim1}, \/  const {\bf RIM} $\ast$ {\em rim2}, \/  {\bf RIM\_\-map} $\ast$ {\em map})}}
\label{RIM_8h_cb5c390646a42f66d9cfdb50e425d8c5}


Compare all the nodes of {\em rim1\/} and {\em rim2\/}, marking differences in {\em map\/}. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim1}]First in-memory configuration structure\item[{\em rim2}]Second in-memory configuration structure\item[{\em map}]Indicates which nodes are different\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of different nodes \end{Desc}


References checkBit(), compareCpt(), RIM\_\-cptDesc(), RIM\_\-number(), and setBit().\hypertarget{RIM_8h_c4c862001b32f6ad2d7226d2d252fd06}{
\index{RIM.h@{RIM.h}!RIM\_\-compareType@{RIM\_\-compareType}}
\index{RIM\_\-compareType@{RIM\_\-compareType}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-compareType}]{\setlength{\rightskip}{0pt plus 5cm}int RIM\_\-compareType (const char $\ast$ {\em string}, \/  {\bf RIM\_\-type} {\em type})}}
\label{RIM_8h_c4c862001b32f6ad2d7226d2d252fd06}


Compare string with the name of a type. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]Name of a component type\item[{\em type}]Type to compare to\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em -1}]If the type is unknown (exceeds the range of acceptable types) \item[{\em 0}]If the type is known, and the name matches the string \item[{\em 1}]If the type is known, and the name does not match the string \end{description}
\end{Desc}
\hypertarget{RIM_8h_48f1fc27dc9a90ae0097a089c07f2d69}{
\index{RIM.h@{RIM.h}!RIM\_\-construct@{RIM\_\-construct}}
\index{RIM\_\-construct@{RIM\_\-construct}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-construct}]{\setlength{\rightskip}{0pt plus 5cm}{\bf RIM}$\ast$ RIM\_\-construct (void $\ast$ {\em buffer})}}
\label{RIM_8h_48f1fc27dc9a90ae0097a089c07f2d69}


Initialise a block of memory as a RIM object. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buffer}]Pointer to uninitialised memory to use for the RIM structure\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The address of the initialised RIM structure, or NULL if the buffer is misaligned \end{Desc}


References align(), RIM\_\-constructMap(), RIM\_\-cptDesc(), RIM\_\-number(), RIM\_\-setReg(), sizeofCpt(), and sizeofStore().\hypertarget{RIM_8h_9b47eae4434c81b75970ba29ac2902b3}{
\index{RIM.h@{RIM.h}!RIM\_\-constructMap@{RIM\_\-constructMap}}
\index{RIM\_\-constructMap@{RIM\_\-constructMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-constructMap}]{\setlength{\rightskip}{0pt plus 5cm}{\bf RIM\_\-map}$\ast$ RIM\_\-constructMap (void $\ast$ {\em buf})}}
\label{RIM_8h_9b47eae4434c81b75970ba29ac2902b3}


Initialise the supplied memory as a RIM\_\-map object. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em buf}]Block of memory, at least as large as RIM\_\-sizeofMap, to initalise as a RIM\_\-map object\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Pointer to an initialised RIM\_\-map object \end{Desc}


References sizeofMap().

Referenced by RIM\_\-construct().\hypertarget{RIM_8h_73e4162ee97aeed85b7fa4b01fbbe1b2}{
\index{RIM.h@{RIM.h}!RIM\_\-contrast@{RIM\_\-contrast}}
\index{RIM\_\-contrast@{RIM\_\-contrast}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-contrast}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-contrast (const {\bf RIM} $\ast$ {\em rim1}, \/  const {\bf RIM} $\ast$ {\em rim2}, \/  const {\bf RIM\_\-map} $\ast$ {\em ign}, \/  {\bf RIM\_\-type} $\ast$ {\em r\_\-type}, \/  {\bf RIM\_\-addr} $\ast$ {\em r\_\-addr})}}
\label{RIM_8h_73e4162ee97aeed85b7fa4b01fbbe1b2}


Compare all the nodes of {\em rim1\/} and {\em rim2\/}, that are not marked to be ignored. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim1}]First in memory configuration model\item[{\em rim2}]Second in memory configuration model\item[{\em ign}]Pointer to a bit-map of sections of the LAT to ignore\item[{\em r\_\-type}]Location to fill with the type of the first different node (can be NULL if not interested)\item[{\em r\_\-addr}]Pointer to an address structure to populate with the first different node (can be NULL if not interested)\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]If the two in-memory models are functionally identical \item[{\em RIM\_\-DIFFER}]If the two in-memory models are different \end{description}
\end{Desc}


References checkBit(), compareCpt(), RIM\_\-cptDesc(), RIM\_\-getAddress(), and RIM\_\-number().\hypertarget{RIM_8h_a8e76e0c1dd1cd8fc797513be2725e3d}{
\index{RIM.h@{RIM.h}!RIM\_\-correct@{RIM\_\-correct}}
\index{RIM\_\-correct@{RIM\_\-correct}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-correct}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-correct ({\bf RIM} $\ast$ {\em orig}, \/  {\bf RIM} $\ast$ {\em capt})}}
\label{RIM_8h_a8e76e0c1dd1cd8fc797513be2725e3d}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em orig}]Orignal RIM\item[{\em capt}]New copy of the RIM (probably captured from the LAT) \end{description}
\end{Desc}


References checkBit(), RIM\_\-getReg(), and RIM\_\-setReg().\hypertarget{RIM_8h_7116862875423f008a1a8edec64cfec8}{
\index{RIM.h@{RIM.h}!RIM\_\-countMap@{RIM\_\-countMap}}
\index{RIM\_\-countMap@{RIM\_\-countMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-countMap}]{\setlength{\rightskip}{0pt plus 5cm}int RIM\_\-countMap (const {\bf RIM\_\-map} $\ast$ {\em map}, \/  {\bf RIM\_\-type} {\em type})}}
\label{RIM_8h_7116862875423f008a1a8edec64cfec8}


Count the number of set bits in the map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Structure being manipulated\item[{\em type}]Identifies map to count\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Number of bits set in the map, or -1 for an illegal type \end{Desc}


Referenced by RIM\_\-export().\hypertarget{RIM_8h_3566fc4d9130f51cdd8a7eda3d012171}{
\index{RIM.h@{RIM.h}!RIM\_\-dataMasks@{RIM\_\-dataMasks}}
\index{RIM\_\-dataMasks@{RIM\_\-dataMasks}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-dataMasks}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-dataMasks ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int $\ast$ {\em dMask}, \/  unsigned int $\ast$ {\em eMask})}}
\label{RIM_8h_3566fc4d9130f51cdd8a7eda3d012171}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the in-memory model data\item[{\em dMask}]The address of an integer to receive the bitmask of types with default data present.\item[{\em eMask}]The address of an integer to receive the bitmask of types with exception data present. \end{description}
\end{Desc}
\hypertarget{RIM_8h_588f9722fd7e300aa8a145e99fd2627f}{
\index{RIM.h@{RIM.h}!RIM\_\-export@{RIM\_\-export}}
\index{RIM\_\-export@{RIM\_\-export}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-export}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-export ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int {\em typMask}, \/  {\bf RIM\_\-expRecdCB} {\em recdRtn}, \/  {\bf RIM\_\-expDataCB} {\em dataRtn}, \/  void $\ast$ {\em parm})}}
\label{RIM_8h_588f9722fd7e300aa8a145e99fd2627f}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure to use as a source\item[{\em 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.\item[{\em recdRtn}]Routine to be called at the start of each record to be exported.\item[{\em dataRtn}]Routine to be called for each block of data to be exported.\item[{\em parm}]Parameter to pass to the callback routines.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \end{description}
\end{Desc}


References checkBit(), exportData(), RIM\_\-countMap(), RIM\_\-cptDesc(), RIM\_\-number(), RIM\_\-RT\_\-DFT, RIM\_\-RT\_\-EXCP, RIM\_\-RT\_\-MAP, sizeofCpt(), and sizeofMap().\hypertarget{RIM_8h_1cf019303d4a5796719127d050fa7a61}{
\index{RIM.h@{RIM.h}!RIM\_\-exportMap@{RIM\_\-exportMap}}
\index{RIM\_\-exportMap@{RIM\_\-exportMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-exportMap}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-exportMap ({\bf RIM\_\-map} $\ast$ {\em map}, \/  {\bf RIM\_\-expRecdCB} {\em recdRtn}, \/  {\bf RIM\_\-expDataCB} {\em dataRtn}, \/  void $\ast$ {\em parm})}}
\label{RIM_8h_1cf019303d4a5796719127d050fa7a61}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]RIM map structure to use as a source\item[{\em recdRtn}]Routine to be called at the start of each record to be exported.\item[{\em dataRtn}]Routine to be called for each block of data to be exported.\item[{\em parm}]Parameter to pass to the callback routines.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \end{description}
\end{Desc}


References exportData(), RIM\_\-RT\_\-MAP, and sizeofMap().\hypertarget{RIM_8h_d6acae40a94386291643f2fa42fd745c}{
\index{RIM.h@{RIM.h}!RIM\_\-get@{RIM\_\-get}}
\index{RIM\_\-get@{RIM\_\-get}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-get}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-get (const {\bf RIM} $\ast$ {\em rim}, \/  {\bf RIM\_\-type} {\em type}, \/  const {\bf RIM\_\-addr} $\ast$ {\em addr}, \/  int {\em regId}, \/  void $\ast$ {\em value})}}
\label{RIM_8h_d6acae40a94386291643f2fa42fd745c}


Put the contents of the requested register and field into {\em value\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]In memory configuration structure to be interogated\item[{\em type}]Type of data sought\item[{\em addr}]Address of the leaf requested\item[{\em regId}]Register to get, as LAT hardware ID\item[{\em value}]Location to put the contents of the target field\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all the parameters are in bounds and the data is successfully retrieved. \item[{\em RIM\_\-TYPEUNKN}]if type is not a valid RIM\_\-type \item[{\em RIM\_\-CPTNONE}]if the requested type has no real data \item[{\em RIM\_\-ADDRBCST}]if the address contains a mixture of broadcast and unicast components \item[{\em RIM\_\-ADDRRNGE}]if any component of the address is outside the allowable range for this type \item[{\em RIM\_\-BADREGID}]if regId is outside the acceptable range of register IDs for this type \item[{\em RIM\_\-NOTSET}]if the requested node has not been previously set \item[{\em RIM\_\-BADREGID}]The register ID was unrecognized \end{description}
\end{Desc}


References CHECK\_\-TYPE, checkBit(), RIM\_\-getIndex(), RIM\_\-getReg(), RIM\_\-number(), and RIM\_\-regEnum().\hypertarget{RIM_8h_1f8ff9fd2bca009fc966a0125cd1a543}{
\index{RIM.h@{RIM.h}!RIM\_\-getAddress@{RIM\_\-getAddress}}
\index{RIM\_\-getAddress@{RIM\_\-getAddress}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-getAddress}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-getAddress ({\bf RIM\_\-addr} $\ast$ {\em addr}, \/  unsigned int {\em index}, \/  {\bf RIM\_\-type} {\em type})}}
\label{RIM_8h_1f8ff9fd2bca009fc966a0125cd1a543}


Convert flat addressing to hierarchical bit 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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]Address corresponding to index\item[{\em index}]Index to convert\item[{\em type}]Type of address to convert\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]Success \item[{\em RIM\_\-TYPEUNKN}]The component type is unknown \item[{\em RIM\_\-ADDRRNGE}]The index is outside the allowable range for this type \end{description}
\end{Desc}


References \_\-RIM\_\-addr::cpt.

Referenced by RIM\_\-checkSplit(), and RIM\_\-contrast().\hypertarget{RIM_8h_e59252ce9ce9544ed65d57f03f56151e}{
\index{RIM.h@{RIM.h}!RIM\_\-getAddrRng@{RIM\_\-getAddrRng}}
\index{RIM\_\-getAddrRng@{RIM\_\-getAddrRng}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-getAddrRng}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-getAddrRng (const char $\ast$ {\em string}, \/  {\bf RIM\_\-addr} $\ast$ {\em addr})}}
\label{RIM_8h_e59252ce9ce9544ed65d57f03f56151e}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]Identifies the address range required\item[{\em addr}]Pointer to address stucture to populate with the address range\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]If the string is a good type name. \item[{\em RIM\_\-TYPESTR}]If the string does not match a known type \end{description}
\end{Desc}


References \_\-RIM\_\-addr::cpt, and RIM\_\-lookupType().\hypertarget{RIM_8h_5cabac0a9a770f1f6025da5ea1083a6f}{
\index{RIM.h@{RIM.h}!RIM\_\-getIndex@{RIM\_\-getIndex}}
\index{RIM\_\-getIndex@{RIM\_\-getIndex}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-getIndex}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-getIndex (const {\bf RIM\_\-addr} $\ast$ {\em addr}, \/  unsigned int $\ast$ {\em index}, \/  {\bf RIM\_\-type} {\em type})}}
\label{RIM_8h_5cabac0a9a770f1f6025da5ea1083a6f}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em addr}]Address to convert\item[{\em index}]Index corresponding to address\item[{\em type}]Type of address to convert\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]Success \item[{\em RIM\_\-TYPEUNKN}]The component type is unknown \item[{\em RIM\_\-ADDRBCST}]The address contains a mixture of broadcast and unicast components \item[{\em RIM\_\-ADDRRNGE}]A component of the address is outside the allowable range for this type \end{description}
\end{Desc}


References \_\-RIM\_\-addr::cpt.

Referenced by mapIndex(), RIM\_\-deleteData(), RIM\_\-get(), and RIM\_\-set().\hypertarget{RIM_8h_589af03832ad1e942b81bf9f3b55431f}{
\index{RIM.h@{RIM.h}!RIM\_\-getLayerID@{RIM\_\-getLayerID}}
\index{RIM\_\-getLayerID@{RIM\_\-getLayerID}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-getLayerID}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-getLayerID (const char $\ast$ {\em name}, \/  unsigned int $\ast$ {\em layer})}}
\label{RIM_8h_589af03832ad1e942b81bf9f3b55431f}


Convert a layer name to a layer ID. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]The address of the three-byte layer name.\item[{\em layer}]Location to store the layer ID\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]If the layer ID was successfully found \item[{\em RIM\_\-ADDRLSIG}]If the layer sign is nonsensical \item[{\em RIM\_\-ADDRLXY}]If the layer xy value is nonsensical \item[{\em RIM\_\-ADDRLIND}]If the layer index is nonsensical \end{description}
\end{Desc}
\hypertarget{RIM_8h_3f075ec5553f4004f74fe0d3fac1fb08}{
\index{RIM.h@{RIM.h}!RIM\_\-getLayerName@{RIM\_\-getLayerName}}
\index{RIM\_\-getLayerName@{RIM\_\-getLayerName}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-getLayerName}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-getLayerName (unsigned int {\em layer}, \/  char $\ast$ {\em name})}}
\label{RIM_8h_3f075ec5553f4004f74fe0d3fac1fb08}


Form the layer name from the layer ID. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em layer}]ID of the layer to name\item[{\em name}]The address of a 4-byte array to hold the layer name (3 bytes) plus the trailing null.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]If the layer is located \item[{\em RIM\_\-ADDRLAYR}]If the layer is out of range \end{description}
\end{Desc}


References N\_\-LAYER.\hypertarget{RIM_8h_5092ae512f130bf2fc787c6fb3a47926}{
\index{RIM.h@{RIM.h}!RIM\_\-import@{RIM\_\-import}}
\index{RIM\_\-import@{RIM\_\-import}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-import}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-import ({\bf RIM} $\ast$ {\em rim}, \/  int {\em optns}, \/  unsigned short $\ast$ {\em versn}, \/  {\bf RIM\_\-impRecdCB} {\em recdRtn}, \/  {\bf RIM\_\-impDataCB} {\em dataRtn}, \/  void $\ast$ {\em parm})}}
\label{RIM_8h_5092ae512f130bf2fc787c6fb3a47926}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure to use as a repository.\item[{\em optns}]An options word, consisting of the logical OR of the following possible values:\begin{itemize}
\item RIM\_\-OPT\_\-SWAP Swap the bytes of the imported data from big-endian to machine order.\item RIM\_\-OPT\_\-CURR Allow only the current version of the data.\end{itemize}
\item[{\em versn}]The address of a two-element array containing the major and minor version numbers of the data being imported.\item[{\em recdRtn}]Routine to be called at the start of each record to be imported.\item[{\em dataRtn}]Routine to be called for each block of data to be imported.\item[{\em parm}]Parameter to pass to the callback routines.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]Success \item[{\em RIM\_\-BADVERSN}]The supplied version number is invalid \item[{\em RIM\_\-RTYPUNKN}]Received a record with invalid record type \item[{\em RIM\_\-TYPEUNKN}]Received a record with invalid RIM type \end{description}
\end{Desc}


References checkBit(), importData(), RIM\_\-cptDesc(), RIM\_\-number(), RIM\_\-OPT\_\-CURR, RIM\_\-OPT\_\-SWAP, RIM\_\-RT\_\-DFT, RIM\_\-RT\_\-EXCP, RIM\_\-RT\_\-MAP, RIM\_\-RT\_\-MASK, sizeofCpt(), and sizeofMap().\hypertarget{RIM_8h_6d56c1b9095af830b9b93f2c16822b2c}{
\index{RIM.h@{RIM.h}!RIM\_\-importMap@{RIM\_\-importMap}}
\index{RIM\_\-importMap@{RIM\_\-importMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-importMap}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-importMap ({\bf RIM\_\-map} $\ast$ {\em map}, \/  int {\em optns}, \/  unsigned short $\ast$ {\em versn}, \/  {\bf RIM\_\-impRecdCB} {\em recdRtn}, \/  {\bf RIM\_\-impDataCB} {\em dataRtn}, \/  void $\ast$ {\em parm})}}
\label{RIM_8h_6d56c1b9095af830b9b93f2c16822b2c}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]RIM map structure to use as a source\item[{\em optns}]An options word, consisting of the logical OR of the following possible values:\begin{itemize}
\item RIM\_\-OPT\_\-SWAP Swap the bytes of the imported data from big-endian to machine order.\item RIM\_\-OPT\_\-CURR Allow only the current version of the data.\end{itemize}
\item[{\em versn}]The address of a two-element array containing the major and minor version numbers of the data being imported.\item[{\em recdRtn}]Routine to be called at the start of each record to be exported.\item[{\em dataRtn}]Routine to be called for each block of data to be exported.\item[{\em parm}]Parameter to pass to the callback routines.\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]Success \item[{\em RIM\_\-BADVERSN}]The supplied version number is invalid \item[{\em RIM\_\-RTYPUNKN}]Received a record with invalid record type \item[{\em RIM\_\-TYPEUNKN}]Received a record with invalid RIM type \end{description}
\end{Desc}


References importData(), RIM\_\-OPT\_\-CURR, RIM\_\-OPT\_\-SWAP, RIM\_\-RT\_\-MAP, RIM\_\-RT\_\-MASK, and sizeofMap().\hypertarget{RIM_8h_600604fb11a89d7120fdc383ef702f97}{
\index{RIM.h@{RIM.h}!RIM\_\-load@{RIM\_\-load}}
\index{RIM\_\-load@{RIM\_\-load}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-load}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-load ({\bf RIM} $\ast$ {\em rim}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_600604fb11a89d7120fdc383ef702f97}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the RIM structure to populate from the LAT\item[{\em param}]Pointer passed through to the {\em loadRegFn\/} \item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References LoadParm::loadFn, LoadParm::param, RIM\_\-cptDesc(), and RIM\_\-loadSplit().\hypertarget{RIM_8h_83237b7ff2ac863b53ae0e1d01d47e91}{
\index{RIM.h@{RIM.h}!RIM\_\-loadAfeConfig@{RIM\_\-loadAfeConfig}}
\index{RIM\_\-loadAfeConfig@{RIM\_\-loadAfeConfig}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-loadAfeConfig}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-loadAfeConfig ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int {\em mask}, \/  unsigned int {\em value0}, \/  unsigned int {\em value1}, \/  unsigned int {\em rcMask}, \/  unsigned int {\em feMask}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_83237b7ff2ac863b53ae0e1d01d47e91}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LATC registers\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value0}]The value to be masked and merged with the configuration value for front-ends not selected by the RC and FE masks.\item[{\em value1}]The value to be masked and merged with the configuration value for front-ends selected by the RC and FE masks.\item[{\em rcMask}]Mask of bits, one per RC, specifying which RCs are selected.\item[{\em feMask}]Mask of bits, one per FE, specifying which FEs within selected RCs are selected.\item[{\em param}]Parameter to be passed to the load routine.\item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References \_\-RIM\_\-addr::acd, checkBit(), \_\-ACD\_\-addr::fe, \_\-ACD\_\-addr::rc, CptDescription::rd, RegDescription::regId, RIM\_\-addrRng(), RIM\_\-cptDesc(), and RIM\_\-getReg().\hypertarget{RIM_8h_e073368687d4d58b98e902fbcd79759b}{
\index{RIM.h@{RIM.h}!RIM\_\-loadCfeConfig0@{RIM\_\-loadCfeConfig0}}
\index{RIM\_\-loadCfeConfig0@{RIM\_\-loadCfeConfig0}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-loadCfeConfig0}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-loadCfeConfig0 ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int {\em mask}, \/  unsigned int {\em value}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_e073368687d4d58b98e902fbcd79759b}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LATC registers\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value}]The value to be masked and merged with the configuration value.\item[{\em param}]Parameter to be passed to the load routine.\item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References \_\-TEM\_\-addr::cc, checkBit(), \_\-TEM\_\-addr::fe, \_\-TEM\_\-addr::rc, CptDescription::rd, RegDescription::regId, RIM\_\-addrRng(), RIM\_\-cptDesc(), RIM\_\-getReg(), \_\-RIM\_\-addr::tem, and \_\-TEM\_\-addr::to.\hypertarget{RIM_8h_c996815f2892728bc8c3402bf7eeb6f8}{
\index{RIM.h@{RIM.h}!RIM\_\-loadCfeConfig1@{RIM\_\-loadCfeConfig1}}
\index{RIM\_\-loadCfeConfig1@{RIM\_\-loadCfeConfig1}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-loadCfeConfig1}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-loadCfeConfig1 ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int {\em mask}, \/  unsigned int {\em value0}, \/  unsigned int {\em value1}, \/  unsigned int {\em cMask}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_c996815f2892728bc8c3402bf7eeb6f8}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LATC registers\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value0}]The value to be masked and merged with the configuration value for front-ends whose bit is clear in the column mask.\item[{\em value1}]The value to be masked and merged with the configuration value for front-ends whose bit is set in the column mask.\item[{\em cMask}]Mask of bits, one per column, specifying which value is to be used for loading the config register.\item[{\em param}]Parameter to be passed to the load routine.\item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References \_\-TEM\_\-addr::cc, checkBit(), \_\-TEM\_\-addr::fe, \_\-TEM\_\-addr::rc, CptDescription::rd, RegDescription::regId, RIM\_\-addrRng(), RIM\_\-cptDesc(), RIM\_\-getReg(), \_\-RIM\_\-addr::tem, and \_\-TEM\_\-addr::to.\hypertarget{RIM_8h_92cae81f707248fca5a8a187b7158a87}{
\index{RIM.h@{RIM.h}!RIM\_\-loadSplit@{RIM\_\-loadSplit}}
\index{RIM\_\-loadSplit@{RIM\_\-loadSplit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-loadSplit}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-loadSplit ({\bf RIM} $\ast$ {\em rim}, \/  int {\em nLow}, \/  int {\em nHigh}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_92cae81f707248fca5a8a187b7158a87}


Load TKR split values. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]RIM structure containing the values to load onto the LAT\item[{\em nLow}]Number of TFEs to talk on the low side, or -1 if the configured values are to be used.\item[{\em nHigh}]Number of TFEs to talk on the high side, or -1 if the configured values are to be used.\item[{\em param}]Parameter to be passed to the load function.\item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References checkBit(), \_\-Layer\_\-addr::la, \_\-RIM\_\-addr::lyr, RIM\_\-addrRng(), RIM\_\-getReg(), and \_\-Layer\_\-addr::to.

Referenced by RIM\_\-load().\hypertarget{RIM_8h_d74a95cbf44ec12348575f1f4afb0091}{
\index{RIM.h@{RIM.h}!RIM\_\-loadTfeDac@{RIM\_\-loadTfeDac}}
\index{RIM\_\-loadTfeDac@{RIM\_\-loadTfeDac}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-loadTfeDac}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-loadTfeDac ({\bf RIM} $\ast$ {\em rim}, \/  unsigned int {\em mask}, \/  unsigned int {\em value}, \/  int {\em nLow}, \/  int {\em nHigh}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-loadFn} $\ast$$\ast$ {\em loadFn})}}
\label{RIM_8h_d74a95cbf44ec12348575f1f4afb0091}


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.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the cached in-memory model of the LATC registers\item[{\em mask}]Mask of bits to be changed from the configuration.\item[{\em value}]The value to be masked and merged with the configuration value.\item[{\em nLow}]Number of TFEs talking on the low side, or -1 if the configured values are being used.\item[{\em nHigh}]Number of TFEs talking on the high side, or -1 if the configured values are being used.\item[{\em param}]Parameter to be passed to the load routine.\item[{\em loadFn}]Type ordered array of pointers to functions that load the LAT registers\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References checkBit(), \_\-Layer\_\-addr::fe, \_\-Layer\_\-addr::la, \_\-RIM\_\-addr::lyr, CptDescription::rd, RegDescription::regId, RIM\_\-addrRng(), RIM\_\-cptDesc(), RIM\_\-getReg(), RIM\_\-layerHigh(), RIM\_\-layerLow(), \_\-RIM\_\-addr::tem, and \_\-Layer\_\-addr::to.\hypertarget{RIM_8h_0c8ce01846b056ca5c06efcab115986b}{
\index{RIM.h@{RIM.h}!RIM\_\-lookupType@{RIM\_\-lookupType}}
\index{RIM\_\-lookupType@{RIM\_\-lookupType}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-lookupType}]{\setlength{\rightskip}{0pt plus 5cm}{\bf RIM\_\-type} RIM\_\-lookupType (const char $\ast$ {\em string})}}
\label{RIM_8h_0c8ce01846b056ca5c06efcab115986b}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string}]String corresponding to one of the component types used in the LAT register description\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]integer corresponding to the type identified by {\em string\/} or RIM\_\-BAD\_\-TYPE if the string does not match any on the list \end{Desc}


Referenced by RIM\_\-getAddrRng().\hypertarget{RIM_8h_94e278b66927d9df7f7ffabf9dd21a08}{
\index{RIM.h@{RIM.h}!RIM\_\-nameType@{RIM\_\-nameType}}
\index{RIM\_\-nameType@{RIM\_\-nameType}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-nameType}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-nameType (char $\ast$ {\em string}, \/  {\bf RIM\_\-type} {\em type})}}
\label{RIM_8h_94e278b66927d9df7f7ffabf9dd21a08}


Place the four-character string describing this type into {\em name\/}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type}]Type to be named\item[{\em string}]Location to place name\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]If the type is known to RIM \item[{\em RIM\_\-TYPEUNKN}]If the type is unknown \end{description}
\end{Desc}
\hypertarget{RIM_8h_b969895deba3cd20677c8e8ae2563c8f}{
\index{RIM.h@{RIM.h}!RIM\_\-nTypes@{RIM\_\-nTypes}}
\index{RIM\_\-nTypes@{RIM\_\-nTypes}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-nTypes}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-nTypes (void)}}
\label{RIM_8h_b969895deba3cd20677c8e8ae2563c8f}


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

\begin{Desc}
\item[Returns:]Number of component types \end{Desc}
\hypertarget{RIM_8h_6033c521b3a275b9eba46857362d6223}{
\index{RIM.h@{RIM.h}!RIM\_\-read@{RIM\_\-read}}
\index{RIM\_\-read@{RIM\_\-read}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-read}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-read ({\bf RIM} $\ast$ {\em rim}, \/  void $\ast$ {\em param}, \/  {\bf RIM\_\-readFn} $\ast$$\ast$ {\em readFn}, \/  {\bf RIM\_\-decodeFn} $\ast$$\ast$ {\em decodeFn})}}
\label{RIM_8h_6033c521b3a275b9eba46857362d6223}


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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]Pointer to the RIM structure to populate from the LAT\item[{\em param}]Pointer passed through to the {\em readRegFn\/} \item[{\em readFn}]Type ordered array of pointers to functions that read the LAT registers\item[{\em decodeFn}]Type ordered array of pointers to functions that decode the register responses\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all goes well \item[{\em LEM\_\-$\ast$}]if there is an error arising from one of the register load commands \end{description}
\end{Desc}


References ReadParm::decodeFn, ReadParm::param, ReadParm::readFn, RIM\_\-cptDesc(), and RIM\_\-number().\hypertarget{RIM_8h_4ab0735e2b1e628c4f9de7ba09bd7ed2}{
\index{RIM.h@{RIM.h}!RIM\_\-set@{RIM\_\-set}}
\index{RIM\_\-set@{RIM\_\-set}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-set}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-set ({\bf RIM} $\ast$ {\em rim}, \/  {\bf RIM\_\-type} {\em type}, \/  const {\bf RIM\_\-addr} $\ast$ {\em addr}, \/  int {\em regId}, \/  const void $\ast$ {\em value})}}
\label{RIM_8h_4ab0735e2b1e628c4f9de7ba09bd7ed2}


Set the value of a register. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em rim}]In memory configuration structure to manipulated\item[{\em type}]Type of data sought\item[{\em addr}]Address of the leaf requested\item[{\em regId}]Register to set, as a LAT hardware ID\item[{\em value}]Ptr to value to set the register field to\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if all the parameters are in bounds and the data is successfully retrieved. \item[{\em RIM\_\-TYPEUNKN}]if type is not a valid RIM\_\-type \item[{\em RIM\_\-CPTNONE}]if the requested type has no real data \item[{\em RIM\_\-ADDRBCST}]if the address contains a mixture of broadcast and unicast components \item[{\em RIM\_\-ADDRRNGE}]if any component of the address is outside the allowable range for this type \item[{\em RIM\_\-BADREGID}]if regId is outside the acceptable range of register IDs for this type \end{description}
\end{Desc}


References CHECK\_\-TYPE, RIM\_\-getIndex(), RIM\_\-number(), RIM\_\-regEnum(), RIM\_\-setReg(), and setBit().\hypertarget{RIM_8h_fa9b5493971570b4bcc9887eef485741}{
\index{RIM.h@{RIM.h}!RIM\_\-setBit@{RIM\_\-setBit}}
\index{RIM\_\-setBit@{RIM\_\-setBit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-setBit}]{\setlength{\rightskip}{0pt plus 5cm}unsigned RIM\_\-setBit ({\bf RIM\_\-map} $\ast$ {\em map}, \/  {\bf RIM\_\-type} {\em type}, \/  const {\bf RIM\_\-addr} $\ast$ {\em addr})}}
\label{RIM_8h_fa9b5493971570b4bcc9887eef485741}


Set a bit in the map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]Structure being manipulated\item[{\em type}]Identifies map to manipulate\item[{\em addr}]bit to set\end{description}
\end{Desc}
\begin{Desc}
\item[Return values:]
\begin{description}
\item[{\em RIM\_\-SUCCESS}]if everything goes well \item[{\em RIM\_\-TYPEUNKN}]if the type does not exist \item[{\em RIM\_\-MAPNONE}]if there is no sub-map corresponding to this type \item[{\em RIM\_\-ADDRBCST}]if the address contains a mixture of broadcast and unicast addresses \item[{\em RIM\_\-ADDRRNGE}]if any component of the address is out of range \item[{\em RIM\_\-ADDRINDX}]if the final index exceeds the total number of bits in the map \end{description}
\end{Desc}


References mapIndex(), and setBit().\hypertarget{RIM_8h_35d3c6605acb4d7e9b04b9c9c5d4acb2}{
\index{RIM.h@{RIM.h}!RIM\_\-setSplit@{RIM\_\-setSplit}}
\index{RIM\_\-setSplit@{RIM\_\-setSplit}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-setSplit}]{\setlength{\rightskip}{0pt plus 5cm}void RIM\_\-setSplit (short $\ast$ {\em ptr}, \/  unsigned long long {\em value}, \/  unsigned int {\em uid})}}
\label{RIM_8h_35d3c6605acb4d7e9b04b9c9c5d4acb2}


Decode the result item used to populate a split. 

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

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em ptr}]Pointer to split registers instance\item[{\em value}]Value read from the TRC register\item[{\em uid}]The unique ID of the SPT register \end{description}
\end{Desc}


References RIM\_\-addrRng(), and UID\_\-SPT\_\-HIGH.\hypertarget{RIM_8h_7bbd90199cbe1d4ba7970a44cb5210d1}{
\index{RIM.h@{RIM.h}!RIM\_\-sizeof@{RIM\_\-sizeof}}
\index{RIM\_\-sizeof@{RIM\_\-sizeof}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-sizeof}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t RIM\_\-sizeof (void)}}
\label{RIM_8h_7bbd90199cbe1d4ba7970a44cb5210d1}


Calculate the footprint of the RIM structure. 

\begin{Desc}
\item[Returns:]Amount of memory required to hold the RIM structure \end{Desc}


References RIM\_\-sizeofMap(), roundUp(), and sizeofStore().\hypertarget{RIM_8h_55dc1a1fdd8c0520d00fe7bc9804ef0d}{
\index{RIM.h@{RIM.h}!RIM\_\-sizeofMap@{RIM\_\-sizeofMap}}
\index{RIM\_\-sizeofMap@{RIM\_\-sizeofMap}!RIM.h@{RIM.h}}
\subsubsection[{RIM\_\-sizeofMap}]{\setlength{\rightskip}{0pt plus 5cm}size\_\-t RIM\_\-sizeofMap (void)}}
\label{RIM_8h_55dc1a1fdd8c0520d00fe7bc9804ef0d}


Calculate the total size of a RIM\_\-map object. 

\begin{Desc}
\item[Returns:]Amount of memory required to accomodate a RIM\_\-map object \end{Desc}


References sizeofMap().

Referenced by RIM\_\-sizeof().