JLab Pipeline TS Library  3v7.1
tsLib.c File Reference

Macros

#define TSLOCK   if(pthread_mutex_lock(&tsMutex)<0) perror("pthread_mutex_lock");
 
#define TSUNLOCK   if(pthread_mutex_unlock(&tsMutex)<0) perror("pthread_mutex_unlock");
 
#define TILOCK   TSLOCK
 
#define TIUNLOCK   TSUNLOCK
 
#define tiVMESlot2PayloadPort   tsVMESlot2PayloadPort
 
#define MAX_VME_SLOTS   21
 

Functions

int tsSetCrateID_preInit (int cid)
 Set the CrateID to be used during initialization. More...
 
int tsInit (unsigned int tAddr, unsigned int mode, int iFlag)
 Initialize the TSp register space into local memory, and setup registers given user input. More...
 
unsigned int tsFind ()
 Find the TS within the prescribed "GEO Slot to A24 VME Address" range from slot 2 to 21. More...
 
int tsCheckAddresses ()
 
void tsStatus (int pflag)
 Print some status information of the TS to standard out. More...
 
void tsSlaveStatus (int pflag)
 Print a summary of all fiber port connections to potential TI Slaves. More...
 
int tsGetPortTrigSrcEnabled (int port)
 Get the trigger sources enabled bits of the selected port. More...
 
int tsGetTrigSrcEnabledFiberMask ()
 Returns the mask of fiber channels that report a "connected" status from a TI has it's trigger source enabled. More...
 
int tsGetFirmwareVersion ()
 Get the Firmware Version. More...
 
int tsReload ()
 Reload the firmware on the FPGA. More...
 
unsigned int tsGetSerialNumber (char **rSN)
 Get the Module Serial Number. More...
 
int tsClockResync ()
 Resync the 250 MHz Clock. More...
 
int tsReset ()
 Perform a soft reset of the TS. More...
 
int tsSetCrateID (unsigned int crateID)
 Set the crate ID. More...
 
int tsGetCrateID (int port)
 Get the crate ID of the selected port. More...
 
int tsSetBlockLevel (int blockLevel)
 Set the number of events per block. More...
 
