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

Go to the source code of this file.

Data Structures

struct  ScalerStruct
 
struct  PartitionStruct
 
struct  PartTrigTableStruct
 
struct  TS_A24RegStruct
 

Macros

#define INTLOCK
 
#define INTUNLOCK
 
#define TS_READOUT_EXT_INT   0
 
#define TS_READOUT_EXT_POLL   2
 
#define TS_FIRMWARE_ID_MASK   0xFFFF0000
 
#define TS_FIRMWARE_TYPE_MASK   0x0000F000
 
#define TS_FIRMWARE_TYPE_PROD   1
 
#define TS_FIRMWARE_TYPE_P   3
 
#define TS_FIRMWARE_MAJOR_VERSION_MASK   0x00000FF0
 
#define TS_FIRWMARE_MINOR_VERSION_MASK   0x0000000F
 
#define TS_SUPPORTED_FIRMWARE   0x71
 
#define TS_SUPPORTED_TYPE   TS_FIRMWARE_TYPE_P
 
#define TS_TRIGSRC_PULSER   5
 
#define TS_TRIGSRC_EXT   6
 
#define TS_BOARDID_TYPE_TIDS   0x71D5
 
#define TS_BOARDID_TYPE_TI   0x7100
 
#define TS_BOARDID_TYPE_TS   0x7500
 
#define TS_BOARDID_TYPE_TD   0x7D00
 
#define TS_BOARDID_TYPE_MASK   0xFF000000
 
#define TS_BOARDID_PROD_MASK   0x00FF0000
 
#define TS_BOARDID_GEOADR_MASK   0x00001F00
 
#define TS_BOARDID_CRATEID_MASK   0x000000FF
 
#define TS_FIBER_LOW_POWER   (1<<1)
 
#define TS_FIBER_I2C_ACTIVE   (1<<2)
 
#define TS_FIBER_RESET   (1<<3)
 
#define TS_FIBER_ENABLE_P0   (1<<8)
 
#define TS_INTSETUP_VECTOR_MASK   0x000000FF
 
#define TS_INTSETUP_LEVEL_MASK   0x00000F00
 
#define TS_INTSETUP_ENABLE   (1<<16)
 
#define TS_TRIGDELAY_TRIG1_DELAY_MASK   0x000000FF
 
#define TS_TRIGDELAY_TRIG1_WIDTH_MASK   0x0000FF00
 
#define TS_TRIGDELAY_TRIG2_DELAY_MASK   0x00FF0000
 
#define TS_TRIGDELAY_TRIG2_WIDTH_MASK   0xFF000000
 
#define TS_ADR32_MBLK_ADDR_MAX_MASK   0x000003FE
 
#define TS_ADR32_MBLK_ADDR_MIN_MASK   0x003FC000
 
#define TS_ADR32_BASE_MASK   0xFF800000
 
#define TS_BLOCKLEVEL_MASK   0x000000FF
 
#define TS_BLOCKLEVEL_CURRENT_MASK   0x00FF0000
 
#define TS_BLOCKLEVEL_RECEIVED_MASK   0xFF000000
 
#define TS_DATAFORMAT_TWOBLOCK_PLACEHOLDER   (1<<0)
 
#define TS_DATAFORMAT_TIMING_WORD   (1<<1)
 
#define TS_DATAFORMAT_HIGHERBITS_WORD   (1<<2)
 
#define TS_DATAFORMAT_WORDS_MASK   0x00000007
 
#define TS_DATAFORMAT_GTPINPUT_READOUT   (1<<3)
 
#define TS_DATAFORMAT_FPINPUT_READOUT   (1<<4)
 
#define TS_VMECONTROL_BERR   (1<<0)
 
#define TS_VMECONTROL_TOKEN   (1<<1)
 
#define TS_VMECONTROL_MBLK   (1<<2)
 
#define TS_VMECONTROL_A32M   (1<<3)
 
#define TS_VMECONTROL_A32   (1<<4)
 
#define TS_VMECONTROL_INT   (1<<7)
 
#define TS_VMECONTROL_I2CDEV_HACK   (1<<8)
 
#define TS_VMECONTROL_TOKEN_HI   (1<<9)
 
#define TS_VMECONTROL_FIRST_BOARD   (1<<10)
 
#define TS_VMECONTROL_LAST_BOARD   (1<<11)
 
#define TS_VMECONTROL_BUFFER_DISABLE   (1<<12)
 
#define TS_VMECONTROL_DRIVE_TSIO_EN   (1<<20)
 
#define TS_VMECONTROL_BLOCKLEVEL_UPDATE   (1<<21)
 
#define TS_VMECONTROL_SLOWER_TRIGGER_RULES   (1<<31)
 
#define TS_TRIGGER_SOURCEMASK   0x000003FF
 
#define TS_TRIGGER_P0   (1<<0)
 
#define TS_TRIGGER_HFBR1   (1<<1)
 
#define TS_TRIGGER_LOOPBACK   (1<<2)
 
#define TS_TRIGGER_FPTRG   (1<<3)
 
#define TS_TRIGGER_VME   (1<<4)
 
#define TS_TRIGGER_TSINPUTS   (1<<5)
 
#define TS_TRIGGER_TSREV2   (1<<6)
 
#define TS_TRIGGER_PULSER   (1<<7)
 
#define TS_TRIGGER_ENABLE   (1<<8)
 
#define TS_TRIGGER_P2BUSY   (1<<9)
 
#define TS_TRIGGER_PART(pID)   (1<<(pID+11))
 
#define TS_TRIGGER_MONITOR_MASK   0xFFFF0000
 
#define TS_SYNC_SOURCEMASK   0x0000FFFF
 
#define TS_SYNC_P0   (1<<0)
 
#define TS_SYNC_HFBR1   (1<<1)
 
#define TS_SYNC_HFBR5   (1<<2)
 
#define TS_SYNC_FP   (1<<3)
 
#define TS_SYNC_LOOPBACK   (1<<4)
 
#define TS_SYNC_MONITOR_MASK   0xFFFF0000
 
#define TS_BUSY_SOURCEMASK   0x0000FFFF
 
#define TS_BUSY_SWA   (1<<0)
 
#define TS_BUSY_SWB   (1<<1)
 
#define TS_BUSY_P2   (1<<2)
 
#define TS_BUSY_FP_FTDC   (1<<3)
 
#define TS_BUSY_FP_FADC   (1<<4)
 
#define TS_BUSY_FP   (1<<5)
 
#define TS_BUSY_P2_TRIGGER_INPUT   (1<<6)
 
#define TS_BUSY_LOOPBACK   (1<<7)
 
#define TS_BUSY_TI_A   (1<<8)
 
#define TS_BUSY_TI_B   (1<<9)
 
#define TS_BUSY_HFBR_MASK   ((1<<9) | (1<<8))
 
#define TS_BUSY_INT   (1<<10)
 
#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_MONITOR_SWA   (1<<16)
 
#define TS_BUSY_MONITOR_SWB   (1<<17)
 
#define TS_BUSY_MONITOR_P2   (1<<18)
 
#define TS_BUSY_MONITOR_FP_FTDC   (1<<19)
 
#define TS_BUSY_MONITOR_FP_FADC   (1<<20)
 
#define TS_BUSY_MONITOR_FP   (1<<21)
 
#define TS_BUSY_MONITOR_LOOPBACK   (1<<23)
 
#define TS_BUSY_MONITOR_TS   (1<<27)
 
#define TS_BUSY_MONITOR_TI_A   (1<<28)
 
#define TS_BUSY_MONITOR_TI_B   (1<<29)
 
#define TS_BUSY_MONITOR_FIBER_BUSY(x)   (1<<(x+27))
 
#define TS_BUSY_MONITOR_DUPL   (1<<31)
 
#define TS_BUSY_MONITOR_MASK   0xFFFF0000
 
#define TS_CLOCK_INTERNAL   (0)
 
#define TS_CLOCK_EXTERNAL   (1)
 
#define TS_CLOCK_INPUT_MIX_CONTROL_MASK   0x00000030
 
#define TS_CLOCK_INPUT_MIX_ENABLE   (1<<4)
 
#define TS_TRIG1PRESCALE_MASK   0x0000FFFF
 
#define TS_BLOCKBUFFER_BUFFERLEVEL_MASK   0x000000FF
 
