JLab Pipeline TI Library
3v6.1
|
Modules | |
Master Configuration | |
Slave Configuration | |
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 | tiReset () |
Perform a soft reset of the TI. More... | |
int | tiSetCrateID (unsigned int crateID) |
Set the crate ID. More... | |
int | tiSetInstantBlockLevelChange (int enable) |
Set TS to instantly change blocklevel 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 | 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... | |
void | tiEnableBusError () |
Enable Bus Errors to terminate Block Reads. More... | |
void | tiDisableBusError () |
Disable Bus Errors to terminate Block Reads. 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... | |
void | tiSetSyncDelayWidth (unsigned int delay, unsigned int width, int widthstep) |
Set the delay time and width of the Sync signal. 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... | |
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 | 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... | |
void | tiSetFiberDelay (unsigned int delay, unsigned int offset) |
Set the fiber delay required to align the sync and triggers for all crates. 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 | tiResetSyncHistory () |
Reset the SyncCommand history buffer. More... | |
void | tiUserSyncReset (int enable, int pflag) |
Control level of the SyncReset signal. More... | |
int | tiResetMGTRx () |
Reset the MGT Rx CDR. More... | |
int | tiSetTSInputDelay (int chan, int delay) |
Set the input delay for the specified front panel TSinput (1-6) 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 tiDisableA32 | ( | ) |
Disable A32.
References TI_A24RegStruct::adr32, TI_VMECONTROL_A32, TILOCK, TIUNLOCK, and TI_A24RegStruct::vmeControl.
void tiDisableBusError | ( | ) |
Disable Bus Errors to terminate Block Reads.
References TI_VMECONTROL_BERR, TILOCK, and TI_A24RegStruct::vmeControl.
Referenced by tiGetCurrentBlockLevel().
int tiDisableDataReadout | ( | ) |
Disable the necessity to readout the TI for every block.
For instances when the TI data is not required for analysis When a block is "ready", a call to tiResetBlockReadout must be made.
int tiDisableFiber | ( | unsigned int | fiber | ) |
Disnable Fiber transceiver.
fiber | integer indicative of the transceiver to disable |
References TI_A24RegStruct::fiber, 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 tiIntDisable().
int tiDisableVXSSignals | ( | ) |
Disable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module.
This may be required to eliminate the possibility of accidental signals being sent during Clock Synchronization or Trigger Enable/Disabling by the TI Master or TS.
References TI_A24RegStruct::fiber, TI_FIBER_ENABLE_P0, TILOCK, and TIUNLOCK.
void tiEnableBusError | ( | ) |
Enable Bus Errors to terminate Block Reads.
References TI_VMECONTROL_BERR, TILOCK, and TI_A24RegStruct::vmeControl.
Referenced by tiGetCurrentBlockLevel().
int tiEnableDataReadout | ( | ) |
Enable readout the TI for every block.
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().
int tiEnableTriggerSource | ( | ) |
Enable trigger sources Enable trigger sources set by tiSetTriggerSource(...) or tiSetTriggerSourceMask(...)
References TILOCK, tiTriggerSource, TIUNLOCK, and TI_A24RegStruct::trigsrc.
int tiEnableVXSSignals | ( | ) |
Enable trigger and sync signals sent through the VXS to the Signal Distribution (SD) module.
This may be required to eliminate the possibility of accidental signals being sent during Clock Synchronization or Trigger Enable/Disabling by the TI Master or TS.
References TI_A24RegStruct::fiber, TI_FIBER_ENABLE_P0, TILOCK, and TIUNLOCK.
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_INIT_NO_INIT, TI_INIT_SLAVE_FIBER_5, and tiFind().
int tiReload | ( | ) |
Reload the firmware on the FPGA.
References TI_A24RegStruct::JTAGPROMBase, TI_A24RegStruct::reset, TI_RESET_JTAG, TILOCK, and TIUNLOCK.
int tiReset | ( | ) |
Perform a soft reset of the TI.
References TI_A24RegStruct::reset, TI_RESET_SOFT, TILOCK, and TIUNLOCK.
int tiResetEventCounter | ( | ) |
Reset the L1A counter, as incremented by the TI.
References TI_A24RegStruct::reset, TI_RESET_SCALERS_RESET, TILOCK, and TIUNLOCK.
int tiResetMGTRx | ( | ) |
Reset the MGT Rx CDR.
References TI_A24RegStruct::reset, TI_RESET_MGT_RX_RESET, TILOCK, and TIUNLOCK.
void tiResetSyncHistory | ( | ) |
Reset the SyncCommand history buffer.
References TI_A24RegStruct::reset, TI_RESET_SYNC_HISTORY, TILOCK, and TIUNLOCK.
int tiSetAdr32 | ( | unsigned int | a32base | ) |
Routine to set the A32 Base.
References TI_A24RegStruct::adr32, TI_ADR32_BASE_MASK, TI_VMECONTROL_A32, tiA32Base, tiA32Offset, TILOCK, TIpd, TIUNLOCK, and TI_A24RegStruct::vmeControl.
int tiSetBusySource | ( | unsigned int | sourcemask, |
int | rFlag | ||
) |
Set the busy source with a given sourcemask sourcemask bits:
sourcemask |
|
rFlag | - decision to reset the global source flags
|
References TI_A24RegStruct::busy, TI_BUSY_SOURCEMASK, TILOCK, and TIUNLOCK.
Referenced by tiAddSlave().
int tiSetClockSource | ( | unsigned int | source | ) |
Set the clock to the specified source.
source |
|
References TI_A24RegStruct::clock, TI_A24RegStruct::reset, TI_A24RegStruct::runningMode, TI_CLOCK_HFBR1, TI_CLOCK_HFBR5, TI_CLOCK_INTERNAL, TI_CLOCK_MASK, TI_RESET_CLK125, TI_RESET_CLK250, TI_RUNNINGMODE_DISABLE, TI_RUNNINGMODE_ENABLE, TILOCK, and TIUNLOCK.
int tiSetCrateID | ( | unsigned int | crateID | ) |
Set the crate ID.
References TI_A24RegStruct::boardID, TI_BOARDID_CRATEID_MASK, tiCrateID, TILOCK, and TIUNLOCK.
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.
void tiSetFiberDelay | ( | unsigned int | delay, |
unsigned int | offset | ||
) |
Set the fiber delay required to align the sync and triggers for all crates.
References TI_A24RegStruct::fiberSyncDelay, TI_A24RegStruct::reset, TI_A24RegStruct::syncDelay, TILOCK, tiMaster, and TIUNLOCK.
int tiSetFPInputReadout | ( | int | enable | ) |
Set whether or not the latched pattern of FP Inputs in block readout.
enable |
|
References TI_A24RegStruct::dataFormat, TI_DATAFORMAT_FPINPUT_READOUT, TILOCK, and TIUNLOCK.
int tiSetInstantBlockLevelChange | ( | int | enable | ) |
Set TS to instantly change blocklevel when broadcast is received.
enable | Option to enable or disable this feature
|
References TI_VMECONTROL_BLOCKLEVEL_UPDATE, TILOCK, TIUNLOCK, and TI_A24RegStruct::vmeControl.
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.
set1 | O#1 |
set2 | O#2 |
set3 | O#3 |
set4 | O#4 |
References TI_A24RegStruct::output, TILOCK, and TIUNLOCK.
int tiSetPromptTriggerWidth | ( | int | width | ) |
Set the width of the prompt trigger from OT#2.
width | Output width will be set to (width + 2) * 4ns |
This routine is only functional for Firmware type=2 (modTI)
References TI_A24RegStruct::eventNumber_hi, TI_PROMPT_TRIG_WIDTH_MASK, TILOCK, and TIUNLOCK.
void tiSetSyncDelayWidth | ( | unsigned int | delay, |
unsigned int | width, | ||
int | widthstep | ||
) |
Set the delay time and width of the Sync signal.
delay | the delay (latency) set in units of 4ns. |
width | the width set in units of 4ns. |
twidth | if this is non-zero, set width in units of 32ns. |
References TI_A24RegStruct::syncDelay, TI_A24RegStruct::syncWidth, TI_SYNCDELAY_MASK, TI_SYNCWIDTH_LONGWIDTH_ENABLE, TI_SYNCWIDTH_MASK, 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.
int tiSetTokenOutTest | ( | int | level | ) |
Set the level of the token out signal.
level |
|
References TI_VMECONTROL_TOKENOUT_HI, TILOCK, TIUNLOCK, and TI_A24RegStruct::vmeControl.
int tiSetTokenTestMode | ( | int | mode | ) |
Turn on Token out test mode.
References TI_VMECONTROL_TOKEN_TESTMODE, TILOCK, TIUNLOCK, and TI_A24RegStruct::vmeControl.
int tiSetTriggerPulse | ( | int | trigger, |
int | delay, | ||
int | width, | ||
int | delay_step | ||
) |
Set the characteristics of a specified trigger.
trigger |
|
delay | delay in units of delay_step |
width | pulse width in units of 4ns |
delay_step | step size of the delay
|
References TI_TRIGDELAY_TRIG1_64NS_STEP, TI_TRIGDELAY_TRIG1_DELAY_MASK, TI_TRIGDELAY_TRIG1_WIDTH_MASK, TI_TRIGDELAY_TRIG2_64NS_STEP, TI_TRIGDELAY_TRIG2_DELAY_MASK, TI_TRIGDELAY_TRIG2_WIDTH_MASK, TILOCK, TIUNLOCK, and TI_A24RegStruct::trigDelay.
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_TRIGSRC_VME, and tiMaster.
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 tiSetTSInputDelay | ( | int | chan, |
int | delay | ||
) |
Set the input delay for the specified front panel TSinput (1-6)
chan | Front Panel TSInput Channel (1-6) |
delay | Delay in units of 4ns (0=8ns) |
References TI_A24RegStruct::fpDelay, TI_FPDELAY_MASK, TILOCK, and TIUNLOCK.
void tiUserSyncReset | ( | int | enable, |
int | pflag | ||
) |
Control level of the SyncReset signal.
enable |
|
pflag |
|
References TI_A24RegStruct::syncCommand, TI_SYNCCOMMAND_SYNCRESET_HIGH, TI_SYNCCOMMAND_SYNCRESET_LOW, TILOCK, and TIUNLOCK.