JLab Signal Distribution Switch Slot module  A5
 All Data Structures Files Functions Variables Macros Groups
Signal testing

Functions

int sdTestGetBusyout ()
 Return the mask of busy's asserted from the payload ports. More...
 
int sdTestGetSdLink ()
 Return the asserted level from the TI over the SDlink. More...
 
int sdTestGetTokenIn ()
 Return payload port mask of those payload modules asserting TokenIN. More...
 
int sdTestGetTrigOut ()
 Return payload port mask of those payload modules asserting TrigOUT. More...
 
void sdTestSetTokenOutMask (int mask)
 Set TokenOUT levels HI to those payload ports specified in mask. More...
 
void sdTestSetStatBitBMask (int mask)
 Set StatBitB levels HI to those payload ports specified in mask. More...
 
void sdTestSetClkAPLL (int mode)
 Set the PLL mode for Clock A (LHS of crate). More...
 
int sdTestGetClockAStatus ()
 Return the amount of clocks ticks that occurred for a two second period after the Clock A Mode was set. More...
 
int sdTestGetClockAFreq ()
 Return the Clock A Frequency. This test was bypassed during acceptance testing. More...
 
void sdTestSetClkBPLL (int mode)
 Set the PLL mode for Clock B (LHS of crate). More...
 
int sdTestGetClockBStatus ()
 Return the amount of clocks ticks that occurred for a two second period after the Clock A Mode was set. More...
 
int sdTestGetClockBFreq ()
 Return the Clock B Frequency. This test was bypassed during acceptance testing. More...
 
void sdTestSetTIBusyOut (int level)
 Set the Busy OUT level to the TI. More...
 
int sdTestGetTITokenIn ()
 Get the input level from the TI TokenIN. More...
 
void sdTestSetTIGTPLink (int level)
 Set the GTP Link output to the TI. More...
 
unsigned int sdTestGetClkACounter ()
 Get the counter associated with the Clock A Frequency during period of 0.1ms. More...
 
unsigned int sdTestGetClkBCounter ()
 Get the counter associated with the Clock B Frequency during period of 0.1ms. More...
 
unsigned int sdTestGetSWALoopback ()
 Return the bit mask of levels sent from the SWA Module. This test was bypassed during acceptance testing. More...
 

Detailed Description

Function Documentation

int sdTestGetBusyout ( )

Return the mask of busy's asserted from the payload ports.

Returns
Payload Port Mask of asserted busy's if successful, otherwise ERROR.

References SDStruct::busyoutTest, SDLOCK, and SDUNLOCK.

unsigned int sdTestGetClkACounter ( )

Get the counter associated with the Clock A Frequency during period of 0.1ms.

Returns
Counter value if successful, otherwise ERROR

References SDStruct::clkACounterTest, SDLOCK, and SDUNLOCK.

unsigned int sdTestGetClkBCounter ( )

Get the counter associated with the Clock B Frequency during period of 0.1ms.

Returns
Counter value if successful, otherwise ERROR

References SDStruct::clkBCounterTest, SDLOCK, and SDUNLOCK.

int sdTestGetClockAFreq ( )

Return the Clock A Frequency. This test was bypassed during acceptance testing.

Returns
if successful, otherwise ERROR.

References SDStruct::csrTest, SD_CSRTEST_CLKA_FREQ, SDLOCK, and SDUNLOCK.

int sdTestGetClockAStatus ( )

Return the amount of clocks ticks that occurred for a two second period after the Clock A Mode was set.

Returns
Clock count if successful, otherwise ERROR.

References SDStruct::csrTest, SD_CSRTEST_CLKA_TEST_STATUS, SDLOCK, and SDUNLOCK.

int sdTestGetClockBFreq ( )

Return the Clock B Frequency. This test was bypassed during acceptance testing.

Returns
if successful, otherwise ERROR.

References SDStruct::csrTest, SD_CSRTEST_CLKB_FREQ, SDLOCK, and SDUNLOCK.

int sdTestGetClockBStatus ( )

Return the amount of clocks ticks that occurred for a two second period after the Clock A Mode was set.

Returns
Clock count if successful, otherwise ERROR.

References SDStruct::csrTest, SD_CSRTEST_CLKB_TEST_STATUS, SDLOCK, and SDUNLOCK.

int sdTestGetSdLink ( )

Return the asserted level from the TI over the SDlink.

Returns
Value stored at sdLinkTest register if successful, otherwise ERROR.

References SDStruct::sdLinkTest, SDLOCK, and SDUNLOCK.

unsigned int sdTestGetSWALoopback ( )

Return the bit mask of levels sent from the SWA Module. This test was bypassed during acceptance testing.

Returns
SWA Bitmask if successful, otherwise ERROR

References SDStruct::csrTest, SD_CSRTEST_SWA_LOOPBACK_MASK, SDLOCK, and SDUNLOCK.

int sdTestGetTITokenIn ( )

Get the input level from the TI TokenIN.

Returns
1 if Hi, 0 if Lo, otherwise ERROR

References SDStruct::csrTest, SD_CSRTEST_TI_TOKENIN, SDLOCK, and SDUNLOCK.

int sdTestGetTokenIn ( )

Return payload port mask of those payload modules asserting TokenIN.

Returns
Payload Port Mask of asserted TokenIN's if successful, otherwise ERROR.

References SDLOCK, SDUNLOCK, and SDStruct::tokenInTest.

int sdTestGetTrigOut ( )

Return payload port mask of those payload modules asserting TrigOUT.

Returns
Payload Port Mask of asserted TrigOUT's if successful, otherwise ERROR.

References SDLOCK, SDUNLOCK, and SDStruct::trigOutTest.

void sdTestSetClkAPLL ( int  mode)

Set the PLL mode for Clock A (LHS of crate).

Parameters
modePLL mode
  • 0 : Bypass Mode
  • 1 : PLL mode

References SDStruct::csrTest, SD_CSRTEST_CLKA_FREQ, SD_CSRTEST_CLKB_FREQ, SD_CSRTEST_TEST_RESET, SDLOCK, and SDUNLOCK.

void sdTestSetClkBPLL ( int  mode)

Set the PLL mode for Clock B (LHS of crate).

Parameters
modePLL mode
  • 0 : Bypass Mode
  • 1 : PLL mode

References SDStruct::csrTest, SD_CSRTEST_TEST_RESET, SDLOCK, and SDUNLOCK.

void sdTestSetStatBitBMask ( int  mask)

Set StatBitB levels HI to those payload ports specified in mask.

Parameters
maskMask to set StatBitB levels HI

References SDLOCK, SDUNLOCK, and SDStruct::statBitBTest.

void sdTestSetTIBusyOut ( int  level)

Set the Busy OUT level to the TI.

Parameters
levelBusy Out level
  • 0: Lo
  • !0: Hi

References SDStruct::csrTest, SD_CSRTEST_TEST_RESET, SD_CSRTEST_TI_BUSYOUT, SDLOCK, and SDUNLOCK.

void sdTestSetTIGTPLink ( int  level)

Set the GTP Link output to the TI.

Parameters
levelGTP Link output level
  • 0: Lo
  • !0: Hi

References SDStruct::csrTest, SD_CSRTEST_TEST_RESET, SD_CSRTEST_TI_GTPLINK, SDLOCK, and SDUNLOCK.

void sdTestSetTokenOutMask ( int  mask)

Set TokenOUT levels HI to those payload ports specified in mask.

Parameters
maskMask to set TokenOUT levels HI

References SDLOCK, SDUNLOCK, and SDStruct::tokenOutTest.