#define TS_BLOCKBUFFER_BLOCKS_READY_MASK   0x0000FF00
 
#define TS_BLOCKBUFFER_TRIGGERS_IN_BLOCK   0x00FF0000
 
#define TS_BLOCKBUFFER_BLOCKS_NEEDACK_MASK   0x7F000000
 
#define TS_BLOCKBUFFER_BREADY_INT_MASK   0x0F000000
 
#define TS_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT   (1<<28)
 
#define TS_BLOCKBUFFER_SYNCRESET_REQUESTED   (1<<30)
 
#define TS_BLOCKBUFFER_SYNCEVENT   (1<<31)
 
#define TS_TRIGGERRULE_RULE1_MASK   0x000000FF
 
#define TS_TRIGGERRULE_RULE2_MASK   0x0000FF00
 
#define TS_TRIGGERRULE_RULE3_MASK   0x00FF0000
 
#define TS_TRIGGERRULE_RULE4_MASK   0xFF000000
 
#define TS_TRIGGERWINDOW_COINC_MASK   0x000000FF
 
#define TS_TRIGGERWINDOW_INHIBIT_MASK   0x0000FF00
 
#define TS_TRIGGERWINDOW_TRIG21_DELAY_MASK   0x00FF0000
 
#define TS_OUTPUT_FP_MASK   0x0000003F
 
#define TS_OUTPUT_FP_1   (1<<0)
 
#define TS_OUTPUT_FP_2   (1<<1)
 
#define TS_OUTPUT_FP_3   (1<<2)
 
#define TS_OUTPUT_FP_4   (1<<3)
 
#define TS_OUTPUT_FP_5   (1<<4)
 
#define TS_OUTPUT_FP_6   (1<<5)
 
#define TS_OUTPUT_BLOCKS_FOR_INT_MASK   0xFFFF0000
 
#define TS_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK   0x0000FF00
 
#define TS_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK   0x00FF0000
 
#define TS_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK   0xFF000000
 
#define TS_DUPL_LOCAL_TRIG_RULE_MASK   0x0000007F
 
#define TS_DUPL_LOCAL_TRIG_WIDTH_MASK   0x0000FF00
 
#define TS_DUPL_FAST_CLEAR_WIDTH_MASK   0x00FF0000
 
#define TS_DUPL_FAST_CLEAR_VETO_WIDTH_MASK   0xFF000000
 
#define TS_SPECIALEVTYPES_MULT_GTP_OR_FP_MASK   0x000000FF
 
#define TS_SPECIALEVTYPES_GTP_AND_FP_MASK   0x0000FF00
 
#define TS_SPECIALEVTYPES_VME_MASK   0x00FF0000
 
#define TS_SPECIALEVTYPES_PULSER_MASK   0xFF000000
 
#define TS_SYNCCOMMAND_VME_CLOCKRESET   0x11
 
#define TS_SYNCCOMMAND_CLK250_RESYNC   0x22
 
#define TS_SYNCCOMMAND_AD9510_RESYNC   0x33
 
#define TS_SYNCCOMMAND_GTP_STATUSB_RESET   0x44
 
#define TS_SYNCCOMMAND_TRIGGERLINK_ENABLE   0x55
 
#define TS_SYNCCOMMAND_TRIGGERLINK_DISABLE   0x77
 
#define TS_SYNCCOMMAND_SYNCRESET_HIGH   0x99
 
#define TS_SYNCCOMMAND_TRIGGER_READY_RESET   0xAA
 
#define TS_SYNCCOMMAND_RESET_EVNUM   0xBB
 
#define TS_SYNCCOMMAND_SYNCRESET_LOW   0xCC
 
#define TS_SYNCCOMMAND_SYNCRESET   0xDD
 
#define TS_SYNCCOMMAND_SYNCRESET_4US   0xEE
 
#define TS_SYNCCOMMAND_SYNCCODE_MASK   0x000000FF
 
#define TS_SYNCDELAY_MASK   0x0000007F
 
#define TS_SYNCWIDTH_MASK   0x7F
 
#define TS_SYNCWIDTH_LONGWIDTH_ENABLE   (1<<7)
 
#define TS_TRIGGERCOMMAND_VALUE_MASK   0x000000FF
 
#define TS_TRIGGERCOMMAND_CODE_MASK   0x00000F00
 
#define TS_TRIGGERCOMMAND_TRIG1   0x00000100
 
#define TS_TRIGGERCOMMAND_TRIG2   0x00000200
 
#define TS_TRIGGERCOMMAND_SYNC_EVENT   0x00000300
 
#define TS_TRIGGERCOMMAND_SET_BLOCKLEVEL   0x00000800
 
#define TS_RANDOMPULSER_TRIG1_RATE_MASK   0x0000000F
 
#define TS_RANDOMPULSER_TRIG1_ENABLE   (1<<7)
 
#define TS_RANDOMPULSER_TRIG2_RATE_MASK   0x00000F00
 
#define TS_RANDOMPULSER_TRIG2_ENABLE   (1<<15)
 
#define TS_FIXEDPULSER1_NTRIGGERS_MASK   0x0000FFFF
 
#define TS_FIXEDPULSER1_PERIOD_MASK   0x7FFF0000
 
#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_NBLOCKS_COUNT_MASK   0x00FFFFFF
 
#define TS_NBLOCKS_EVENTS_IN_BLOCK_MASK   0xFF000000
 
#define TS_GTPSTATUSA_RESET_DONE_MASK   0x000000FF
 
#define TS_GTPSTATUSA_PLL_LOCK_MASK   0x00000F00
 
#define TS_GTPSTATUSB_CHANNEL_BONDING_MASK   0x000000FF
 
#define TS_GTPSTATUSB_DATA_ERROR_MASK   0x0000FF00
 
#define TS_GTPSTATUSB_DISPARITY_ERROR_MASK   0x00FF0000
 
#define TS_GTPSTATUSB_DATA_NOT_IN_TABLE_ERROR_MASK   0xFF000000
 
#define TS_GTPTRIGGERBUFFERLENGTH_GLOBAL_LENGTH_MASK   0x000007FF
 
#define TS_GTPTRIGGERBUFFERLENGTH_SUBSYS_LENGTH_MASK   0x07FF0000
 
#define TS_GTPTRIGGERBUFFERLENGTH_HFBR1_MGT_ERROR   (1<<28)
 
#define TS_GTPTRIGGERBUFFERLENGTH_CLK250_DCM_LOCK   (1<<29)
 
#define TS_GTPTRIGGERBUFFERLENGTH_CLK125_DCM_LOCK   (1<<30)
 
#define TS_GTPTRIGGERBUFFERLENGTH_VMECLK_DCM_LOCK   (1<<31)
 
#define TS_BLOCKSTATUS_NBLOCKS_READY0   0x000000FF
 
#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK0   0x0000FF00
 
#define TS_BLOCKSTATUS_NBLOCKS_READY1   0x00FF0000
 
#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK1   0xFF000000
 
#define TS_ADR24_ADDRESS_MASK   0x0000001F
 
#define TS_ADR24_HARDWARE_SET_MASK   0x000003E0
 
#define TS_ADR24_TM_NBLOCKS_READY1   0x00FF0000
 
#define TS_ADR24_TM_NBLOCKS_NEEDACK1   0xFF000000
 
#define TS_SYNCEVENTCTRL_NBLOCKS_MASK   0x00FFFFFF
 
#define TS_EVENTNUMBER_FIBER_A_ENABLE   (1<<0)
 
#define TS_EVENTNUMBER_FIBER_B_ENABLE   (1<<1)
 
#define TS_EVENTNUMBER_FIBER_A_TRANSCEIVER_MISSING   (1<<4)
 
#define TS_EVENTNUMBER_FIBER_A_INT_NOT_REQUESTED   (1<<5)
 
#define TS_EVENTNUMBER_FIBER_B_TRANSCEIVER_MISSING   (1<<6)
 
#define TS_EVENTNUMBER_FIBER_B_INT_NOT_REQUESTED   (1<<7)
 
#define TS_EVENTNUMBER_HI_MASK   0xFFFF0000
 
#define TS_ID_TRIGSRC_ENABLE_MASK   0x000000FF
 
