|
JLab f1TDC-V2,V3 Library
V2:0x0e,V3:0x15
|
Functions | |
| int | f1ReadBlock (int id, volatile UINT32 *data, int nwrds, int rflag) |
| General Data readout routine. More... | |
| int | f1PrintEvent (int id, int rflag) |
| Readout and print event to standard out. More... | |
| int | f1FlushEvent (int id) |
| Routine to flush a partial event from the FIFO. Read until a valid trailer is found. More... | |
| int | f1GPrintEvent (int rflag) |
| Readout and print event from all initialized f1TDCs to standard out. More... | |
| int | f1Dready (int id) |
| Determine if an event is ready for readout on the module. More... | |
| int | f1Bready (int id) |
| Return block available for readout status of the module. More... | |
| unsigned int | f1GBready () |
| Return the mask of all initialized modules with blocks available for readout. More... | |
| int | f1DataScan (int pflag) |
| Return the mask of all initialized modules with events available for readout. More... | |
| int f1Bready | ( | int | id | ) |
Return block available for readout status of the module.
| id |
|
References f1tdc_struct::csr, F1_CSR_BLOCK_READY, f1ID, F1LOCK, f1p, F1UNLOCK, and f1tdc_struct::stat.
| int f1DataScan | ( | int | pflag | ) |
Return the mask of all initialized modules with events available for readout.
| pflag | Print Flag
|
References f1tdc_struct::ev_count, F1_EVENT_COUNT_MASK, f1ID, F1LOCK, f1p, F1UNLOCK, and nf1tdc.
Referenced by f1GPrintEvent(), f1ISR(), and f1TestRead().
| int f1Dready | ( | int | id | ) |
Determine if an event is ready for readout on the module.
| id |
|
References f1tdc_struct::ev_count, F1_EVENT_COUNT_MASK, f1ID, F1LOCK, f1p, and F1UNLOCK.
| int f1FlushEvent | ( | int | id | ) |
Routine to flush a partial event from the FIFO. Read until a valid trailer is found.
| id |
|
References f1tdc_struct::csr, f1tdc_struct::ctrl, f1tdc_struct::ev_count, F1_DATA_INVALID, F1_DATA_SLOT_MASK, F1_ENABLE_BERR, F1_EVENT_COUNT_MASK, F1_HT_DATA_MASK, F1_TAIL_DATA, f1Clear(), f1ID, F1LOCK, f1p, f1pd, and F1UNLOCK.
| unsigned int f1GBready | ( | ) |
Return the mask of all initialized modules with blocks available for readout.
References f1tdc_struct::csr, F1_CSR_BLOCK_READY, f1ID, F1LOCK, f1p, F1UNLOCK, nf1tdc, and f1tdc_struct::stat.
| int f1GPrintEvent | ( | int | rflag | ) |
Readout and print event from all initialized f1TDCs to standard out.
| rflag | Not used |
References f1DataScan(), f1ID, f1PrintEvent(), and nf1tdc.
| int f1PrintEvent | ( | int | id, |
| int | rflag | ||
| ) |
Readout and print event to standard out.
| id | Slot number of module to read |
| rflag | Not used |
References f1tdc_struct::csr, f1tdc_struct::ctrl, f1tdc_struct::ev_count, F1_DATA_INVALID, F1_DATA_SLOT_MASK, F1_ENABLE_BERR, F1_EVENT_COUNT_MASK, F1_HEAD_DATA, F1_HT_CHIP_MASK, F1_HT_DATA_MASK, F1_HT_EVENT_MASK, F1_HT_TRIG_MASK, F1_TAIL_DATA, f1ID, F1LOCK, f1p, f1pd, and F1UNLOCK.
Referenced by f1GPrintEvent().
| int f1ReadBlock | ( | int | id, |
| volatile UINT32 * | data, | ||
| int | nwrds, | ||
| int | rflag | ||
| ) |
General Data readout routine.
| id | Slot number of module to read |
| 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)
2 - Multiblock DMA transfer (Multiblock must be enabled
and daisychain in place or SD being used)
|
References f1tdc_struct::csr, f1tdc_struct::ctrl, f1tdc_struct::ev_count, F1_CSR_BERR_STATUS, F1_DATA_BLOCK_HEADER, F1_DATA_BLOCK_TRAILER, F1_DATA_TYPE_DEFINE, F1_DATA_TYPE_MASK, F1_DUMMY_DATA, F1_ENABLE_BERR, F1_EVENT_COUNT_MASK, F1_FIRST_BOARD, F1_MAX_HITS_PER_CHANNEL, F1_MAX_TDC_CHANNELS, f1ID, F1LOCK, f1MaxSlot, f1p, f1pd, f1pmb, f1tdcA32Offset, F1UNLOCK, and f1tdc_struct::stat.
Referenced by f1ISR(), and f1TestRead().