int tsBroadcastNextBlockLevel (int blockLevel)
 Broadcast the next block level (to be changed at the end of the next sync event, or during a call to tsSyncReset(1). More...
 
int tsGetNextBlockLevel ()
 Get the block level that will be updated on the end of the block readout. More...
 
int tsGetCurrentBlockLevel ()
 Get the current block level. More...
 
int tsSetInstantBlockLevelChange (int enable)
 Set TS to instantly change blocklevel when broadcast is received. More...
 
int tsGetInstantBlockLevelChange ()
 Get Status of instant blocklevel change when broadcast is received. More...
 
int tsSetInputMix (int enable)
 Set option to mix FP and GTP inputs Effectively swaps the FP(16:1) -> GTP'(32:17) and GTP(32:17) -> FP'(16:1) in both trigger table and data pattern output. More...
 
int tsGetInputMix ()
 Get option to mix FP and GTP inputs Effectively swaps the FP(16:1) -> GTP'(32:17) and GTP(32:17) -> FP'(16:1) in both trigger table and data pattern output. More...
 
int tsSetGTPInput (unsigned int inputmask)
 Set which GTP inputs are enabled. More...
 
int tsSetFPInput (unsigned int inputmask)
 Set which FP inputs are enabled. More...
 
int tsSetTriggerSource (int trig)
 Set the trigger source. More...
 
int tsSetTriggerSourceMask (int trigmask)
 Set trigger sources with specified trigmask. More...
 
int tsEnableTriggerSource ()
 Enable trigger sources set by tsSetTriggerSource(...) or tsSetTriggerSourceMask(...) More...
 
int tsDisableTriggerSource (int fflag)
 Disable trigger sources. More...
 
int tsSetSyncSource (unsigned int sync)
 Set the Sync source mask. More...
 
int tsSetEventFormat (int format)
 Set the event format. More...
 
int tsSoftTrig (int trigger, unsigned int nevents, unsigned int period_inc, int range)
 Set and enable the "software" trigger. More...
 
int tsSetRandomTrigger (int trigger, int setting)
 Set the parameters of the random internal trigger. More...
 
int tsDisableRandomTrigger ()
 Disable random trigger generation. More...
 
int tsReadBlock (volatile unsigned int *data, int nwrds, int rflag)
 Read a block of events from the TI. More...
 
int tsReadTriggerBlock (volatile unsigned int *data)
 Read a block from the TS and form it into a CODA Trigger Bank. More...
 
int tsReadScalers (volatile unsigned int *data, int choice)
 Readout input scalers Returned data: bit 31 0: As stored 1: Shifted by 7 bits (must multiply by 2**7) More...
 
int tsPrintScalers (int choice)
 Print input scalers to standard out. More...
 
int tsSetBusySource (unsigned int sourcemask, int rFlag)
 Set the busy source with a given sourcemask sourcemask bits: More...
 
void tsEnableBusError ()
 Enable Bus Errors to terminate Block Reads. More...
 
void tsDisableBusError ()
 Disable Bus Errors to terminate Block Reads. More...
 
int tsPayloadPort2VMESlot (int payloadport)
 Routine to return the VME slot, provided the VXS payload port. More...
 
int tsVMESlot2PayloadPort (int vmeslot)
 Routine to return the VXS payload port, provided the VME Slot. More...
 
int tsSetPrescale (int prescale)
 Set the prescale factor for the external trigger. More...
 
int tsGetPrescale ()
 Get the current prescale factor. More...
 
int tsSetTriggerPrescale (int type, int chan, unsigned int prescale)
 Set the prescale for specified type and channel. More...
 
unsigned int tsGetTriggerPrescaleMask (int type, int bank)
 FIXME: This is not quite right. More...
 
int tsSetTriggerPulse (int trigger, int delay, int width)
 Set the characteristics of a specified trigger. More...
 
void tsSetSyncDelayWidth (unsigned int delay, unsigned int width, int widthstep)
 Set the delay time and width of the Sync signal. More...
 
void tsTrigLinkReset ()
 Reset the trigger link. More...
 
void tsTrigLinkDisable ()
 Disable the trigger link. More...
 
int tsSetSyncResetType (int type)
 Set type of SyncReset to send to TI Slaves. More...
 
void tsSyncReset (int blflag)
 Generate a Sync Reset signal. More...
 
void tsSyncResetResync ()
 Generate a Sync Reset Resync signal. More...
 
void tsClockReset ()
 Generate a Clock Reset signal. This signal is sent to the loopback and all configured TI Slaves. More...
 
void tsUserSyncReset (int enable)
 Control level of the SyncReset signal. More...
 
void tsTriggerReadyReset ()
 Reset the registers that record the triggers enabled status of TI Slaves. More...
 
int tsSetAdr32 (unsigned int a32base)
 Routine to set the A32 Base. More...
 
int tsResetEventCounter ()
 Reset the L1A counter, as incremented by the TS. More...
 
unsigned long long int tsGetEventCounter ()
 Returns the event counter (48 bit) More...
 
int tsSetBlockLimit (unsigned int limit)
 Set the block number at which triggers will be disabled automatically. More...
 
unsigned int tsGetBlockLimit ()
 Returns the value that is currently programmed as the block limit. More...
 
int tsGetBlockLimitStatus ()
 Get the current status of the block limit. More...
 
int tsSetGTPInputReadout (int enable)
 Set whether or not the latched pattern of GTP Inputs in block readout. More...
 
int tsSetFPInputReadout (int enable)
 Set whether or not the latched pattern of FP Inputs in block readout. More...
 
unsigned int tsGetIntCount ()
 Return current readout count. More...
 
int tsIntConnect (unsigned int vector, VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to the TS Interrupt or latched trigger, if polling. More...
 
int tsIntDisconnect ()
 Disable interrupts or kill the polling service thread. More...
 
int tsAckConnect (VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to be executed instead of the default TS interrupt/trigger latching acknowledge prescription. More...
 
void tsIntAck ()
 Acknowledge an interrupt or latched trigger. This "should" effectively release the "Busy" state of the TS. More...
 
int tsIntEnable (int iflag)
 Enable interrupts or latching triggers (depending on set TS mode) More...
 
void tsIntDisable ()
 Disable interrupts or latching triggers. More...
 
unsigned int tsBReady ()
 Returns the number of Blocks available for readout. More...
 
int tsGetSyncEventFlag ()
 Return the value of the Synchronization flag, obtained from tsBReady. i.e. Return the value of the SyncFlag for the current readout block. More...
 
int tsGetSyncEventReceived ()
 Return the value of whether or not the sync event has been received. More...
 
int tsSetBlockBufferLevel (unsigned int level)
 Set the block buffer level for the number of blocks in the system that need to be read out. More...
 
int tsSetOutputPort (unsigned int set1, unsigned int set2, unsigned int set3, unsigned int set4, unsigned int set5, unsigned int set6)
 Set (or unset) high level for the user controllable output ports on the front panel. More...
 
int tsSetClockSource (unsigned int source)
 Set the clock to the specified source. More...
 
void tsResetIODelay ()
 Reset the IO Delay on the TS. More...
 
int tsResetSlaveConfig ()
 Reset the configuration of TI Slaves on the TS. This routine removes all slaves and resets the fiber port busy's. More...
 
int tsAddSlave (unsigned int fiber)
 Add and configurate a TI Slave. More...
 
int tsRemoveSlave (unsigned int fiber)
 Remove a TI Slave for the TS. More...
 
int tsSetTriggerHoldoff (int rule, unsigned int value, int timestep)
 Set the value for a specified trigger rule. More...
 
int tsGetTriggerHoldoff (int rule)
 Get the value for a specified trigger rule. More...
 
int tsPrintTriggerHoldoff (int dflag)
 
int tsSetTriggerHoldoffMin (int rule, unsigned int value)
 Set the value for the minimum time of specified trigger rule. More...
 
int tsGetTriggerHoldoffMin (int rule, int pflag)
 Get the value for a specified trigger rule minimum busy. More...
 
int tsTriggerTableConfig (unsigned int **itable)
 Configure trigger table to be loaded with a user provided array. More...
 
int tsGetTriggerTable (unsigned int **otable)
 Get the current trigger table stored in local memory (not necessarily on TS). More...
 
void tsTriggerTableDefault ()
 Configure trigger table to be loaded with a predefined trigger table (mapping GTP and FP inputs to trigger types). More...
 
int tsDefineEventType (int inputType, unsigned int trigMask, int hwTrig, int evType)
 Define a specific trigger pattern as a hardware trigger (trig1/trig2/syncevent) and Event Type. More...
 
int tsDefineSpecialEventType (int trigOpt, int evType)
 Set the trigger type for the specified special trigger. More...
 
int tsGetSpecialEventType (int trigOpt)
 Get the trigger type for the specified special trigger. More...
 
int tsLoadTriggerTable ()
 Load up the default trigger lookup table for the TS. More...
 
void tsPrintTriggerTable (int inputType, int subGroup, int showbits)
 Print trigger table to standard out. More...
 
int tsLatchTimers ()
 Latch the Busy and Live Timers. More...
 
unsigned int tsGetLiveTime ()
 Return the current "live" time of the module. More...
 
unsigned int tsGetBusyTime ()
 Return the current "busy" time of the module. More...
 
unsigned int tsGetLiveTime_InputHigh ()
 Return the current "live" time of the module. More...
 
unsigned int tsGetBusyTime_InputHigh ()
 Return the current "busy" time of the module. More...
 
int tsLive (int sflag)
 Calculate the live time (percentage) from the live and busy time scalers. More...
 
unsigned int tsBlockStatus (int fiber, int pflag)
 Show block Status of specified fiber. More...
 
int tsGetBusyStatus (int pflag)
 Returns the bits that are contributing to the current busy state. More...
 
int tsSetSyncEventInterval (int blk_interval)
 Set the value of the syncronization event interval. More...
 
int tsForceSyncEvent ()
 Force a sync event (type = 0). More...
 
int tsSyncResetRequest ()
 Sync Reset Request is sent to TI-Master or TS. More...
 
int tsGetSyncResetRequest ()
 Determine if a TI has requested a Sync Reset. More...
 
int tsFillToEndBlock ()
 Generate non-physics triggers until the current block is filled. This feature is useful for "end of run" situations. More...
 
int tsCurrentBlockFilled (unsigned short npoll)
 Poll the TS to determine status of current block, for specified number of times. Return immediately when block has been filed, or when timeout has occurred. More...
 
int tsResetMGT ()
 Reset the MGT. More...
 
int tsSetFPDelay (int chan, int delay)
 Set the input delay for teh specified front panel input (0-31) More...
 
int tsGetFPDelay (int chan)
 Get the input delay for teh specified front panel input (0-31) More...
 
int tsPrintFPDelay ()
 Print Front Panel Channel Delays to Standard Out. More...
 
int tsSetTSIODrive (int enable)
 Enable/Disable the FPGA drive to the TSIO. More...
 
int tsGetTSIODrive ()
 Return the Enable/Disable status the FPGA drive to the TSIO. More...
 
int tsGetDriverSupportedVersion ()
 Return the Firmware Version that is Supported by the Library. More...
 
int tsReadScalersMon (volatile unsigned int *data)
 Readout input scalers Returned data: bit 31 0: As stored 1: Shifted by 7 bits (must multiply by 2**7) More...
 
int tsSetTrigCoinWindow (unsigned int size)
 Set the trigger coincidence window. More...
 
int tsGetTrigCoinWindow ()
 Get the trigger coincidence window. More...
 
int tsSetTrigInhibitWindow (unsigned int size)
 Set the trigger inhibit window. More...
 
int tsGetTrigInhibitWindow ()
 Get the trigger inhibit window. More...
 
int tsPartInit (int pID, unsigned int tAddr, unsigned int mode, int iFlag)
 Initialize a TS partition. More...
 
int tsPartSetBusySource (int busysrc)
 Set the busy source for this partition. More...
 
int tsPartSetBlockBufferLevel (unsigned int bufferlevel)
 Set up the Block Buffer Level. More...
 
int tsPartSetTDInput (unsigned int tdinput)
 Select the input that has the TD Busy. More...
 
int tsPartSetFPInput (unsigned short input1, unsigned short input2, unsigned short input3)
 Set the FP Inputs for this partition. More...
 
int tsPartSetGTPInput (unsigned short input1, unsigned short input2, unsigned short input3, unsigned short input4, unsigned short input5)
 Set the GTP Inputs for this partition. More...
 
int tsPartLoadTriggerTable ()
 Load the trigger table for current partition. More...
 
int tsPartReadBlock (volatile unsigned int *data, int nwrds)
 Read a block of events from the current TS partition. More...
 
unsigned int tsPartBReady ()
 Returns the number of Blocks available for readout for this partition. More...
 
void tsPartIntAck ()
 Acknowledge an interrupt or latched trigger for this partition. More...
 
int tsPartIntEnable (int iflag)
 Enable interrupts or latching triggers for this partition. More...
 
void tsPartIntDisable ()
 Disable interrupts or latching triggers for this partition. More...
 
int tsPartIntConnect (VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to the TS Interrupt or latched trigger, if polling. More...
 
int tsPartIntDisconnect ()
 Disable interrupts or kill the polling service thread. More...
 
int tsDuplMode (int set)
 Enable/Disable Duplication Mode. More...
 
int tsDuplSetBranchEnable (int b1, int b2, int b3, int b4)
 
int tsDuplSetLocalTrigComboMask (unsigned int mask)
 
unsigned int tsDuplGetLocalTrigComboMask ()
 
int tsDuplSetLocalTrigCombo (unsigned int mask, int set)
 
int tsDuplSetTriggerHoldoff (unsigned int value)
 
int tsDuplGetTriggerHoldoff ()
 
int tsDuplSetLocalTriggerWidth (int width)
 
int tsDuplGetLocalTriggerWidth ()
 
int tsDuplSetFastClearWidth (int width)
 
int tsDuplGetFastClearWidth ()
 
int tsDuplSetFastClearDelay (int delay)
 
int tsDuplGetFastClearDelay ()
 
int tsDuplSetFastClearVetoWidth (int width)
 
int tsDuplGetFastClearVetoWidth ()
 
int tsDuplSetLocalTrigBusy (int value)
 
int tsDuplGetLocalTrigBusy ()
 
int tsDuplSetFastClearBusy (int value)
 
int tsDuplGetFastClearBusy ()
 
int tsDuplGetBusyTime ()
 
unsigned int tsDuplGetBusyStatus ()
 
int tsDuplPrintBusyStatus ()
 

Variables

pthread_mutex_t tsMutex = PTHREAD_MUTEX_INITIALIZER
 
volatile struct TS_A24RegStructTSp =NULL
 
volatile unsigned int * TSpd =NULL
 
unsigned long tsA24Offset =0
 
unsigned int tsA32Base =0x10000000
 
unsigned long tsA32Offset =0
 
int tsCrateID =0x59
 
int tsBlockLevel =0
 
int tsNextBlockLevel =0
 
unsigned int tsIntCount = 0
 
unsigned int tsAckCount = 0
 
unsigned int tsDaqCount = 0
 
unsigned int tsReadoutMode = 0
 
unsigned int tsTriggerSource = 0
 
unsigned int tsSlaveMask = 0
 
int tsDoAck = 0
 
int tsNeedAck = 0
 
volatile struct PartitionStructTSpart =NULL
 
pthread_attr_t tspollthread_attr
 
pthread_t tspollthread
 
unsigned short PayloadPort [MAX_VME_SLOTS+1]
 

Macro Definition Documentation

◆ MAX_VME_SLOTS

#define MAX_VME_SLOTS   21

This is either 20 or 21

Referenced by tsPartInit(), tsPayloadPort2VMESlot(), and tsVMESlot2PayloadPort().

◆ TILOCK

#define TILOCK   TSLOCK

◆ TIUNLOCK

#define TIUNLOCK   TSUNLOCK

◆ tiVMESlot2PayloadPort

#define tiVMESlot2PayloadPort   tsVMESlot2PayloadPort

◆ TSLOCK

#define TSLOCK   if(pthread_mutex_lock(&tsMutex)<0) perror("pthread_mutex_lock");

Mutex Lock

Referenced by tsBReady(), tsBroadcastNextBlockLevel(), tsClockReset(), tsClockResync(), tsCurrentBlockFilled(), tsDefineSpecialEventType(), tsDisableBusError(), tsDisableRandomTrigger(), tsDisableTriggerSource(), tsDuplMode(), tsEnableBusError(), tsEnableTriggerSource(), tsFillToEndBlock(), tsForceSyncEvent(), tsGetBlockLimit(), tsGetBlockLimitStatus(), tsGetBusyStatus(), tsGetBusyTime(), tsGetBusyTime_InputHigh(), tsGetCrateID(), tsGetCurrentBlockLevel(), tsGetEventCounter(), tsGetFirmwareVersion(), tsGetFPDelay(), tsGetInputMix(), tsGetInstantBlockLevelChange(), tsGetLiveTime(), tsGetLiveTime_InputHigh(), tsGetNextBlockLevel(), tsGetPortTrigSrcEnabled(), tsGetPrescale(), tsGetSerialNumber(), tsGetSpecialEventType(), tsGetSyncEventFlag(), tsGetSyncEventReceived(), tsGetSyncResetRequest(), tsGetTrigCoinWindow(), tsGetTriggerHoldoff(), tsGetTriggerHoldoffMin(), tsGetTriggerPrescaleMask(), tsGetTrigInhibitWindow(), tsGetTrigSrcEnabledFiberMask(), tsGetTSIODrive(), tsIntDisable(), tsIntEnable(), tsLatchTimers(), tsLive(), tsPrintFPDelay(), tsPrintTriggerHoldoff(), tsReadBlock(), tsReadScalers(), tsReadScalersMon(), tsReload(), tsRemoveSlave(), tsReset(), tsResetEventCounter(), tsResetIODelay(), tsResetMGT(), tsResetSlaveConfig(), tsSetAdr32(), tsSetBlockBufferLevel(), tsSetBlockLimit(), tsSetBusySource(), tsSetClockSource(), tsSetCrateID(), tsSetEventFormat(), tsSetFPDelay(), tsSetFPInput(), tsSetFPInputReadout(), tsSetGTPInput(), tsSetGTPInputReadout(), tsSetInputMix(), tsSetInstantBlockLevelChange(), tsSetOutputPort(), tsSetPrescale(), tsSetRandomTrigger(), tsSetSyncDelayWidth(), tsSetSyncEventInterval(), tsSetSyncSource(), tsSetTrigCoinWindow(), tsSetTriggerHoldoff(), tsSetTriggerHoldoffMin(), tsSetTriggerPrescale(), tsSetTriggerPulse(), tsSetTrigInhibitWindow(), tsSetTSIODrive(), tsSlaveStatus(), tsSoftTrig(), tsStatus(), tsSyncReset(), tsSyncResetRequest(), tsSyncResetResync(), tsTriggerReadyReset(), tsTrigLinkDisable(), tsTrigLinkReset(), and tsUserSyncReset().

◆ TSUNLOCK

#define TSUNLOCK   if(pthread_mutex_unlock(&tsMutex)<0) perror("pthread_mutex_unlock");

Mutex Unlock

Referenced by tsBroadcastNextBlockLevel(), tsClockReset(), tsClockResync(), tsCurrentBlockFilled(), tsDefineSpecialEventType(), tsDisableRandomTrigger(), tsDisableTriggerSource(), tsEnableTriggerSource(), tsFillToEndBlock(), tsForceSyncEvent(), tsGetBlockLimit(), tsGetBlockLimitStatus(), tsGetBusyStatus(), tsGetBusyTime(), tsGetBusyTime_InputHigh(), tsGetCrateID(), tsGetCurrentBlockLevel(), tsGetEventCounter(), tsGetFirmwareVersion(), tsGetFPDelay(), tsGetInputMix(), tsGetInstantBlockLevelChange(), tsGetLiveTime(), tsGetLiveTime_InputHigh(), tsGetNextBlockLevel(), tsGetPortTrigSrcEnabled(), tsGetPrescale(), tsGetSerialNumber(), tsGetSpecialEventType(), tsGetSyncResetRequest(), tsGetTrigCoinWindow(), tsGetTriggerHoldoff(), tsGetTriggerHoldoffMin(), tsGetTriggerPrescaleMask(), tsGetTrigInhibitWindow(), tsGetTrigSrcEnabledFiberMask(), tsGetTSIODrive(), tsLatchTimers(), tsLive(), tsPrintFPDelay(), tsPrintTriggerHoldoff(), tsReadScalers(), tsReadScalersMon(), tsReload(), tsRemoveSlave(), tsReset(), tsResetEventCounter(), tsResetIODelay(), tsResetMGT(), tsResetSlaveConfig(), tsSetAdr32(), tsSetBlockBufferLevel(), tsSetBlockLimit(), tsSetBusySource(), tsSetClockSource(), tsSetCrateID(), tsSetEventFormat(), tsSetFPDelay(), tsSetFPInput(), tsSetFPInputReadout(), tsSetGTPInput(), tsSetGTPInputReadout(), tsSetInputMix(), tsSetInstantBlockLevelChange(), tsSetOutputPort(), tsSetPrescale(), tsSetRandomTrigger(), tsSetSyncDelayWidth(), tsSetSyncEventInterval(), tsSetSyncSource(), tsSetTrigCoinWindow(), tsSetTriggerHoldoff(), tsSetTriggerHoldoffMin(), tsSetTriggerPrescale(), tsSetTriggerPulse(), tsSetTrigInhibitWindow(), tsSetTSIODrive(), tsSlaveStatus(), tsSoftTrig(), tsTriggerReadyReset(), tsTrigLinkDisable(), tsTrigLinkReset(), and tsUserSyncReset().

Function Documentation

◆ tsCheckAddresses()

◆ tsGetInputMix()

int tsGetInputMix ( )

Get option to mix FP and GTP inputs Effectively swaps the FP(16:1) -> GTP'(32:17) and GTP(32:17) -> FP'(16:1) in both trigger table and data pattern output.

Returns
0 if disabled, 1 if enabled, ERROR otherwise

References TS_A24RegStruct::clock, TS_CLOCK_INPUT_MIX_CONTROL_MASK, TSLOCK, and TSUNLOCK.

◆ tsPrintTriggerHoldoff()

Variable Documentation

◆ PayloadPort

unsigned short PayloadPort[MAX_VME_SLOTS+1]
Initial value:
=
{
0,
0,
17, 15, 13, 11, 9, 7, 5, 3, 1,
0,
0,
2, 4, 6, 8, 10, 12, 14, 16,
18
}

VXS Payload Port to VME Slot map

Referenced by tsPayloadPort2VMESlot(), and tsVMESlot2PayloadPort().

◆ tsA24Offset

unsigned long tsA24Offset =0

Difference in CPU A24 Base and VME A24 Base

Referenced by tsPartInit(), and tsSlaveStatus().

◆ tsA32Base

unsigned int tsA32Base =0x10000000

Minimum VME A32 Address for use by TS

Referenced by tsSetAdr32().

◆ tsA32Offset

unsigned long tsA32Offset =0

Difference in CPU A32 Base and VME A32 Base

Referenced by tsSetAdr32().

◆ tsAckCount

unsigned int tsAckCount = 0

Referenced by tsIntEnable().

◆ tsBlockLevel

int tsBlockLevel =0

Current Block level for TS

Referenced by tsGetCurrentBlockLevel(), tsGetNextBlockLevel(), and tsReadTriggerBlock().

◆ tsCrateID

int tsCrateID =0x59

Crate ID

Referenced by tsSetCrateID(), and tsSetCrateID_preInit().

◆ tsDaqCount

unsigned int tsDaqCount = 0

Block count from previous update (in daqStatus)

◆ tsDoAck

int tsDoAck = 0

Instruction to perform a Readout Acknowledge

◆ tsIntCount

unsigned int tsIntCount = 0

Referenced by tsGetIntCount(), and tsIntEnable().

◆ tsMutex

pthread_mutex_t tsMutex = PTHREAD_MUTEX_INITIALIZER

Mutex to guard TS read/writes

◆ tsNeedAck

int tsNeedAck = 0

Requirement to perform a Readout Acknowledge

◆ tsNextBlockLevel

int tsNextBlockLevel =0

Next Block level for TS

Referenced by tsGetCurrentBlockLevel(), and tsGetNextBlockLevel().

◆ TSp

volatile struct TS_A24RegStruct* TSp =NULL

pointer to TS memory map

◆ TSpart

volatile struct PartitionStruct* TSpart =NULL

pointer to partition registers

◆ TSpd

volatile unsigned int* TSpd =NULL

pointer to TS data FIFO

Referenced by tsReadBlock(), and tsSetAdr32().

◆ tspollthread

pthread_t tspollthread

◆ tspollthread_attr

pthread_attr_t tspollthread_attr

◆ tsReadoutMode

unsigned int tsReadoutMode = 0

◆ tsSlaveMask

unsigned int tsSlaveMask = 0

TI Slaves (mask) to be used with TI Master

Referenced by tsAddSlave(), tsRemoveSlave(), tsResetSlaveConfig(), and tsSlaveStatus().

◆ tsTriggerSource

unsigned int tsTriggerSource = 0

Set with tsSetTriggerSource(...)

Referenced by tsEnableTriggerSource(), tsSetTriggerSource(), and tsSetTriggerSourceMask().