JLab Pipeline TI Library  3v6.1
tiLib.h File Reference

Go to the source code of this file.

Data Structures

struct  TI_A24RegStruct
 

Macros

#define INTLOCK
 
#define INTUNLOCK
 
#define TI_READOUT_EXT_INT   0
 
#define TI_READOUT_TS_INT   1
 
#define TI_READOUT_EXT_POLL   2
 
#define TI_READOUT_TS_POLL   3
 
#define TI_SUPPORTED_FIRMWARE   0x061
 
#define TI_SUPPORTED_TYPE   3
 
#define TI_FIRMWARE_ID_MASK   0xFFFF0000
 
#define TI_FIRMWARE_TYPE_MASK   0x0000F000
 
#define TI_FIRMWARE_TYPE_REV2   0
 
#define TI_FIRMWARE_TYPE_PROD   1
 
#define TI_FIRMWARE_TYPE_MODTI   2
 
#define TI_FIRMWARE_TYPE_PROD2   3
 
#define TI_FIRMWARE_MAJOR_VERSION_MASK   0x00000FF0
 
#define TI_FIRWMARE_MINOR_VERSION_MASK   0x0000000F
 
#define TI_BOARDID_TYPE_TIDS   0x71D5
 
#define TI_BOARDID_TYPE_TI   0x7100
 
#define TI_BOARDID_TYPE_TS   0x7500
 
#define TI_BOARDID_TYPE_TD   0x7D00
 
#define TI_BOARDID_TYPE_MASK   0xFF000000
 
#define TI_BOARDID_PROD_MASK   0x00FF0000
 
#define TI_BOARDID_GEOADR_MASK   0x00001F00
 
#define TI_BOARDID_CRATEID_MASK   0x000000FF
 
#define TI_FIBER_1   (1<<0)
 
#define TI_FIBER_2   (1<<1)
 
#define TI_FIBER_3   (1<<2)
 
#define TI_FIBER_4   (1<<3)
 
#define TI_FIBER_5   (1<<4)
 
#define TI_FIBER_6   (1<<5)
 
#define TI_FIBER_7   (1<<6)
 
#define TI_FIBER_8   (1<<7)
 
#define TI_FIBER_ENABLE_P0   (1<<8)
 
#define TI_FIBER_ENABLED(x)   (1<<(x+1))
 
#define TI_FIBER_MASK   0x000000FF
 
#define TI_FIBER_CONNECTED_1   (1<<16)
 
#define TI_FIBER_CONNECTED_2   (1<<17)
 
#define TI_FIBER_CONNECTED_3   (1<<18)
 
#define TI_FIBER_CONNECTED_4   (1<<19)
 
#define TI_FIBER_CONNECTED_5   (1<<20)
 
#define TI_FIBER_CONNECTED_6   (1<<21)
 
#define TI_FIBER_CONNECTED_7   (1<<22)
 
#define TI_FIBER_CONNECTED_8   (1<<23)
 
#define TI_FIBER_CONNECTED_TI(x)   (1<<(x+15))
 
#define TI_FIBER_CONNECTED_MASK   0x00FF0000
 
#define TI_FIBER_TRIGSRC_ENABLED_1   (1<<24)
 
#define TI_FIBER_TRIGSRC_ENABLED_2   (1<<25)
 
#define TI_FIBER_TRIGSRC_ENABLED_3   (1<<26)
 
#define TI_FIBER_TRIGSRC_ENABLED_4   (1<<27)
 
#define TI_FIBER_TRIGSRC_ENABLED_5   (1<<28)
 
#define TI_FIBER_TRIGSRC_ENABLED_6   (1<<29)
 
#define TI_FIBER_TRIGSRC_ENABLED_7   (1<<30)
 
#define TI_FIBER_TRIGSRC_ENABLED_8   (1<<31)
 
#define TI_FIBER_TRIGSRC_ENABLED_TI(x)   (1<<(x+23))
 
#define TI_FIBER_TRIGSRC_ENABLED_MASK   0xFF000000
 
#define TI_INTSETUP_VECTOR_MASK   0x000000FF
 
#define TI_INTSETUP_LEVEL_MASK   0x00000F00
 
#define TI_INTSETUP_ENABLE   (1<<16)
 
#define TI_TRIGDELAY_TRIG1_DELAY_MASK   0x000000FF
 
#define TI_TRIGDELAY_TRIG1_WIDTH_MASK   0x0000FF00
 
#define TI_TRIGDELAY_TRIG2_DELAY_MASK   0x00FF0000
 
#define TI_TRIGDELAY_TRIG2_WIDTH_MASK   0xFF000000
 
#define TI_TRIGDELAY_TRIG1_64NS_STEP   (1<<7)
 
#define TI_TRIGDELAY_TRIG2_64NS_STEP   (1<<23)
 
#define TI_ADR32_MBLK_ADDR_MAX_MASK   0x000003FE
 
#define TI_ADR32_MBLK_ADDR_MIN_MASK   0x003FC000
 
#define TI_ADR32_BASE_MASK   0xFF800000
 
#define TI_BLOCKLEVEL_MASK   0x000000FF
 
#define TI_BLOCKLEVEL_CURRENT_MASK   0x00FF0000
 
#define TI_BLOCKLEVEL_RECEIVED_MASK   0xFF000000
 
#define TI_DATAFORMAT_TWOBLOCK_PLACEHOLDER   (1<<0)
 
#define TI_DATAFORMAT_TIMING_WORD   (1<<1)
 
#define TI_DATAFORMAT_HIGHERBITS_WORD   (1<<2)
 
#define TI_DATAFORMAT_FPINPUT_READOUT   (1<<3)
 
#define TI_VMECONTROL_BERR   (1<<0)
 
#define TI_VMECONTROL_TOKEN_TESTMODE   (1<<1)
 
#define TI_VMECONTROL_MBLK   (1<<2)
 
#define TI_VMECONTROL_A32M   (1<<3)
 
#define TI_VMECONTROL_A32   (1<<4)
 
#define TI_VMECONTROL_ERROR_INT   (1<<7)
 
#define TI_VMECONTROL_I2CDEV_HACK   (1<<8)
 
#define TI_VMECONTROL_TOKENOUT_HI   (1<<9)
 
#define TI_VMECONTROL_FIRST_BOARD   (1<<10)
 
#define TI_VMECONTROL_LAST_BOARD   (1<<11)
 
#define TI_VMECONTROL_BUFFER_DISABLE   (1<<15)
 
#define TI_VMECONTROL_BLOCKLEVEL_UPDATE   (1<<21)
 
#define TI_VMECONTROL_SLOWER_TRIGGER_RULES   (1<<31)
 
#define TI_TRIGSRC_SOURCEMASK   0x0000F3FF
 
#define TI_TRIGSRC_P0   (1<<0)
 
#define TI_TRIGSRC_HFBR1   (1<<1)
 
#define TI_TRIGSRC_LOOPBACK   (1<<2)
 
#define TI_TRIGSRC_FPTRG   (1<<3)
 
#define TI_TRIGSRC_VME   (1<<4)
 
#define TI_TRIGSRC_TSINPUTS   (1<<5)
 
#define TI_TRIGSRC_TSREV2   (1<<6)
 
#define TI_TRIGSRC_PULSER   (1<<7)
 
#define TI_TRIGSRC_HFBR5   (1<<10)
 
#define TI_TRIGSRC_TRIG21   (1<<11)
 
#define TI_TRIGSRC_PART_1   (1<<12)
 
#define TI_TRIGSRC_PART_2   (1<<13)
 
#define TI_TRIGSRC_PART_3   (1<<14)
 
#define TI_TRIGSRC_PART_4   (1<<15)
 
#define TI_TRIGSRC_MONITOR_MASK   0xFFFF0000
 
#define TI_SYNC_SOURCEMASK   0x000000FF
 
#define TI_SYNC_P0   (1<<0)
 
#define TI_SYNC_HFBR1   (1<<1)
 
#define TI_SYNC_HFBR5   (1<<2)
 
#define TI_SYNC_FP   (1<<3)
 
#define TI_SYNC_LOOPBACK   (1<<4)
 
#define TI_SYNC_USER_SYNCRESET_ENABLED   (1<<7)
 
#define TI_SYNC_HFBR1_CODE_MASK   0x00000F00
 
#define TI_SYNC_HFBR5_CODE_MASK   0x0000F000
 
#define TI_SYNC_LOOPBACK_CODE_MASK   0x000F0000
 
#define TI_SYNC_HISTORY_FIFO_MASK   0x00700000
 
#define TI_SYNC_HISTORY_FIFO_EMPTY   (1<<20)
 
#define TI_SYNC_HISTORY_FIFO_HALF_FULL   (1<<21)
 
#define TI_SYNC_HISTORY_FIFO_FULL   (1<<22)
 
#define TI_SYNC_MONITOR_MASK   0xFF000000
 
#define TI_BUSY_SOURCEMASK   0x0000FFFF
 
#define TI_BUSY_SWA   (1<<0)
 
#define TI_BUSY_SWB   (1<<1)
 
#define TI_BUSY_P2   (1<<2)
 
#define TI_BUSY_FP_FTDC   (1<<3)
 
#define TI_BUSY_FP_FADC   (1<<4)
 
#define TI_BUSY_FP   (1<<5)
 
#define TI_BUSY_TRIGGER_LOCK   (1<<6)
 
#define TI_BUSY_LOOPBACK   (1<<7)
 
#define TI_BUSY_HFBR1   (1<<8)
 
#define TI_BUSY_HFBR2   (1<<9)
 
#define TI_BUSY_HFBR3   (1<<10)
 
#define TI_BUSY_HFBR4   (1<<11)
 
#define TI_BUSY_HFBR5   (1<<12)
 
#define TI_BUSY_HFBR6   (1<<13)
 
#define TI_BUSY_HFBR7   (1<<14)
 
#define TI_BUSY_HFBR8   (1<<15)
 
#define TI_BUSY_MONITOR_MASK   0xFFFF0000
 
#define TI_BUSY_MONITOR_SWA   (1<<16)
 
#define TI_BUSY_MONITOR_SWB   (1<<17)
 
#define TI_BUSY_MONITOR_P2   (1<<18)
 
#define TI_BUSY_MONITOR_FP_FTDC   (1<<19)
 
#define TI_BUSY_MONITOR_FP_FADC   (1<<20)
 
#define TI_BUSY_MONITOR_FP   (1<<21)
 
#define TI_BUSY_MONITOR_TRIG_LOST   (1<<22)
 
#define TI_BUSY_MONITOR_LOOPBACK   (1<<23)
 
#define TI_BUSY_MONITOR_FIBER_BUSY(x)   (1<<(x+23))
 
#define TI_BUSY_MONITOR_HFBR1   (1<<24)
 
#define TI_BUSY_MONITOR_HFBR2   (1<<25)
 
#define TI_BUSY_MONITOR_HFBR3   (1<<26)
 
#define TI_BUSY_MONITOR_HFBR4   (1<<27)
 
#define TI_BUSY_MONITOR_HFBR5   (1<<28)
 
#define TI_BUSY_MONITOR_HFBR6   (1<<29)
 
#define TI_BUSY_MONITOR_HFBR7   (1<<30)
 