#define TS_ID_CRATEID_MASK   0x0000FF00
 
#define TS_RESET_I2C   (1<<1)
 
#define TS_RESET_JTAG   (1<<2)
 
#define TS_RESET_SFM   (1<<3)
 
#define TS_RESET_SOFT   (1<<4)
 
#define TS_RESET_BUSYACK   (1<<7)
 
#define TS_RESET_CLK250   (1<<8)
 
#define TS_RESET_CLK200   (1<<8)
 
#define TS_RESET_CLK125   (1<<9)
 
#define TS_RESET_MGT   (1<<10)
 
#define TS_RESET_AUTOALIGN_HFBR1_SYNC   (1<<11)
 
#define TS_RESET_AUTOALIGN_HFBR5_SYNC   (1<<12)
 
#define TS_RESET_RAM_WRITE   (1<<12)
 
#define TS_RESET_IODELAY   (1<<14)
 
#define TS_RESET_MEASURE_LATENCY   (1<<15)
 
#define TS_RESET_TAKE_TOKEN   (1<<16)
 
#define TS_RESET_FORCE_SYNCEVENT   (1<<20)
 
#define TS_RESET_SYNCRESET_REQUEST   (1<<23)
 
#define TS_RESET_LATCH_TIMERS   (1<<24)
 
#define TS_RESET_RESET_L1A_NUMBER   (1<<25)
 
#define TS_RESET_PART_ACK(pID)   (1<<(pID+25))
 
#define TS_RESET_FILL_TO_END_BLOCK   (1<<31)
 
#define TS_FPDELAY_MASK(x)   (0x1FF<<(10*(x%3)))
 
#define TS_DUPL_FAST_CLEAR_DELAY_MASK   0x0007fc00
 
#define TS_DUPL_LOCAL_TRIG_BUSY_MASK   0x000003FF
 
#define TS_DUPL_FAST_CLEAR_BUSY_MASK   0x3FF00000
 
#define TS_TRIGGERRULEMIN_MIN2_MASK   0x00007F00
 
#define TS_TRIGGERRULEMIN_MIN2_EN   (1<<15)
 
#define TS_TRIGGERRULEMIN_MIN3_MASK   0x007F0000
 
#define TS_TRIGGERRULEMIN_MIN3_EN   (1<<23)
 
#define TS_TRIGGERRULEMIN_MIN4_MASK   0x7F000000
 
#define TS_TRIGGERRULEMIN_MIN4_EN   (1<<31)
 
#define TS_INT_VEC   0xc8
 
#define TS_INT_LEVEL   5
 
#define TS_I2C_DATA_MASK   0x0000ffff
 
#define TS_I2C_8BIT_DATA_MASK   0x000000ff
 
#define TS_SCALER_SCALE_HI_MSB_MASK   0x0000007f
 
#define TS_SCALER_SCALE_HI_LSB_MASK   0x7fffff80
 
#define TS_SCALER_SCALE_HI   (1<<31)
 
#define TS_PART_BLOCKBUFFER_EVENTS_LEFT_IN_BLOCK_MASK   0xFF000000
 
#define TS_PART_BLOCKBUFFER_BLOCKS_READY_MASK   0x00FFFF00
 
#define TS_PART_BLOCKBUFFER_BLOCKLEVEL_MASK   0x000000FF
 
#define TS_PART_BLOCKBUFFERINFO_BLOCKS_READY_MASK   0x00FFFF00
 
#define TS_PART_BUSYCONFIG_BUFFERLEVEL_MASK   0xFF000000
 
#define TS_PART_BUSYCONFIG_BUSYSRC_MASK   0x00F00000
 
#define TS_PART_BUSYCONFIG_TI_B   (1<<23)
 
#define TS_PART_BUSYCONFIG_TI_A   (1<<22)
 
#define TS_PART_BUSYCONFIG_FP   (1<<21)
 
#define TS_PART_BUSYCONFIG_SWB   (1<<20)
 
#define TS_PART_BUSYCONFIG_BUFFERLEVEL_ENABLE   (1<<17)
 
#define TS_PART_BUSYCONFIG_ALMOSTFULL_ENABLE   (1<<16)
 
#define TS_PART_BUSYCONFIG_TD_INPUT_MASK   0x0000FFFF
 
#define TS_PART_BUSYTIME_MASK   0x0000FFFF
 
#define TS_EMPTY_FIFO   0xF545BAD5
 
#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_DATA_BLKNUM_MASK   0x0000FF00
 
#define TS_DATA_BLKLEVEL_MASK   0x000000FF
 
#define TS_DATAFORMAT_DATA_TYPE_WORD   (1<<31)
 
#define TS_DATAFORMAT_TYPE_MASK   0x78000000
 
#define TS_DATAFORMAT_FILLER_WORD_TYPE   0x78000000
 
#define TS_DATAFORMAT_TYPE_BLOCK_HEADER   0
 
#define TS_DATAFORMAT_BLOCKHEADER_SLOT_MASK   0x07C00000
 
#define TS_DATAFORMAT_BLOCKHEADER_MODID_MASK   0x003C0000
 
#define TS_DATAFORMAT_BLOCKHEADER_BLKNUM_MASK   0x0003FF00
 
#define TS_DATAFORMAT_BLOCKHEADER_NEVTS_MASK   0x000000FF
 
#define TS_DATAFORMAT_TYPE_BLOCK_TRAILER   1
 
#define TS_DATAFORMAT_BLOCKTRAILER_SLOT_MASK   0x07C00000
 
#define TS_DATAFORMAT_BLOCKTRAILER_NWORDS_MASK   0x003FFFFF
 
#define TS_INIT_NO_INIT   (1<<0)
 
#define TS_INIT_SKIP_FIRMWARE_CHECK   (1<<2)
 
#define TS_INIT_DUPLICATION_MODE   (1<<3)
 

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
 

Macro Definition Documentation

◆ INTLOCK

#define INTLOCK
Value:
{ \
vmeBusLock(); \
}

◆ INTUNLOCK

#define INTUNLOCK
Value:
{ \
vmeBusUnlock(); \
}

◆ TS_ADR24_ADDRESS_MASK

#define TS_ADR24_ADDRESS_MASK   0x0000001F

◆ TS_ADR24_HARDWARE_SET_MASK

#define TS_ADR24_HARDWARE_SET_MASK   0x000003E0

◆ TS_ADR24_TM_NBLOCKS_NEEDACK1

#define TS_ADR24_TM_NBLOCKS_NEEDACK1   0xFF000000

◆ TS_ADR24_TM_NBLOCKS_READY1

#define TS_ADR24_TM_NBLOCKS_READY1   0x00FF0000

◆ TS_ADR32_BASE_MASK

#define TS_ADR32_BASE_MASK   0xFF800000

Referenced by tsSetAdr32().

◆ TS_ADR32_MBLK_ADDR_MAX_MASK

#define TS_ADR32_MBLK_ADDR_MAX_MASK   0x000003FE

◆ TS_ADR32_MBLK_ADDR_MIN_MASK

#define TS_ADR32_MBLK_ADDR_MIN_MASK   0x003FC000

◆ TS_BLOCK_HEADER_CRATEID_MASK

#define TS_BLOCK_HEADER_CRATEID_MASK   0xFF000000

◆ TS_BLOCK_HEADER_SLOTS_MASK

#define TS_BLOCK_HEADER_SLOTS_MASK   0x001F0000

◆ TS_BLOCK_TRAILER_CRATEID_MASK

#define TS_BLOCK_TRAILER_CRATEID_MASK   0x00FF0000

◆ TS_BLOCK_TRAILER_SLOTS_MASK

#define TS_BLOCK_TRAILER_SLOTS_MASK   0x1F000000

◆ TS_BLOCKBUFFER_BLOCKS_NEEDACK_MASK

#define TS_BLOCKBUFFER_BLOCKS_NEEDACK_MASK   0x7F000000

◆ TS_BLOCKBUFFER_BLOCKS_READY_MASK

#define TS_BLOCKBUFFER_BLOCKS_READY_MASK   0x0000FF00

Referenced by tsBReady().

◆ TS_BLOCKBUFFER_BREADY_INT_MASK

#define TS_BLOCKBUFFER_BREADY_INT_MASK   0x0F000000

Referenced by tsBReady().

