GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LCBT / V1-4-1

Constituent: lcbt     Tag: mv2304


Interface   Data Structures   File List   Data Fields   Globals  

LCBT_cmdExternal.c File Reference

LCB Remote Cmd/Response exercise tests. More...

#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>

Include dependency graph for LCBT_cmdExternal.c:

Include dependency graph

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 () determine which HW is connected to the LCB

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 determine which HW is connected to the LCB

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.


Detailed Description

LCB Remote Cmd/Response exercise tests.

Author:
Ed Bacho -- ebacho@slac.stanford.edu
These tests access registers on other boards thru the LCB cmd/respose fabric.

Function Documentation

int LCBT_cmdExternalTest int  num,
int  singleAccess,
TDATA_DTEST  testType,
unsigned int  testParm
 

read test on LCB local registers that require Cmd list DMA

Parameters:
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
Returns:
total errs
This test excersizes LCB board and driver by write/read/compare to registers on the TEMP or EBM if HW is availible. The registers are NOT set to reasonable values and only those register where this is not problematic are used.

Here is the call graph for this function:

LCBT_determineHw  ) 
 

get mask determined by LCBT_determineHw() for use in LCBT_determineHw () determine which HW is connected to the LCB

This 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.

Here is the call graph for this function:

void LCBT_dumpCru  ) 
 

dump all registers for CRU

Returns:
none

void LCBT_dumpEbm  ) 
 

dump all registers for EBM

Returns:
none

void LCBT_dumpTem int  latpAddr  ) 
 

dump some registers for TEM

Parameters:
latpAddr latpAddr of TEM which is 0-0xf
Returns:
none

unsigned int LCBT_hwAvail  ) 
 

get mask of hw determined by LCBT_determineHw() for use in LCBT_cmdExternalTest()

Returns:
mask of HW connected to LCB

LCBT_initGasu  ) 
 

setup registers in GASU determine which HW is connected to the LCB

This routine is used as an alternative to PIG to init the GASU. DO NOT use if you are using PIG to setup the HW.

Here is the call graph for this function:

LCBT_lam int  latpAddr  ) 
 

Send out LAM (lookAtMe) to specified addr.

Parameters:
latpAddr addr to send LAM to
Returns:
status

Here is the call graph for this function:

void LCBT_lamCruLoop int  num  ) 
 

loop on LAM write and CRU reg0 read, used for debugging HW

Parameters:
num Number of accesses to do in the test, 0=forever
Returns:
nothing

Here is the call graph for this function:

unsigned int LCBT_readReg int  latpAddr,
int  block,
int  reg,
unsigned int *  value
 

read a single register over the cmdResponse fabric

Parameters:
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
Returns:
status
This routine does a syncronous read from a single register on HW connected thru LCB. Format of message is determined from latpAddr (so expects standard assignments).

unsigned int LCBT_remoteLatpCsr int  latpAddr,
unsigned int  val,
unsigned int  mask,
int  broadcast
 

send value to LatpCsr on another CPU over CmdResponse

Parameters:
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)
Returns:
status

Here is the call graph for this function:

unsigned int LCBT_setCfg int  haveGasu,
int  haveTem
 

get mask determined by LCBT_determineHw() for use in LCBT_cmdExternalTest()

Parameters:
haveGasu 1=have GASU/EBM
haveTem 1=have TEM either thru GASU or Transition Board
Returns:
mask of HW connected to LCB

This routine is used instead of LCNT_determineHw() when the HW configuration is already known. 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.

void LCBT_setEpu int  idx  ) 
 

Set boardID in Csr to EPU addr.

Parameters:
idx which EPU,0=EPU0,1=EPU1,2=EPU3
Returns:
none

unsigned int LCBT_setRemoteBoardId int  latpAddr  ) 
 

set board ID to latpAddr on CPU determined by CRU

Parameters:
latpAddr addr to send to, ignored if broadcast=0
Returns:
status
This routine sets up CRU to enable one path to a CPU (determined by latpAddr) and then sets the CPU on that path for boardId=latpAddr. This function is normally done by PIG so this routine should be used with CAUTION.

Here is the call graph for this function:

void LCBT_setSiu int  idx  ) 
 

Set boardID in Csr to SIU addr.

Parameters:
idx which SIU,0=SIU0,1=SIU1
Returns:
none

unsigned int LCBT_writeReg int  latpAddr,
int  block,
int  reg,
unsigned int  value,
int  broadcast
 

write to single register over the cmdResponse fabric

Parameters:
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
Returns:
status
This routine does a syncronous write to a single register on HW connected thru LCB. Format of message is determined from latpAddr (so expects standard assignments).


Generated on Wed Jan 19 21:28:49 2005 by doxygen 1.3.3