#define TI_BUSY_MONITOR_HFBR8   (1<<31)
 
#define TI_CLOCK_INTERNAL   (0)
 
#define TI_CLOCK_HFBR5   (1)
 
#define TI_CLOCK_HFBR1   (2)
 
#define TI_CLOCK_FP   (3)
 
#define TI_CLOCK_MASK   0x0000000F
 
#define TI_TRIG1PRESCALE_MASK   0x0000FFFF
 
#define TI_BLOCKBUFFER_BUFFERLEVEL_MASK   0x000000FF
 
#define TI_BLOCKBUFFER_BLOCKS_READY_MASK   0x0000FF00
 
#define TI_BLOCKBUFFER_TRIGGERS_IN_BLOCK   0x00FF0000
 
#define TI_BLOCKBUFFER_RO_NEVENTS_MASK   0x07000000
 
#define TI_BLOCKBUFFER_BLOCKS_NEEDACK_MASK   0x7F000000
 
#define TI_BLOCKBUFFER_BREADY_INT_MASK   0x0F000000
 
#define TI_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT   (1<<28)
 
#define TI_BLOCKBUFFER_SYNCRESET_REQUESTED   (1<<30)
 
#define TI_BLOCKBUFFER_SYNCEVENT   (1<<31)
 
#define TI_TRIGGERRULE_RULE1_MASK   0x000000FF
 
#define TI_TRIGGERRULE_RULE2_MASK   0x0000FF00
 
#define TI_TRIGGERRULE_RULE3_MASK   0x00FF0000
 
#define TI_TRIGGERRULE_RULE4_MASK   0xFF000000
 
#define TI_TRIGGERWINDOW_COINC_MASK   0x000000FF
 
#define TI_TRIGGERWINDOW_INHIBIT_MASK   0x0000FF00
 
#define TI_TRIGGERWINDOW_TRIG21_MASK   0x01FF0000
 
#define TI_TRIGGERWINDOW_LEVEL_LATCH   (1<<31)
 
#define TI_TSINPUT_MASK   0x0000003F
 
#define TI_TSINPUT_1   (1<<0)
 
#define TI_TSINPUT_2   (1<<1)
 
#define TI_TSINPUT_3   (1<<2)
 
#define TI_TSINPUT_4   (1<<3)
 
#define TI_TSINPUT_5   (1<<4)
 
#define TI_TSINPUT_6   (1<<5)
 
#define TI_TSINPUT_ALL   (0x3F)
 
#define TI_OUTPUT_MASK   0x0000FFFF
 
#define TI_OUTPUT_BLOCKS_READY_MASK   0x00FF0000
 
#define TI_OUTPUT_EVENTS_IN_BLOCK_MASK   0xFF000000
 
#define TI_FIBERSYNCDELAY_HFBR1_SYNCPHASE_MASK   0x000000FF
 
#define TI_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK   0x0000FF00
 
#define TI_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK   0x00FF0000
 
#define TI_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK   0xFF000000
 
#define TI_INPUTPRESCALE_FP1_MASK   0x0000000F
 
#define TI_INPUTPRESCALE_FP2_MASK   0x000000F0
 
#define TI_INPUTPRESCALE_FP3_MASK   0x00000F00
 
#define TI_INPUTPRESCALE_FP4_MASK   0x0000F000
 
#define TI_INPUTPRESCALE_FP5_MASK   0x000F0000
 
#define TI_INPUTPRESCALE_FP6_MASK   0x00F00000
 
#define TI_INPUTPRESCALE_FP_MASK(x)   (0xF<<4*((x-1)))
 
#define TI_SYNCCOMMAND_VME_CLOCKRESET   0x11
 
#define TI_SYNCCOMMAND_CLK250_RESYNC   0x22
 
#define TI_SYNCCOMMAND_AD9510_RESYNC   0x33
 
#define TI_SYNCCOMMAND_GTP_STATUSB_RESET   0x44
 
#define TI_SYNCCOMMAND_TRIGGERLINK_ENABLE   0x55
 
#define TI_SYNCCOMMAND_TRIGGERLINK_DISABLE   0x77
 
#define TI_SYNCCOMMAND_SYNCRESET_HIGH   0x99
 
#define TI_SYNCCOMMAND_TRIGGER_READY_RESET   0xAA
 
#define TI_SYNCCOMMAND_RESET_EVNUM   0xBB
 
#define TI_SYNCCOMMAND_SYNCRESET_LOW   0xCC
 
#define TI_SYNCCOMMAND_SYNCRESET   0xDD
 
#define TI_SYNCCOMMAND_SYNCRESET_4US   0xEE
 
#define TI_SYNCCOMMAND_SYNCCODE_MASK   0x000000FF
 
#define TI_SYNCDELAY_MASK   0x0000007F
 
#define TI_SYNCWIDTH_MASK   0x7F
 
#define TI_SYNCWIDTH_LONGWIDTH_ENABLE   (1<<7)
 
#define TI_TRIGGERCOMMAND_VALUE_MASK   0x000000FF
 
#define TI_TRIGGERCOMMAND_CODE_MASK   0x00000F00
 
#define TI_TRIGGERCOMMAND_TRIG1   0x00000100
 
#define TI_TRIGGERCOMMAND_TRIG2   0x00000200
 
#define TI_TRIGGERCOMMAND_SYNC_EVENT   0x00000300
 
#define TI_TRIGGERCOMMAND_SET_BLOCKLEVEL   0x00000800
 
#define TI_RANDOMPULSER_TRIG1_RATE_MASK   0x0000000F
 
#define TI_RANDOMPULSER_TRIG1_ENABLE   (1<<7)
 
#define TI_RANDOMPULSER_TRIG2_RATE_MASK   0x00000F00
 
#define TI_RANDOMPULSER_TRIG2_ENABLE   (1<<15)
 
#define TI_FIXEDPULSER1_NTRIGGERS_MASK   0x0000FFFF
 
#define TI_FIXEDPULSER1_PERIOD_MASK   0x7FFF0000
 
#define TI_FIXEDPULSER1_PERIOD_RANGE   (1<<31)
 
#define TI_FIXEDPULSER2_NTRIGGERS_MASK   0x0000FFFF
 
#define TI_FIXEDPULSER2_PERIOD_MASK   0x7FFF0000
 
#define TI_FIXEDPULSER2_PERIOD_RANGE   (1<<31)
 
#define TI_NBLOCKS_COUNT_MASK   0x00FFFFFF
 
#define TI_NBLOCKS_EVENTS_IN_BLOCK_MASK   0xFF000000
 
#define TI_SYNCHISTORY_HFBR1_CODE_MASK   0x0000000F
 
#define TI_SYNCHISTORY_HFBR1_CODE_VALID   (1<<4)
 
#define TI_SYNCHISTORY_HFBR5_CODE_MASK   0x000001E0
 
#define TI_SYNCHISTORY_HFBR5_CODE_VALID   (1<<9)
 
#define TI_SYNCHISTORY_LOOPBACK_CODE_MASK   0x00003C00
 
#define TI_SYNCHISTORY_LOOPBACK_CODE_VALID   (1<<14)
 
#define TI_SYNCHISTORY_TIMESTAMP_OVERFLOW   (1<<15)
 
#define TI_SYNCHISTORY_TIMESTAMP_MASK   0xFFFF0000
 
#define TI_RUNNINGMODE_ENABLE   0x71
 
#define TI_RUNNINGMODE_DISABLE   0x0
 
#define TI_FIBERLATENCYMEASUREMENT_CARRYCHAIN_MASK   0x0000FFFF
 
#define TI_FIBERLATENCYMEASUREMENT_IODELAY_MASK   0x007F0000
 
#define TI_FIBERLATENCYMEASUREMENT_DATA_MASK   0xFF800000
 
#define TI_FIBERALIGNMENT_HFBR1_IODELAY_MASK   0x000000FF
 
#define TI_FIBERALIGNMENT_HFBR1_SYNCDELAY_MASK   0x0000FF00
 
#define TI_FIBERALIGNMENT_HFBR5_IODELAY_MASK   0x00FF0000
 
#define TI_FIBERALIGNMENT_HFBR5_SYNCDELAY_MASK   0xFF000000
 
#define TI_BLOCKSTATUS_NBLOCKS_READY0   0x000000FF
 
#define TI_BLOCKSTATUS_NBLOCKS_NEEDACK0   0x0000FF00
 
#define TI_BLOCKSTATUS_NBLOCKS_READY1   0x00FF0000
 
#define TI_BLOCKSTATUS_NBLOCKS_NEEDACK1   0xFF000000
 
#define TI_ADR24_ADDRESS_MASK   0x0000001F
 
#define TI_ADR24_HARDWARE_SET_MASK   0x000003E0
 
#define TI_ADR24_GEOADDR_MASK   0x00007C00
 
#define TI_ADR24_TM_NBLOCKS_READY1   0x00FF0000
 
#define TI_ADR24_TM_NBLOCKS_NEEDACK1   0xFF000000
 
#define TI_SYNCEVENTCTRL_NBLOCKS_MASK   0x00FFFFFF
 
#define TI_PROMPT_TRIG_WIDTH_MASK   0x0000007F
 
#define TI_EVENTNUMBER_HI_MASK   0xFFFF0000
 
#define TI_ROCENABLE_MASK   0x000000FF
 
#define TI_ROCENABLE_ROC(x)   (1<<(x))
 
#define TI_ROCENABLE_SYNCRESET_REQUEST_ENABLE_MASK   0x0007FC00
 
#define TI_ROCENABLE_SYNCRESET_REQUEST_MONITOR_MASK   0x1FF00000
 
#define TI_RESET_I2C   (1<<1)
 
#define TI_RESET_JTAG   (1<<2)
 
#define TI_RESET_SFM   (1<<3)
 
#define TI_RESET_SOFT   (1<<4)
 
#define TI_RESET_SYNC_HISTORY   (1<<6)
 
#define TI_RESET_BUSYACK   (1<<7)
 
#define TI_RESET_CLK250   (1<<8)
 
#define TI_RESET_CLK200   (1<<8)
 
#define TI_RESET_CLK125   (1<<9)
 
#define TI_RESET_MGT   (1<<10)
 
#define TI_RESET_AUTOALIGN_HFBR1_SYNC   (1<<11)
 
#define TI_RESET_AUTOALIGN_HFBR5_SYNC   (1<<12)
 
#define TI_RESET_RAM_WRITE   (1<<12)
 
#define TI_RESET_FIBER_AUTO_ALIGN   (1<<13)
 
#define TI_RESET_IODELAY   (1<<14)
 
#define TI_RESET_MEASURE_LATENCY   (1<<15)
 
#define TI_RESET_TAKE_TOKEN   (1<<16)
 
#define TI_RESET_BLOCK_READOUT   (1<<17)
 
#define TI_RESET_FORCE_SYNCEVENT   (1<<20)
 
#define TI_RESET_MGT_RX_RESET   (1<<22)
 
#define TI_RESET_SYNCRESET_REQUEST   (1<<23)
 
#define TI_RESET_SCALERS_LATCH   (1<<24)
 
#define TI_RESET_SCALERS_RESET   (1<<25)
 