◆ TS_BLOCKBUFFER_BUFFERLEVEL_MASK

#define TS_BLOCKBUFFER_BUFFERLEVEL_MASK   0x000000FF

Referenced by tsSetBlockBufferLevel().

◆ TS_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT

#define TS_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT   (1<<28)

Referenced by tsGetBlockLimitStatus().

◆ TS_BLOCKBUFFER_SYNCEVENT

#define TS_BLOCKBUFFER_SYNCEVENT   (1<<31)

◆ TS_BLOCKBUFFER_SYNCRESET_REQUESTED

#define TS_BLOCKBUFFER_SYNCRESET_REQUESTED   (1<<30)

Referenced by tsGetSyncResetRequest().

◆ TS_BLOCKBUFFER_TRIGGERS_IN_BLOCK

#define TS_BLOCKBUFFER_TRIGGERS_IN_BLOCK   0x00FF0000

◆ TS_BLOCKLEVEL_CURRENT_MASK

#define TS_BLOCKLEVEL_CURRENT_MASK   0x00FF0000

◆ TS_BLOCKLEVEL_MASK

#define TS_BLOCKLEVEL_MASK   0x000000FF

◆ TS_BLOCKLEVEL_RECEIVED_MASK

#define TS_BLOCKLEVEL_RECEIVED_MASK   0xFF000000

◆ TS_BLOCKSTATUS_NBLOCKS_NEEDACK0

#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK0   0x0000FF00

Referenced by tsBlockStatus(), and tsSlaveStatus().

◆ TS_BLOCKSTATUS_NBLOCKS_NEEDACK1

#define TS_BLOCKSTATUS_NBLOCKS_NEEDACK1   0xFF000000

Referenced by tsSlaveStatus().

◆ TS_BLOCKSTATUS_NBLOCKS_READY0

#define TS_BLOCKSTATUS_NBLOCKS_READY0   0x000000FF

Referenced by tsBlockStatus(), and tsSlaveStatus().

◆ TS_BLOCKSTATUS_NBLOCKS_READY1

#define TS_BLOCKSTATUS_NBLOCKS_READY1   0x00FF0000

Referenced by tsSlaveStatus().

◆ TS_BOARDID_CRATEID_MASK

#define TS_BOARDID_CRATEID_MASK   0x000000FF

Referenced by tsSetCrateID().

◆ TS_BOARDID_GEOADR_MASK

#define TS_BOARDID_GEOADR_MASK   0x00001F00

Referenced by tsPartInit().

◆ TS_BOARDID_PROD_MASK

#define TS_BOARDID_PROD_MASK   0x00FF0000

◆ TS_BOARDID_TYPE_MASK

#define TS_BOARDID_TYPE_MASK   0xFF000000

Referenced by tsFind(), and tsPartInit().

◆ TS_BOARDID_TYPE_TD

#define TS_BOARDID_TYPE_TD   0x7D00

◆ TS_BOARDID_TYPE_TI

#define TS_BOARDID_TYPE_TI   0x7100

◆ TS_BOARDID_TYPE_TIDS

#define TS_BOARDID_TYPE_TIDS   0x71D5

◆ TS_BOARDID_TYPE_TS

#define TS_BOARDID_TYPE_TS   0x7500

Referenced by tsFind(), and tsPartInit().

◆ TS_BUSY_ALL_BRANCHES

#define TS_BUSY_ALL_BRANCHES   (1<<11)

◆ TS_BUSY_BRANCH1

#define TS_BUSY_BRANCH1   (1<<12)

◆ TS_BUSY_BRANCH2

#define TS_BUSY_BRANCH2   (1<<13)

◆ TS_BUSY_BRANCH3

#define TS_BUSY_BRANCH3   (1<<14)

◆ TS_BUSY_BRANCH4

#define TS_BUSY_BRANCH4   (1<<15)

◆ TS_BUSY_FP

#define TS_BUSY_FP   (1<<5)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_FP_FADC

#define TS_BUSY_FP_FADC   (1<<4)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_FP_FTDC

#define TS_BUSY_FP_FTDC   (1<<3)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_HFBR_MASK

#define TS_BUSY_HFBR_MASK   ((1<<9) | (1<<8))

Referenced by tsResetSlaveConfig().

◆ TS_BUSY_INT

#define TS_BUSY_INT   (1<<10)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_LOOPBACK

#define TS_BUSY_LOOPBACK   (1<<7)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_MONITOR_DUPL

#define TS_BUSY_MONITOR_DUPL   (1<<31)

◆ TS_BUSY_MONITOR_FIBER_BUSY

#define TS_BUSY_MONITOR_FIBER_BUSY (   x)    (1<<(x+27))

Referenced by tsSlaveStatus().

◆ TS_BUSY_MONITOR_FP

#define TS_BUSY_MONITOR_FP   (1<<21)

◆ TS_BUSY_MONITOR_FP_FADC

#define TS_BUSY_MONITOR_FP_FADC   (1<<20)

◆ TS_BUSY_MONITOR_FP_FTDC

#define TS_BUSY_MONITOR_FP_FTDC   (1<<19)

◆ TS_BUSY_MONITOR_LOOPBACK

#define TS_BUSY_MONITOR_LOOPBACK   (1<<23)

Referenced by tsSlaveStatus().

◆ TS_BUSY_MONITOR_MASK

#define TS_BUSY_MONITOR_MASK   0xFFFF0000

Referenced by tsGetBusyStatus().

◆ TS_BUSY_MONITOR_P2

#define TS_BUSY_MONITOR_P2   (1<<18)

◆ TS_BUSY_MONITOR_SWA

#define TS_BUSY_MONITOR_SWA   (1<<16)

◆ TS_BUSY_MONITOR_SWB

#define TS_BUSY_MONITOR_SWB   (1<<17)

◆ TS_BUSY_MONITOR_TI_A

#define TS_BUSY_MONITOR_TI_A   (1<<28)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_MONITOR_TI_B

#define TS_BUSY_MONITOR_TI_B   (1<<29)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_MONITOR_TS

#define TS_BUSY_MONITOR_TS   (1<<27)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_P2

#define TS_BUSY_P2   (1<<2)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_P2_TRIGGER_INPUT

#define TS_BUSY_P2_TRIGGER_INPUT   (1<<6)

Referenced by tsSetBusySource().

◆ TS_BUSY_SOURCEMASK

#define TS_BUSY_SOURCEMASK   0x0000FFFF

Referenced by tsGetBusyStatus(), and tsSetBusySource().

◆ TS_BUSY_SWA

#define TS_BUSY_SWA   (1<<0)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_SWB

#define TS_BUSY_SWB   (1<<1)

Referenced by tsGetBusyStatus().

◆ TS_BUSY_TI_A

#define TS_BUSY_TI_A   (1<<8)

◆ TS_BUSY_TI_B

#define TS_BUSY_TI_B   (1<<9)

Referenced by tsAddSlave(), and tsGetBusyStatus().

◆ TS_CLOCK_EXTERNAL

#define TS_CLOCK_EXTERNAL   (1)

Referenced by tsSetClockSource().

◆ TS_CLOCK_INPUT_MIX_CONTROL_MASK

#define TS_CLOCK_INPUT_MIX_CONTROL_MASK   0x00000030

Referenced by tsGetInputMix(), and tsSetInputMix().

◆ TS_CLOCK_INPUT_MIX_ENABLE

#define TS_CLOCK_INPUT_MIX_ENABLE   (1<<4)

Referenced by tsSetInputMix().

◆ TS_CLOCK_INTERNAL

#define TS_CLOCK_INTERNAL   (0)

Referenced by tsSetClockSource().

◆ TS_DATA_BLKLEVEL_MASK

#define TS_DATA_BLKLEVEL_MASK   0x000000FF

◆ TS_DATA_BLKNUM_MASK

#define TS_DATA_BLKNUM_MASK   0x0000FF00

◆ TS_DATAFORMAT_BLOCKHEADER_BLKNUM_MASK

#define TS_DATAFORMAT_BLOCKHEADER_BLKNUM_MASK   0x0003FF00

◆ TS_DATAFORMAT_BLOCKHEADER_MODID_MASK

#define TS_DATAFORMAT_BLOCKHEADER_MODID_MASK   0x003C0000

