JLab Pipeline TI Library
1.0
|
Functions | |
int | tiInit (unsigned int tAddr, unsigned int mode, int iFlag) |
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 | tiReload () |
Reload the firmware on the FPGA. 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 | 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 | 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 | 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 | tiEnableFiber (unsigned int fiber) |
Enable Fiber transceiver. More... | |
int | tiDisableFiber (unsigned int fiber) |
Disnable Fiber transceiver. 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).
blockLevel | block level to broadcats |
References TI_BLOCKLEVEL_MASK, TI_TRIGGERCOMMAND_SET_BLOCKLEVEL, TI_TRIGSRC_VME, tiGetNextBlockLevel(), TILOCK, tiMaster, TIUNLOCK, TI_A24RegStruct::triggerCommand, and TI_A24RegStruct::trigsrc.
Referenced by tiSetBlockLevel(), and tiSyncReset().
int tiClockResync | ( | ) |
Resync the 250 MHz Clock.
References TI_A24RegStruct::syncCommand, TI_SYNCCOMMAND_AD9510_RESYNC, TILOCK, and TIUNLOCK.
int tiDisableFiber | ( | unsigned int | fiber | ) |
Disnable Fiber transceiver.
fiber | integer indicative of the transceiver to disable |
References TI_A24RegStruct::fiber, TILOCK, and TIUNLOCK.
int tiDisableRandomTrigger | ( | ) |
Disable random trigger generation.
References TI_A24RegStruct::randomPulser, TILOCK, and TIUNLOCK.
int tiDisableTriggerSource | ( | int | fflag | ) |
Disable trigger sources.
fflag |
|
References TI_TRIGSRC_LOOPBACK, tiFillToEndBlock(), TILOCK, tiMaster, TIUNLOCK, and TI_A24RegStruct::trigsrc.
Referenced by tiInit(), and tiIntDisable().
int tiEnableFiber | ( | unsigned int | fiber | ) |
Enable Fiber transceiver.
Note: All Fiber are enabled by default (no harm, except for 1-2W power usage)
fiber | integer indicative of the transceiver to enable |
References TI_A24RegStruct::fiber, TILOCK, and TIUNLOCK.
Referenced by tiAddSlave(), tiInit(), and tiSetSlavePort().
int tiEnableTriggerSource | ( | ) |
Enable trigger sources Enable trigger sources set by tiSetTriggerSource(...) or tiSetTriggerSourceMask(...)
References TILOCK, tiTriggerSource, TIUNLOCK, and TI_A24RegStruct::trigsrc.
Referenced by tiIntEnable().
unsigned int tiFind | ( | ) |
Find the TI within the prescribed "GEO Slot to A24 VME Address" range from slot 3 to 21.
References TI_BOARDID_TYPE_MASK, and TI_BOARDID_TYPE_TI.
Referenced by tiInit().
int tiInit | ( | unsigned int | tAddr, |
unsigned int | mode, | ||
int | iFlag | ||
) |
Initialize the TIp register space into local memory, and setup registers given user input.
tAddr | Address or Slot Number
|
mode | Readout/Triggering Mode
|
iFlag | Initialization bit mask
|
References TI_A24RegStruct::boardID, TI_A24RegStruct::fiberSyncDelay, TI_A24RegStruct::reset, TI_A24RegStruct::SWB, TI_A24RegStruct::syncWidth, TI_BOARDID_GEOADR_MASK, TI_BOARDID_PROD_MASK, TI_BOARDID_TYPE_MASK, TI_BOARDID_TYPE_TI, TI_BUSY_LOOPBACK, TI_BUSY_SWB, TI_CLOCK_INTERNAL, TI_FIBERSYNCDELAY_LOOPBACK_SYNCDELAY_MASK, TI_INIT_NO_INIT, TI_INIT_SKIP_FIRMWARE_CHECK, TI_INIT_SLAVE_FIBER_5, TI_READOUT_EXT_INT, TI_READOUT_EXT_POLL, TI_READOUT_TS_INT, TI_READOUT_TS_POLL, TI_RESET_AUTOALIGN_HFBR1_SYNC, TI_RESET_AUTOALIGN_HFBR5_SYNC, TI_RESET_FIBER_AUTO_ALIGN, TI_RESET_I2C, TI_RESET_IODELAY, TI_RESET_MEASURE_LATENCY, TI_SUPPORTED_FIRMWARE, TI_SYNC_HFBR1, TI_SYNC_HFBR5, TI_SYNC_LOOPBACK, TI_TRIGGER_HFBR1, TI_TRIGGER_HFBR5, TI_TSINPUT_ALL, tiA24Offset, tiA32Base, tiCrateID, tiDisableTriggerSource(), tiDisableTSInput(), tiDisableVXSSignals(), tiEnableBusError(), tiEnableFiber(), tiFiberLatencyOffset, tiFind(), tiGetFirmwareVersion(), tiMaster, tiReadoutMode, tiReload(), tiResetMGT(), tiSetAdr32(), tiSetBlockBufferLevel(), tiSetBlockLevel(), tiSetBusySource(), tiSetClockSource(), tiSetCrateID(), tiSetEventFormat(), tiSetPrescale(), tiSetSyncDelayWidth(), tiSetSyncSource(), tiSetTriggerPulse(), tiSetTriggerSource(), tiSlaveMask, and tiTrigLinkReset().
int tiReload | ( | ) |
Reload the firmware on the FPGA.
References TI_A24RegStruct::JTAGPROMBase, TI_A24RegStruct::reset, TI_RESET_JTAG, TILOCK, and TIUNLOCK.
Referenced by tiInit().
int tiReset | ( | ) |
Perform a soft reset of the TI.
References TI_A24RegStruct::reset, TI_RESET_SOFT, TILOCK, and TIUNLOCK.
int tiSetBlockLevel | ( | int | blockLevel | ) |
Set the number of events per block.
blockLevel | Number of events per block |
References tiBroadcastNextBlockLevel().
Referenced by tiInit().
int tiSetCrateID | ( | unsigned int | crateID | ) |
Set the crate ID.
References TI_A24RegStruct::boardID, TI_BOARDID_CRATEID_MASK, tiCrateID, TILOCK, and TIUNLOCK.
Referenced by tiInit().
int tiSetEventFormat | ( | int | format | ) |
Set the event format.
format | - integer number indicating the event format
|
References TI_A24RegStruct::dataFormat, TI_DATAFORMAT_HIGHERBITS_WORD, TI_DATAFORMAT_TIMING_WORD, TILOCK, and TIUNLOCK.
Referenced by tiInit().
int tiSetRandomTrigger | ( | int | trigger, |
int | setting | ||
) |
Set the parameters of the random internal trigger.
trigger | - Trigger Selection
|
setting | - frequency prescale from 500MHz |
References TI_A24RegStruct::randomPulser, TI_RANDOMPULSER_TRIG1_ENABLE, TI_RANDOMPULSER_TRIG1_RATE_MASK, TI_RANDOMPULSER_TRIG2_ENABLE, TILOCK, and TIUNLOCK.
int tiSetSyncSource | ( | unsigned int | sync | ) |
Set the Sync source mask.
sync | - MASK indicating the sync source bit: description
|
References TI_A24RegStruct::sync, TI_SYNC_SOURCEMASK, TILOCK, and TIUNLOCK.
Referenced by tiInit(), and tiSetSlavePort().
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.
trig | - integer indicating the trigger source
|
References TI_TRIGGER_FPTRG, TI_TRIGGER_HFBR1, TI_TRIGGER_HFBR5, TI_TRIGGER_P0, TI_TRIGGER_PART_1, TI_TRIGGER_PART_2, TI_TRIGGER_PART_3, TI_TRIGGER_PART_4, TI_TRIGGER_PULSER, TI_TRIGGER_TSINPUTS, TI_TRIGGER_TSREV2, TI_TRIGSRC_FPTRG, TI_TRIGSRC_HFBR1, TI_TRIGSRC_HFBR5, TI_TRIGSRC_LOOPBACK, TI_TRIGSRC_P0, TI_TRIGSRC_PART_1, TI_TRIGSRC_PART_2, TI_TRIGSRC_PART_3, TI_TRIGSRC_PART_4, TI_TRIGSRC_PULSER, TI_TRIGSRC_TSINPUTS, TI_TRIGSRC_TSREV2, TI_TRIGSRC_VME, tiMaster, and tiTriggerSource.
Referenced by tiInit(), and tiSetSlavePort().
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.
trigmask | bits:
|
References TI_TRIGSRC_SOURCEMASK, and tiTriggerSource.
int tiSoftTrig | ( | int | trigger, |
unsigned int | nevents, | ||
unsigned int | period_inc, | ||
int | range | ||
) |
Set and enable the "software" trigger.
trigger | trigger type 1 or 2 (playback trigger) |
nevents | integer number of events to trigger |
period_inc | period multiplier, depends on range (0-0x7FFF) |
range |
|
References TI_A24RegStruct::fixedPulser1, TI_A24RegStruct::fixedPulser2, TI_FIXEDPULSER1_NTRIGGERS_MASK, TI_FIXEDPULSER1_PERIOD_MASK, TILOCK, and TIUNLOCK.