GLAST / LAT > DAQ and FSW > FSW > Doxygen Index> LCBT / V1-6-2 > lcbt / rad750
#include <LCBT/LCBT_initBoard.h>
#include <LCBT/TDATA.h>
Defines | |
#define | LCBT_STALL (0) |
standard stall value for register access, possible use in testing | |
Typedefs | |
typedef enum _LCBT_OPTION | LCBT_OPTION |
Masks for test option mask. | |
typedef enum _LCBT_AVAIL | LCBT_AVAIL |
defines used with sHwAvail to determine what HW is connected for LCBT_cmdExternalTest() | |
Enumerations | |
enum | _LCBT_OPTION { LCBT_OPTION_BUSYPRINT = 1, LCBT_OPTION_VERBOSE = 2, LCBT_OPTION_FOREVER = 4, LCBT_OPTION_INCTESTPARM = 0x10, LCBT_OPTION_COMPARE_FOR_ECHO = 0x20, LCBT_OPTION_RLCL_ADDR = 0x40, LCBT_OPTION_NOWRITEOVER = 0x80, LCBT_OPTION_NO_EVT_DUMP = 0x100 } |
enum | _LCBT_AVAIL { LCBT_TEM_AVAIL = 1, LCBT_GASU_AVAIL = 2, LCBT_MASK_VALID = 0x8000 } |
Functions | |
int | LCBT_init (int latpAddr, int useRedundantPath, LCBD lcb) |
inits LCB driver (which starts 2 tasks associated with driver) | |
int | LCBT_isInit () |
indicates if LCBT_init has been run ok | |
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_eventInit (int forkPri) |
Setup module in this file to echo event data back to sender. | |
int | LCBT_testAll (int num, int nLoops, int latpAddr, int loopbackCable) |
overall test, does complete regression test of LCB | |
int | LCBT_testAllEpu (int num, int nLoops, int latpAddr, int loopbackCable) |
overall test for EPU, does complete regression test of LCB minus cmdResp test | |
void | LCBT_setOption (unsigned int optionMask) |
set test option mask, see LCBT.h for values | |
int | LCBT_localRegTest (int num, TDATA_DTEST testType, unsigned int testParm) |
Read/write/compare test on all PCI accessable registers on LCB board. | |
int | LCBT_cmdLocalTest (int num, TDATA_DTEST testType, unsigned int testParm) |
read-only test on LCB local registers that require Cmd list DMA | |
int | LCBT_cmdLocalTest2 (int num, TDATA_DTEST testType, unsigned int testParm) |
2 task read test on LCB local registers that require Cmd list DMA | |
int | LCBT_cmdLocalTest3 (int num, TDATA_DTEST testType, unsigned int testParm) |
3 task read test on LCB local registers that require Cmd list DMA | |
int | LCBT_cmdExternalTest (int num, int singleAccess, TDATA_DTEST testType, unsigned int testParm) |
read test on LCB local registers that require Cmd list DMA | |
int | LCBT_eventTest (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
Test to send/recv/compare event data thru loopback on LCB board. | |
int | LCBT_eventTest2 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
2 concurrent task test to send/recv/compare event data thru loopback on LCB board | |
int | LCBT_eventTest3 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
3 concurrent task test to send/recv/compare event data thru loopback on LCB board | |
int | LCBT_eventTest5 (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
5 concurrent task test to send/recv/compare event data thru loopback on LCB board | |
int | LCBT_comboTest (int num, int maxLen, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
2 concurrent tasks running event and localCmdReg test | |
int | LCBT_eventWatermarkTest (int num, int latpAddr) |
Check for proper operation of watermarks on Event and EventData queues. | |
int | LCBT_fillQueueTest (int numLoop, int disableResultInt) |
Fill requestQ with requests to make sure it handles it properly. | |
int | LCBT_eventFillTest (int num, int latpAddr, int buffSize32, int printInfo) |
Check for proper operation circular buffFUll interrupt. | |
unsigned int | LCBT_determineHw () |
get mask determined by LCBT_determineHw() for use in LCBT_determineHw () | |
unsigned int | LCBT_hwAvail () |
get mask of hw determined by LCBT_determineHw() for use in LCBT_cmdExternalTest() | |
unsigned int | LCBT_initGasu () |
setup registers in GASU | |
unsigned int | LCBT_setCfg (int haveGasu, int haveTem) |
get mask determined by LCBT_determineHw() for use in LCBT_cmdExternalTest() | |
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 | |
int | LCBT_clearErrorTotals () |
clear the global error counts | |
int | LCBT_printErrorTotals (char *title) |
print the global error counts | |
int | LCBT_updateErrorTotals (int access, int rErr, int wErr, int cErr) |
update the global error counts | |
int | LCBT_saveErrorForDeltas () |
stash global error counts to use with LCBT_printErrorDeltas() | |
int | LCBT_printErrorDeltas (char *title) |
print the delta error counts since LCBT_saveErrorForDeltas() | |
int | LCBT_getErrorTotals (int *numAccess, int *rErr, int *wErr, int *cErr) |
get the global error counts | |
int | LCBT_eventRecv (int numRecv, int ccsds) |
Setup to receive and compare data from LCBT_eventSend(). | |
int | LCBT_eventSend (int numEvents, int maxEvtSize, int latpAddr, int randomLen, int ccsds, TDATA_DTEST testType, unsigned int testParm) |
Send out test event data to be received by LCBT_eventRecv(). | |
int | LCBT_eventSendDelay (int delayNanosec) |
Set delay in nanoSec between event sends, can be 0. | |
void | LCBT_regs () |
print vals of all registers in LCB | |
unsigned int | LCBT_readCsr () |
Read CSR register. | |
unsigned int | LCBT_readIrq () |
Read IRQ register which has interrupt status. | |
unsigned int | LCBT_readEventBase () |
Read Event Base register which is start of Event circular buffer. | |
unsigned int | LCBT_readEventFree () |
Read Event Free register which is offset in Event circular buffer HW will write to. | |
unsigned int | LCBT_readEventQ () |
Read eventQueue NOTE this will pull value from queue and effect operation. | |
unsigned int | LCBT_readResultQ () |
Read resultQueue NOTE this will pull value from queue and effect operation. | |
unsigned int | LCBT_readRequestQ () |
Read requestQueue, 0=notEMpty, not0=empty NOTE this will pull value from queue and effect operation. | |
unsigned int | LCBT_readLatpCsr () |
read LATp CSR register (requires a DMA) | |
unsigned int | LCBT_readFifoFault () |
read Fifo Fault registers (requires a DMA) | |
unsigned int | LCBT_readFabricSelect () |
Read FabricSelect register which indicates primary or redundant. | |
unsigned int | LCBT_readStats () |
read stats register (requires a DMA) | |
void | LCBT_readHwInfo () |
Read hwInfo register. | |
unsigned int | LCBT_writeCsr (unsigned int data) |
Write given value to register. | |
unsigned int | LCBT_writeIrq (unsigned int data) |
Write given value to register. | |
unsigned int | LCBT_writeEventBase (unsigned int data) |
Write given value to register. | |
unsigned int | LCBT_writeEventFree (unsigned int data) |
Write given value to register. | |
unsigned int | LCBT_writeFabricSelect (unsigned int data) |
Write given value to register. | |
unsigned int | LCBT_writeLatpCsr (unsigned int data, unsigned int mask) |
write LATp CSR register (requires a DMA) | |
unsigned int | LCBT_writeFifoFault (unsigned int data, unsigned int mask) |
write Fifo Fault register (requires a DMA) | |
unsigned int | LCBT_writeStats (unsigned int data, unsigned int mask) |
write Stats register (requires a DMA) | |
void | LCBT_latReset (unsigned int stall) |
sends LAT reset (requires a DMA) | |
unsigned int | LCBT_setWatermark (unsigned int val) |
Write the watermark field in the CSR. | |
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_stats (int mask) |
print stats for LCB driver | |
void | LCBT_clearStats () |
clear stats for LCB driver | |
void | LCBT_resetTest (int numReqPer) |
special test for reset fix on FpgaLat=0x5d | |
void | LCBT_printAllocBuffs (int numErrLines, int numPrntLines, int wrap) |
allocates buffers for PRINTF and EPRINTF | |
void | LCBT_printReleaseBuffs () |
releases buffers for PRINTF and EPRINTF | |
void | LCBT_printClearBuffs () |
clear buffers for PRINTF and EPRINTF, i.e. no text | |
void | LCBT_printGetErrBuff (char *errBuff, int maxLen) |
fills buffers for EPRINTF | |
void | LCBT_printGetPrntBuff (char *prntBuff, int maxLen) |
fills buffers for PRINTF | |
void | LCBT_printShellDisable (int disable) |
set disable flag to stop PRINTF and EPRINTF to VxSHell |
These are the main subroutines for running LCB regression tests. They are intended to be run on VxWorks through the WindSh or across the network via LTX. The subroutines are structured to be used thru the WindSh rather than be called by other progs. They assume a single LCB board. CVS $Id: LCBT.h,v 1.34 2011/03/25 19:31:37 apw Exp $
enum _LCBT_AVAIL |
enum _LCBT_OPTION |
LCBT_clearErrorTotals | ( | ) |
clear the global error counts
void LCBT_clearStats | ( | ) |
clear stats for LCB driver
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.
int LCBT_cmdLocalTest | ( | int | num, | |
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
read-only test on LCB local registers that require Cmd list DMA
num | Number of accesses to do in the test | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_printErrorDeltas(), and LCBT_saveErrorForDeltas().
Referenced by LCBT_comboTest().
int LCBT_cmdLocalTest2 | ( | int | num, | |
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
2 task read test on LCB local registers that require Cmd list DMA
num | Number of accesses to do in the test | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_printErrorDeltas(), and LCBT_saveErrorForDeltas().
int LCBT_cmdLocalTest3 | ( | int | num, | |
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
3 task read test on LCB local registers that require Cmd list DMA
num | Number of accesses to do in the test | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_printErrorDeltas(), and LCBT_saveErrorForDeltas().
int LCBT_comboTest | ( | int | num, | |
int | maxLen, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
2 concurrent tasks running event and localCmdReg test
num | number of events to send | |
maxLen | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_cmdLocalTest(), LCBT_eventRecv(), LCBT_eventSend(), and TDATA_testStr().
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().
int LCBT_eventFillTest | ( | int | num, | |
int | latpAddr, | |||
int | buffSize32, | |||
int | printInfo | |||
) |
Check for proper operation circular buffFUll interrupt.
num | Number of times to do the test | |
latpAddr | - LATp address of board to send to, 0=self | |
printInfo | print irq and other info while processing | |
buffSize32 | buffSize to send, must be multiple of 32 to match EBM, min is 128 |
References EPRINTF, LCBT_eventRecv(), LCBT_eventSend(), and PRINTF.
int LCBT_eventInit | ( | int | echoForkPri | ) |
Setup module in this file to echo event data back to sender.
echoForkPri | priority of forked task to send event data back |
Referenced by LCBT_init().
int LCBT_eventRecv | ( | int | numRecv, | |
int | ccsds | |||
) |
Setup to receive and compare data from LCBT_eventSend().
numRecv | 0=sets up and return, 1=waits for numRecv events | |
ccsds | 1=expect CCSDS header on event data received |
Referenced by LCBT_comboTest(), LCBT_eventFillTest(), LCBT_eventTest(), LCBT_eventTest2(), LCBT_eventTest3(), LCBT_eventTest5(), and LCBT_eventWatermarkTest().
int LCBT_eventSend | ( | int | numEvents, | |
int | maxEvtSize, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
Send out test event data to be received by LCBT_eventRecv().
numEvents | number of events to send | |
maxEvtSize | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References EPRINTF, LCBT_OPTION_BUSYPRINT, LCBT_OPTION_FOREVER, LCBT_OPTION_INCTESTPARM, LCBT_OPTION_RLCL_ADDR, LCBT_OPTION_VERBOSE, PRINTF, RND_lc0_gen(), RND_lc0_init(), TDATA_create(), and TDATA_testStr().
Referenced by LCBT_comboTest(), LCBT_eventFillTest(), LCBT_eventTest(), LCBT_eventTest2(), LCBT_eventTest3(), and LCBT_eventTest5().
int LCBT_eventSendDelay | ( | int | delayNanosec | ) |
Set delay in nanoSec between event sends, can be 0.
delayNanosec | delay in nanoSec |
int LCBT_eventTest | ( | int | num, | |
int | maxLen, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
Test to send/recv/compare event data thru loopback on LCB board.
num | number of events to send | |
maxLen | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_eventRecv(), LCBT_eventSend(), and TDATA_testStr().
int LCBT_eventTest2 | ( | int | num, | |
int | maxLen, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
2 concurrent task test to send/recv/compare event data thru loopback on LCB board
num | number of events to send | |
maxLen | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_eventRecv(), LCBT_eventSend(), and TDATA_testStr().
int LCBT_eventTest3 | ( | int | num, | |
int | maxLen, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
3 concurrent task test to send/recv/compare event data thru loopback on LCB board
num | number of events to send | |
maxLen | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_eventRecv(), LCBT_eventSend(), and TDATA_testStr().
int LCBT_eventTest5 | ( | int | num, | |
int | maxLen, | |||
int | latpAddr, | |||
int | randomLen, | |||
int | ccsds, | |||
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
5 concurrent task test to send/recv/compare event data thru loopback on LCB board
num | number of events to send | |
maxLen | max event size in int32 (4 to 1020), 0 will set to maximum size for loopback which is 767 | |
latpAddr | - LATp address of board to send to, 0=self | |
randomLen | 1=packet range from 4 to maxEvtSize, 0=packets are maxEvtSize | |
ccsds | 1=put CCSDS header on data sent out as event | |
testType | Specifies the data sequence for test | |
testParm | Parm to use with testType |
References LCBT_eventRecv(), LCBT_eventSend(), and TDATA_testStr().
int LCBT_eventWatermarkTest | ( | int | num, | |
int | latpAddr | |||
) |
Check for proper operation of watermarks on Event and EventData queues.
num | Number of times to do the test | |
latpAddr | - LATp address of board to send to, 0=self |
References LCBT_eventRecv(), and PRINTF.
int LCBT_fillQueueTest | ( | int | numLoop, | |
int | disableResult | |||
) |
Fill requestQ with requests to make sure it handles it properly.
numLoop | Number of times to do in the test | |
disableResult | fill up all queues by disabling result queue |
References EPRINTF, LCBT_OPTION_VERBOSE, LCBT_STALL, and PRINTF.
LCBT_getErrorTotals | ( | int * | numAccess, | |
int * | rErr, | |||
int * | wErr, | |||
int * | cErr | |||
) |
get the global error counts
numAccess | if not NULL, return number of R/W/Compare ops | |
rErr | if not NULL, return number of read errors | |
wErr | if not NULL, return number of write errors | |
cErr | if not NULL, return number of compare errors |
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().
int LCBT_init | ( | int | latpAddr, | |
int | useRedundantPath, | |||
LCBD | lcb | |||
) |
inits LCB driver (which starts 2 tasks associated with driver)
latpAddr | LATp addr to assign to this board | |
useRedundantPath | 0=primary path, 1=redundant path | |
lcb | lcbd driver handle is driver if already init (use LCBD_get()), if 0 will load driver |
References LCBT_eventInit(), LCBT_initBoard(), and LCBT_printInit().
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.
int LCBT_isInit | ( | ) |
indicates if LCBT_init has been run ok
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_latReset | ( | unsigned int | stall | ) |
sends LAT reset (requires a DMA)
stall | stall after reset in 50 nSec tics |
References EPRINTF.
int LCBT_localRegTest | ( | int | num, | |
TDATA_DTEST | testType, | |||
unsigned int | testParm | |||
) |
Read/write/compare test on all PCI accessable registers on LCB board.
num | Number of events to do in the test | |
testType | Specified the data sequence used for test data | |
testParm | Parm to use with testType |
References EPRINTF, LCBT_OPTION_BUSYPRINT, LCBT_saveErrorForDeltas(), LCBT_updateErrorTotals(), PRINTF, TDATA_getNextSeqVal(), and TDATA_getRandCtxForSeqVal().
void LCBT_printAllocBuffs | ( | int | numErrLines, | |
int | numPrntLines, | |||
int | wrap | |||
) |
allocates buffers for PRINTF and EPRINTF
numErrLines | number of lines to be buffered | |
numPrntLines | number of lines to be buffered | |
wrap | 0=buffer fills and stops, 1=buffer wraps and deltes oldest |
References LCBT_printClearBuffs().
void LCBT_printClearBuffs | ( | ) |
clear buffers for PRINTF and EPRINTF, i.e. no text
Referenced by LCBT_printAllocBuffs().
LCBT_printErrorDeltas | ( | char * | title | ) |
print the delta error counts since LCBT_saveErrorForDeltas()
title | title to print before totals |
References PRINTF.
Referenced by LCBT_cmdExternalTest(), LCBT_cmdLocalTest(), LCBT_cmdLocalTest2(), and LCBT_cmdLocalTest3().
LCBT_printErrorTotals | ( | char * | title | ) |
print the global error counts
title | title to print before totals |
References PRINTF.
void LCBT_printGetErrBuff | ( | char * | errBuff, | |
int | maxLen | |||
) |
fills buffers for EPRINTF
errBuff | buffer to fill in | |
maxLen | length of buffer to fill in |
void LCBT_printGetPrntBuff | ( | char * | prntBuff, | |
int | maxLen | |||
) |
fills buffers for PRINTF
prntBuff | buffer to fill in | |
maxLen | length of buffer to fill in |
void LCBT_printReleaseBuffs | ( | ) |
releases buffers for PRINTF and EPRINTF
void LCBT_printShellDisable | ( | int | disable | ) |
set disable flag to stop PRINTF and EPRINTF to VxSHell
disable | 0=print to shell, 1=no print to shell |
unsigned int LCBT_readCsr | ( | ) |
unsigned int LCBT_readEventBase | ( | ) |
Read Event Base register which is start of Event circular buffer.
References PRINTF.
Referenced by LCBT_regs().
unsigned int LCBT_readEventFree | ( | ) |
Read Event Free register which is offset in Event circular buffer HW will write to.
References PRINTF.
Referenced by LCBT_regs().
unsigned int LCBT_readEventQ | ( | ) |
Read eventQueue NOTE this will pull value from queue and effect operation.
unsigned int LCBT_readFabricSelect | ( | ) |
Read FabricSelect register which indicates primary or redundant.
References PRINTF.
Referenced by LCBT_regs().
unsigned int LCBT_readFifoFault | ( | ) |
read Fifo Fault registers (requires a DMA)
References EPRINTF, LCBT_STALL, and PRINTF.
Referenced by LCBT_regs().
void LCBT_readHwInfo | ( | ) |
unsigned int LCBT_readIrq | ( | ) |
Read IRQ register which has interrupt status.
References PRINTF.
Referenced by LCBT_regs().
unsigned int LCBT_readLatpCsr | ( | ) |
read LATp CSR register (requires a DMA)
References EPRINTF, LCBT_STALL, and PRINTF.
Referenced by LCBT_regs().
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_readRequestQ | ( | ) |
Read requestQueue, 0=notEMpty, not0=empty NOTE this will pull value from queue and effect operation.
unsigned int LCBT_readResultQ | ( | ) |
Read resultQueue NOTE this will pull value from queue and effect operation.
Referenced by LCBT_resetTest().
unsigned int LCBT_readStats | ( | ) |
read stats register (requires a DMA)
References EPRINTF, LCBT_STALL, and PRINTF.
Referenced by LCBT_regs().
LCBT_regs | ( | ) |
print vals of all registers in LCB
References LCBT_readCsr(), LCBT_readEventBase(), LCBT_readEventFree(), LCBT_readFabricSelect(), LCBT_readFifoFault(), LCBT_readHwInfo(), LCBT_readIrq(), LCBT_readLatpCsr(), and LCBT_readStats().
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().
void LCBT_resetTest | ( | int | numReqPer | ) |
special test for reset fix on FpgaLat=0x5d
numReqPer | num of read for each of 4 part test |
The fix in LatFpga=0x5d allows this test to run sucessfully without errors.
References LCBT_readResultQ(), LCBT_writeCsr(), LCBT_writeIrq(), and PRINTF.
LCBT_saveErrorForDeltas | ( | ) |
stash global error counts to use with LCBT_printErrorDeltas()
Referenced by LCBT_cmdExternalTest(), LCBT_cmdLocalTest(), LCBT_cmdLocalTest2(), LCBT_cmdLocalTest3(), and LCBT_localRegTest().
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.
void LCBT_setOption | ( | unsigned int | mask | ) |
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_setWatermark | ( | unsigned int | val | ) |
Write the watermark field in the CSR.
val | 0=3/4 full,1=1/2 full, 2=1/4 full, 3=notEmpty |
References PRINTF.
void LCBT_stats | ( | int | mask | ) |
print stats for LCB driver
mask | 0=all,1=ISR,2=rst,4=evt,8=time |
int LCBT_testAll | ( | int | num, | |
int | nLoops, | |||
int | latpAddr, | |||
int | loopbackCable | |||
) |
overall test, does complete regression test of LCB
num | number of accesses to board per test | |
nLoops | number of times thru all tests test | |
latpAddr | 0=route event tests back to self, else route event test to echo server at this addr | |
loopbackCable | 1=loopback cable present and will run event test, 0=no cable so run event tests only if GASU availible |
References LCBT_GASU_AVAIL, LCBT_hwAvail(), LCBT_MASK_VALID, and PRINTF.
int LCBT_testAllEpu | ( | int | num, | |
int | nLoops, | |||
int | latpAddr, | |||
int | loopbackCable | |||
) |
overall test for EPU, does complete regression test of LCB minus cmdResp test
num | number of accesses to board per test | |
nLoops | number of times thru all tests test | |
latpAddr | 0=route event tests back to self, else route event test to echo server at this addr | |
loopbackCable | 1=loopback cable present and will run event test, 0=no cable so run event tests only if GASU availible |
References LCBT_GASU_AVAIL, LCBT_hwAvail(), LCBT_MASK_VALID, and PRINTF.
LCBT_updateErrorTotals | ( | int | numAccess, | |
int | rErr, | |||
int | wErr, | |||
int | cErr | |||
) |
update the global error counts
numAccess | Number of R/W/Compare ops | |
rErr | number of read errors | |
wErr | number of write errors | |
cErr | number of compare errors |
Referenced by LCBT_localRegTest().
unsigned int LCBT_writeCsr | ( | unsigned int | data | ) |
Write given value to register.
data | value to write to register |
Referenced by LCBT_resetTest().
unsigned int LCBT_writeEventBase | ( | unsigned int | data | ) |
Write given value to register.
data | value to write to register |
unsigned int LCBT_writeEventFree | ( | unsigned int | data | ) |
Write given value to register.
data | value to write to register |
unsigned int LCBT_writeFabricSelect | ( | unsigned int | data | ) |
Write given value to register.
data | value to write to register |
unsigned int LCBT_writeFifoFault | ( | unsigned int | data, | |
unsigned int | mask | |||
) |
write Fifo Fault register (requires a DMA)
data | value to write to register | |
mask | mask of bits to write, if 0 will default to full register |
References EPRINTF, and LCBT_STALL.
unsigned int LCBT_writeIrq | ( | unsigned int | data | ) |
Write given value to register.
data | value to write to register |
Referenced by LCBT_resetTest().
unsigned int LCBT_writeLatpCsr | ( | unsigned int | data, | |
unsigned int | mask | |||
) |
write LATp CSR register (requires a DMA)
data | value to write to register | |
mask | mask of bits to write, if 0 will default to full register |
References EPRINTF, and LCBT_STALL.
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().
unsigned int LCBT_writeStats | ( | unsigned int | data, | |
unsigned int | mask | |||
) |
write Stats register (requires a DMA)
data | value to write to register | |
mask | mask of bits to write, if 0 will default to full register |
References EPRINTF, and LCBT_STALL.