◆ TS_DATAFORMAT_BLOCKHEADER_NEVTS_MASK

#define TS_DATAFORMAT_BLOCKHEADER_NEVTS_MASK   0x000000FF

◆ TS_DATAFORMAT_BLOCKHEADER_SLOT_MASK

#define TS_DATAFORMAT_BLOCKHEADER_SLOT_MASK   0x07C00000

◆ TS_DATAFORMAT_BLOCKTRAILER_NWORDS_MASK

#define TS_DATAFORMAT_BLOCKTRAILER_NWORDS_MASK   0x003FFFFF

◆ TS_DATAFORMAT_BLOCKTRAILER_SLOT_MASK

#define TS_DATAFORMAT_BLOCKTRAILER_SLOT_MASK   0x07C00000

◆ TS_DATAFORMAT_DATA_TYPE_WORD

#define TS_DATAFORMAT_DATA_TYPE_WORD   (1<<31)

Referenced by tsReadTriggerBlock().

◆ TS_DATAFORMAT_FILLER_WORD_TYPE

#define TS_DATAFORMAT_FILLER_WORD_TYPE   0x78000000

◆ TS_DATAFORMAT_FPINPUT_READOUT

#define TS_DATAFORMAT_FPINPUT_READOUT   (1<<4)

Referenced by tsSetFPInputReadout().

◆ TS_DATAFORMAT_GTPINPUT_READOUT

#define TS_DATAFORMAT_GTPINPUT_READOUT   (1<<3)

Referenced by tsSetGTPInputReadout().

◆ TS_DATAFORMAT_HIGHERBITS_WORD

#define TS_DATAFORMAT_HIGHERBITS_WORD   (1<<2)

Referenced by tsSetEventFormat().

◆ TS_DATAFORMAT_TIMING_WORD

#define TS_DATAFORMAT_TIMING_WORD   (1<<1)

Referenced by tsSetEventFormat().

◆ TS_DATAFORMAT_TWOBLOCK_PLACEHOLDER

#define TS_DATAFORMAT_TWOBLOCK_PLACEHOLDER   (1<<0)

◆ TS_DATAFORMAT_TYPE_BLOCK_HEADER

#define TS_DATAFORMAT_TYPE_BLOCK_HEADER   0

Referenced by tsReadTriggerBlock().

◆ TS_DATAFORMAT_TYPE_BLOCK_TRAILER

#define TS_DATAFORMAT_TYPE_BLOCK_TRAILER   1

Referenced by tsReadTriggerBlock().

◆ TS_DATAFORMAT_TYPE_MASK

#define TS_DATAFORMAT_TYPE_MASK   0x78000000

Referenced by tsReadTriggerBlock().

◆ TS_DATAFORMAT_WORDS_MASK

#define TS_DATAFORMAT_WORDS_MASK   0x00000007

Referenced by tsSetEventFormat().

◆ TS_DUPL_FAST_CLEAR_BUSY_MASK

#define TS_DUPL_FAST_CLEAR_BUSY_MASK   0x3FF00000

◆ TS_DUPL_FAST_CLEAR_DELAY_MASK

#define TS_DUPL_FAST_CLEAR_DELAY_MASK   0x0007fc00

◆ TS_DUPL_FAST_CLEAR_VETO_WIDTH_MASK

#define TS_DUPL_FAST_CLEAR_VETO_WIDTH_MASK   0xFF000000

◆ TS_DUPL_FAST_CLEAR_WIDTH_MASK

#define TS_DUPL_FAST_CLEAR_WIDTH_MASK   0x00FF0000

◆ TS_DUPL_LOCAL_TRIG_BUSY_MASK

#define TS_DUPL_LOCAL_TRIG_BUSY_MASK   0x000003FF

◆ TS_DUPL_LOCAL_TRIG_RULE_MASK

#define TS_DUPL_LOCAL_TRIG_RULE_MASK   0x0000007F

◆ TS_DUPL_LOCAL_TRIG_WIDTH_MASK

#define TS_DUPL_LOCAL_TRIG_WIDTH_MASK   0x0000FF00

◆ TS_EMPTY_FIFO

#define TS_EMPTY_FIFO   0xF545BAD5

◆ TS_EVENTNUMBER_FIBER_A_ENABLE

#define TS_EVENTNUMBER_FIBER_A_ENABLE   (1<<0)

◆ TS_EVENTNUMBER_FIBER_A_INT_NOT_REQUESTED

#define TS_EVENTNUMBER_FIBER_A_INT_NOT_REQUESTED   (1<<5)

◆ TS_EVENTNUMBER_FIBER_A_TRANSCEIVER_MISSING

#define TS_EVENTNUMBER_FIBER_A_TRANSCEIVER_MISSING   (1<<4)

◆ TS_EVENTNUMBER_FIBER_B_ENABLE

#define TS_EVENTNUMBER_FIBER_B_ENABLE   (1<<1)

◆ TS_EVENTNUMBER_FIBER_B_INT_NOT_REQUESTED

#define TS_EVENTNUMBER_FIBER_B_INT_NOT_REQUESTED   (1<<7)

◆ TS_EVENTNUMBER_FIBER_B_TRANSCEIVER_MISSING

#define TS_EVENTNUMBER_FIBER_B_TRANSCEIVER_MISSING   (1<<6)

◆ TS_EVENTNUMBER_HI_MASK

#define TS_EVENTNUMBER_HI_MASK   0xFFFF0000

Referenced by tsGetEventCounter().

◆ TS_FIBER_ENABLE_P0

#define TS_FIBER_ENABLE_P0   (1<<8)

◆ TS_FIBER_I2C_ACTIVE

#define TS_FIBER_I2C_ACTIVE   (1<<2)

◆ TS_FIBER_LOW_POWER

#define TS_FIBER_LOW_POWER   (1<<1)

◆ TS_FIBER_RESET

#define TS_FIBER_RESET   (1<<3)

◆ TS_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK

#define TS_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK   0x0000FF00

◆ TS_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK

#define TS_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK   0xFF000000

◆ TS_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK

#define TS_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK   0x00FF0000

◆ TS_FIRMWARE_ID_MASK

#define TS_FIRMWARE_ID_MASK   0xFFFF0000

Referenced by tsPartInit().

◆ TS_FIRMWARE_MAJOR_VERSION_MASK

#define TS_FIRMWARE_MAJOR_VERSION_MASK   0x00000FF0

Referenced by tsPartInit().

◆ TS_FIRMWARE_TYPE_MASK

#define TS_FIRMWARE_TYPE_MASK   0x0000F000

Referenced by tsPartInit().

◆ TS_FIRMWARE_TYPE_P

#define TS_FIRMWARE_TYPE_P   3

◆ TS_FIRMWARE_TYPE_PROD

#define TS_FIRMWARE_TYPE_PROD   1

◆ TS_FIRWMARE_MINOR_VERSION_MASK

#define TS_FIRWMARE_MINOR_VERSION_MASK   0x0000000F

Referenced by tsPartInit().

◆ TS_FIXEDPULSER1_NTRIGGERS_MASK

#define TS_FIXEDPULSER1_NTRIGGERS_MASK   0x0000FFFF

Referenced by tsSoftTrig().

◆ TS_FIXEDPULSER1_PERIOD_MASK

#define TS_FIXEDPULSER1_PERIOD_MASK   0x7FFF0000

Referenced by tsSoftTrig().

◆ TS_FIXEDPULSER1_PERIOD_RANGE

#define TS_FIXEDPULSER1_PERIOD_RANGE   (1<<31)

◆ TS_FIXEDPULSER2_NTRIGGERS_MASK

#define TS_FIXEDPULSER2_NTRIGGERS_MASK   0x0000FFFF

◆ TS_FIXEDPULSER2_PERIOD_MASK

#define TS_FIXEDPULSER2_PERIOD_MASK   0x7FFF0000

◆ TS_FIXEDPULSER2_PERIOD_RANGE

#define TS_FIXEDPULSER2_PERIOD_RANGE   (1<<31)

◆ TS_FPDELAY_MASK

#define TS_FPDELAY_MASK (   x)    (0x1FF<<(10*(x%3)))

◆ TS_GTPSTATUSA_PLL_LOCK_MASK

#define TS_GTPSTATUSA_PLL_LOCK_MASK   0x00000F00

