Doxygen Documentation

Main Index

Package Index

Package:

DUTIL

Version:

V0-2-6

Marked:

(not marked)

Constituent:

start

Tag:

mcp750


Interface   Compound List   File List   Compound Members   File Members  

start.h File Reference

Provides functions to power on and configure the LAT. More...

#include "DUTIL/LCB_cfg.h"
#include "LCB/LIOX_sync_handle.h"
#include "LCB/LCB.h"

Include dependency graph for start.h:

Include dependency graph

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

Included by dependency graph

Functions

void powerOn (LIOXs slh, unsigned priMask, unsigned redMask, unsigned delay)
 Configures the PDUs to power the required components of the LAT.

int configCRU (LIOXs slh, unsigned cptMask)
 Configures the CRU to allow LATp C/R with the specified components and sets the LATp addresses of those cpts.

int configEBM (LIOXs slh, unsigned cptMask)
 Configures the source and destination enables of the EBM.

int powerOn_load (LIOXs slh, unsigned temMask, unsigned delay)
 Power on the CAL and TRK.

unsigned getEPUaddr (LIOXs slh)
 Returns address to use in the event contributions.

int addTEM (LIOXs slh, unsigned temID, unsigned redPDU)
 Power on a TEM and configure it along with the CRU and EBM.

int removeTEM (LIOXs slh, unsigned temID)
 Power off a TEM and remove it from the CRU and EBM configurations.

int addEPU (LIOXs slh, unsigned epuID, unsigned redPDU)
 Power on an EPU and configure it along with the CRU and EBM.

int removeEPU (LIOXs slh, unsigned epuID)
 Power off an EPU and remove it from the CRU and EBM configurations.

unsigned createSLH (LCB lcb, LIOXs *slh)
 Allocate memory for and initializes Synchronous LIOX handle.

unsigned LCB_startup (LCB *pLCB, LCB_cfg *conf)
 Laundry list of LCB initializations.

unsigned LCB_promote (LIOXs slh)
 Assert the LCB commander wire - field promotion from SLAVE to COMMANDER.

unsigned LCB_demote (LIOXs slh)
 De-assert the LCB commander wire.

void useOtherLATp (LCB lcb, LIOXs slh)
 Invert the command and event path bits in the configuration registers of the LCB (change to the other LATp fabric).

void usePrimaryLATp (LCB lcb, LIOXs slh)
 Clear the C/R and event path bits.

void useRedundantLATp (LCB lcb, LIOXs slh)
 Set the C/R and event path bits.


Detailed Description

Provides functions to power on and configure the LAT.

Author:
James Swain -- jswain@slac.stanford.edu

Function Documentation

int addEPU LIOXs  slh,
unsigned  epuID,
unsigned  redPDU
 

Power on an EPU and configure it along with the CRU and EBM.

Parameters:
slh Synchronous LIOX handle
epuID 0 ... 2
redPDU 0 -> use Primary PDU, 1 -> use Redundant PDU
Returns:
0 if successful, -1 if failed

int addTEM LIOXs  slh,
unsigned  temID,
unsigned  redPDU
 

Power on a TEM and configure it along with the CRU and EBM.

Parameters:
slh Synchronous LIOX handle
temID 0 ... 15
redPDU 0 -> use Primary PDU, 1 -> use Redundant PDU
Returns:
0 if successful, -1 if failed

int configCRU LIOXs  slh,
unsigned  cptMask
 

Configures the CRU to allow LATp C/R with the specified components and sets the LATp addresses of those cpts.

int configCRU(LIOXs slh, unsigned cptMask)

Parameters:
slh Synchronous LIOX handle
cptMask Bit mask indicating which components should be configured
Returns:
0 on success, -1 on failure
1) Any component that is not specified in cptMask will be inaccessible following the execution of this function

2) Only the TEMs, DAB and PDUs are configured by this function.

3) cptMask is laid out in the manner of the CRU command and response enable bit masks (LAT-TD-01547, figs 12 & 13).

TEM0 = 0x00000001 TEM1 = 0x00000002 TEM2 = 0x00000004 : TEMe = 0x00004000 TEMf = 0x00008000 GEM = 0x00010000 AEM = 0x00020000 EBM = 0x00040000 PDU0 = 0x00080000 PDU1 = 0x00100000 SIUx = 0x01000000 SIU0 = 0x02000000 SIU1 = 0x04000000 EPU0 = 0x08000000 EPU1 = 0x10000000 EPU2 = 0x20000000

int configEBM LIOXs  slh,
unsigned  cptMask
 

Configures the source and destination enables of the EBM.

int configEBM(LIOXs slh, unsigned cptMask)

Parameters:
slh Synchronous LIOX handle
cptMask Bit mask indicating which components should be configured
Returns:
0 on success, -1 on failure
1) cptMask is the concatenation of registers 4-6 of the EBM controller block (LAT-TD-01546, the source enable registers) with an additional bit in the most- significant-byte representing the SSR

