JLab fADC250-V2 Library
0x42
|
Functions | |
int | faReadBlock (int id, volatile UINT32 *data, int nwrds, int rflag) |
General Data readout routine. More... | |
int | faReadBlockStatus (int id, volatile UINT32 *data, int nwrds, int rflag) |
For asychronous calls to faReadBlock, this routine completes the block transfer. More... | |
int | faPrintBlock (int id, int rflag) |
Print the current available block to standard out. More... | |
void | faTrig (int id) |
Pulse a software trigger to the module. More... | |
void | faGTrig () |
Pulse a software trigger to all initialized fADC250s. More... | |
void | faTrig2 (int id) |
Pulse a software playback trigger to the module. More... | |
void | faGTrig2 () |
Pulse a software playback trigger to all initialized fADC250s. More... | |
int | faDready (int id, int dflag) |
Return Event/Block count. More... | |
int | faBready (int id) |
Return a Block Ready status. More... | |
unsigned int | faGBready () |
Return a Block Ready status mask for all initialized fADC250s. More... | |
unsigned int | faGBlockReady (unsigned int slotmask, int nloop) |
Return a Block Ready status mask for fADCs indicated in supplied slotmask. More... | |
int | faProcPedConfig (int id, int nsamples, int maxvalue) |
Configure pedestal parameters to be used by processing algorythm. More... | |
int | faGProcPedConfig (int nsamples, int maxvalue) |
Configure pedestal parameters to be used by processing algorythm for all initialized modules. More... | |
int | faSampleConfig (int id, int nsamples, int maxvalue) |
Configure output of sample data from . More... | |
int | faGSampleConfig (int nsamples, int maxvalue) |
Configure output of sample data from for all initialized modules. More... | |
int | faReadAllChannelSamples (int id, volatile unsigned int *data) |
Read the current sample data from the specified channel and module. More... | |
int | faReadScalers (int id, volatile unsigned int *data, unsigned int chmask, int rflag) |
Scaler Data readout routine. More... | |
int | faPrintScalers (int id, int rflag) |
Scaler Print Out routine. More... | |
int | faHistoryBufferDReady (int id) |
Return whether or not the history buffer has been triggered. More... | |
int | faReadHistoryBuffer (int id, volatile unsigned int *data, int nwrds) |
Read out history buffer from the module. More... | |
int faBready | ( | int | id | ) |
Return a Block Ready status.
id | Slot number |
References fadc_struct::csr, FA_CSR_BLOCK_READY, fadcID, FALOCK, FAp, and FAUNLOCK.
int faDready | ( | int | id, |
int | dflag | ||
) |
Return Event/Block count.
id | Slot number |
dflag |
|
References fadc_struct::blk_count, fadc_struct::ev_count, FA_BLOCK_COUNT_MASK, FA_EVENT_COUNT_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
unsigned int faGBlockReady | ( | unsigned int | slotmask, |
int | nloop | ||
) |
Return a Block Ready status mask for fADCs indicated in supplied slotmask.
slotmask | Slotmask Slotmask of fADCs to check for block ready |
nloop | Number of times to iterate through slotmask. |
References fadc_struct::csr, FA_CSR_BLOCK_READY, fadcID, FALOCK, FAp, and FAUNLOCK.
unsigned int faGBready | ( | ) |
Return a Block Ready status mask for all initialized fADC250s.
References fadc_struct::csr, FA_CSR_BLOCK_READY, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
int faGProcPedConfig | ( | int | nsamples, |
int | maxvalue | ||
) |
Configure pedestal parameters to be used by processing algorythm for all initialized modules.
nsamples | Number of samples to contribute to sum |
maxvalue | Maximum sample value to be included in the sum |
References faProcPedConfig(), faSlot(), and nfadc.
int faGSampleConfig | ( | int | nsamples, |
int | maxvalue | ||
) |
Configure output of sample data from for all initialized modules.
nsamples | Number of samples to contribute to sum |
maxvalue | Maximum sample value to be included in the sum |
References faSampleConfig(), faSlot(), and nfadc.
void faGTrig | ( | ) |
void faGTrig2 | ( | ) |
int faHistoryBufferDReady | ( | int | id | ) |
Return whether or not the history buffer has been triggered.
id | Slot number |
References FA_SUM_THRESHOLD_DREADY, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::sum_threshold.
int faPrintBlock | ( | int | id, |
int | rflag | ||
) |
Print the current available block to standard out.
id | Slot number |
rflag | Not used |
References fadc_struct::ctrl1, fadc_struct::ev_count, FA_DATA_BLKNUM_MASK, FA_DATA_BLOCK_HEADER, FA_DATA_BLOCK_TRAILER, FA_DATA_INVALID, FA_DATA_TRIGNUM_MASK, FA_DATA_TYPE_DEFINE, FA_DATA_TYPE_MASK, FA_ENABLE_BERR, FA_EVENT_COUNT_MASK, faDataDecode(), fadcID, FALOCK, FAp, FApd, and FAUNLOCK.
int faPrintScalers | ( | int | id, |
int | rflag | ||
) |
Scaler Print Out routine.
Print out the scalers as well as the timer counter.
id | Slot number |
rflag | - Printout Flag
|
References FA_SCALER_CTRL_ENABLE, FA_SCALER_CTRL_LATCH, FA_SCALER_CTRL_MASK, FA_SCALER_CTRL_RESET, fadcID, FALOCK, FAp, FAUNLOCK, fadc_struct::scaler, fadc_struct::scaler_ctrl, and fadc_struct::time_count.
int faProcPedConfig | ( | int | id, |
int | nsamples, | ||
int | maxvalue | ||
) |
Configure pedestal parameters to be used by processing algorythm.
id | Slot number |
nsamples | Number of samples to contribute to sum |
maxvalue | Maximum sample value to be included in the sum |
References fadc_struct::config7, FA_ADC_MAX_NPED, FA_ADC_MIN_NPED, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGProcPedConfig().
int faReadAllChannelSamples | ( | int | id, |
volatile unsigned int * | data | ||
) |
Read the current sample data from the specified channel and module.
id | Slot number |
data | local memory address to place data
|
References fadc_struct::adc_config, fadc_struct::adc_status, FA_ADC_CONFIG0_CHAN_READ_ENABLE, FA_ADC_STATUS2_CHAN_DATA_MASK, FA_MAX_ADC_CHANNELS, fadcID, FALOCK, FAp, and FAUNLOCK.
int faReadBlock | ( | 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 fadc_struct::csr, fadc_struct::ctrl1, fadc_struct::ev_count, FA_BLOCKERROR_DMADONE_ERROR, FA_BLOCKERROR_NO_ERROR, FA_BLOCKERROR_TERM_ON_WORDCOUNT, FA_BLOCKERROR_UNKNOWN_BUS_ERROR, FA_BLOCKERROR_ZERO_WORD_COUNT, FA_CSR_BERR_STATUS, FA_DATA_BLKNUM_MASK, FA_DATA_BLOCK_HEADER, FA_DATA_BLOCK_TRAILER, FA_DATA_TRIGNUM_MASK, FA_DATA_TYPE_DEFINE, FA_DATA_TYPE_MASK, FA_DUMMY_DATA, FA_ENABLE_BERR, FA_EVENT_COUNT_MASK, FA_FIRST_BOARD, FA_MAX_ADC_CHANNELS, FA_MAX_DATA_PER_CHANNEL, fadcA32Offset, fadcBlockError, fadcID, fadcMaxSlot, faGetTokenStatus(), FALOCK, FAp, FApd, FApmb, and FAUNLOCK.
int faReadBlockStatus | ( | int | id, |
volatile UINT32 * | data, | ||
int | nwrds, | ||
int | rflag | ||
) |
For asychronous calls to faReadBlock, this routine completes the block transfer.
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 fadc_struct::csr, FA_CSR_BERR_STATUS, FA_MAX_ADC_CHANNELS, FA_MAX_DATA_PER_CHANNEL, fadcID, fadcMaxSlot, FALOCK, FAp, and FAUNLOCK.
int faReadHistoryBuffer | ( | int | id, |
volatile unsigned int * | data, | ||
int | nwrds | ||
) |
Read out history buffer from the module.
id | Slot number |
data | local memory address to place data |
nwrds | Max number of words to transfer |
References FA_SUM_DATA_ARM_HISTORY_BUFFER, FA_SUM_DATA_SAMPLE_MASK, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::sum_data.
int faReadScalers | ( | int | id, |
volatile unsigned int * | data, | ||
unsigned int | chmask, | ||
int | rflag | ||
) |
Scaler Data readout routine.
Readout the desired scalers (indicated by the channel mask), as well as the timer counter. The timer counter will be the last word in the "data" array.
id | Slot number |
data | - local memory address to place data |
chmask | - Channel Mask (indicating which channels to read) |
rflag | - Readout Flag
|
References FA_SCALER_CTRL_ENABLE, FA_SCALER_CTRL_LATCH, FA_SCALER_CTRL_MASK, FA_SCALER_CTRL_RESET, fadcID, FALOCK, FAp, FAUNLOCK, fadc_struct::scaler, fadc_struct::scaler_ctrl, and fadc_struct::time_count.
int faSampleConfig | ( | int | id, |
int | nsamples, | ||
int | maxvalue | ||
) |
Configure output of sample data from .
id | Slot number |
nsamples | Number of samples to contribute to sum |
maxvalue | Maximum sample value to be included in the sum |
References fadc_struct::config6, FA_ADC_MAX_MNPED, FA_ADC_MIN_MNPED, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGSampleConfig().
void faTrig | ( | int | id | ) |
Pulse a software trigger to the module.
id | Slot number |
References fadc_struct::csr, fadc_struct::ctrl1, FA_CSR_TRIGGER, FA_ENABLE_SOFT_TRIG, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGTrig().
void faTrig2 | ( | int | id | ) |
Pulse a software playback trigger to the module.
id | Slot number |
References fadc_struct::csr, fadc_struct::ctrl1, FA_CSR_SOFT_PULSE_TRIG2, FA_ENABLE_SOFT_TRIG, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGTrig2().