◆ TS_GTPSTATUSA_RESET_DONE_MASK

#define TS_GTPSTATUSA_RESET_DONE_MASK   0x000000FF

◆ TS_GTPSTATUSB_CHANNEL_BONDING_MASK

#define TS_GTPSTATUSB_CHANNEL_BONDING_MASK   0x000000FF

◆ TS_GTPSTATUSB_DATA_ERROR_MASK

#define TS_GTPSTATUSB_DATA_ERROR_MASK   0x0000FF00

◆ TS_GTPSTATUSB_DATA_NOT_IN_TABLE_ERROR_MASK

#define TS_GTPSTATUSB_DATA_NOT_IN_TABLE_ERROR_MASK   0xFF000000

◆ TS_GTPSTATUSB_DISPARITY_ERROR_MASK

#define TS_GTPSTATUSB_DISPARITY_ERROR_MASK   0x00FF0000

◆ TS_GTPTRIGGERBUFFERLENGTH_CLK125_DCM_LOCK

#define TS_GTPTRIGGERBUFFERLENGTH_CLK125_DCM_LOCK   (1<<30)

◆ TS_GTPTRIGGERBUFFERLENGTH_CLK250_DCM_LOCK

#define TS_GTPTRIGGERBUFFERLENGTH_CLK250_DCM_LOCK   (1<<29)

◆ TS_GTPTRIGGERBUFFERLENGTH_GLOBAL_LENGTH_MASK

#define TS_GTPTRIGGERBUFFERLENGTH_GLOBAL_LENGTH_MASK   0x000007FF

◆ TS_GTPTRIGGERBUFFERLENGTH_HFBR1_MGT_ERROR

#define TS_GTPTRIGGERBUFFERLENGTH_HFBR1_MGT_ERROR   (1<<28)

◆ TS_GTPTRIGGERBUFFERLENGTH_SUBSYS_LENGTH_MASK

#define TS_GTPTRIGGERBUFFERLENGTH_SUBSYS_LENGTH_MASK   0x07FF0000

◆ TS_GTPTRIGGERBUFFERLENGTH_VMECLK_DCM_LOCK

#define TS_GTPTRIGGERBUFFERLENGTH_VMECLK_DCM_LOCK   (1<<31)

◆ TS_I2C_8BIT_DATA_MASK

#define TS_I2C_8BIT_DATA_MASK   0x000000ff

◆ TS_I2C_DATA_MASK

#define TS_I2C_DATA_MASK   0x0000ffff

◆ TS_ID_CRATEID_MASK

#define TS_ID_CRATEID_MASK   0x0000FF00

Referenced by tsGetCrateID(), and tsSlaveStatus().

◆ TS_ID_TRIGSRC_ENABLE_MASK

#define TS_ID_TRIGSRC_ENABLE_MASK   0x000000FF

◆ TS_INIT_DUPLICATION_MODE

#define TS_INIT_DUPLICATION_MODE   (1<<3)

Referenced by tsInit().

◆ TS_INIT_NO_INIT

#define TS_INIT_NO_INIT   (1<<0)

Referenced by tsInit().

◆ TS_INIT_SKIP_FIRMWARE_CHECK

#define TS_INIT_SKIP_FIRMWARE_CHECK   (1<<2)

Referenced by tsInit().

◆ TS_INT_LEVEL

#define TS_INT_LEVEL   5

◆ TS_INT_VEC

#define TS_INT_VEC   0xc8

◆ TS_INTSETUP_ENABLE

#define TS_INTSETUP_ENABLE   (1<<16)

Referenced by tsIntDisable().

◆ TS_INTSETUP_LEVEL_MASK

#define TS_INTSETUP_LEVEL_MASK   0x00000F00

◆ TS_INTSETUP_VECTOR_MASK

#define TS_INTSETUP_VECTOR_MASK   0x000000FF

◆ TS_NBLOCKS_COUNT_MASK

#define TS_NBLOCKS_COUNT_MASK   0x00FFFFFF

◆ TS_NBLOCKS_EVENTS_IN_BLOCK_MASK

#define TS_NBLOCKS_EVENTS_IN_BLOCK_MASK   0xFF000000

Referenced by tsCurrentBlockFilled().

◆ TS_OUTPUT_BLOCKS_FOR_INT_MASK

#define TS_OUTPUT_BLOCKS_FOR_INT_MASK   0xFFFF0000

◆ TS_OUTPUT_FP_1

#define TS_OUTPUT_FP_1   (1<<0)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_2

#define TS_OUTPUT_FP_2   (1<<1)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_3

#define TS_OUTPUT_FP_3   (1<<2)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_4

#define TS_OUTPUT_FP_4   (1<<3)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_5

#define TS_OUTPUT_FP_5   (1<<4)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_6

#define TS_OUTPUT_FP_6   (1<<5)

Referenced by tsSetOutputPort().

◆ TS_OUTPUT_FP_MASK

#define TS_OUTPUT_FP_MASK   0x0000003F

◆ TS_PART_BLOCKBUFFER_BLOCKLEVEL_MASK

#define TS_PART_BLOCKBUFFER_BLOCKLEVEL_MASK   0x000000FF

◆ TS_PART_BLOCKBUFFER_BLOCKS_READY_MASK

#define TS_PART_BLOCKBUFFER_BLOCKS_READY_MASK   0x00FFFF00

◆ TS_PART_BLOCKBUFFER_EVENTS_LEFT_IN_BLOCK_MASK

#define TS_PART_BLOCKBUFFER_EVENTS_LEFT_IN_BLOCK_MASK   0xFF000000

◆ TS_PART_BLOCKBUFFERINFO_BLOCKS_READY_MASK

#define TS_PART_BLOCKBUFFERINFO_BLOCKS_READY_MASK   0x00FFFF00

◆ TS_PART_BUSYCONFIG_ALMOSTFULL_ENABLE

#define TS_PART_BUSYCONFIG_ALMOSTFULL_ENABLE   (1<<16)

◆ TS_PART_BUSYCONFIG_BUFFERLEVEL_ENABLE

#define TS_PART_BUSYCONFIG_BUFFERLEVEL_ENABLE   (1<<17)

◆ TS_PART_BUSYCONFIG_BUFFERLEVEL_MASK

#define TS_PART_BUSYCONFIG_BUFFERLEVEL_MASK   0xFF000000

◆ TS_PART_BUSYCONFIG_BUSYSRC_MASK

#define TS_PART_BUSYCONFIG_BUSYSRC_MASK   0x00F00000

◆ TS_PART_BUSYCONFIG_FP

#define TS_PART_BUSYCONFIG_FP   (1<<21)

◆ TS_PART_BUSYCONFIG_SWB

#define TS_PART_BUSYCONFIG_SWB   (1<<20)

◆ TS_PART_BUSYCONFIG_TD_INPUT_MASK

#define TS_PART_BUSYCONFIG_TD_INPUT_MASK   0x0000FFFF

◆ TS_PART_BUSYCONFIG_TI_A

#define TS_PART_BUSYCONFIG_TI_A   (1<<22)

◆ TS_PART_BUSYCONFIG_TI_B

#define TS_PART_BUSYCONFIG_TI_B   (1<<23)

◆ TS_PART_BUSYTIME_MASK

#define TS_PART_BUSYTIME_MASK   0x0000FFFF

◆ TS_RANDOMPULSER_TRIG1_ENABLE

#define TS_RANDOMPULSER_TRIG1_ENABLE   (1<<7)

Referenced by tsSetRandomTrigger().

◆ TS_RANDOMPULSER_TRIG1_RATE_MASK

#define TS_RANDOMPULSER_TRIG1_RATE_MASK   0x0000000F

Referenced by tsSetRandomTrigger().

◆ TS_RANDOMPULSER_TRIG2_ENABLE

#define TS_RANDOMPULSER_TRIG2_ENABLE   (1<<15)

Referenced by tsSetRandomTrigger().

◆ TS_RANDOMPULSER_TRIG2_RATE_MASK

#define TS_RANDOMPULSER_TRIG2_RATE_MASK   0x00000F00

◆ TS_READOUT_EXT_INT

#define TS_READOUT_EXT_INT   0

◆ TS_READOUT_EXT_POLL

#define TS_READOUT_EXT_POLL   2

