JLab Pipeline TI Library
3v6.1
|
Functions | |
int | tiClockResync () |
Resync the 250 MHz Clock. 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 | 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 | tiSetTriggerLock (int enable) |
Set the the trigger lock mode. More... | |
int | tiSetPrescale (int prescale) |
Set the prescale factor for the external trigger. More... | |
int | tiSetInputPrescale (int input, int prescale) |
Set the prescale factor for the selected input. 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 blflag) |
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 | tiSetBlockLimit (unsigned int limit) |
Set the block number at which triggers will be disabled automatically. 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 | tiAddSlave (unsigned int fiber) |
Add and configurate a TI Slave for the TI Master. More... | |
int | tiAddSlaveMask (unsigned int fibermask) |
Add and configure TI Slaves by using a mask for the TI-Master. More... | |
int | tiSetTriggerHoldoff (int rule, unsigned int value, int timestep) |
Set the value for a specified trigger rule. More... | |
int | tiSetTriggerHoldoffMin (int rule, unsigned int value) |
Set the value for the minimum time of specified trigger rule. 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... | |
int | tiSetTriggerWindow (int window_width) |
Set 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 | tiSetTrig21Delay (int delay) |
Set 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 | tiLatchTimers () |
Latch the Busy and Live Timers. More... | |
int | tiSetUserSyncResetReceive (int enable) |
Enable/Disable operation of User SyncReset. More... | |
int | tiSetSyncEventInterval (int blk_interval) |
Set the value of the syncronization event interval. More... | |
int | tiEnableSyncResetRequest (unsigned int portMask, int self) |
Configure which ports (and self) to enable response of a SyncReset request. More... | |
void | tiTriggerReadyReset () |
Reset the registers that record the triggers enabled status of TI Slaves. More... | |
int | tiResetMGT () |
Reset the MGT. More... | |
int tiAddSlave | ( | unsigned int | fiber | ) |
Add and configurate a TI Slave for the TI Master.
This routine should be used by the TI Master to configure HFBR porti and BUSY sources.
fiber | The fiber port of the TI Master that is connected to the slave |
References TI_BUSY_HFBR1, tiEnableFiber(), tiMaster, tiSetBusySource(), and tiSlaveMask.
Referenced by tiAddSlaveMask().
int tiAddSlaveMask | ( | unsigned int | fibermask | ) |
Add and configure TI Slaves by using a mask for the TI-Master.
This routine should be used by the TI-Master to configure HFBR ports and BUSY sources.
fibermask | The fiber port mask of the TI-Master that is connected to the slaves |
References tiAddSlave().
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().
void tiClockReset | ( | ) |
Generate a Clock Reset signal. This signal is sent to the loopback and all configured TI Slaves.
References TI_A24RegStruct::sync, TI_A24RegStruct::syncCommand, TI_SYNC_SOURCEMASK, TI_SYNCCOMMAND_CLK250_RESYNC, TILOCK, tiMaster, and TIUNLOCK.
int tiClockResync | ( | ) |
Resync the 250 MHz Clock.
References TI_A24RegStruct::syncCommand, TI_SYNCCOMMAND_AD9510_RESYNC, TILOCK, and TIUNLOCK.
int tiDefineEventType | ( | int | trigMask, |
int | hwTrig, | ||
int | evType | ||
) |
Define a specific trigger pattern as a hardware trigger (trig1/trig2/syncevent) and Event Type.
trigMask | Trigger Pattern (must be less than 0x3F)
|
hwTrig | Hardware trigger type (must be less than 3) 0: no trigger 1: Trig1 (event trigger) 2: Trig2 (playback trigger) 3: SyncEvent |
evType | Event Type (must be less than 255) |
int tiDefinePulserEventType | ( | int | fixed_type, |
int | random_type | ||
) |
Define the event type for the TI Master's fixed and random internal trigger.
fixed_type | Fixed Pulser Event Type |
random_type | Pseudo Random Pulser Event Type |
References TI_A24RegStruct::pulserEvType, TILOCK, and TIUNLOCK.
int tiDisableRandomTrigger | ( | ) |
Disable random trigger generation.
References TI_A24RegStruct::randomPulser, TILOCK, and TIUNLOCK.
int tiDisableTSInput | ( | unsigned int | inpMask | ) |
Disable trigger inputs labelled TS#1-6 on the Front Panel.
These inputs MUST be disabled if not connected.
inpMask |
|
References TILOCK, TIUNLOCK, and TI_A24RegStruct::tsInput.
int tiEnableSyncResetRequest | ( | unsigned int | portMask, |
int | self | ||
) |
Configure which ports (and self) to enable response of a SyncReset request.
portMask | Mask of ports to enable (port 1 = bit 0) |
self | 1 to enable self, 0 to disable |
References TI_A24RegStruct::rocEnable, TI_ROCENABLE_MASK, TILOCK, tiMaster, and TIUNLOCK.
int tiEnableTSInput | ( | unsigned int | inpMask | ) |
Enable/Disable trigger inputs labelled TS#1-6 on the Front Panel.
These inputs MUST be disabled if not connected.
inpMask |
|
References TILOCK, TIUNLOCK, and TI_A24RegStruct::tsInput.
int tiGetTriggerTable | ( | unsigned int * | otable | ) |
Get the current trigger table stored in local memory (not necessarily on TI).
otable | Output Table (Array of 16 4byte words, user must allocate memory) |
int tiLatchTimers | ( | ) |
Latch the Busy and Live Timers.
This routine should be called prior to a call to tiGetLiveTime and tiGetBusyTime
References TI_A24RegStruct::reset, TI_RESET_SCALERS_LATCH, TILOCK, and TIUNLOCK.
Referenced by tiStatus().
int tiLoadTriggerTable | ( | int | mode | ) |
Load a predefined trigger table (mapping TS inputs to trigger types).
mode |
|
References TILOCK, tiTriggerTablePredefinedConfig(), and TI_A24RegStruct::trigTable.
int tiResetMGT | ( | ) |
Reset the MGT.
References TI_A24RegStruct::reset, TI_RESET_MGT, TILOCK, tiMaster, and TIUNLOCK.
int tiSetBlockBufferLevel | ( | unsigned int | level | ) |
Set the block buffer level for the number of blocks in the system that need to be read out.
If this buffer level is full, the TI will go BUSY. The BUSY is released as soon as the number of buffers in the system drops below this level.
level |
|
References TI_A24RegStruct::blockBuffer, TI_BLOCKBUFFER_BUFFERLEVEL_MASK, TILOCK, and TIUNLOCK.
int tiSetBlockLevel | ( | int | blockLevel | ) |
Set the number of events per block.
blockLevel | Number of events per block |
References tiBroadcastNextBlockLevel().
int tiSetBlockLimit | ( | unsigned int | limit | ) |
Set the block number at which triggers will be disabled automatically.
References TI_A24RegStruct::blocklimit, TILOCK, and TIUNLOCK.
int tiSetInputPrescale | ( | int | input, |
int | prescale | ||
) |
Set the prescale factor for the selected input.
input | Selected trigger input (1-6) |
prescale | Factor for prescale. Max {prescale} available is 65535 |
References TI_A24RegStruct::inputPrescale, TI_INPUTPRESCALE_FP_MASK, TILOCK, and TIUNLOCK.
int tiSetPrescale | ( | int | prescale | ) |
Set the prescale factor for the external trigger.
prescale | Factor for prescale. Max {prescale} available is 65535 |
References TILOCK, TIUNLOCK, and TI_A24RegStruct::trig1Prescale.
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 tiSetSyncEventInterval | ( | int | blk_interval | ) |
Set the value of the syncronization event interval.
blk_interval | Sync Event will occur in the last event of the set blk_interval (number of blocks) |
References TI_A24RegStruct::syncEventCtrl, TI_SYNCEVENTCTRL_NBLOCKS_MASK, TILOCK, tiMaster, and TIUNLOCK.
int tiSetSyncResetType | ( | int | type | ) |
Set type of SyncReset to send to TI Slaves.
type | Sync Reset Type
|
int tiSetTrig21Delay | ( | int | delay | ) |
Set the delay of Trig1 relative to Trig2 when trigger source is 11.
delay | Trig1 delay after Trig2
|
References TI_TRIGGERWINDOW_TRIG21_MASK, TILOCK, TIUNLOCK, and TI_A24RegStruct::triggerWindow.
int tiSetTriggerHoldoff | ( | int | rule, |
unsigned int | value, | ||
int | timestep | ||
) |
Set the value for a specified trigger rule.
rule | the number of triggers within some time period.. e.g. rule=1: No more than ONE trigger within the specified time period |
value | the specified time period (in steps of timestep) |
timestep | Timestep that is dependent on the trigger rule selected rule timestep 1 2 3 4 -------- ------ ------- ------- -------- 0 16ns 16ns 32ns 64ns 1 480ns 960ns 1920ns 3840ns 2 15360ns 30720ns 61440ns 122880ns * |
References TI_TRIGGERRULE_RULE1_MASK, TI_TRIGGERRULE_RULE2_MASK, TI_TRIGGERRULE_RULE3_MASK, TI_TRIGGERRULE_RULE4_MASK, TI_VMECONTROL_SLOWER_TRIGGER_RULES, TILOCK, TIUNLOCK, TI_A24RegStruct::triggerRule, and TI_A24RegStruct::vmeControl.
int tiSetTriggerHoldoffMin | ( | int | rule, |
unsigned int | value | ||
) |
Set the value for the minimum time of specified trigger rule.
rule | the number of triggers within some time period.. e.g. rule=1: No more than ONE trigger within the specified time period |
value | the specified time period (in steps of timestep) rule 2 3 4 ----- ------ ------ 16ns 480ns 480ns * |
References TI_TRIGGERRULEMIN_MIN2_EN, TI_TRIGGERRULEMIN_MIN2_MASK, TI_TRIGGERRULEMIN_MIN3_EN, TI_TRIGGERRULEMIN_MIN3_MASK, TI_TRIGGERRULEMIN_MIN4_EN, TI_TRIGGERRULEMIN_MIN4_MASK, TILOCK, TIUNLOCK, and TI_A24RegStruct::triggerRuleMin.
int tiSetTriggerInhibitWindow | ( | int | window_width | ) |
Set the width of the input trigger inhibit window.
window_width | Width of the input inhibit window (units of 4ns) |
References TI_TRIGGERWINDOW_INHIBIT_MASK, TILOCK, TIUNLOCK, and TI_A24RegStruct::triggerWindow.
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.
enable | 1 to enable <1 to disable |
References TI_TRIGGERWINDOW_LEVEL_LATCH, TILOCK, TIUNLOCK, and TI_A24RegStruct::triggerWindow.
int tiSetTriggerLock | ( | int | enable | ) |
Set the the trigger lock mode.
enable | Enable flag 0: Disable !0: Enable |
References TI_A24RegStruct::busy, TI_BUSY_TRIGGER_LOCK, TILOCK, tiMaster, and TIUNLOCK.
int tiSetTriggerWindow | ( | int | window_width | ) |
Set the window of the input trigger coincidence window.
window_width | Width of the input coincidence window (units of 4ns) |
References TI_TRIGGERWINDOW_COINC_MASK, TILOCK, TIUNLOCK, and TI_A24RegStruct::triggerWindow.
int tiSetUserSyncResetReceive | ( | int | enable | ) |
Enable/Disable operation of User SyncReset.
enable |
|
References TI_A24RegStruct::sync, TI_SYNC_SOURCEMASK, TI_SYNC_USER_SYNCRESET_ENABLED, TILOCK, and TIUNLOCK.
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.
void tiSyncReset | ( | int | blflag | ) |
Generate a Sync Reset signal. This signal is sent to the loopback and all configured TI Slaves.
blflag | Option to change block level, after SyncReset issued
|
References TI_A24RegStruct::syncCommand, and TILOCK.
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.
References TI_A24RegStruct::syncCommand, and TILOCK.
void tiTriggerReadyReset | ( | ) |
Reset the registers that record the triggers enabled status of TI Slaves.
References TI_A24RegStruct::reset, TI_A24RegStruct::sync, TI_A24RegStruct::syncCommand, TI_RESET_MGT_RX_RESET, TI_SYNC_LOOPBACK, TI_SYNC_SOURCEMASK, TI_SYNCCOMMAND_TRIGGER_READY_RESET, TILOCK, tiMaster, and TIUNLOCK.
int tiTriggerTableConfig | ( | unsigned int * | itable | ) |
Configure trigger table to be loaded with a user provided array.
itable | Input Table (Array of 16 4byte words) |
int tiTriggerTablePredefinedConfig | ( | int | mode | ) |
Configure trigger tabled to be loaded with a predefined trigger table (mapping TS inputs to trigger types).
mode |
|
Referenced by tiLoadTriggerTable().
void tiTrigLinkReset | ( | ) |
Reset the trigger link.
References TI_A24RegStruct::syncCommand, TI_SYNCCOMMAND_TRIGGERLINK_DISABLE, TI_SYNCCOMMAND_TRIGGERLINK_ENABLE, TILOCK, and TIUNLOCK.