#define TI_RESET_FILL_TO_END_BLOCK   (1<<31)
 
#define TI_FPDELAY_MASK(x)   (0x1FF<<(10*(x%3)))
 
#define TI_TRIGGERRULEMIN_MIN2_MASK   0x00007F00
 
#define TI_TRIGGERRULEMIN_MIN2_EN   (1<<15)
 
#define TI_TRIGGERRULEMIN_MIN3_MASK   0x007F0000
 
#define TI_TRIGGERRULEMIN_MIN3_EN   (1<<23)
 
#define TI_TRIGGERRULEMIN_MIN4_MASK   0x7F000000
 
#define TI_TRIGGERRULEMIN_MIN4_EN   (1<<31)
 
#define TI_ID_TRIGSRC_ENABLE_MASK   0x000000FF
 
#define TI_ID_CRATEID_MASK   0x0000FF00
 
#define TI_ID_BLOCKLEVEL_MASK   0x00FF0000
 
#define TI_TRIGGER_P0   0
 
#define TI_TRIGGER_HFBR1   1
 
#define TI_TRIGGER_FPTRG   2
 
#define TI_TRIGGER_TSINPUTS   3
 
#define TI_TRIGGER_TSREV2   4
 
#define TI_TRIGGER_RANDOM   5
 
#define TI_TRIGGER_PULSER   5
 
#define TI_TRIGGER_PART_1   6
 
#define TI_TRIGGER_PART_2   7
 
#define TI_TRIGGER_PART_3   8
 
#define TI_TRIGGER_PART_4   9
 
#define TI_TRIGGER_HFBR5   10
 
#define TI_TRIGGER_TRIG21   11
 
#define TI_INT_VEC   0xec
 
#define TI_INT_LEVEL   5
 
#define TI_I2C_DATA_MASK   0x0000ffff
 
#define TI_I2C_8BIT_DATA_MASK   0x000000ff
 
#define TI_DATA_TYPE_DEFINE_MASK   0x80000000
 
#define TI_WORD_TYPE_MASK   0x78000000
 
#define TI_FILLER_WORD_TYPE   0x78000000
 
#define TI_BLOCK_HEADER_WORD_TYPE   0x00000000
 
#define TI_BLOCK_TRAILER_WORD_TYPE   0x08000000
 
#define TI_EMPTY_FIFO   0xF0BAD0F0
 
#define TI_BLOCK_HEADER_CRATEID_MASK   0xFF000000
 
#define TI_BLOCK_HEADER_SLOTS_MASK   0x001F0000
 
#define TI_BLOCK_TRAILER_CRATEID_MASK   0x00FF0000
 
#define TI_BLOCK_TRAILER_SLOTS_MASK   0x1F000000
 
#define TI_DATA_BLKNUM_MASK   0x0000FF00
 
#define TI_DATA_BLKLEVEL_MASK   0x000000FF
 
#define TI_INIT_NO_INIT   (1<<0)
 
#define TI_INIT_SLAVE_FIBER_5   (1<<1)
 
#define TI_INIT_SKIP_FIRMWARE_CHECK   (1<<2)
 

Functions

int tiSetFiberLatencyOffset_preInit (int flo)
 Set the Fiber Latency Offset to be used during initialization. More...
 
int tiSetCrateID_prIinit (int cid)
 
int tiInit (unsigned int tAddr, unsigned int mode, int force)
 Initialize the TIp register space into local memory, and setup registers given user input. More...
 
unsigned int tiFind ()
 Find the TI within the prescribed "GEO Slot to A24 VME Address" range from slot 3 to 21. More...
 
int tiCheckAddresses ()
 
void tiStatus (int pflag)
 Print some status information of the TI to standard out. More...
 
int tiSetSlavePort (int port)
 This routine provides the ability to switch the port that the TI Slave receives its Clock, SyncReset, and Trigger. If the TI has already been configured to use this port, nothing is done. More...
 
int tiGetSlavePort ()
 Returns the port of which the TI Slave has been configured (or will be) More...
 
void tiSlaveStatus (int pflag)
 Print a summary of all fiber port connections to potential TI Slaves. More...
 
int tiGetFirmwareVersion ()
 Get the Firmware Version. More...
 
int tiReload ()
 Reload the firmware on the FPGA. More...
 
unsigned int tiGetSerialNumber (char **rSN)
 Get the Module Serial Number. More...
 
int tiClockResync ()
 Resync the 250 MHz Clock. More...
 
int tiReset ()
 Perform a soft reset of the TI. More...
 
int tiSetCrateID (unsigned int crateID)
 Set the crate ID. More...
 
int tiGetCrateID (int port)
 Get the crate ID of the selected port. More...
 
int tiGetPortTrigSrcEnabled (int port)
 Get the trigger sources enabled bits of the selected port. More...
 
int tiGetSlaveBlocklevel (int port)
 Get the blocklevel of the TI-Slave on the selected port. More...
 
int tiSetBlockLevel (int blockLevel)
 Set the number of events per block. More...
 