◆ TS_RESET_AUTOALIGN_HFBR1_SYNC

#define TS_RESET_AUTOALIGN_HFBR1_SYNC   (1<<11)

◆ TS_RESET_AUTOALIGN_HFBR5_SYNC

#define TS_RESET_AUTOALIGN_HFBR5_SYNC   (1<<12)

◆ TS_RESET_BUSYACK

#define TS_RESET_BUSYACK   (1<<7)

◆ TS_RESET_CLK125

#define TS_RESET_CLK125   (1<<9)

Referenced by tsSetClockSource().

◆ TS_RESET_CLK200

#define TS_RESET_CLK200   (1<<8)

◆ TS_RESET_CLK250

#define TS_RESET_CLK250   (1<<8)

Referenced by tsSetClockSource().

◆ TS_RESET_FILL_TO_END_BLOCK

#define TS_RESET_FILL_TO_END_BLOCK   (1<<31)

Referenced by tsFillToEndBlock().

◆ TS_RESET_FORCE_SYNCEVENT

#define TS_RESET_FORCE_SYNCEVENT   (1<<20)

Referenced by tsForceSyncEvent().

◆ TS_RESET_I2C

#define TS_RESET_I2C   (1<<1)

◆ TS_RESET_IODELAY

#define TS_RESET_IODELAY   (1<<14)

Referenced by tsResetIODelay().

◆ TS_RESET_JTAG

#define TS_RESET_JTAG   (1<<2)

◆ TS_RESET_LATCH_TIMERS

#define TS_RESET_LATCH_TIMERS   (1<<24)

◆ TS_RESET_MEASURE_LATENCY

#define TS_RESET_MEASURE_LATENCY   (1<<15)

◆ TS_RESET_MGT

#define TS_RESET_MGT   (1<<10)

Referenced by tsResetMGT().

◆ TS_RESET_PART_ACK

#define TS_RESET_PART_ACK (   pID)    (1<<(pID+25))

◆ TS_RESET_RAM_WRITE

#define TS_RESET_RAM_WRITE   (1<<12)

◆ TS_RESET_RESET_L1A_NUMBER

#define TS_RESET_RESET_L1A_NUMBER   (1<<25)

Referenced by tsResetEventCounter().

◆ TS_RESET_SFM

#define TS_RESET_SFM   (1<<3)

◆ TS_RESET_SOFT

#define TS_RESET_SOFT   (1<<4)

Referenced by tsReset().

◆ TS_RESET_SYNCRESET_REQUEST

#define TS_RESET_SYNCRESET_REQUEST   (1<<23)

◆ TS_RESET_TAKE_TOKEN

#define TS_RESET_TAKE_TOKEN   (1<<16)

◆ TS_SCALER_SCALE_HI

#define TS_SCALER_SCALE_HI   (1<<31)

◆ TS_SCALER_SCALE_HI_LSB_MASK

#define TS_SCALER_SCALE_HI_LSB_MASK   0x7fffff80

Referenced by tsReadScalers(), and tsReadScalersMon().

◆ TS_SCALER_SCALE_HI_MSB_MASK

#define TS_SCALER_SCALE_HI_MSB_MASK   0x0000007f

Referenced by tsReadScalers(), and tsReadScalersMon().

◆ TS_SPECIALEVTYPES_GTP_AND_FP_MASK

#define TS_SPECIALEVTYPES_GTP_AND_FP_MASK   0x0000FF00

◆ TS_SPECIALEVTYPES_MULT_GTP_OR_FP_MASK

#define TS_SPECIALEVTYPES_MULT_GTP_OR_FP_MASK   0x000000FF

◆ TS_SPECIALEVTYPES_PULSER_MASK

#define TS_SPECIALEVTYPES_PULSER_MASK   0xFF000000

◆ TS_SPECIALEVTYPES_VME_MASK

#define TS_SPECIALEVTYPES_VME_MASK   0x00FF0000

◆ TS_SUPPORTED_FIRMWARE

#define TS_SUPPORTED_FIRMWARE   0x71

◆ TS_SUPPORTED_TYPE

#define TS_SUPPORTED_TYPE   TS_FIRMWARE_TYPE_P

◆ TS_SYNC_FP

#define TS_SYNC_FP   (1<<3)

◆ TS_SYNC_HFBR1

#define TS_SYNC_HFBR1   (1<<1)

◆ TS_SYNC_HFBR5

#define TS_SYNC_HFBR5   (1<<2)

◆ TS_SYNC_LOOPBACK

#define TS_SYNC_LOOPBACK   (1<<4)

◆ TS_SYNC_MONITOR_MASK

#define TS_SYNC_MONITOR_MASK   0xFFFF0000

◆ TS_SYNC_P0

#define TS_SYNC_P0   (1<<0)

◆ TS_SYNC_SOURCEMASK

#define TS_SYNC_SOURCEMASK   0x0000FFFF

Referenced by tsSetSyncSource().

◆ TS_SYNCCOMMAND_AD9510_RESYNC

#define TS_SYNCCOMMAND_AD9510_RESYNC   0x33

Referenced by tsClockResync().

◆ TS_SYNCCOMMAND_CLK250_RESYNC

#define TS_SYNCCOMMAND_CLK250_RESYNC   0x22

Referenced by tsClockReset().

◆ TS_SYNCCOMMAND_GTP_STATUSB_RESET

#define TS_SYNCCOMMAND_GTP_STATUSB_RESET   0x44

◆ TS_SYNCCOMMAND_RESET_EVNUM

#define TS_SYNCCOMMAND_RESET_EVNUM   0xBB

◆ TS_SYNCCOMMAND_SYNCCODE_MASK

#define TS_SYNCCOMMAND_SYNCCODE_MASK   0x000000FF

◆ TS_SYNCCOMMAND_SYNCRESET

#define TS_SYNCCOMMAND_SYNCRESET   0xDD

◆ TS_SYNCCOMMAND_SYNCRESET_4US

#define TS_SYNCCOMMAND_SYNCRESET_4US   0xEE

◆ TS_SYNCCOMMAND_SYNCRESET_HIGH

#define TS_SYNCCOMMAND_SYNCRESET_HIGH   0x99

Referenced by tsUserSyncReset().

◆ TS_SYNCCOMMAND_SYNCRESET_LOW

#define TS_SYNCCOMMAND_SYNCRESET_LOW   0xCC

Referenced by tsUserSyncReset().

◆ TS_SYNCCOMMAND_TRIGGER_READY_RESET

#define TS_SYNCCOMMAND_TRIGGER_READY_RESET   0xAA

Referenced by tsTriggerReadyReset().

◆ TS_SYNCCOMMAND_TRIGGERLINK_DISABLE

#define TS_SYNCCOMMAND_TRIGGERLINK_DISABLE   0x77

◆ TS_SYNCCOMMAND_TRIGGERLINK_ENABLE

#define TS_SYNCCOMMAND_TRIGGERLINK_ENABLE   0x55

Referenced by tsTrigLinkReset().

◆ TS_SYNCCOMMAND_VME_CLOCKRESET

#define TS_SYNCCOMMAND_VME_CLOCKRESET   0x11

◆ TS_SYNCDELAY_MASK

#define TS_SYNCDELAY_MASK   0x0000007F

Referenced by tsSetSyncDelayWidth().

◆ TS_SYNCEVENTCTRL_NBLOCKS_MASK

#define TS_SYNCEVENTCTRL_NBLOCKS_MASK   0x00FFFFFF

Referenced by tsSetSyncEventInterval().

◆ TS_SYNCWIDTH_LONGWIDTH_ENABLE

#define TS_SYNCWIDTH_LONGWIDTH_ENABLE   (1<<7)

Referenced by tsSetSyncDelayWidth().

◆ TS_SYNCWIDTH_MASK

#define TS_SYNCWIDTH_MASK   0x7F

Referenced by tsSetSyncDelayWidth().

◆ TS_TRIG1PRESCALE_MASK

#define TS_TRIG1PRESCALE_MASK   0x0000FFFF

◆ TS_TRIGDELAY_TRIG1_DELAY_MASK

#define TS_TRIGDELAY_TRIG1_DELAY_MASK   0x000000FF

Referenced by tsSetTriggerPulse().

