Hardware Functions


Functions

int fwTell1_TypeOfBoard (string Tell1Name, string &TypeOfBoard)
int fwTell1_enableMDIOCtrl (string Tell1Name, bool pFlag=true)
int fwTell1_chkTriggers (string Tell1Name)
int fwTell1_disableBoard (string Tell1Name)
int fwTell1_resetVeloSampleClockPhase (string Tell1Name)

Detailed Description

The parameters of these functions will always be the hardware name (datapoint name). The functions will just work, if the boards are subscribed!

Function Documentation

int fwTell1_chkTriggers ( string  Tell1Name  ) 

Checks if Triggers are sent to Tell1 board. Accessing the board e.g. applying recipes should be prohibited then.

Parameters:
[in] Tell1Name The name of the hardware (Tell1 board).
Returns:
int Return 1 if triggers are applied and 0 if not. -1 if an error occured.
Example:

  (...)
  if(!fwTell1_chkTriggers("myTell1Board")
     fwHw_applyRecipe(DeviceUnitDP_noDist, regs, data);
  (...)



int fwTell1_disableBoard ( string  Tell1Name  ) 

This function disables the GBE ports on the SL (no data sent) and sets ECS as trigger source (no TTC triggers accepted).

Parameters:
[in] Tell1Name The name of the hardware (Tell1 board).
Returns:
int the errorcode of this library: 0 if no error occured -1 ECS error Example:
  (...)
  if(!fwTell1_disableBoard("myTell1Board")
     DebugN("Board is disabled - no TTC triggers accepted and no data can be sent from GBE!"):
  (...)



int fwTell1_enableMDIOCtrl ( string  Tell1Name,
bool  pFlag = true 
)

This function sets bit Nr.1 in the MDIO-Control register (0x683) of the MAC chip to enable/disable the austoscan feature. The flag 'true' (=default) enables the autoscan, 'false' will disable the autoscan. It checks if the WriteRead function terminated successfully and compares the written bit with the value that was read back.

Parameters:
[in] Tell1Name The name of the hardware (Tell1 board).
[in] pFlag Used to enable or disable autoscan feature of MAC chip.
Returns:
int the errorcode of this library: 0 if no error occured -1 register could not be read or written 1 if the bit which is set does not match with the bit read back from register
Example:
  (...)
  if(fwTell1_enableMDIOCtrl("myTell1",true) == 0)
     DebugN("MDIO Control enabled without error!");
  (...)



int fwTell1_resetVeloSampleClockPhase ( string  Tell1Name  ) 

Resets the sample clock circuit and reinitializes all ADC clock phases. This function has to be called after configuring the Tell1 board. If not the data from the ARx boards is not sampled correctly. The function is part of the FSM.

Parameters:
[in] Tell1Name The name of the hardware (Tell1 board).
Returns:
int Return 1 if triggers are applied and 0 if not. -1 if an error occured.
Example:

  (...)
  if(!fwTell1_resetVeloSampleClockPhase("myTell1Board")
     DebugN("ARx ready for taking data!"):
  (...)



int fwTell1_TypeOfBoard ( string  Tell1Name,
string &  TypeOfBoard 
)

TELL1 boards of different subdetectors can be recognised by reading various bits of a special register. The global variable FWTELL1_BOARDTYPE can be used to store the returned string which is a short acronym for the board type. By default this variable is "NOT_DEF".

Parameters:
[in] Tell1Name the name of the hardware (Tell1 board).
[out] TypeOfBoard returns the abriations of the board types.
Returns:
int the errorcode of this library: 0 if no error occured -1 register could not be read
Example:

  (...)
  if (FWTELL1_BOARDTYPE == "NOT_DEF")
     if(fwTell1_TypeOfBoard("myTell1", FWTELL1_BOARDTYPE) == -1)
        DebugN("Reading of register not successfull! Board not identified!");
  (...)




Generated on Thu Dec 13 01:29:59 2007 for FwTell1 by  doxygen 1.5.1-p1