int tiBroadcastNextBlockLevel (int blockLevel)
 Broadcast the next block level (to be changed at the end of the next sync event, or during a call to tiSyncReset(1). More...
 
int tiGetNextBlockLevel ()
 Get the block level that will be updated on the end of the block readout. More...
 
int tiGetCurrentBlockLevel ()
 Get the current block level. More...
 
int tiSetInstantBlockLevelChange (int enable)
 Set TS to instantly change blocklevel when broadcast is received. More...
 
int tiGetInstantBlockLevelChange ()
 Get Status of instant blocklevel change when broadcast is received. More...
 
int tiSetTriggerSource (int trig)
 Set the trigger source This routine will set a library variable to be set in the TI registers at a call to tiIntEnable. More...
 
int tiSetTriggerSourceMask (int trigmask)
 Set trigger sources with specified trigmask This routine is for special use when tiSetTriggerSource(...) does not set all of the trigger sources that is required by the user. More...
 
int tiEnableTriggerSource ()
 Enable trigger sources Enable trigger sources set by tiSetTriggerSource(...) or tiSetTriggerSourceMask(...) More...
 
int tiDisableTriggerSource (int fflag)
 Disable trigger sources. More...
 
int tiSetSyncSource (unsigned int sync)
 Set the Sync source mask. More...
 
int tiSetEventFormat (int format)
 Set the event format. More...
 
int tiSetFPInputReadout (int enable)
 Set whether or not the latched pattern of FP Inputs in block readout. More...
 
int tiSoftTrig (int trigger, unsigned int nevents, unsigned int period_inc, int range)
 Set and enable the "software" trigger. More...
 
int tiSetRandomTrigger (int trigger, int setting)
 Set the parameters of the random internal trigger. More...
 
int tiDisableRandomTrigger ()
 Disable random trigger generation. More...
 
int tiReadBlock (volatile unsigned int *data, int nwrds, int rflag)
 Read a block of events from the TI. More...
 
int tiReadTriggerBlock (volatile unsigned int *data)
 Read a block from the TI and form it into a CODA Trigger Bank. More...
 
int tiCheckTriggerBlock (volatile unsigned int *data)
 
int tiDecodeTriggerType (volatile unsigned int *data, int data_len, int event)
 
int tiEnableFiber (unsigned int fiber)
 Enable Fiber transceiver. More...
 
int tiDisableFiber (unsigned int fiber)
 Disnable Fiber transceiver. More...
 
int tiSetBusySource (unsigned int sourcemask, int rFlag)
 Set the busy source with a given sourcemask sourcemask bits: More...
 
int tiSetTriggerLock (int enable)
 Set the the trigger lock mode. More...
 
int tiGetTriggerLock ()
 Get the current setting of the trigger lock mode. More...
 
void tiEnableBusError ()
 Enable Bus Errors to terminate Block Reads. More...
 
void tiDisableBusError ()
 Disable Bus Errors to terminate Block Reads. More...
 
int tiPayloadPort2VMESlot (int payloadport)
 Routine to return the VME slot, provided the VXS payload port. More...
 
unsigned int tiPayloadPortMask2VMESlotMask (unsigned int ppmask)
 Routine to return the VME slot Mask, provided the VXS payload port Mask. More...
 
int tiVMESlot2PayloadPort (int vmeslot)
 Routine to return the VXS payload port, provided the VME Slot. More...
 
unsigned int tiVMESlotMask2PayloadPortMask (unsigned int vmemask)
 Routine to return the VXS Payload Port Mask, provided the VME Slot Mask. More...
 
int tiSetPrescale (int prescale)
 Set the prescale factor for the external trigger. More...
 
int tiGetPrescale ()
 Get the current prescale factor. More...
 
int tiSetInputPrescale (int input, int prescale)
 Set the prescale factor for the selected input. More...
 
int tiGetInputPrescale (int input)
 Get the current prescale factor for the selected input. More...
 
int tiSetTriggerPulse (int trigger, int delay, int width, int delay_step)
 Set the characteristics of a specified trigger. More...
 
int tiSetPromptTriggerWidth (int width)
 Set the width of the prompt trigger from OT#2. More...
 
int tiGetPromptTriggerWidth ()
 Get the width of the prompt trigger from OT#2. More...
 
void tiSetSyncDelayWidth (unsigned int delay, unsigned int width, int widthstep)
 Set the delay time and width of the Sync signal. More...
 
void tiTrigLinkReset ()
 Reset the trigger link. More...
 
int tiSetSyncResetType (int type)
 Set type of SyncReset to send to TI Slaves. More...
 
void tiSyncReset (int bflag)
 Generate a Sync Reset signal. This signal is sent to the loopback and all configured TI Slaves. More...
 
void tiSyncResetResync ()
 Generate a Sync Reset Resync signal. This signal is sent to the loopback and all configured TI Slaves. This type of Sync Reset will NOT reset event numbers. More...
 
void tiClockReset ()
 Generate a Clock Reset signal. This signal is sent to the loopback and all configured TI Slaves. More...
 
int tiSetAdr32 (unsigned int a32base)
 Routine to set the A32 Base. More...
 
int tiDisableA32 ()
 Disable A32. More...
 
int tiResetEventCounter ()
 Reset the L1A counter, as incremented by the TI. More...
 
unsigned long long int tiGetEventCounter ()
 Returns the event counter (48 bit) More...
 
int tiSetBlockLimit (unsigned int limit)
 Set the block number at which triggers will be disabled automatically. More...
 
unsigned int tiGetBlockLimit ()
 Returns the value that is currently programmed as the block limit. More...
 
unsigned int tiBReady ()
 Returns the number of Blocks available for readout. More...
 
int tiGetSyncEventFlag ()
 Return the value of the Synchronization flag, obtained from tiBReady. i.e. Return the value of the SyncFlag for the current readout block. More...
 
int tiGetSyncEventReceived ()
 Return the value of whether or not the sync event has been received. More...
 
int tiGetReadoutEvents ()
 Return the value of the number of readout events accepted. More...
 
int tiEnableVXSSignals ()
 Enable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module. More...
 
int tiDisableVXSSignals ()
 Disable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module. More...
 
int tiSetBlockBufferLevel (unsigned int level)
 Set the block buffer level for the number of blocks in the system that need to be read out. More...
 
int tiEnableTSInput (unsigned int inpMask)
 Enable/Disable trigger inputs labelled TS#1-6 on the Front Panel. More...
 
int tiDisableTSInput (unsigned int inpMask)
 Disable trigger inputs labelled TS#1-6 on the Front Panel. More...
 
int tiSetOutputPort (unsigned int set1, unsigned int set2, unsigned int set3, unsigned int set4)
 Set (or unset) high level for the output ports on the front panel labelled as O#1-4. More...
 
int tiSetClockSource (unsigned int source)
 Set the clock to the specified source. More...
 
int tiGetClockSource ()
 Get the current clock source. More...
 
void tiSetFiberDelay (unsigned int delay, unsigned int offset)
 Set the fiber delay required to align the sync and triggers for all crates. More...
 
int tiAddSlave (unsigned int fiber)
 Add and configurate a TI Slave for the TI Master. More...
 
int tiSetTriggerHoldoff (int rule, unsigned int value, int timestep)
 Set the value for a specified trigger rule. More...
 
int tiGetTriggerHoldoff (int rule)
 Get the value for a specified trigger rule. More...
 
int tiPrintTriggerHoldoff (int dflag)
 
int tiSetTriggerHoldoffMin (int rule, unsigned int value)
 Set the value for the minimum time of specified trigger rule. More...
 
int tiGetTriggerHoldoffMin (int rule, int pflag)
 Get the value for a specified trigger rule minimum busy. More...
 
int tiDisableDataReadout ()
 Disable the necessity to readout the TI for every block. More...
 
int tiEnableDataReadout ()
 Enable readout the TI for every block. More...
 
void tiResetBlockReadout ()
 Decrement the hardware counter for blocks available, effectively simulating a readout from the data fifo. More...
 
int tiTriggerTableConfig (unsigned int *itable)
 Configure trigger table to be loaded with a user provided array. More...
 
int tiGetTriggerTable (unsigned int *otable)
 Get the current trigger table stored in local memory (not necessarily on TI). More...
 
int tiTriggerTablePredefinedConfig (int mode)
 Configure trigger tabled to be loaded with a predefined trigger table (mapping TS inputs to trigger types). More...
 
int tiDefineEventType (int trigMask, int hwTrig, int evType)
 Define a specific trigger pattern as a hardware trigger (trig1/trig2/syncevent) and Event Type. More...
 
int tiDefinePulserEventType (int fixed_type, int random_type)
 Define the event type for the TI Master's fixed and random internal trigger. More...
 
int tiLoadTriggerTable (int mode)
 Load a predefined trigger table (mapping TS inputs to trigger types). More...
 
void tiPrintTriggerTable (int showbits)
 Print trigger table to standard out. More...
 
int tiSetTriggerWindow (int window_width)
 Set the window of the input trigger coincidence window. More...
 
int tiGetTriggerWindow ()
 Get the window of the input trigger coincidence window. More...
 
int tiSetTriggerInhibitWindow (int window_width)
 Set the width of the input trigger inhibit window. More...
 
int tiGetTriggerInhibitWindow ()
 Get the width of the input trigger inhibit window. More...
 
int tiSetTrig21Delay (int delay)
 Set the delay of Trig1 relative to Trig2 when trigger source is 11. More...
 
int tiGetTrig21Delay ()
 Get the delay of Trig1 relative to Trig2 when trigger source is 11. More...
 
int tiSetTriggerLatchOnLevel (int enable)
 Set the trigger latch pattern readout in the data stream to include the Level of the input trigger OR the transition to Hi. More...
 
int tiGetTriggerLatchOnLevel ()
 Get the trigger latch pattern readout in the data stream to include the Level of the input trigger OR the transition to Hi. More...
 
int tiLatchTimers ()
 Latch the Busy and Live Timers. More...
 
unsigned int tiGetLiveTime ()
 Return the current "live" time of the module. More...
 
unsigned int tiGetBusyTime ()
 Return the current "busy" time of the module. More...
 
int tiLive (int sflag)
 Calculate the live time (percentage) from the live and busy time scalers. More...
 
unsigned int tiGetTSscaler (int input, int latch)
 Get the current counter for the specified TS Input. More...
 
unsigned int tiBlockStatus (int fiber, int pflag)
 Show block Status of specified fiber. More...
 
int tiGetFiberLatencyMeasurement ()
 Return measured fiber length. More...
 
int tiSetUserSyncResetReceive (int enable)
 Enable/Disable operation of User SyncReset. More...
 
int tiGetLastSyncCodes (int pflag)
 Return last SyncCommand received. More...
 
int tiGetSyncHistoryBufferStatus (int pflag)
 Get the status of the SyncCommand History Buffer. More...
 
void tiResetSyncHistory ()
 Reset the SyncCommand history buffer. More...
 
void tiUserSyncReset (int enable, int pflag)
 Control level of the SyncReset signal. More...
 
void tiPrintSyncHistory ()
 Print to standard out the history buffer of Sync Commands received. More...
 
int tiSetSyncEventInterval (int blk_interval)
 Set the value of the syncronization event interval. More...
 
int tiGetSyncEventInterval ()
 Get the SyncEvent Block interval. More...
 
int tiForceSyncEvent ()
 Force a sync event (type = 0). More...
 
int tiSyncResetRequest ()
 Sync Reset Request is sent to TI-Master or TS. More...
 
int tiGetSyncResetRequest ()
 Determine if a TI has requested a Sync Reset. More...
 
int tiEnableSyncResetRequest (unsigned int portMask, int self)
 Configure which ports (and self) to enable response of a SyncReset request. More...
 
int tiSyncResetRequestStatus (int pflag)
 Status of SyncReset Request received bits. More...
 
void tiTriggerReadyReset ()
 Reset the registers that record the triggers enabled status of TI Slaves. More...
 
int tiFillToEndBlock ()
 Generate non-physics triggers until the current block is filled. This feature is useful for "end of run" situations. More...
 
int tiResetMGT ()
 Reset the MGT. More...
 
int tiSetTSInputDelay (int chan, int delay)
 Set the input delay for the specified front panel TSinput (1-6) More...
 
int tiGetTSInputDelay (int chan)
 Get the input delay for the specified front panel TSinput (1-6) More...
 
int tiPrintTSInputDelay ()
 Print Front Panel TSinput Delays to Standard Out. More...
 
unsigned int tiGetGTPBufferLength (int pflag)
 Return value of buffer length from GTP. More...
 
unsigned int tiGetSWAStatus (int reg)
 Return the value from the SWa fast link register. More...
 
unsigned int tiGetSWBStatus (int reg)
 Return the value from the SWB fast link register. More...
 
int tiGetGeoAddress ()
 Return geographic address as provided from a VME-64X crate. More...
 
int tiIntConnect (unsigned int vector, VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to the TI Interrupt or latched trigger, if polling. More...
 
int tiIntDisconnect ()
 Disable interrupts or kill the polling service thread. More...
 
int tiAckConnect (VOIDFUNCPTR routine, unsigned int arg)
 Connect a user routine to be executed instead of the default TI interrupt/trigger latching acknowledge prescription. More...
 
void tiIntAck ()
 Acknowledge an interrupt or latched trigger. This "should" effectively release the "Busy" state of the TI. More...
 
int tiIntEnable (int iflag)
 Enable interrupts or latching triggers (depending on set TI mode) More...
 
void tiIntDisable ()
 Disable interrupts or latching triggers. More...
 
unsigned int tiGetIntCount ()
 Return current readout count. More...
 
unsigned int tiGetAckCount ()
 Return current acknowledge count. More...
 
int tiGetSWBBusy (int pflag)
 Return status of Busy from SWB. More...
 
unsigned int tiGetBusyCounter (int busysrc)
 Return BUSY counter for specified Busy Source. More...
 
int tiPrintBusyCounters ()
 Print the BUSY counters for all busy sources. More...
 
int tiSetTokenTestMode (int mode)
 Turn on Token out test mode. More...
 
int tiSetTokenOutTest (int level)
 Set the level of the token out signal. More...
 
int tiRocEnable (int roc)
 
int tiRocEnableMask (int rocmask)
 
int tiGetRocEnableMask ()
 

Variables

pthread_mutex_t tiISR_mutex =PTHREAD_MUTEX_INITIALIZER
 

Macro Definition Documentation

◆ INTLOCK

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

◆ INTUNLOCK

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

◆ TI_ADR24_ADDRESS_MASK

#define TI_ADR24_ADDRESS_MASK   0x0000001F

◆ TI_ADR24_GEOADDR_MASK

#define TI_ADR24_GEOADDR_MASK   0x00007C00

Referenced by tiGetGeoAddress().

◆ TI_ADR24_HARDWARE_SET_MASK

#define TI_ADR24_HARDWARE_SET_MASK   0x000003E0

◆ TI_ADR24_TM_NBLOCKS_NEEDACK1

#define TI_ADR24_TM_NBLOCKS_NEEDACK1   0xFF000000

◆ TI_ADR24_TM_NBLOCKS_READY1

#define TI_ADR24_TM_NBLOCKS_READY1   0x00FF0000

◆ TI_ADR32_BASE_MASK

#define TI_ADR32_BASE_MASK   0xFF800000

Referenced by tiGetAdr32(), and tiSetAdr32().

◆ TI_ADR32_MBLK_ADDR_MAX_MASK

#define TI_ADR32_MBLK_ADDR_MAX_MASK   0x000003FE

◆ TI_ADR32_MBLK_ADDR_MIN_MASK

#define TI_ADR32_MBLK_ADDR_MIN_MASK   0x003FC000

◆ TI_BLOCK_HEADER_CRATEID_MASK

#define TI_BLOCK_HEADER_CRATEID_MASK   0xFF000000

◆ TI_BLOCK_HEADER_SLOTS_MASK

#define TI_BLOCK_HEADER_SLOTS_MASK   0x001F0000

◆ TI_BLOCK_HEADER_WORD_TYPE

#define TI_BLOCK_HEADER_WORD_TYPE   0x00000000

Referenced by tiReadTriggerBlock().

◆ TI_BLOCK_TRAILER_CRATEID_MASK

#define TI_BLOCK_TRAILER_CRATEID_MASK   0x00FF0000

◆ TI_BLOCK_TRAILER_SLOTS_MASK

#define TI_BLOCK_TRAILER_SLOTS_MASK   0x1F000000

◆ TI_BLOCK_TRAILER_WORD_TYPE

#define TI_BLOCK_TRAILER_WORD_TYPE   0x08000000

Referenced by tiReadTriggerBlock().

◆ TI_BLOCKBUFFER_BLOCKS_NEEDACK_MASK

#define TI_BLOCKBUFFER_BLOCKS_NEEDACK_MASK   0x7F000000

◆ TI_BLOCKBUFFER_BLOCKS_READY_MASK

#define TI_BLOCKBUFFER_BLOCKS_READY_MASK   0x0000FF00

Referenced by tiBReady(), and tiStatus().

◆ TI_BLOCKBUFFER_BREADY_INT_MASK

#define TI_BLOCKBUFFER_BREADY_INT_MASK   0x0F000000

Referenced by tiBReady().

◆ TI_BLOCKBUFFER_BUFFERLEVEL_MASK

#define TI_BLOCKBUFFER_BUFFERLEVEL_MASK   0x000000FF

Referenced by tiSetBlockBufferLevel(), and tiStatus().

◆ TI_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT

#define TI_BLOCKBUFFER_BUSY_ON_BLOCKLIMIT   (1<<28)

Referenced by tiGetBlockLimitStatus(), and tiStatus().

◆ TI_BLOCKBUFFER_RO_NEVENTS_MASK

#define TI_BLOCKBUFFER_RO_NEVENTS_MASK   0x07000000

◆ TI_BLOCKBUFFER_SYNCEVENT

#define TI_BLOCKBUFFER_SYNCEVENT   (1<<31)

◆ TI_BLOCKBUFFER_SYNCRESET_REQUESTED

#define TI_BLOCKBUFFER_SYNCRESET_REQUESTED   (1<<30)

Referenced by tiGetSyncResetRequest().

◆ TI_BLOCKBUFFER_TRIGGERS_IN_BLOCK

#define TI_BLOCKBUFFER_TRIGGERS_IN_BLOCK   0x00FF0000

◆ TI_BLOCKLEVEL_CURRENT_MASK

#define TI_BLOCKLEVEL_CURRENT_MASK   0x00FF0000

◆ TI_BLOCKLEVEL_MASK

#define TI_BLOCKLEVEL_MASK   0x000000FF

◆ TI_BLOCKLEVEL_RECEIVED_MASK

#define TI_BLOCKLEVEL_RECEIVED_MASK   0xFF000000

◆ TI_BLOCKSTATUS_NBLOCKS_NEEDACK0

#define TI_BLOCKSTATUS_NBLOCKS_NEEDACK0   0x0000FF00

◆ TI_BLOCKSTATUS_NBLOCKS_NEEDACK1

#define TI_BLOCKSTATUS_NBLOCKS_NEEDACK1   0xFF000000

Referenced by tiSlaveStatus(), and tiStatus().

◆ TI_BLOCKSTATUS_NBLOCKS_READY0

#define TI_BLOCKSTATUS_NBLOCKS_READY0   0x000000FF

◆ TI_BLOCKSTATUS_NBLOCKS_READY1

#define TI_BLOCKSTATUS_NBLOCKS_READY1   0x00FF0000

Referenced by tiSlaveStatus(), and tiStatus().

◆ TI_BOARDID_CRATEID_MASK

#define TI_BOARDID_CRATEID_MASK   0x000000FF

Referenced by tiSetCrateID().

◆ TI_BOARDID_GEOADR_MASK

#define TI_BOARDID_GEOADR_MASK   0x00001F00

◆ TI_BOARDID_PROD_MASK

#define TI_BOARDID_PROD_MASK   0x00FF0000

◆ TI_BOARDID_TYPE_MASK

#define TI_BOARDID_TYPE_MASK   0xFF000000

Referenced by tiFind().

◆ TI_BOARDID_TYPE_TD

#define TI_BOARDID_TYPE_TD   0x7D00

◆ TI_BOARDID_TYPE_TI

#define TI_BOARDID_TYPE_TI   0x7100

Referenced by tiFind().

◆ TI_BOARDID_TYPE_TIDS

#define TI_BOARDID_TYPE_TIDS   0x71D5

◆ TI_BOARDID_TYPE_TS

#define TI_BOARDID_TYPE_TS   0x7500

◆ TI_BUSY_FP

#define TI_BUSY_FP   (1<<5)

Referenced by tiStatus().

◆ TI_BUSY_FP_FADC

#define TI_BUSY_FP_FADC   (1<<4)

Referenced by tiStatus().

◆ TI_BUSY_FP_FTDC

#define TI_BUSY_FP_FTDC   (1<<3)

Referenced by tiStatus().

◆ TI_BUSY_HFBR1

#define TI_BUSY_HFBR1   (1<<8)

Referenced by tiAddSlave(), and tiStatus().

◆ TI_BUSY_HFBR2

#define TI_BUSY_HFBR2   (1<<9)

Referenced by tiStatus().

◆ TI_BUSY_HFBR3

#define TI_BUSY_HFBR3   (1<<10)

Referenced by tiStatus().

◆ TI_BUSY_HFBR4

#define TI_BUSY_HFBR4   (1<<11)

Referenced by tiStatus().

◆ TI_BUSY_HFBR5

#define TI_BUSY_HFBR5   (1<<12)

Referenced by tiStatus().

◆ TI_BUSY_HFBR6

#define TI_BUSY_HFBR6   (1<<13)

Referenced by tiStatus().

◆ TI_BUSY_HFBR7

#define TI_BUSY_HFBR7   (1<<14)

Referenced by tiStatus().

◆ TI_BUSY_HFBR8

#define TI_BUSY_HFBR8   (1<<15)

Referenced by tiStatus().

◆ TI_BUSY_LOOPBACK

#define TI_BUSY_LOOPBACK   (1<<7)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_FIBER_BUSY

#define TI_BUSY_MONITOR_FIBER_BUSY (   x)    (1<<(x+23))

Referenced by tiSlaveStatus().

◆ TI_BUSY_MONITOR_FP

#define TI_BUSY_MONITOR_FP   (1<<21)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_FP_FADC

#define TI_BUSY_MONITOR_FP_FADC   (1<<20)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_FP_FTDC

#define TI_BUSY_MONITOR_FP_FTDC   (1<<19)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR1

#define TI_BUSY_MONITOR_HFBR1   (1<<24)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR2

#define TI_BUSY_MONITOR_HFBR2   (1<<25)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR3

#define TI_BUSY_MONITOR_HFBR3   (1<<26)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR4

#define TI_BUSY_MONITOR_HFBR4   (1<<27)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR5

#define TI_BUSY_MONITOR_HFBR5   (1<<28)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR6

#define TI_BUSY_MONITOR_HFBR6   (1<<29)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR7

#define TI_BUSY_MONITOR_HFBR7   (1<<30)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_HFBR8

#define TI_BUSY_MONITOR_HFBR8   (1<<31)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_LOOPBACK

#define TI_BUSY_MONITOR_LOOPBACK   (1<<23)

Referenced by tiSlaveStatus(), and tiStatus().

◆ TI_BUSY_MONITOR_MASK

#define TI_BUSY_MONITOR_MASK   0xFFFF0000

◆ TI_BUSY_MONITOR_P2

#define TI_BUSY_MONITOR_P2   (1<<18)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_SWA

#define TI_BUSY_MONITOR_SWA   (1<<16)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_SWB

#define TI_BUSY_MONITOR_SWB   (1<<17)

Referenced by tiStatus().

◆ TI_BUSY_MONITOR_TRIG_LOST

#define TI_BUSY_MONITOR_TRIG_LOST   (1<<22)

Referenced by tiStatus().

◆ TI_BUSY_P2

#define TI_BUSY_P2   (1<<2)

Referenced by tiStatus().

◆ TI_BUSY_SOURCEMASK

#define TI_BUSY_SOURCEMASK   0x0000FFFF

Referenced by tiSetBusySource(), and tiStatus().

◆ TI_BUSY_SWA

#define TI_BUSY_SWA   (1<<0)

Referenced by tiStatus().

◆ TI_BUSY_SWB

#define TI_BUSY_SWB   (1<<1)

Referenced by tiGetSWBBusy(), and tiStatus().

◆ TI_BUSY_TRIGGER_LOCK

#define TI_BUSY_TRIGGER_LOCK   (1<<6)

◆ TI_CLOCK_FP

#define TI_CLOCK_FP   (3)

Referenced by tiStatus().

◆ TI_CLOCK_HFBR1

#define TI_CLOCK_HFBR1   (2)

Referenced by tiSetClockSource(), and tiStatus().

◆ TI_CLOCK_HFBR5

#define TI_CLOCK_HFBR5   (1)

Referenced by tiSetClockSource(), and tiStatus().

◆ TI_CLOCK_INTERNAL

#define TI_CLOCK_INTERNAL   (0)

Referenced by tiSetClockSource(), and tiStatus().

◆ TI_CLOCK_MASK

#define TI_CLOCK_MASK   0x0000000F

Referenced by tiSetClockSource(), and tiStatus().

◆ TI_DATA_BLKLEVEL_MASK

#define TI_DATA_BLKLEVEL_MASK   0x000000FF

◆ TI_DATA_BLKNUM_MASK

#define TI_DATA_BLKNUM_MASK   0x0000FF00

◆ TI_DATA_TYPE_DEFINE_MASK

#define TI_DATA_TYPE_DEFINE_MASK   0x80000000

Referenced by tiReadTriggerBlock().

◆ TI_DATAFORMAT_FPINPUT_READOUT

#define TI_DATAFORMAT_FPINPUT_READOUT   (1<<3)

Referenced by tiSetFPInputReadout().

◆ TI_DATAFORMAT_HIGHERBITS_WORD

#define TI_DATAFORMAT_HIGHERBITS_WORD   (1<<2)

Referenced by tiSetEventFormat().

◆ TI_DATAFORMAT_TIMING_WORD

#define TI_DATAFORMAT_TIMING_WORD   (1<<1)

Referenced by tiSetEventFormat().

◆ TI_DATAFORMAT_TWOBLOCK_PLACEHOLDER

#define TI_DATAFORMAT_TWOBLOCK_PLACEHOLDER   (1<<0)

◆ TI_EMPTY_FIFO

#define TI_EMPTY_FIFO   0xF0BAD0F0

◆ TI_EVENTNUMBER_HI_MASK

#define TI_EVENTNUMBER_HI_MASK   0xFFFF0000

Referenced by tiGetEventCounter().

◆ TI_FIBER_1

#define TI_FIBER_1   (1<<0)

◆ TI_FIBER_2

#define TI_FIBER_2   (1<<1)

◆ TI_FIBER_3

#define TI_FIBER_3   (1<<2)

◆ TI_FIBER_4

#define TI_FIBER_4   (1<<3)

◆ TI_FIBER_5

#define TI_FIBER_5   (1<<4)

◆ TI_FIBER_6

#define TI_FIBER_6   (1<<5)

◆ TI_FIBER_7

#define TI_FIBER_7   (1<<6)

◆ TI_FIBER_8

#define TI_FIBER_8   (1<<7)

◆ TI_FIBER_CONNECTED_1

#define TI_FIBER_CONNECTED_1   (1<<16)

◆ TI_FIBER_CONNECTED_2

#define TI_FIBER_CONNECTED_2   (1<<17)

◆ TI_FIBER_CONNECTED_3

#define TI_FIBER_CONNECTED_3   (1<<18)

◆ TI_FIBER_CONNECTED_4

#define TI_FIBER_CONNECTED_4   (1<<19)

◆ TI_FIBER_CONNECTED_5

#define TI_FIBER_CONNECTED_5   (1<<20)

◆ TI_FIBER_CONNECTED_6

#define TI_FIBER_CONNECTED_6   (1<<21)

◆ TI_FIBER_CONNECTED_7

#define TI_FIBER_CONNECTED_7   (1<<22)

◆ TI_FIBER_CONNECTED_8

#define TI_FIBER_CONNECTED_8   (1<<23)

◆ TI_FIBER_CONNECTED_MASK

#define TI_FIBER_CONNECTED_MASK   0x00FF0000

Referenced by tiGetConnectedFiberMask().

◆ TI_FIBER_CONNECTED_TI

#define TI_FIBER_CONNECTED_TI (   x)    (1<<(x+15))

Referenced by tiSlaveStatus(), and tiStatus().

◆ TI_FIBER_ENABLE_P0

#define TI_FIBER_ENABLE_P0   (1<<8)

◆ TI_FIBER_ENABLED

#define TI_FIBER_ENABLED (   x)    (1<<(x+1))

◆ TI_FIBER_MASK

#define TI_FIBER_MASK   0x000000FF

◆ TI_FIBER_TRIGSRC_ENABLED_1

#define TI_FIBER_TRIGSRC_ENABLED_1   (1<<24)

◆ TI_FIBER_TRIGSRC_ENABLED_2

#define TI_FIBER_TRIGSRC_ENABLED_2   (1<<25)

◆ TI_FIBER_TRIGSRC_ENABLED_3

#define TI_FIBER_TRIGSRC_ENABLED_3   (1<<26)

◆ TI_FIBER_TRIGSRC_ENABLED_4

#define TI_FIBER_TRIGSRC_ENABLED_4   (1<<27)

◆ TI_FIBER_TRIGSRC_ENABLED_5

#define TI_FIBER_TRIGSRC_ENABLED_5   (1<<28)

◆ TI_FIBER_TRIGSRC_ENABLED_6

#define TI_FIBER_TRIGSRC_ENABLED_6   (1<<29)

◆ TI_FIBER_TRIGSRC_ENABLED_7

#define TI_FIBER_TRIGSRC_ENABLED_7   (1<<30)

◆ TI_FIBER_TRIGSRC_ENABLED_8

#define TI_FIBER_TRIGSRC_ENABLED_8   (1<<31)

◆ TI_FIBER_TRIGSRC_ENABLED_MASK

#define TI_FIBER_TRIGSRC_ENABLED_MASK   0xFF000000

◆ TI_FIBER_TRIGSRC_ENABLED_TI

#define TI_FIBER_TRIGSRC_ENABLED_TI (   x)    (1<<(x+23))

Referenced by tiSlaveStatus(), and tiStatus().

◆ TI_FIBERALIGNMENT_HFBR1_IODELAY_MASK

#define TI_FIBERALIGNMENT_HFBR1_IODELAY_MASK   0x000000FF

◆ TI_FIBERALIGNMENT_HFBR1_SYNCDELAY_MASK

#define TI_FIBERALIGNMENT_HFBR1_SYNCDELAY_MASK   0x0000FF00

◆ TI_FIBERALIGNMENT_HFBR5_IODELAY_MASK

#define TI_FIBERALIGNMENT_HFBR5_IODELAY_MASK   0x00FF0000

◆ TI_FIBERALIGNMENT_HFBR5_SYNCDELAY_MASK

#define TI_FIBERALIGNMENT_HFBR5_SYNCDELAY_MASK   0xFF000000

◆ TI_FIBERLATENCYMEASUREMENT_CARRYCHAIN_MASK

#define TI_FIBERLATENCYMEASUREMENT_CARRYCHAIN_MASK   0x0000FFFF

◆ TI_FIBERLATENCYMEASUREMENT_DATA_MASK

#define TI_FIBERLATENCYMEASUREMENT_DATA_MASK   0xFF800000

◆ TI_FIBERLATENCYMEASUREMENT_IODELAY_MASK

#define TI_FIBERLATENCYMEASUREMENT_IODELAY_MASK   0x007F0000

◆ TI_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK

#define TI_FIBERSYNCDELAY_HFBR1_SYNCDELAY_MASK   0x0000FF00

◆ TI_FIBERSYNCDELAY_HFBR1_SYNCPHASE_MASK

#define TI_FIBERSYNCDELAY_HFBR1_SYNCPHASE_MASK   0x000000FF

◆ TI_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK

#define TI_FIBERSYNCDELAY_HFBR5_SYNCDELAY_MASK   0xFF000000

◆ TI_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK

#define TI_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK   0x00FF0000

◆ TI_FILLER_WORD_TYPE

#define TI_FILLER_WORD_TYPE   0x78000000

◆ TI_FIRMWARE_ID_MASK

#define TI_FIRMWARE_ID_MASK   0xFFFF0000

◆ TI_FIRMWARE_MAJOR_VERSION_MASK

#define TI_FIRMWARE_MAJOR_VERSION_MASK   0x00000FF0

◆ TI_FIRMWARE_TYPE_MASK

#define TI_FIRMWARE_TYPE_MASK   0x0000F000

◆ TI_FIRMWARE_TYPE_MODTI

#define TI_FIRMWARE_TYPE_MODTI   2

◆ TI_FIRMWARE_TYPE_PROD

#define TI_FIRMWARE_TYPE_PROD   1

◆ TI_FIRMWARE_TYPE_PROD2

#define TI_FIRMWARE_TYPE_PROD2   3

◆ TI_FIRMWARE_TYPE_REV2

#define TI_FIRMWARE_TYPE_REV2   0

◆ TI_FIRWMARE_MINOR_VERSION_MASK

#define TI_FIRWMARE_MINOR_VERSION_MASK   0x0000000F

◆ TI_FIXEDPULSER1_NTRIGGERS_MASK

#define TI_FIXEDPULSER1_NTRIGGERS_MASK   0x0000FFFF

Referenced by tiSoftTrig().

◆ TI_FIXEDPULSER1_PERIOD_MASK

#define TI_FIXEDPULSER1_PERIOD_MASK   0x7FFF0000

Referenced by tiSoftTrig().

◆ TI_FIXEDPULSER1_PERIOD_RANGE

#define TI_FIXEDPULSER1_PERIOD_RANGE   (1<<31)

◆ TI_FIXEDPULSER2_NTRIGGERS_MASK

#define TI_FIXEDPULSER2_NTRIGGERS_MASK   0x0000FFFF

◆ TI_FIXEDPULSER2_PERIOD_MASK

#define TI_FIXEDPULSER2_PERIOD_MASK   0x7FFF0000

◆ TI_FIXEDPULSER2_PERIOD_RANGE

#define TI_FIXEDPULSER2_PERIOD_RANGE   (1<<31)

◆ TI_FPDELAY_MASK

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

◆ TI_I2C_8BIT_DATA_MASK

#define TI_I2C_8BIT_DATA_MASK   0x000000ff

◆ TI_I2C_DATA_MASK

#define TI_I2C_DATA_MASK   0x0000ffff

◆ TI_ID_BLOCKLEVEL_MASK

#define TI_ID_BLOCKLEVEL_MASK   0x00FF0000

◆ TI_ID_CRATEID_MASK

#define TI_ID_CRATEID_MASK   0x0000FF00

Referenced by tiGetCrateID(), and tiSlaveStatus().

◆ TI_ID_TRIGSRC_ENABLE_MASK

#define TI_ID_TRIGSRC_ENABLE_MASK   0x000000FF

Referenced by tiGetPortTrigSrcEnabled().

◆ TI_INIT_NO_INIT

#define TI_INIT_NO_INIT   (1<<0)

Referenced by tiInit().

◆ TI_INIT_SKIP_FIRMWARE_CHECK

#define TI_INIT_SKIP_FIRMWARE_CHECK   (1<<2)

◆ TI_INIT_SLAVE_FIBER_5

#define TI_INIT_SLAVE_FIBER_5   (1<<1)

Referenced by tiInit().

◆ TI_INPUTPRESCALE_FP1_MASK

#define TI_INPUTPRESCALE_FP1_MASK   0x0000000F

◆ TI_INPUTPRESCALE_FP2_MASK

#define TI_INPUTPRESCALE_FP2_MASK   0x000000F0

◆ TI_INPUTPRESCALE_FP3_MASK

#define TI_INPUTPRESCALE_FP3_MASK   0x00000F00

◆ TI_INPUTPRESCALE_FP4_MASK

#define TI_INPUTPRESCALE_FP4_MASK   0x0000F000

◆ TI_INPUTPRESCALE_FP5_MASK

#define TI_INPUTPRESCALE_FP5_MASK   0x000F0000

◆ TI_INPUTPRESCALE_FP6_MASK

#define TI_INPUTPRESCALE_FP6_MASK   0x00F00000

◆ TI_INPUTPRESCALE_FP_MASK

#define TI_INPUTPRESCALE_FP_MASK (   x)    (0xF<<4*((x-1)))

◆ TI_INT_LEVEL

#define TI_INT_LEVEL   5

◆ TI_INT_VEC

#define TI_INT_VEC   0xec

◆ TI_INTSETUP_ENABLE

#define TI_INTSETUP_ENABLE   (1<<16)

Referenced by tiIntDisable(), and tiStatus().

◆ TI_INTSETUP_LEVEL_MASK

#define TI_INTSETUP_LEVEL_MASK   0x00000F00

Referenced by tiStatus().

◆ TI_INTSETUP_VECTOR_MASK

#define TI_INTSETUP_VECTOR_MASK   0x000000FF

Referenced by tiStatus().

◆ TI_NBLOCKS_COUNT_MASK

#define TI_NBLOCKS_COUNT_MASK   0x00FFFFFF

Referenced by tiStatus().

◆ TI_NBLOCKS_EVENTS_IN_BLOCK_MASK

#define TI_NBLOCKS_EVENTS_IN_BLOCK_MASK   0xFF000000

◆ TI_OUTPUT_BLOCKS_READY_MASK

#define TI_OUTPUT_BLOCKS_READY_MASK   0x00FF0000

◆ TI_OUTPUT_EVENTS_IN_BLOCK_MASK

#define TI_OUTPUT_EVENTS_IN_BLOCK_MASK   0xFF000000

◆ TI_OUTPUT_MASK

#define TI_OUTPUT_MASK   0x0000FFFF

◆ TI_PROMPT_TRIG_WIDTH_MASK

#define TI_PROMPT_TRIG_WIDTH_MASK   0x0000007F

◆ TI_RANDOMPULSER_TRIG1_ENABLE

#define TI_RANDOMPULSER_TRIG1_ENABLE   (1<<7)

Referenced by tiSetRandomTrigger().

◆ TI_RANDOMPULSER_TRIG1_RATE_MASK

#define TI_RANDOMPULSER_TRIG1_RATE_MASK   0x0000000F

Referenced by tiSetRandomTrigger().

◆ TI_RANDOMPULSER_TRIG2_ENABLE

#define TI_RANDOMPULSER_TRIG2_ENABLE   (1<<15)

Referenced by tiSetRandomTrigger().

◆ TI_RANDOMPULSER_TRIG2_RATE_MASK

#define TI_RANDOMPULSER_TRIG2_RATE_MASK   0x00000F00

◆ TI_READOUT_EXT_INT

#define TI_READOUT_EXT_INT   0

◆ TI_READOUT_EXT_POLL

#define TI_READOUT_EXT_POLL   2

◆ TI_READOUT_TS_INT

#define TI_READOUT_TS_INT   1

◆ TI_READOUT_TS_POLL

#define TI_READOUT_TS_POLL   3

◆ TI_RESET_AUTOALIGN_HFBR1_SYNC

#define TI_RESET_AUTOALIGN_HFBR1_SYNC   (1<<11)

◆ TI_RESET_AUTOALIGN_HFBR5_SYNC

#define TI_RESET_AUTOALIGN_HFBR5_SYNC   (1<<12)

◆ TI_RESET_BLOCK_READOUT

#define TI_RESET_BLOCK_READOUT   (1<<17)

Referenced by tiResetBlockReadout().

◆ TI_RESET_BUSYACK

#define TI_RESET_BUSYACK   (1<<7)

◆ TI_RESET_CLK125

#define TI_RESET_CLK125   (1<<9)

Referenced by tiSetClockSource().

◆ TI_RESET_CLK200

#define TI_RESET_CLK200   (1<<8)

◆ TI_RESET_CLK250

#define TI_RESET_CLK250   (1<<8)

Referenced by tiSetClockSource().

◆ TI_RESET_FIBER_AUTO_ALIGN

#define TI_RESET_FIBER_AUTO_ALIGN   (1<<13)

◆ TI_RESET_FILL_TO_END_BLOCK

#define TI_RESET_FILL_TO_END_BLOCK   (1<<31)

Referenced by tiFillToEndBlock().

◆ TI_RESET_FORCE_SYNCEVENT

#define TI_RESET_FORCE_SYNCEVENT   (1<<20)

Referenced by tiForceSyncEvent().

◆ TI_RESET_I2C

#define TI_RESET_I2C   (1<<1)

◆ TI_RESET_IODELAY

#define TI_RESET_IODELAY   (1<<14)

◆ TI_RESET_JTAG

#define TI_RESET_JTAG   (1<<2)

◆ TI_RESET_MEASURE_LATENCY

#define TI_RESET_MEASURE_LATENCY   (1<<15)

◆ TI_RESET_MGT

#define TI_RESET_MGT   (1<<10)

Referenced by tiResetMGT().

◆ TI_RESET_MGT_RX_RESET

#define TI_RESET_MGT_RX_RESET   (1<<22)

◆ TI_RESET_RAM_WRITE

#define TI_RESET_RAM_WRITE   (1<<12)

◆ TI_RESET_SCALERS_LATCH

#define TI_RESET_SCALERS_LATCH   (1<<24)

◆ TI_RESET_SCALERS_RESET

#define TI_RESET_SCALERS_RESET   (1<<25)

◆ TI_RESET_SFM

#define TI_RESET_SFM   (1<<3)

◆ TI_RESET_SOFT

#define TI_RESET_SOFT   (1<<4)

Referenced by tiReset().

◆ TI_RESET_SYNC_HISTORY

#define TI_RESET_SYNC_HISTORY   (1<<6)

Referenced by tiResetSyncHistory().

◆ TI_RESET_SYNCRESET_REQUEST

#define TI_RESET_SYNCRESET_REQUEST   (1<<23)

◆ TI_RESET_TAKE_TOKEN

#define TI_RESET_TAKE_TOKEN   (1<<16)

◆ TI_ROCENABLE_MASK

#define TI_ROCENABLE_MASK   0x000000FF

◆ TI_ROCENABLE_ROC

#define TI_ROCENABLE_ROC (   x)    (1<<(x))

Referenced by tiRocEnable().

◆ TI_ROCENABLE_SYNCRESET_REQUEST_ENABLE_MASK

#define TI_ROCENABLE_SYNCRESET_REQUEST_ENABLE_MASK   0x0007FC00

Referenced by tiStatus().

◆ TI_ROCENABLE_SYNCRESET_REQUEST_MONITOR_MASK

#define TI_ROCENABLE_SYNCRESET_REQUEST_MONITOR_MASK   0x1FF00000

◆ TI_RUNNINGMODE_DISABLE

#define TI_RUNNINGMODE_DISABLE   0x0

Referenced by tiSetClockSource().

◆ TI_RUNNINGMODE_ENABLE

#define TI_RUNNINGMODE_ENABLE   0x71

Referenced by tiSetClockSource().

◆ TI_SUPPORTED_FIRMWARE

#define TI_SUPPORTED_FIRMWARE   0x061

◆ TI_SUPPORTED_TYPE

#define TI_SUPPORTED_TYPE   3

◆ TI_SYNC_FP

#define TI_SYNC_FP   (1<<3)

Referenced by tiStatus().

◆ TI_SYNC_HFBR1

#define TI_SYNC_HFBR1   (1<<1)

Referenced by tiStatus().

◆ TI_SYNC_HFBR1_CODE_MASK

#define TI_SYNC_HFBR1_CODE_MASK   0x00000F00

Referenced by tiGetLastSyncCodes().

◆ TI_SYNC_HFBR5

#define TI_SYNC_HFBR5   (1<<2)

Referenced by tiStatus().

◆ TI_SYNC_HFBR5_CODE_MASK

#define TI_SYNC_HFBR5_CODE_MASK   0x0000F000

◆ TI_SYNC_HISTORY_FIFO_EMPTY

#define TI_SYNC_HISTORY_FIFO_EMPTY   (1<<20)

◆ TI_SYNC_HISTORY_FIFO_FULL

#define TI_SYNC_HISTORY_FIFO_FULL   (1<<22)

◆ TI_SYNC_HISTORY_FIFO_HALF_FULL

#define TI_SYNC_HISTORY_FIFO_HALF_FULL   (1<<21)

◆ TI_SYNC_HISTORY_FIFO_MASK

#define TI_SYNC_HISTORY_FIFO_MASK   0x00700000

◆ TI_SYNC_LOOPBACK

#define TI_SYNC_LOOPBACK   (1<<4)

Referenced by tiStatus(), and tiTriggerReadyReset().

◆ TI_SYNC_LOOPBACK_CODE_MASK

#define TI_SYNC_LOOPBACK_CODE_MASK   0x000F0000

Referenced by tiGetLastSyncCodes().

◆ TI_SYNC_MONITOR_MASK

#define TI_SYNC_MONITOR_MASK   0xFF000000

◆ TI_SYNC_P0

#define TI_SYNC_P0   (1<<0)

Referenced by tiStatus().

◆ TI_SYNC_SOURCEMASK

#define TI_SYNC_SOURCEMASK   0x000000FF

◆ TI_SYNC_USER_SYNCRESET_ENABLED

#define TI_SYNC_USER_SYNCRESET_ENABLED   (1<<7)

◆ TI_SYNCCOMMAND_AD9510_RESYNC

#define TI_SYNCCOMMAND_AD9510_RESYNC   0x33

Referenced by tiClockResync().

◆ TI_SYNCCOMMAND_CLK250_RESYNC

#define TI_SYNCCOMMAND_CLK250_RESYNC   0x22

Referenced by tiClockReset().

◆ TI_SYNCCOMMAND_GTP_STATUSB_RESET

#define TI_SYNCCOMMAND_GTP_STATUSB_RESET   0x44

◆ TI_SYNCCOMMAND_RESET_EVNUM

#define TI_SYNCCOMMAND_RESET_EVNUM   0xBB

◆ TI_SYNCCOMMAND_SYNCCODE_MASK

#define TI_SYNCCOMMAND_SYNCCODE_MASK   0x000000FF

◆ TI_SYNCCOMMAND_SYNCRESET

#define TI_SYNCCOMMAND_SYNCRESET   0xDD

◆ TI_SYNCCOMMAND_SYNCRESET_4US

#define TI_SYNCCOMMAND_SYNCRESET_4US   0xEE

◆ TI_SYNCCOMMAND_SYNCRESET_HIGH

#define TI_SYNCCOMMAND_SYNCRESET_HIGH   0x99

Referenced by tiUserSyncReset().

◆ TI_SYNCCOMMAND_SYNCRESET_LOW

#define TI_SYNCCOMMAND_SYNCRESET_LOW   0xCC

Referenced by tiUserSyncReset().

◆ TI_SYNCCOMMAND_TRIGGER_READY_RESET

#define TI_SYNCCOMMAND_TRIGGER_READY_RESET   0xAA

Referenced by tiTriggerReadyReset().

◆ TI_SYNCCOMMAND_TRIGGERLINK_DISABLE

#define TI_SYNCCOMMAND_TRIGGERLINK_DISABLE   0x77

Referenced by tiTrigLinkReset().

◆ TI_SYNCCOMMAND_TRIGGERLINK_ENABLE

#define TI_SYNCCOMMAND_TRIGGERLINK_ENABLE   0x55

Referenced by tiTrigLinkReset().

◆ TI_SYNCCOMMAND_VME_CLOCKRESET

#define TI_SYNCCOMMAND_VME_CLOCKRESET   0x11

◆ TI_SYNCDELAY_MASK

#define TI_SYNCDELAY_MASK   0x0000007F

Referenced by tiSetSyncDelayWidth().

◆ TI_SYNCEVENTCTRL_NBLOCKS_MASK

#define TI_SYNCEVENTCTRL_NBLOCKS_MASK   0x00FFFFFF

◆ TI_SYNCHISTORY_HFBR1_CODE_MASK

#define TI_SYNCHISTORY_HFBR1_CODE_MASK   0x0000000F

Referenced by tiPrintSyncHistory().

◆ TI_SYNCHISTORY_HFBR1_CODE_VALID

#define TI_SYNCHISTORY_HFBR1_CODE_VALID   (1<<4)

Referenced by tiPrintSyncHistory().

◆ TI_SYNCHISTORY_HFBR5_CODE_MASK

#define TI_SYNCHISTORY_HFBR5_CODE_MASK   0x000001E0

◆ TI_SYNCHISTORY_HFBR5_CODE_VALID

#define TI_SYNCHISTORY_HFBR5_CODE_VALID   (1<<9)

◆ TI_SYNCHISTORY_LOOPBACK_CODE_MASK

#define TI_SYNCHISTORY_LOOPBACK_CODE_MASK   0x00003C00

Referenced by tiPrintSyncHistory().

◆ TI_SYNCHISTORY_LOOPBACK_CODE_VALID

#define TI_SYNCHISTORY_LOOPBACK_CODE_VALID   (1<<14)

Referenced by tiPrintSyncHistory().

◆ TI_SYNCHISTORY_TIMESTAMP_MASK

#define TI_SYNCHISTORY_TIMESTAMP_MASK   0xFFFF0000

Referenced by tiPrintSyncHistory().

◆ TI_SYNCHISTORY_TIMESTAMP_OVERFLOW

#define TI_SYNCHISTORY_TIMESTAMP_OVERFLOW   (1<<15)

Referenced by tiPrintSyncHistory().

◆ TI_SYNCWIDTH_LONGWIDTH_ENABLE

#define TI_SYNCWIDTH_LONGWIDTH_ENABLE   (1<<7)

Referenced by tiSetSyncDelayWidth().

◆ TI_SYNCWIDTH_MASK

#define TI_SYNCWIDTH_MASK   0x7F

Referenced by tiSetSyncDelayWidth().

◆ TI_TRIG1PRESCALE_MASK

#define TI_TRIG1PRESCALE_MASK   0x0000FFFF

◆ TI_TRIGDELAY_TRIG1_64NS_STEP

#define TI_TRIGDELAY_TRIG1_64NS_STEP   (1<<7)

Referenced by tiSetTriggerPulse().

◆ TI_TRIGDELAY_TRIG1_DELAY_MASK

#define TI_TRIGDELAY_TRIG1_DELAY_MASK   0x000000FF

Referenced by tiSetTriggerPulse().

◆ TI_TRIGDELAY_TRIG1_WIDTH_MASK

#define TI_TRIGDELAY_TRIG1_WIDTH_MASK   0x0000FF00

Referenced by tiSetTriggerPulse().

◆ TI_TRIGDELAY_TRIG2_64NS_STEP

#define TI_TRIGDELAY_TRIG2_64NS_STEP   (1<<23)

Referenced by tiSetTriggerPulse().

◆ TI_TRIGDELAY_TRIG2_DELAY_MASK

#define TI_TRIGDELAY_TRIG2_DELAY_MASK   0x00FF0000

Referenced by tiSetTriggerPulse().

◆ TI_TRIGDELAY_TRIG2_WIDTH_MASK

#define TI_TRIGDELAY_TRIG2_WIDTH_MASK   0xFF000000

Referenced by tiSetTriggerPulse().

◆ TI_TRIGGER_FPTRG

#define TI_TRIGGER_FPTRG   2

◆ TI_TRIGGER_HFBR1

#define TI_TRIGGER_HFBR1   1

◆ TI_TRIGGER_HFBR5

#define TI_TRIGGER_HFBR5   10

◆ TI_TRIGGER_P0

#define TI_TRIGGER_P0   0

◆ TI_TRIGGER_PART_1

#define TI_TRIGGER_PART_1   6

◆ TI_TRIGGER_PART_2

#define TI_TRIGGER_PART_2   7

◆ TI_TRIGGER_PART_3

#define TI_TRIGGER_PART_3   8

◆ TI_TRIGGER_PART_4

#define TI_TRIGGER_PART_4   9

◆ TI_TRIGGER_PULSER

#define TI_TRIGGER_PULSER   5

◆ TI_TRIGGER_RANDOM

#define TI_TRIGGER_RANDOM   5

◆ TI_TRIGGER_TRIG21

#define TI_TRIGGER_TRIG21   11

◆ TI_TRIGGER_TSINPUTS

#define TI_TRIGGER_TSINPUTS   3

◆ TI_TRIGGER_TSREV2

#define TI_TRIGGER_TSREV2   4

◆ TI_TRIGGERCOMMAND_CODE_MASK

#define TI_TRIGGERCOMMAND_CODE_MASK   0x00000F00

◆ TI_TRIGGERCOMMAND_SET_BLOCKLEVEL

#define TI_TRIGGERCOMMAND_SET_BLOCKLEVEL   0x00000800

◆ TI_TRIGGERCOMMAND_SYNC_EVENT

#define TI_TRIGGERCOMMAND_SYNC_EVENT   0x00000300

◆ TI_TRIGGERCOMMAND_TRIG1

#define TI_TRIGGERCOMMAND_TRIG1   0x00000100

◆ TI_TRIGGERCOMMAND_TRIG2

#define TI_TRIGGERCOMMAND_TRIG2   0x00000200

◆ TI_TRIGGERCOMMAND_VALUE_MASK

#define TI_TRIGGERCOMMAND_VALUE_MASK   0x000000FF

◆ TI_TRIGGERRULE_RULE1_MASK

#define TI_TRIGGERRULE_RULE1_MASK   0x000000FF

◆ TI_TRIGGERRULE_RULE2_MASK

#define TI_TRIGGERRULE_RULE2_MASK   0x0000FF00

◆ TI_TRIGGERRULE_RULE3_MASK

#define TI_TRIGGERRULE_RULE3_MASK   0x00FF0000

◆ TI_TRIGGERRULE_RULE4_MASK

#define TI_TRIGGERRULE_RULE4_MASK   0xFF000000

◆ TI_TRIGGERRULEMIN_MIN2_EN

#define TI_TRIGGERRULEMIN_MIN2_EN   (1<<15)

◆ TI_TRIGGERRULEMIN_MIN2_MASK

#define TI_TRIGGERRULEMIN_MIN2_MASK   0x00007F00

◆ TI_TRIGGERRULEMIN_MIN3_EN

#define TI_TRIGGERRULEMIN_MIN3_EN   (1<<23)

◆ TI_TRIGGERRULEMIN_MIN3_MASK

#define TI_TRIGGERRULEMIN_MIN3_MASK   0x007F0000

◆ TI_TRIGGERRULEMIN_MIN4_EN

#define TI_TRIGGERRULEMIN_MIN4_EN   (1<<31)

◆ TI_TRIGGERRULEMIN_MIN4_MASK

#define TI_TRIGGERRULEMIN_MIN4_MASK   0x7F000000

◆ TI_TRIGGERWINDOW_COINC_MASK

#define TI_TRIGGERWINDOW_COINC_MASK   0x000000FF

◆ TI_TRIGGERWINDOW_INHIBIT_MASK

#define TI_TRIGGERWINDOW_INHIBIT_MASK   0x0000FF00

◆ TI_TRIGGERWINDOW_LEVEL_LATCH

#define TI_TRIGGERWINDOW_LEVEL_LATCH   (1<<31)

◆ TI_TRIGGERWINDOW_TRIG21_MASK

#define TI_TRIGGERWINDOW_TRIG21_MASK   0x01FF0000

◆ TI_TRIGSRC_FPTRG

#define TI_TRIGSRC_FPTRG   (1<<3)

Referenced by tiStatus().

◆ TI_TRIGSRC_HFBR1

#define TI_TRIGSRC_HFBR1   (1<<1)

Referenced by tiStatus().

◆ TI_TRIGSRC_HFBR5

#define TI_TRIGSRC_HFBR5   (1<<10)

Referenced by tiStatus().

◆ TI_TRIGSRC_LOOPBACK

#define TI_TRIGSRC_LOOPBACK   (1<<2)

◆ TI_TRIGSRC_MONITOR_MASK

#define TI_TRIGSRC_MONITOR_MASK   0xFFFF0000

◆ TI_TRIGSRC_P0

#define TI_TRIGSRC_P0   (1<<0)

Referenced by tiStatus().

◆ TI_TRIGSRC_PART_1

#define TI_TRIGSRC_PART_1   (1<<12)

Referenced by tiStatus().

◆ TI_TRIGSRC_PART_2

#define TI_TRIGSRC_PART_2   (1<<13)

Referenced by tiStatus().

◆ TI_TRIGSRC_PART_3

#define TI_TRIGSRC_PART_3   (1<<14)

Referenced by tiStatus().

◆ TI_TRIGSRC_PART_4

#define TI_TRIGSRC_PART_4   (1<<15)

Referenced by tiStatus().

◆ TI_TRIGSRC_PULSER

#define TI_TRIGSRC_PULSER   (1<<7)

Referenced by tiStatus().

◆ TI_TRIGSRC_SOURCEMASK

#define TI_TRIGSRC_SOURCEMASK   0x0000F3FF

Referenced by tiSetTriggerSourceMask(), and tiStatus().

◆ TI_TRIGSRC_TRIG21

#define TI_TRIGSRC_TRIG21   (1<<11)

◆ TI_TRIGSRC_TSINPUTS

#define TI_TRIGSRC_TSINPUTS   (1<<5)

Referenced by tiStatus().

◆ TI_TRIGSRC_TSREV2

#define TI_TRIGSRC_TSREV2   (1<<6)

Referenced by tiStatus().

◆ TI_TRIGSRC_VME

#define TI_TRIGSRC_VME   (1<<4)

◆ TI_TSINPUT_1

#define TI_TSINPUT_1   (1<<0)

◆ TI_TSINPUT_2

#define TI_TSINPUT_2   (1<<1)

◆ TI_TSINPUT_3

#define TI_TSINPUT_3   (1<<2)

◆ TI_TSINPUT_4

#define TI_TSINPUT_4   (1<<3)

◆ TI_TSINPUT_5

#define TI_TSINPUT_5   (1<<4)

◆ TI_TSINPUT_6

#define TI_TSINPUT_6   (1<<5)

◆ TI_TSINPUT_ALL

#define TI_TSINPUT_ALL   (0x3F)

◆ TI_TSINPUT_MASK

#define TI_TSINPUT_MASK   0x0000003F

Referenced by tiStatus().

◆ TI_VMECONTROL_A32

#define TI_VMECONTROL_A32   (1<<4)

Referenced by tiDisableA32(), tiSetAdr32(), and tiStatus().

◆ TI_VMECONTROL_A32M

#define TI_VMECONTROL_A32M   (1<<3)

◆ TI_VMECONTROL_BERR

#define TI_VMECONTROL_BERR   (1<<0)

◆ TI_VMECONTROL_BLOCKLEVEL_UPDATE

#define TI_VMECONTROL_BLOCKLEVEL_UPDATE   (1<<21)

◆ TI_VMECONTROL_BUFFER_DISABLE

#define TI_VMECONTROL_BUFFER_DISABLE   (1<<15)

◆ TI_VMECONTROL_ERROR_INT

#define TI_VMECONTROL_ERROR_INT   (1<<7)

◆ TI_VMECONTROL_FIRST_BOARD

#define TI_VMECONTROL_FIRST_BOARD   (1<<10)

◆ TI_VMECONTROL_I2CDEV_HACK

#define TI_VMECONTROL_I2CDEV_HACK   (1<<8)

◆ TI_VMECONTROL_LAST_BOARD

#define TI_VMECONTROL_LAST_BOARD   (1<<11)

◆ TI_VMECONTROL_MBLK

#define TI_VMECONTROL_MBLK   (1<<2)

◆ TI_VMECONTROL_SLOWER_TRIGGER_RULES

#define TI_VMECONTROL_SLOWER_TRIGGER_RULES   (1<<31)

Referenced by tiSetTriggerHoldoff().

◆ TI_VMECONTROL_TOKEN_TESTMODE

#define TI_VMECONTROL_TOKEN_TESTMODE   (1<<1)

Referenced by tiSetTokenTestMode().

◆ TI_VMECONTROL_TOKENOUT_HI

#define TI_VMECONTROL_TOKENOUT_HI   (1<<9)

Referenced by tiSetTokenOutTest().

◆ TI_WORD_TYPE_MASK

#define TI_WORD_TYPE_MASK   0x78000000

Referenced by tiReadTriggerBlock().

Function Documentation

◆ tiCheckAddresses()

◆ tiCheckTriggerBlock()

int tiCheckTriggerBlock ( volatile unsigned int *  data)

◆ tiDecodeTriggerType()

int tiDecodeTriggerType ( volatile unsigned int *  data,
int  data_len,
int  event 
)

◆ tiGetRocEnableMask()

int tiGetRocEnableMask ( )

◆ tiPrintTriggerHoldoff()

◆ tiRocEnable()

int tiRocEnable ( int  roc)

◆ tiRocEnableMask()

int tiRocEnableMask ( int  rocmask)

◆ tiSetCrateID_prIinit()

int tiSetCrateID_prIinit ( int  cid)

Variable Documentation

◆ tiISR_mutex

pthread_mutex_t tiISR_mutex =PTHREAD_MUTEX_INITIALIZER