JLab Pipeline TI Library  3v6.1
Data Readout

Modules

 Master Data Readout
 

Functions

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...
 
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...
 
void tiResetBlockReadout ()
 Decrement the hardware counter for blocks available, effectively simulating a readout from the data fifo. More...
 
int tiSyncResetRequest ()
 Sync Reset Request is sent to TI-Master or TS. More...
 

Detailed Description

Function Documentation

◆ tiBReady()

unsigned int tiBReady ( )

Returns the number of Blocks available for readout.

Returns
Number of blocks available for readout if successful, otherwise ERROR

References TI_A24RegStruct::blockBuffer, TI_BLOCKBUFFER_BLOCKS_READY_MASK, TI_BLOCKBUFFER_BREADY_INT_MASK, and TILOCK.

◆ tiGetReadoutEvents()

int tiGetReadoutEvents ( )

Return the value of the number of readout events accepted.

Returns
Number of readout events accepted

References TILOCK.

◆ tiGetSyncEventFlag()

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.

See also
tiBReady
Returns
  • 1: if current readout block contains a Sync Event.
  • 0: Otherwise

References TILOCK.

◆ tiGetSyncEventReceived()

int tiGetSyncEventReceived ( )

Return the value of whether or not the sync event has been received.

Returns
  • 1: if sync event received
  • 0: Otherwise

References TILOCK.

◆ tiReadBlock()

int tiReadBlock ( volatile unsigned int *  data,
int  nwrds,
int  rflag 
)

Read a block of events from the TI.

Parameters
data- local memory address to place data
nwrds- Max number of words to transfer
rflag- Readout Flag
  • 0 - programmed I/O from the specified board
  • 1 - DMA transfer using Universe/Tempe DMA Engine (DMA VME transfer Mode must be setup prior)
Returns
Number of words transferred to data if successful, ERROR otherwise

References TILOCK, and TIpd.

Referenced by tiReadTriggerBlock().

◆ tiReadTriggerBlock()

int tiReadTriggerBlock ( volatile unsigned int *  data)

Read a block from the TI and form it into a CODA Trigger Bank.

Parameters
data- local memory address to place data
Returns
Number of words transferred to data if successful, ERROR otherwise

References TI_BLOCK_HEADER_WORD_TYPE, TI_BLOCK_TRAILER_WORD_TYPE, TI_DATA_TYPE_DEFINE_MASK, TI_WORD_TYPE_MASK, tiBlockLevel, and tiReadBlock().

◆ tiResetBlockReadout()

void tiResetBlockReadout ( )

Decrement the hardware counter for blocks available, effectively simulating a readout from the data fifo.

See also
tiDisableDataReadout

References TI_A24RegStruct::reset, TI_RESET_BLOCK_READOUT, TILOCK, and TIUNLOCK.

◆ tiSyncResetRequest()

int tiSyncResetRequest ( )

Sync Reset Request is sent to TI-Master or TS.

This option is available for multicrate systems when the synchronization is suspect. It should be exercised only during "sync events" where the requested sync reset will immediately follow all ROCs concluding their readout.

Returns
OK if successful, otherwise ERROR

References TILOCK.