◆ TS_TRIGDELAY_TRIG1_WIDTH_MASK

#define TS_TRIGDELAY_TRIG1_WIDTH_MASK   0x0000FF00

Referenced by tsSetTriggerPulse().

◆ TS_TRIGDELAY_TRIG2_DELAY_MASK

#define TS_TRIGDELAY_TRIG2_DELAY_MASK   0x00FF0000

Referenced by tsSetTriggerPulse().

◆ TS_TRIGDELAY_TRIG2_WIDTH_MASK

#define TS_TRIGDELAY_TRIG2_WIDTH_MASK   0xFF000000

Referenced by tsSetTriggerPulse().

◆ TS_TRIGGER_ENABLE

#define TS_TRIGGER_ENABLE   (1<<8)

Referenced by tsSetTriggerSource().

◆ TS_TRIGGER_FPTRG

#define TS_TRIGGER_FPTRG   (1<<3)

◆ TS_TRIGGER_HFBR1

#define TS_TRIGGER_HFBR1   (1<<1)

◆ TS_TRIGGER_LOOPBACK

#define TS_TRIGGER_LOOPBACK   (1<<2)

◆ TS_TRIGGER_MONITOR_MASK

#define TS_TRIGGER_MONITOR_MASK   0xFFFF0000

◆ TS_TRIGGER_P0

#define TS_TRIGGER_P0   (1<<0)

◆ TS_TRIGGER_P2BUSY

#define TS_TRIGGER_P2BUSY   (1<<9)

◆ TS_TRIGGER_PART

#define TS_TRIGGER_PART (   pID)    (1<<(pID+11))

◆ TS_TRIGGER_PULSER

#define TS_TRIGGER_PULSER   (1<<7)

Referenced by tsSetTriggerSource().

◆ TS_TRIGGER_SOURCEMASK

#define TS_TRIGGER_SOURCEMASK   0x000003FF

Referenced by tsSetTriggerSourceMask().

◆ TS_TRIGGER_TSINPUTS

#define TS_TRIGGER_TSINPUTS   (1<<5)

◆ TS_TRIGGER_TSREV2

#define TS_TRIGGER_TSREV2   (1<<6)

◆ TS_TRIGGER_VME

#define TS_TRIGGER_VME   (1<<4)

◆ TS_TRIGGERCOMMAND_CODE_MASK

#define TS_TRIGGERCOMMAND_CODE_MASK   0x00000F00

◆ TS_TRIGGERCOMMAND_SET_BLOCKLEVEL

#define TS_TRIGGERCOMMAND_SET_BLOCKLEVEL   0x00000800

◆ TS_TRIGGERCOMMAND_SYNC_EVENT

#define TS_TRIGGERCOMMAND_SYNC_EVENT   0x00000300

◆ TS_TRIGGERCOMMAND_TRIG1

#define TS_TRIGGERCOMMAND_TRIG1   0x00000100

◆ TS_TRIGGERCOMMAND_TRIG2

#define TS_TRIGGERCOMMAND_TRIG2   0x00000200

◆ TS_TRIGGERCOMMAND_VALUE_MASK

#define TS_TRIGGERCOMMAND_VALUE_MASK   0x000000FF

◆ TS_TRIGGERRULE_RULE1_MASK

#define TS_TRIGGERRULE_RULE1_MASK   0x000000FF

◆ TS_TRIGGERRULE_RULE2_MASK

#define TS_TRIGGERRULE_RULE2_MASK   0x0000FF00

◆ TS_TRIGGERRULE_RULE3_MASK

#define TS_TRIGGERRULE_RULE3_MASK   0x00FF0000

◆ TS_TRIGGERRULE_RULE4_MASK

#define TS_TRIGGERRULE_RULE4_MASK   0xFF000000

◆ TS_TRIGGERRULEMIN_MIN2_EN

#define TS_TRIGGERRULEMIN_MIN2_EN   (1<<15)

◆ TS_TRIGGERRULEMIN_MIN2_MASK

#define TS_TRIGGERRULEMIN_MIN2_MASK   0x00007F00

◆ TS_TRIGGERRULEMIN_MIN3_EN

#define TS_TRIGGERRULEMIN_MIN3_EN   (1<<23)

◆ TS_TRIGGERRULEMIN_MIN3_MASK

#define TS_TRIGGERRULEMIN_MIN3_MASK   0x007F0000

◆ TS_TRIGGERRULEMIN_MIN4_EN

#define TS_TRIGGERRULEMIN_MIN4_EN   (1<<31)

◆ TS_TRIGGERRULEMIN_MIN4_MASK

#define TS_TRIGGERRULEMIN_MIN4_MASK   0x7F000000

◆ TS_TRIGGERWINDOW_COINC_MASK

#define TS_TRIGGERWINDOW_COINC_MASK   0x000000FF

◆ TS_TRIGGERWINDOW_INHIBIT_MASK

#define TS_TRIGGERWINDOW_INHIBIT_MASK   0x0000FF00

◆ TS_TRIGGERWINDOW_TRIG21_DELAY_MASK

#define TS_TRIGGERWINDOW_TRIG21_DELAY_MASK   0x00FF0000

◆ TS_TRIGSRC_EXT

#define TS_TRIGSRC_EXT   6

◆ TS_TRIGSRC_PULSER

#define TS_TRIGSRC_PULSER   5

◆ TS_VMECONTROL_A32

#define TS_VMECONTROL_A32   (1<<4)

Referenced by tsSetAdr32().

◆ TS_VMECONTROL_A32M

#define TS_VMECONTROL_A32M   (1<<3)

◆ TS_VMECONTROL_BERR

#define TS_VMECONTROL_BERR   (1<<0)

◆ TS_VMECONTROL_BLOCKLEVEL_UPDATE

#define TS_VMECONTROL_BLOCKLEVEL_UPDATE   (1<<21)

◆ TS_VMECONTROL_BUFFER_DISABLE

#define TS_VMECONTROL_BUFFER_DISABLE   (1<<12)

◆ TS_VMECONTROL_DRIVE_TSIO_EN

#define TS_VMECONTROL_DRIVE_TSIO_EN   (1<<20)

Referenced by tsGetTSIODrive(), and tsSetTSIODrive().

◆ TS_VMECONTROL_FIRST_BOARD

#define TS_VMECONTROL_FIRST_BOARD   (1<<10)

◆ TS_VMECONTROL_I2CDEV_HACK

#define TS_VMECONTROL_I2CDEV_HACK   (1<<8)

◆ TS_VMECONTROL_INT

#define TS_VMECONTROL_INT   (1<<7)

◆ TS_VMECONTROL_LAST_BOARD

#define TS_VMECONTROL_LAST_BOARD   (1<<11)

◆ TS_VMECONTROL_MBLK

#define TS_VMECONTROL_MBLK   (1<<2)

◆ TS_VMECONTROL_SLOWER_TRIGGER_RULES

#define TS_VMECONTROL_SLOWER_TRIGGER_RULES   (1<<31)

Referenced by tsSetTriggerHoldoff().

◆ TS_VMECONTROL_TOKEN

#define TS_VMECONTROL_TOKEN   (1<<1)

◆ TS_VMECONTROL_TOKEN_HI

#define TS_VMECONTROL_TOKEN_HI   (1<<9)

Function Documentation

◆ tsCheckAddresses()

◆ tsGetDaqStatus()

unsigned int tsGetDaqStatus ( )

◆ 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.

◆ tsIntPoll()

int tsIntPoll ( )

◆ tsPayloadPortMask2VMESlotMask()

int tsPayloadPortMask2VMESlotMask ( int  payloadport_mask)

◆ tsPrintTriggerHoldoff()

◆ tsSetFiberDelay()

void tsSetFiberDelay ( unsigned int  number,
unsigned int  offset 
)

◆ tsSetupFiberLoopback()

int tsSetupFiberLoopback ( )

◆ tsVMESlotMask2PayloadPortMask()

int tsVMESlotMask2PayloadPortMask ( int  vmeslot_mask)

◆ tsVmeTrigger1()

int tsVmeTrigger1 ( )

◆ tsVmeTrigger2()

int tsVmeTrigger2 ( )

Variable Documentation

◆ tsISR_mutex

pthread_mutex_t tsISR_mutex =PTHREAD_MUTEX_INITIALIZER