GEM = 0x00000001 TEM0 = 0x00000002 TEM1 = 0x00000004 TEM2 = 0x00000008 : TEMe = 0x00008000 TEMf = 0x00010000 AEM = 0x00020000 SIUX = 0x00040000 SIU0 = 0x00080000 SIU1 = 0x00100000 EPU0 = 0x00200000 EPU1 = 0x00400000 EPU2 = 0x00800000

unsigned int createSLH LCB  lcb,
LIOXs *  slh
 

Allocate memory for and initializes Synchronous LIOX handle.

Parameters:
lcb Initialized LCB handle
slh Pointer to uninitialed Synchronous LIOX handle
Returns:
LCB_OK

unsigned getEPUaddr LIOXs  slh  ) 
 

Returns address to use in the event contributions.

Parameters:
slh Synchronous LIOX handle
Returns:
Destination address to use when configuring the GEM
Once the round-robin functionality is available in the EBM, this will return 0. Until then it returns the address of the commander node.

unsigned LCB_demote LIOXs  slh  ) 
 

De-assert the LCB commander wire.

Parameters:
slh Synchronous LIOX handle
Returns:
Status of the CSR write

unsigned LCB_promote LIOXs  slh  ) 
 

Assert the LCB commander wire - field promotion from SLAVE to COMMANDER.

Parameters:
slh Synchronous LIOX handle
Returns:
Status of the CSR write

unsigned LCB_startup LCB *  pLCB,
LCB_cfg cfg
 

Laundry list of LCB initializations.

Parameters:
pLCB pointer to hold Initialized LCB handle
cfg Pointer to a LCB_cfg structure containing configuration information
Returns:
LCB_OK

Here is the call graph for this function:

void powerOn LIOXs  slh,
unsigned  priMask,
unsigned  redMask,
unsigned  delay
 

Configures the PDUs to power the required components of the LAT.

void powerOn (LIOXs slh, unsigned priMask, unsigned redMask, unsigned delay)

Parameters:
slh Synchronous LIOX handle
priMask Bit mask indicating which components should be powered on by the PRIMARY PDU
redMask Bit mask indicating which components should be powered on by the REDUNDANT PDU
delay Time (in 60ths of a second) to wait after powering a cpt before powering the next
1) Function assumes that the CRU is unconfigured so begins by configuring the CRU to access the requested PDUs and sets the LATp addresses of the aforementioned PDUs.

2) Currently only the Primary EPU DC-DC converters are available.

3) Currently only the Primary ACD supply and converters are available.

4) priMask and redMask are laid out in the manner of the CRU command and response enable bit masks (LAT-TD-01547, figs 12 & 13).

TEM0 = 0x00000001 TEM1 = 0x00000002 TEM2 = 0x00000004 : TEMe = 0x00004000 TEMf = 0x00008000 GEM = 0x00010000 AEM = 0x00020000 EBM = 0x00040000 PDU0 = 0x00080000 PDU1 = 0x00100000 SIUx = 0x01000000 SIU0 = 0x02000000 SIU1 = 0x04000000 EPU0 = 0x08000000 EPU1 = 0x10000000 EPU2 = 0x20000000

int powerOn_load LIOXs  slh,
unsigned  temMask,
unsigned  delay
 

Power on the CAL and TRK.

Parameters:
slh Synchronous LIOX handle
temMask Bitmask indicating the load boards to power
delay Time (in 60ths of a second) between each power-on command
Returns:
0 on success, -1 on failure

int removeEPU LIOXs  slh,
unsigned  epuID
 

Power off an EPU and remove it from the CRU and EBM configurations.

Parameters:
slh Synchronous LIOX handle
epuID 0 ... 3
Returns:
0 if successful, -1 if failed

int removeTEM LIOXs  slh,
unsigned  temID
 

Power off a TEM and remove it from the CRU and EBM configurations.

Parameters:
slh Synchronous LIOX handle
temID 0 ... 15
Returns:
0 if successful, -1 if failed

void useOtherLATp LCB  lcb,
LIOXs  slh
 

Invert the command and event path bits in the configuration registers of the LCB (change to the other LATp fabric).

Parameters:
lcb Pointer to the LCB
slh Synchronous LIOX handle

void usePrimaryLATp LCB  lcb,
LIOXs  slh
 

Clear the C/R and event path bits.

Parameters:
lcb Pointer to the LCB
slh Synchronous LIOX handle

void useRedundantLATp LCB  lcb,
LIOXs  slh
 

Set the C/R and event path bits.

Parameters:
lcb Pointer to the LCB
slh Synchronous LIOX handle


Generated on Sat Apr 17 03:07:26 2004 by doxygen 1.3.3