JLab Pipeline TS Library
3v7.1
|
Go to the source code of this file.
Data Structures | |
struct | ScalerStruct |
struct | PartitionStruct |
struct | PartTrigTableStruct |
struct | TS_A24RegStruct |
Functions | |
int | tsSetCrateID_preInit (int cid) |
Set the CrateID to be used during initialization. More... | |
int | tsInit (unsigned int tAddr, unsigned int mode, int force) |
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 | tsReset () |
Perform a soft reset of the TS. 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 | 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 | 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 | tsPayloadPortMask2VMESlotMask (int payloadport_mask) |
int | tsVMESlot2PayloadPort (int vmeslot) |
Routine to return the VXS payload port, provided the VME Slot. More... | |
int | tsVMESlotMask2PayloadPortMask (int vmeslot_mask) |
int | tsSetPrescale (int prescale) |
Set the prescale factor for the external trigger. More... | |
int | tsGetPrescale () |
Get the current prescale factor. More... | |
int | tsSetTriggerPulse (int trigger, int delay, int width) |
Set the characteristics of a specified trigger. More... | |
void | tsTrigLinkReset () |
Reset the trigger link. More... | |
void | tsSetSyncDelayWidth (unsigned int delay, unsigned int width, int widthstep) |
Set the delay time and width of the Sync signal. 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... | |
int | tsIntPoll () |
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 | tsSetupFiberLoopback () |
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... | |
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... | |
void | tsTriggerTableDefault () |
Configure trigger table to be loaded with a predefined trigger table (mapping GTP and FP inputs to trigger types). 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... | |
unsigned int | tsGetDaqStatus () |
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 | tsVmeTrigger1 () |
int | tsVmeTrigger2 () |
void | tsSetFiberDelay (unsigned int number, unsigned int offset) |
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 | 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... | |
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 | tsPrintTriggerHoldoff (int dflag) |
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 | tsISR_mutex =PTHREAD_MUTEX_INITIALIZER |
#define INTLOCK |
#define INTUNLOCK |
#define TS_ADR24_ADDRESS_MASK 0x0000001F |
#define TS_ADR24_HARDWARE_SET_MASK 0x000003E0 |
#define TS_ADR24_TM_NBLOCKS_NEEDACK1 0xFF000000 |
#define TS_ADR24_TM_NBLOCKS_READY1 0x00FF0000 |
#define TS_ADR32_BASE_MASK 0xFF800000 |
Referenced by tsSetAdr32().
#define TS_ADR32_MBLK_ADDR_MAX_MASK 0x000003FE |
#define TS_ADR32_MBLK_ADDR_MIN_MASK 0x003FC000 |
#define TS_BLOCK_HEADER_CRATEID_MASK 0xFF000000 |
#define TS_BLOCK_HEADER_SLOTS_MASK 0x001F0000 |
#define TS_BLOCK_TRAILER_CRATEID_MASK 0x00FF0000 |
#define TS_BLOCK_TRAILER_SLOTS_MASK 0x1F000000 |
#define TS_BLOCKBUFFER_BLOCKS_NEEDACK_MASK 0x7F000000 |
#define TS_BLOCKBUFFER_BLOCKS_READY_MASK 0x0000FF00 |
Referenced by tsBReady().
#define TS_BLOCKBUFFER_BREADY_INT_MASK 0x0F000000 |
Referenced by tsBReady().
#define TS_BLOCKBUFFER_BUFFERLEVEL_MASK 0x000000FF |
Referenced by tsSetBlockBufferLevel().
#define TS_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT (1<<28) |
Referenced by tsGetBlockLimitStatus().
#define TS_BLOCKBUFFER_SYNCEVENT (1<<31) |
#define TS_BLOCKBUFFER_SYNCRESET_REQUESTED (1<<30) |
Referenced by tsGetSyncResetRequest().
#define TS_BLOCKBUFFER_TRIGGERS_IN_BLOCK 0x00FF0000 |
#define TS_BLOCKLEVEL_CURRENT_MASK 0x00FF0000 |
Referenced by tsGetCurrentBlockLevel(), and tsGetNextBlockLevel().
#define TS_BLOCKLEVEL_MASK 0x000000FF |
Referenced by tsBroadcastNextBlockLevel().
#define TS_BLOCKLEVEL_RECEIVED_MASK 0xFF000000 |
Referenced by tsGetCurrentBlockLevel(), and tsGetNextBlockLevel().
#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK0 0x0000FF00 |
Referenced by tsBlockStatus(), and tsSlaveStatus().
#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK1 0xFF000000 |
Referenced by tsSlaveStatus().
#define TS_BLOCKSTATUS_NBLOCKS_READY0 0x000000FF |
Referenced by tsBlockStatus(), and tsSlaveStatus().
#define TS_BLOCKSTATUS_NBLOCKS_READY1 0x00FF0000 |
Referenced by tsSlaveStatus().
#define TS_BOARDID_CRATEID_MASK 0x000000FF |
Referenced by tsSetCrateID().
#define TS_BOARDID_GEOADR_MASK 0x00001F00 |
Referenced by tsPartInit().
#define TS_BOARDID_PROD_MASK 0x00FF0000 |
#define TS_BOARDID_TYPE_MASK 0xFF000000 |
Referenced by tsFind(), and tsPartInit().
#define TS_BOARDID_TYPE_TD 0x7D00 |
#define TS_BOARDID_TYPE_TI 0x7100 |
#define TS_BOARDID_TYPE_TIDS 0x71D5 |
#define TS_BOARDID_TYPE_TS 0x7500 |
Referenced by tsFind(), and tsPartInit().
#define TS_BUSY_ALL_BRANCHES (1<<11) |
#define TS_BUSY_BRANCH1 (1<<12) |
#define TS_BUSY_BRANCH2 (1<<13) |
#define TS_BUSY_BRANCH3 (1<<14) |
#define TS_BUSY_BRANCH4 (1<<15) |
#define TS_BUSY_FP (1<<5) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_FP_FADC (1<<4) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_FP_FTDC (1<<3) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_HFBR_MASK ((1<<9) | (1<<8)) |
Referenced by tsResetSlaveConfig().
#define TS_BUSY_INT (1<<10) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_LOOPBACK (1<<7) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_MONITOR_DUPL (1<<31) |
#define TS_BUSY_MONITOR_FIBER_BUSY | ( | x | ) | (1<<(x+27)) |
Referenced by tsSlaveStatus().
#define TS_BUSY_MONITOR_FP (1<<21) |
#define TS_BUSY_MONITOR_FP_FADC (1<<20) |
#define TS_BUSY_MONITOR_FP_FTDC (1<<19) |
#define TS_BUSY_MONITOR_LOOPBACK (1<<23) |
Referenced by tsSlaveStatus().
#define TS_BUSY_MONITOR_MASK 0xFFFF0000 |
Referenced by tsGetBusyStatus().
#define TS_BUSY_MONITOR_P2 (1<<18) |
#define TS_BUSY_MONITOR_SWA (1<<16) |
#define TS_BUSY_MONITOR_SWB (1<<17) |
#define TS_BUSY_MONITOR_TI_A (1<<28) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_MONITOR_TI_B (1<<29) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_MONITOR_TS (1<<27) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_P2 (1<<2) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_P2_TRIGGER_INPUT (1<<6) |
Referenced by tsSetBusySource().
#define TS_BUSY_SOURCEMASK 0x0000FFFF |
Referenced by tsGetBusyStatus(), and tsSetBusySource().
#define TS_BUSY_SWA (1<<0) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_SWB (1<<1) |
Referenced by tsGetBusyStatus().
#define TS_BUSY_TI_A (1<<8) |
Referenced by tsAddSlave(), tsGetBusyStatus(), and tsRemoveSlave().
#define TS_BUSY_TI_B (1<<9) |
Referenced by tsAddSlave(), and tsGetBusyStatus().
#define TS_CLOCK_EXTERNAL (1) |
Referenced by tsSetClockSource().
#define TS_CLOCK_INPUT_MIX_CONTROL_MASK 0x00000030 |
Referenced by tsGetInputMix(), and tsSetInputMix().
#define TS_CLOCK_INPUT_MIX_ENABLE (1<<4) |
Referenced by tsSetInputMix().
#define TS_CLOCK_INTERNAL (0) |
Referenced by tsSetClockSource().
#define TS_DATA_BLKLEVEL_MASK 0x000000FF |
#define TS_DATA_BLKNUM_MASK 0x0000FF00 |
#define TS_DATAFORMAT_BLOCKHEADER_BLKNUM_MASK 0x0003FF00 |
#define TS_DATAFORMAT_BLOCKHEADER_MODID_MASK 0x003C0000 |
#define TS_DATAFORMAT_BLOCKHEADER_NEVTS_MASK 0x000000FF |
#define TS_DATAFORMAT_BLOCKHEADER_SLOT_MASK 0x07C00000 |
#define TS_DATAFORMAT_BLOCKTRAILER_NWORDS_MASK 0x003FFFFF |
#define TS_DATAFORMAT_BLOCKTRAILER_SLOT_MASK 0x07C00000 |
#define TS_DATAFORMAT_DATA_TYPE_WORD (1<<31) |
Referenced by tsReadTriggerBlock().
#define TS_DATAFORMAT_FILLER_WORD_TYPE 0x78000000 |
#define TS_DATAFORMAT_FPINPUT_READOUT (1<<4) |
Referenced by tsSetFPInputReadout().
#define TS_DATAFORMAT_GTPINPUT_READOUT (1<<3) |
Referenced by tsSetGTPInputReadout().
#define TS_DATAFORMAT_HIGHERBITS_WORD (1<<2) |
Referenced by tsSetEventFormat().
#define TS_DATAFORMAT_TIMING_WORD (1<<1) |
Referenced by tsSetEventFormat().
#define TS_DATAFORMAT_TWOBLOCK_PLACEHOLDER (1<<0) |
#define TS_DATAFORMAT_TYPE_BLOCK_HEADER 0 |
Referenced by tsReadTriggerBlock().
#define TS_DATAFORMAT_TYPE_BLOCK_TRAILER 1 |
Referenced by tsReadTriggerBlock().
#define TS_DATAFORMAT_TYPE_MASK 0x78000000 |
Referenced by tsReadTriggerBlock().
#define TS_DATAFORMAT_WORDS_MASK 0x00000007 |
Referenced by tsSetEventFormat().
#define TS_DUPL_FAST_CLEAR_BUSY_MASK 0x3FF00000 |
#define TS_DUPL_FAST_CLEAR_DELAY_MASK 0x0007fc00 |
#define TS_DUPL_FAST_CLEAR_VETO_WIDTH_MASK 0xFF000000 |
#define TS_DUPL_FAST_CLEAR_WIDTH_MASK 0x00FF0000 |
#define TS_DUPL_LOCAL_TRIG_BUSY_MASK 0x000003FF |
#define TS_DUPL_LOCAL_TRIG_RULE_MASK 0x0000007F |
#define TS_DUPL_LOCAL_TRIG_WIDTH_MASK 0x0000FF00 |
#define TS_EMPTY_FIFO 0xF545BAD5 |
#define TS_EVENTNUMBER_FIBER_A_ENABLE (1<<0) |
#define TS_EVENTNUMBER_FIBER_A_INT_NOT_REQUESTED (1<<5) |
#define TS_EVENTNUMBER_FIBER_A_TRANSCEIVER_MISSING (1<<4) |
#define TS_EVENTNUMBER_FIBER_B_ENABLE (1<<1) |
#define TS_EVENTNUMBER_FIBER_B_INT_NOT_REQUESTED (1<<7) |
#define TS_EVENTNUMBER_FIBER_B_TRANSCEIVER_MISSING (1<<6) |
#define TS_EVENTNUMBER_HI_MASK 0xFFFF0000 |
Referenced by tsGetEventCounter().
#define TS_FIBER_ENABLE_P0 (1<<8) |
#define TS_FIBER_I2C_ACTIVE (1<<2) |
#define TS_FIBER_LOW_POWER (1<<1) |
#define TS_FIBER_RESET (1<<3) |
#define TS_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK 0x0000FF00 |
#define TS_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK 0xFF000000 |
#define TS_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK 0x00FF0000 |
#define TS_FIRMWARE_ID_MASK 0xFFFF0000 |
Referenced by tsPartInit().
#define TS_FIRMWARE_MAJOR_VERSION_MASK 0x00000FF0 |
Referenced by tsPartInit().
#define TS_FIRMWARE_TYPE_MASK 0x0000F000 |
Referenced by tsPartInit().
#define TS_FIRMWARE_TYPE_P 3 |
#define TS_FIRMWARE_TYPE_PROD 1 |
#define TS_FIRWMARE_MINOR_VERSION_MASK 0x0000000F |
Referenced by tsPartInit().
#define TS_FIXEDPULSER1_NTRIGGERS_MASK 0x0000FFFF |
Referenced by tsSoftTrig().
#define TS_FIXEDPULSER1_PERIOD_MASK 0x7FFF0000 |
Referenced by tsSoftTrig().
#define TS_FIXEDPULSER1_PERIOD_RANGE (1<<31) |
#define TS_FIXEDPULSER2_NTRIGGERS_MASK 0x0000FFFF |
#define TS_FIXEDPULSER2_PERIOD_MASK 0x7FFF0000 |
#define TS_FIXEDPULSER2_PERIOD_RANGE (1<<31) |
#define TS_FPDELAY_MASK | ( | x | ) | (0x1FF<<(10*(x%3))) |
Referenced by tsGetFPDelay(), tsPrintFPDelay(), and tsSetFPDelay().
#define TS_GTPSTATUSA_PLL_LOCK_MASK 0x00000F00 |
#define TS_GTPSTATUSA_RESET_DONE_MASK 0x000000FF |
#define TS_GTPSTATUSB_CHANNEL_BONDING_MASK 0x000000FF |
#define TS_GTPSTATUSB_DATA_ERROR_MASK 0x0000FF00 |
#define TS_GTPSTATUSB_DATA_NOT_IN_TABLE_ERROR_MASK 0xFF000000 |
#define TS_GTPSTATUSB_DISPARITY_ERROR_MASK 0x00FF0000 |
#define TS_GTPTRIGGERBUFFERLENGTH_CLK125_DCM_LOCK (1<<30) |
#define TS_GTPTRIGGERBUFFERLENGTH_CLK250_DCM_LOCK (1<<29) |
#define TS_GTPTRIGGERBUFFERLENGTH_GLOBAL_LENGTH_MASK 0x000007FF |
#define TS_GTPTRIGGERBUFFERLENGTH_HFBR1_MGT_ERROR (1<<28) |
#define TS_GTPTRIGGERBUFFERLENGTH_SUBSYS_LENGTH_MASK 0x07FF0000 |
#define TS_GTPTRIGGERBUFFERLENGTH_VMECLK_DCM_LOCK (1<<31) |
#define TS_I2C_8BIT_DATA_MASK 0x000000ff |
#define TS_I2C_DATA_MASK 0x0000ffff |
#define TS_ID_CRATEID_MASK 0x0000FF00 |
Referenced by tsGetCrateID(), and tsSlaveStatus().
#define TS_ID_TRIGSRC_ENABLE_MASK 0x000000FF |
Referenced by tsGetPortTrigSrcEnabled(), tsGetTrigSrcEnabledFiberMask(), and tsSlaveStatus().
#define TS_INIT_DUPLICATION_MODE (1<<3) |
Referenced by tsInit().
#define TS_INIT_NO_INIT (1<<0) |
Referenced by tsInit().
#define TS_INIT_SKIP_FIRMWARE_CHECK (1<<2) |
Referenced by tsInit().
#define TS_INT_LEVEL 5 |
#define TS_INT_VEC 0xc8 |
#define TS_INTSETUP_ENABLE (1<<16) |
Referenced by tsIntDisable().
#define TS_INTSETUP_LEVEL_MASK 0x00000F00 |
#define TS_INTSETUP_VECTOR_MASK 0x000000FF |
#define TS_NBLOCKS_COUNT_MASK 0x00FFFFFF |
#define TS_NBLOCKS_EVENTS_IN_BLOCK_MASK 0xFF000000 |
Referenced by tsCurrentBlockFilled().
#define TS_OUTPUT_BLOCKS_FOR_INT_MASK 0xFFFF0000 |
#define TS_OUTPUT_FP_1 (1<<0) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_2 (1<<1) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_3 (1<<2) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_4 (1<<3) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_5 (1<<4) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_6 (1<<5) |
Referenced by tsSetOutputPort().
#define TS_OUTPUT_FP_MASK 0x0000003F |
#define TS_PART_BLOCKBUFFER_BLOCKLEVEL_MASK 0x000000FF |
#define TS_PART_BLOCKBUFFER_BLOCKS_READY_MASK 0x00FFFF00 |
#define TS_PART_BLOCKBUFFER_EVENTS_LEFT_IN_BLOCK_MASK 0xFF000000 |
#define TS_PART_BLOCKBUFFERINFO_BLOCKS_READY_MASK 0x00FFFF00 |
#define TS_PART_BUSYCONFIG_ALMOSTFULL_ENABLE (1<<16) |
#define TS_PART_BUSYCONFIG_BUFFERLEVEL_ENABLE (1<<17) |
#define TS_PART_BUSYCONFIG_BUFFERLEVEL_MASK 0xFF000000 |
#define TS_PART_BUSYCONFIG_BUSYSRC_MASK 0x00F00000 |
#define TS_PART_BUSYCONFIG_FP (1<<21) |
#define TS_PART_BUSYCONFIG_SWB (1<<20) |
#define TS_PART_BUSYCONFIG_TD_INPUT_MASK 0x0000FFFF |
#define TS_PART_BUSYCONFIG_TI_A (1<<22) |
#define TS_PART_BUSYCONFIG_TI_B (1<<23) |
#define TS_PART_BUSYTIME_MASK 0x0000FFFF |
#define TS_RANDOMPULSER_TRIG1_ENABLE (1<<7) |
Referenced by tsSetRandomTrigger().
#define TS_RANDOMPULSER_TRIG1_RATE_MASK 0x0000000F |
Referenced by tsSetRandomTrigger().
#define TS_RANDOMPULSER_TRIG2_ENABLE (1<<15) |
Referenced by tsSetRandomTrigger().
#define TS_RANDOMPULSER_TRIG2_RATE_MASK 0x00000F00 |
#define TS_READOUT_EXT_INT 0 |
#define TS_READOUT_EXT_POLL 2 |
#define TS_RESET_AUTOALIGN_HFBR1_SYNC (1<<11) |
#define TS_RESET_AUTOALIGN_HFBR5_SYNC (1<<12) |
#define TS_RESET_BUSYACK (1<<7) |
#define TS_RESET_CLK125 (1<<9) |
Referenced by tsSetClockSource().
#define TS_RESET_CLK200 (1<<8) |
#define TS_RESET_CLK250 (1<<8) |
Referenced by tsSetClockSource().
#define TS_RESET_FILL_TO_END_BLOCK (1<<31) |
Referenced by tsFillToEndBlock().
#define TS_RESET_FORCE_SYNCEVENT (1<<20) |
Referenced by tsForceSyncEvent().
#define TS_RESET_I2C (1<<1) |
#define TS_RESET_IODELAY (1<<14) |
Referenced by tsResetIODelay().
#define TS_RESET_JTAG (1<<2) |
Referenced by tsGetFirmwareVersion(), tsGetSerialNumber(), and tsReload().
#define TS_RESET_LATCH_TIMERS (1<<24) |
Referenced by tsLatchTimers(), tsLive(), tsReadScalersMon(), and tsStatus().
#define TS_RESET_MEASURE_LATENCY (1<<15) |
#define TS_RESET_MGT (1<<10) |
Referenced by tsResetMGT().
#define TS_RESET_PART_ACK | ( | pID | ) | (1<<(pID+25)) |
#define TS_RESET_RAM_WRITE (1<<12) |
#define TS_RESET_RESET_L1A_NUMBER (1<<25) |
Referenced by tsResetEventCounter().
#define TS_RESET_SFM (1<<3) |
#define TS_RESET_SOFT (1<<4) |
Referenced by tsReset().
#define TS_RESET_SYNCRESET_REQUEST (1<<23) |
#define TS_RESET_TAKE_TOKEN (1<<16) |
#define TS_SCALER_SCALE_HI (1<<31) |
Referenced by tsPrintScalers(), tsReadScalers(), and tsReadScalersMon().
#define TS_SCALER_SCALE_HI_LSB_MASK 0x7fffff80 |
Referenced by tsReadScalers(), and tsReadScalersMon().
#define TS_SCALER_SCALE_HI_MSB_MASK 0x0000007f |
Referenced by tsReadScalers(), and tsReadScalersMon().
#define TS_SPECIALEVTYPES_GTP_AND_FP_MASK 0x0000FF00 |
Referenced by tsDefineSpecialEventType(), and tsGetSpecialEventType().
#define TS_SPECIALEVTYPES_MULT_GTP_OR_FP_MASK 0x000000FF |
Referenced by tsDefineSpecialEventType(), and tsGetSpecialEventType().
#define TS_SPECIALEVTYPES_PULSER_MASK 0xFF000000 |
Referenced by tsDefineSpecialEventType(), and tsGetSpecialEventType().
#define TS_SPECIALEVTYPES_VME_MASK 0x00FF0000 |
Referenced by tsDefineSpecialEventType(), and tsGetSpecialEventType().
#define TS_SUPPORTED_FIRMWARE 0x71 |
Referenced by tsGetDriverSupportedVersion().
#define TS_SUPPORTED_TYPE TS_FIRMWARE_TYPE_P |
#define TS_SYNC_FP (1<<3) |
#define TS_SYNC_HFBR1 (1<<1) |
#define TS_SYNC_HFBR5 (1<<2) |
#define TS_SYNC_LOOPBACK (1<<4) |
#define TS_SYNC_MONITOR_MASK 0xFFFF0000 |
#define TS_SYNC_P0 (1<<0) |
#define TS_SYNC_SOURCEMASK 0x0000FFFF |
Referenced by tsSetSyncSource().
#define TS_SYNCCOMMAND_AD9510_RESYNC 0x33 |
Referenced by tsClockResync().
#define TS_SYNCCOMMAND_CLK250_RESYNC 0x22 |
Referenced by tsClockReset().
#define TS_SYNCCOMMAND_GTP_STATUSB_RESET 0x44 |
#define TS_SYNCCOMMAND_RESET_EVNUM 0xBB |
#define TS_SYNCCOMMAND_SYNCCODE_MASK 0x000000FF |
#define TS_SYNCCOMMAND_SYNCRESET 0xDD |
#define TS_SYNCCOMMAND_SYNCRESET_4US 0xEE |
#define TS_SYNCCOMMAND_SYNCRESET_HIGH 0x99 |
Referenced by tsUserSyncReset().
#define TS_SYNCCOMMAND_SYNCRESET_LOW 0xCC |
Referenced by tsUserSyncReset().
#define TS_SYNCCOMMAND_TRIGGER_READY_RESET 0xAA |
Referenced by tsTriggerReadyReset().
#define TS_SYNCCOMMAND_TRIGGERLINK_DISABLE 0x77 |
Referenced by tsTrigLinkDisable(), and tsTrigLinkReset().
#define TS_SYNCCOMMAND_TRIGGERLINK_ENABLE 0x55 |
Referenced by tsTrigLinkReset().
#define TS_SYNCCOMMAND_VME_CLOCKRESET 0x11 |
#define TS_SYNCDELAY_MASK 0x0000007F |
Referenced by tsSetSyncDelayWidth().
#define TS_SYNCEVENTCTRL_NBLOCKS_MASK 0x00FFFFFF |
Referenced by tsSetSyncEventInterval().
#define TS_SYNCWIDTH_LONGWIDTH_ENABLE (1<<7) |
Referenced by tsSetSyncDelayWidth().
#define TS_SYNCWIDTH_MASK 0x7F |
Referenced by tsSetSyncDelayWidth().
#define TS_TRIG1PRESCALE_MASK 0x0000FFFF |
#define TS_TRIGDELAY_TRIG1_DELAY_MASK 0x000000FF |
Referenced by tsSetTriggerPulse().
#define TS_TRIGDELAY_TRIG1_WIDTH_MASK 0x0000FF00 |
Referenced by tsSetTriggerPulse().
#define TS_TRIGDELAY_TRIG2_DELAY_MASK 0x00FF0000 |
Referenced by tsSetTriggerPulse().
#define TS_TRIGDELAY_TRIG2_WIDTH_MASK 0xFF000000 |
Referenced by tsSetTriggerPulse().
#define TS_TRIGGER_ENABLE (1<<8) |
Referenced by tsSetTriggerSource().
#define TS_TRIGGER_FPTRG (1<<3) |
#define TS_TRIGGER_HFBR1 (1<<1) |
#define TS_TRIGGER_LOOPBACK (1<<2) |
Referenced by tsSetTriggerSource(), and tsSlaveStatus().
#define TS_TRIGGER_MONITOR_MASK 0xFFFF0000 |
#define TS_TRIGGER_P0 (1<<0) |
#define TS_TRIGGER_P2BUSY (1<<9) |
#define TS_TRIGGER_PART | ( | pID | ) | (1<<(pID+11)) |
#define TS_TRIGGER_PULSER (1<<7) |
Referenced by tsSetTriggerSource().
#define TS_TRIGGER_SOURCEMASK 0x000003FF |
Referenced by tsSetTriggerSourceMask().
#define TS_TRIGGER_TSINPUTS (1<<5) |
#define TS_TRIGGER_TSREV2 (1<<6) |
#define TS_TRIGGER_VME (1<<4) |
Referenced by tsBroadcastNextBlockLevel(), and tsSetTriggerSource().
#define TS_TRIGGERCOMMAND_CODE_MASK 0x00000F00 |
#define TS_TRIGGERCOMMAND_SET_BLOCKLEVEL 0x00000800 |
Referenced by tsBroadcastNextBlockLevel().
#define TS_TRIGGERCOMMAND_SYNC_EVENT 0x00000300 |
#define TS_TRIGGERCOMMAND_TRIG1 0x00000100 |
#define TS_TRIGGERCOMMAND_TRIG2 0x00000200 |
#define TS_TRIGGERCOMMAND_VALUE_MASK 0x000000FF |
#define TS_TRIGGERRULE_RULE1_MASK 0x000000FF |
Referenced by tsGetTriggerHoldoff(), and tsSetTriggerHoldoff().
#define TS_TRIGGERRULE_RULE2_MASK 0x0000FF00 |
Referenced by tsGetTriggerHoldoff(), and tsSetTriggerHoldoff().
#define TS_TRIGGERRULE_RULE3_MASK 0x00FF0000 |
Referenced by tsGetTriggerHoldoff(), and tsSetTriggerHoldoff().
#define TS_TRIGGERRULE_RULE4_MASK 0xFF000000 |
Referenced by tsGetTriggerHoldoff(), and tsSetTriggerHoldoff().
#define TS_TRIGGERRULEMIN_MIN2_EN (1<<15) |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERRULEMIN_MIN2_MASK 0x00007F00 |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERRULEMIN_MIN3_EN (1<<23) |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERRULEMIN_MIN3_MASK 0x007F0000 |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERRULEMIN_MIN4_EN (1<<31) |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERRULEMIN_MIN4_MASK 0x7F000000 |
Referenced by tsGetTriggerHoldoffMin(), and tsSetTriggerHoldoffMin().
#define TS_TRIGGERWINDOW_COINC_MASK 0x000000FF |
Referenced by tsGetTrigCoinWindow(), and tsSetTrigCoinWindow().
#define TS_TRIGGERWINDOW_INHIBIT_MASK 0x0000FF00 |
Referenced by tsGetTrigInhibitWindow(), and tsSetTrigInhibitWindow().
#define TS_TRIGGERWINDOW_TRIG21_DELAY_MASK 0x00FF0000 |
#define TS_TRIGSRC_EXT 6 |
#define TS_TRIGSRC_PULSER 5 |
#define TS_VMECONTROL_A32 (1<<4) |
Referenced by tsSetAdr32().
#define TS_VMECONTROL_A32M (1<<3) |
#define TS_VMECONTROL_BERR (1<<0) |
Referenced by tsDisableBusError(), and tsEnableBusError().
#define TS_VMECONTROL_BLOCKLEVEL_UPDATE (1<<21) |
Referenced by tsGetInstantBlockLevelChange(), and tsSetInstantBlockLevelChange().
#define TS_VMECONTROL_BUFFER_DISABLE (1<<12) |
#define TS_VMECONTROL_DRIVE_TSIO_EN (1<<20) |
Referenced by tsGetTSIODrive(), and tsSetTSIODrive().
#define TS_VMECONTROL_FIRST_BOARD (1<<10) |
#define TS_VMECONTROL_I2CDEV_HACK (1<<8) |
#define TS_VMECONTROL_INT (1<<7) |
#define TS_VMECONTROL_LAST_BOARD (1<<11) |
#define TS_VMECONTROL_MBLK (1<<2) |
#define TS_VMECONTROL_SLOWER_TRIGGER_RULES (1<<31) |
Referenced by tsSetTriggerHoldoff().
#define TS_VMECONTROL_TOKEN (1<<1) |
#define TS_VMECONTROL_TOKEN_HI (1<<9) |
int tsCheckAddresses | ( | ) |
References TS_A24RegStruct::adr24, TS_A24RegStruct::boardID, TS_A24RegStruct::FPTriggerTable, TS_A24RegStruct::GTPtrigger, TS_A24RegStruct::GTPTriggerTable, TS_A24RegStruct::JTAGFPGABase, TS_A24RegStruct::JTAGPROMBase, TS_A24RegStruct::part1, TS_A24RegStruct::part2, TS_A24RegStruct::reset, TS_A24RegStruct::Scalers1, TS_A24RegStruct::Scalers2, TS_A24RegStruct::SWA, TS_A24RegStruct::SWB, TS_A24RegStruct::syncWidth, and TS_A24RegStruct::trigger.
unsigned int tsGetDaqStatus | ( | ) |
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.
References TS_A24RegStruct::clock, TS_CLOCK_INPUT_MIX_CONTROL_MASK, TSLOCK, and TSUNLOCK.
int tsIntPoll | ( | ) |
int tsPayloadPortMask2VMESlotMask | ( | int | payloadport_mask | ) |
int tsPrintTriggerHoldoff | ( | int | dflag | ) |
void tsSetFiberDelay | ( | unsigned int | number, |
unsigned int | offset | ||
) |
int tsSetupFiberLoopback | ( | ) |
int tsVMESlotMask2PayloadPortMask | ( | int | vmeslot_mask | ) |
int tsVmeTrigger1 | ( | ) |
int tsVmeTrigger2 | ( | ) |
pthread_mutex_t tsISR_mutex =PTHREAD_MUTEX_INITIALIZER |