GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCBT / V1-6-2 > lcbt / rad750
#include <LCBT/LCBT.h>
#include <LCBT/TDATA.h>
#include <PBS/PARITY.h>
#include <PBS/MBA.h>
#include <PBS/L.h>
#include <PBS/QI.h>
#include <LCBT_printf.h>
#include <string.h>
Functions | |
void | LCBT_lamCruLoop (int num) |
loop on LAM write and CRU reg0 read, used for debugging HW | |
unsigned int | LCBT_hwAvail () |
get mask of hw determined by LCBT_determineHw() for use in LCBT_cmdExternalTest() | |
unsigned int | LCBT_setCfg (int haveGasu, int haveTem) |
get mask determined by LCBT_determineHw() for use in LCBT_cmdExternalTest() | |
unsigned int | LCBT_determineHw () |
get mask determined by LCBT_determineHw() for use in LCBT_determineHw () | |
unsigned int | LCBT_lam (int latpAddr) |
Send out LAM (lookAtMe) to specified addr. | |
unsigned int | LCBT_remoteLatpCsr (int latpAddr, unsigned int val, unsigned int mask, int broadcast) |
send value to LatpCsr on another CPU over CmdResponse | |
unsigned int | LCBT_setRemoteBoardId (int latpAddr) |
set board ID to latpAddr on CPU determined by CRU | |
unsigned int | LCBT_initGasu () |
setup registers in GASU | |
int | LCBT_cmdExternalTest (int num, int singleAccess, TDATA_DTEST testType, unsigned int testParm) |
read test on LCB local registers that require Cmd list DMA | |
unsigned int | LCBT_readReg (int latpAddr, int block, int reg, unsigned int *value) |
read a single register over the cmdResponse fabric | |
unsigned int | LCBT_writeReg (int latpAddr, int block, int reg, unsigned int value, int broadcast) |
write to single register over the cmdResponse fabric | |
void | LCBT_dumpEbm () |
dump all registers for EBM | |
void | LCBT_dumpCru () |
dump all registers for CRU | |
void | LCBT_dumpTem (int latpAddr) |
dump some registers for TEM | |
void | LCBT_setSiu (int idx) |
Set boardID in Csr to SIU addr. | |
void | LCBT_setEpu (int idx) |
Set boardID in Csr to EPU addr. |
int LCBT_cmdExternalTest | ( | int | num, | |
int | singleAccess, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
read test on LCB local registers that require Cmd list DMA
num | Number of accesses to do in the test | |
singleAccess | 1=single acess per DMA, all reg are access within single DMA | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_GASU_AVAIL, LCBT_hwAvail(), LCBT_MASK_VALID, LCBT_OPTION_VERBOSE, LCBT_printErrorDeltas(), LCBT_readReg(), LCBT_saveErrorForDeltas(), LCBT_writeReg(), and PRINTF.
unsigned int LCBT_determineHw | ( | ) |
get mask determined by LCBT_determineHw() for use in LCBT_determineHw ()
determine which HW is connected to the LCBThis routine is used to determine what HW is connected to the LCB so that the LCBT_cmdExternalTest() can be run. The most likly configurations are: LCB to TEM (teststand) LCB to GASU (i.e. EBM) LCB to GASU to TEM (i.e. EBM and TEM) It determines HW by trying to read registers in that HW. If HW config is known and user wishes to receive errors if HW is not operating, use the LCBT_setCfg() call to setup. Configuration is essentially only for LCBT_testAll() as it choose the tests to run. If tests withint LCBT_testAll() are called directly they will not consider the configuration setting.
References LCBT_hwAvail(), LCBT_lam(), LCBT_readReg(), LCBT_setCfg(), and PRINTF.
Referenced by LCBT_initGasu().
void LCBT_dumpCru | ( | ) |
dump all registers for CRU
void LCBT_dumpEbm | ( | ) |
dump all registers for EBM
void LCBT_dumpTem | ( | int | latpAddr | ) |
dump some registers for TEM
latpAddr | latpAddr of TEM which is 0-0xf |
unsigned int LCBT_hwAvail | ( | ) |
get mask of hw determined by LCBT_determineHw() for use in LCBT_cmdExternalTest()
Referenced by LCBT_cmdExternalTest(), LCBT_determineHw(), LCBT_testAll(), and LCBT_testAllEpu().
unsigned int LCBT_initGasu | ( | ) |
setup registers in GASU
determine which HW is connected to the LCBThis routine is used as an alternative to PIG to init the GASU. DO NOT use if you are using PIG to setup the HW.
References EPRINTF, LCBT_determineHw(), LCBT_lam(), LCBT_readReg(), LCBT_writeReg(), and PRINTF.
unsigned int LCBT_lam | ( | int | latpAddr | ) |
Send out LAM (lookAtMe) to specified addr.
latpAddr | addr to send LAM to |
References LCBT_writeReg().
Referenced by LCBT_determineHw(), LCBT_initGasu(), and LCBT_lamCruLoop().
void LCBT_lamCruLoop | ( | int | num | ) |
loop on LAM write and CRU reg0 read, used for debugging HW
num | Number of accesses to do in the test, 0=forever |
References LCBT_lam(), LCBT_readReg(), and PRINTF.
unsigned int LCBT_readReg | ( | int | latpAddr, | |
int | block, | |||
int | reg, | |||
unsigned int * | value | |||
) |
read a single register over the cmdResponse fabric
latpAddr | LCB address to access, HW type is inferred from addr | |
block | Register block to access | |
reg | Register number to access | |
value | value to return, if 0 it will printf() value |
References LCBT_OPTION_RLCL_ADDR, and PRINTF.
Referenced by LCBT_cmdExternalTest(), LCBT_determineHw(), LCBT_initGasu(), LCBT_lamCruLoop(), and LCBT_setRemoteBoardId().
unsigned int LCBT_remoteLatpCsr | ( | int | latpAddr, | |
unsigned int | val, | |||
unsigned int | mask, | |||
int | broadcast | |||
) |
send value to LatpCsr on another CPU over CmdResponse
latpAddr | addr to send to, ignored if broadcast=0 | |
val | value to write to LatpCsr | |
mask | mask on register,if =0 will assume 0xfffffff (all bits) | |
broadcast | send out as broadcast (needed to set boardID) |
References LCBT_writeReg().
Referenced by LCBT_setRemoteBoardId().
unsigned int LCBT_setCfg | ( | int | haveGasu, | |
int | haveTem | |||
) |
get mask determined by LCBT_determineHw() for use in LCBT_cmdExternalTest()
haveGasu | 1=have GASU/EBM | |
haveTem | 1=have TEM either thru GASU or Transition Board |
References LCBT_GASU_AVAIL, and LCBT_MASK_VALID.
Referenced by LCBT_determineHw().
void LCBT_setEpu | ( | int | idx | ) |
Set boardID in Csr to EPU addr.
idx | which EPU,0=EPU0,1=EPU1,2=EPU3 |
References PRINTF.
unsigned int LCBT_setRemoteBoardId | ( | int | latpAddr | ) |
set board ID to latpAddr on CPU determined by CRU
latpAddr | addr to send to, ignored if broadcast=0 |
References EPRINTF, LCBT_readReg(), LCBT_remoteLatpCsr(), and LCBT_writeReg().
void LCBT_setSiu | ( | int | idx | ) |
Set boardID in Csr to SIU addr.
idx | which SIU,0=SIU0,1=SIU1,-1=SIUX |
References PRINTF.
unsigned int LCBT_writeReg | ( | int | latpAddr, | |
int | block, | |||
int | reg, | |||
unsigned int | value, | |||
int | broadcast | |||
) |
write to single register over the cmdResponse fabric
latpAddr | LCB address to access, HW type is inferred from addr | |
block | Register block to access | |
reg | Register number to access | |
value | value to write to register | |
broadcast | broadcast to all address |
References LCBT_OPTION_RLCL_ADDR, and PRINTF.
Referenced by LCBT_cmdExternalTest(), LCBT_initGasu(), LCBT_lam(), LCBT_remoteLatpCsr(), and LCBT_setRemoteBoardId().