JLab fADC250-V2 Library
0x42
|
Modules | |
SDC Initialization/Configuration | |
Functions | |
STATUS | faInit (UINT32 addr, UINT32 addr_inc, int nadc, int iFlag) |
Initialize JLAB FADC Library. More... | |
int | faSlot (unsigned int i) |
Convert an index into a slot number, where the index is the element of an array of FADCs in the order in which they were initialized. More... | |
int | faSetClockSource (int id, int clkSrc) |
Set the clock source. More... | |
int | faGSetClockSource (int clkSrc) |
Set the clock source for all initialized modules. More... | |
int | faSetProcMode (int id, int pmode, unsigned int PL, unsigned int PTW, int NSB, unsigned int NSA, unsigned int NP, unsigned int NPED, unsigned int MAXPED, unsigned int NSAT) |
Configure the processing type/mode. More... | |
void | faGSetProcMode (int pmode, unsigned int PL, unsigned int PTW, int NSB, unsigned int NSA, unsigned int NP, unsigned int NPED, unsigned int MAXPED, unsigned int NSAT) |
Configure the processing type/mode for all initialized fADC250s. More... | |
int | faCalcMaxUnAckTriggers (int mode, int ptw, int nsa, int nsb, int np) |
Return the maximum number of unacknowledged triggers a specific mode can handle. More... | |
int | faSetTriggerStopCondition (int id, int trigger_max) |
Set the maximum number of unacknowledged triggers before module stops accepting incoming triggers. More... | |
int | faSetTriggerBusyCondition (int id, int trigger_max) |
Set the maximum number of unacknowledged triggers before module asserts BUSY. More... | |
int | faSetTriggerPathSamples (int id, unsigned int TNSA, unsigned int TNSAT) |
Set the number of samples that are included before and after threshold crossing that are sent through the trigger path. More... | |
void | faGSetTriggerPathSamples (unsigned int TNSA, unsigned int TNSAT) |
Set the number of samples that are included before and after threshold crossing that are sent through the trigger path for all initialized fADC250s. More... | |
int | faSetTriggerPathThreshold (int id, unsigned int TPT) |
Set the threshold used to determine what samples are sent through the trigger path. More... | |
void | faGSetTriggerPathThreshold (unsigned int TPT) |
Set the threshold used to determine what samples are sent through the trigger path for all initialized fADC250s. More... | |
void | faSetNormalMode (int id, int opt) |
Configure the ADC Processing in "Normal Mode". More... | |
void | faSetInvertedMode (int id) |
Configure the ADC Processing in "Inverted (positive polarity) Mode". More... | |
int | faSetPPG (int id, int pmode, unsigned short *sdata, int nsamples) |
Setup FADC Progammable Pulse Generator. More... | |
void | faPPGEnable (int id) |
Enable the programmable pulse generator. More... | |
void | faPPGDisable (int id) |
Disable the programmable pulse generator. More... | |
int | faSuppressTriggerTime (int id, int suppress) |
Suppress all, or just the MSB, of the trigger time words from the datastream. More... | |
int | faGSuppressTriggerTime (int suppress) |
Suppress all, or just the MSB, of the trigger time words from the datastream. More... | |
void | faClear (int id) |
Perform a soft reset. More... | |
void | faGClear () |
Perform a soft reset of all initialized fADC250s. More... | |
void | faClearError (int id) |
Clear latched errors. More... | |
void | faGClearError () |
Clear latched errors of all initialized fADC250s. More... | |
void | faReset (int id, int iFlag) |
Perform a hard reset. More... | |
void | faGReset (int iFlag) |
Perform a hard reset on all initialized fADC250s. More... | |
void | faSoftReset (int id, int cflag) |
Perform either a soft clear or soft reset. More... | |
void | faDACReset (int id) |
Perform a reset of the DAC chip. More... | |
void | faGDACReset () |
Perform a reset of the DAC chip for all initialized modules. More... | |
void | faResetToken (int id) |
Reset the token. More... | |
int | faSetChannelDisable (int id, int channel) |
Disable the specified channel. More... | |
void | faChanDisable (int id, unsigned short cmask) |
Disable all channels in the specified mask. More... | |
int | faSetChannelDisableMask (int id, unsigned short cmask) |
Disable all channels in the specified mask. More... | |
int | faSetChannelEnable (int id, int channel) |
Enable the specified channel. More... | |
int | faSetChannelEnableMask (int id, unsigned short enMask) |
Enable all channels in the specified mask. More... | |
void | faEnableSyncSrc (int id) |
Enabled the SyncReset source. More... | |
void | faGEnableSyncSrc () |
Enable the SyncReset Source of all initialized fADC250s. More... | |
void | faEnable (int id, int eflag, int bank) |
Enable data acquisition, trigger, and SyncReset on the module. More... | |
void | faGEnable (int eflag, int bank) |
Enable data acquisition, trigger, and SyncReset on all initialized fADC250s. More... | |
void | faDisable (int id, int eflag) |
Disable data acquisition, triggers, and SyncReset on the module. More... | |
void | faGDisable (int eflag) |
Disable data acquisition, triggers, and SyncReset on all initialized fADC250s. More... | |
int | faSetTrig21Delay (int id, int delay) |
Configure the delay between the software playback trigger and trigger. More... | |
int | faEnableInternalPlaybackTrigger (int id) |
Enable the software playback trigger and trigger. More... | |
void | faSync (int id) |
Pulse a software SyncReset. More... | |
int | faBusyLevel (int id, unsigned int val, int bflag) |
Set/Readback Busy Level. More... | |
void | faEnableSoftTrig (int id) |
Enable software triggers. More... | |
void | faGEnableSoftTrig () |
Enable Software Triggers for all initialized fADC250s. More... | |
void | faDisableSoftTrig (int id) |
Disable Software Triggers. More... | |
void | faEnableSoftSync (int id) |
Enable Software SyncReset. More... | |
void | faDisableSoftSync (int id) |
Disable Software SyncReset. More... | |
void | faEnableClk (int id) |
Enable the internal clock. More... | |
void | faDisableClk (int id) |
Disable the internal clock. More... | |
void | faEnableTriggerOut (int id, int output) |
Enable trigger out for front panel or p0. More... | |
void | faEnableBusError (int id) |
Enable bus errors to terminate a block transfer. More... | |
void | faGEnableBusError () |
Enable bus errors to terminate a block transfer for all initialized fADC250s. More... | |
void | faDisableBusError (int id) |
Disable bus errors. More... | |
void | faEnableMultiBlock (int tflag) |
Enable and setup multiblock transfers for all initialized fADC250s. More... | |
void | faDisableMultiBlock () |
Disable multiblock transfer for all initialized fADC250s. More... | |
int | faSetBlockLevel (int id, int level) |
Set the block level for the module. More... | |
void | faGSetBlockLevel (int level) |
Set the block level for all initialized fADC250s. More... | |
int | faSetClkSource (int id, int source) |
Set the Clock Source for the module. More... | |
int | faSetTrigSource (int id, int source) |
Set the trigger source for the module. More... | |
int | faSetSyncSource (int id, int source) |
Set the SyncReset source for the module. More... | |
void | faEnableFP (int id) |
Enable Front Panel Inputs. More... | |
int | faSetTrigOut (int id, int trigout) |
Set trigger output options. More... | |
int | faResetTriggerCount (int id) |
Reset the trigger count for the module. More... | |
int | faCheckThreshold (int id) |
Check and make sure readout threshold for each channel is non zero. More... | |
int | faSetThreshold (int id, unsigned short tvalue, unsigned short chmask) |
Set the readout threshold value for specified channel mask. More... | |
int | faSetDAC (int id, unsigned short dvalue, unsigned short chmask) |
Set the DAC value of the specified channel mask. More... | |
int | faSetDACandCheck (int id, unsigned short dvalue, unsigned short chmask) |
Set the DAC value of the specified channel mask and readback and check that it was written properly. More... | |
int | faGetDAC (int id, unsigned short *indata) |
Readback the DAC values currently used by the module in the specified slot. More... | |
int | faGetChannelDAC (int id, int channel) |
Readback the DAC for a specific channel by the module in the specified slot. More... | |
int | faSetChannelPedestal (int id, unsigned int chan, unsigned int ped) |
Set the pedestal value of specified channel. More... | |
int | faSetAlignmentDebugMode (int enable) |
Enable/Disable the alignment sequence that is sent to the CTP for debugging. More... | |
int | faSetHitbitsMode (int id, int enable) |
Enable/Disable Hitbits mode on the module. More... | |
void | faGSetHitbitsMode (int enable) |
Enable/Disable Hitbits mode for all initialized fADC250s. More... | |
int | faClearScalers (int id) |
Clear the scalers (and enable, if disabled) More... | |
int | faLatchScalers (int id) |
Latch the current scaler count. More... | |
int | faEnableScalers (int id) |
Enable the scalers to count. More... | |
int | faDisableScalers (int id) |
Disable counting in the scalers. More... | |
int | faDataInsertAdcParameters (int id, int enable) |
Insert ADC parameter word into datastream. The data word appears as a block header continuation word. More... | |
void | faGDataInsertAdcParameters (int enable) |
Insert ADC parameter word into datastream. For all initialized modules. The data word appears as a block header continuation word. More... | |
int | faDataSuppressTriggerTime (int id, int suppress) |
Enable/Disable suppression of one or both of the trigger time words in the data stream. More... | |
void | faGDataSuppressTriggerTime (int suppress) |
Enable/Disable suppression of one or both of the trigger time words in the data stream for all initialized modules. More... | |
int | faSetDataFormat (int id, int format) |
Set the readout data form which allows for suppression of repetitious data words. More... | |
void | faGSetDataFormat (int format) |
Set the readout data form for all initialized modules. More... | |
void | faTestSetSystemTestMode (int id, int mode) |
Enable/Disable System test mode. More... | |
void | faTestSetTrigOut (int id, int mode) |
Set the level of Trig Out to the SD. More... | |
void | faTestSetBusyOut (int id, int mode) |
Set the level of Busy Out to the SD. More... | |
void | faTestSetSdLink (int id, int mode) |
Set the level of the SD Link. More... | |
void | faTestSetTokenOut (int id, int mode) |
Set the level of Token Out to the SD. More... | |
void | faTestResetSyncCounter (int id) |
Reset the counter of the SyncReset scaler. More... | |
void | faTestResetTrig1Counter (int id) |
Reset the counter of the trig1 scaler. More... | |
void | faTestResetTrig2Counter (int id) |
Reset the counter of the trig2 scaler. More... | |
int | faSetScalerBlockInterval (int id, unsigned int nblock) |
Set the block interval of scaler data insertion. More... | |
int | faForceEndOfBlock (int id, int scalers) |
Allows for the insertion of a block trailer into the data stream. More... | |
void | faGForceEndOfBlock (int scalers) |
Allows for the insertion of a block trailer into the data stream for all initialized fADC250s. More... | |
int | faSetHistoryBufferThreshold (int id, int thres) |
Set the threshold to trigger for the history buffer to be saved for readout. More... | |
void | faGSetHistoryBufferThreshold (int thres) |
Set the threshold to trigger for the history buffer to be saved for readout for all initialized fADC250s. More... | |
int | faArmHistoryBuffer (int id) |
Enable the history buffer for data acquisition for the module. More... | |
void | faGArmHistoryBuffer () |
Enable the history buffer for data acquisition for all initialized fADC250s. More... | |
int | faStateArmBuffer (int id, int enable) |
Enable/Disable Buffer to store state machine diagnostics. More... | |
int faArmHistoryBuffer | ( | int | id | ) |
Enable the history buffer for data acquisition for the module.
id | Slot number |
References FA_SUM_DATA_ARM_HISTORY_BUFFER, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::sum_data.
Referenced by faGArmHistoryBuffer().
int faBusyLevel | ( | int | id, |
unsigned int | val, | ||
int | bflag | ||
) |
Set/Readback Busy Level.
id | Slot number |
val |
|
bflag | i
|
References fadc_struct::busy_level, FA_BUSY_LEVEL_MASK, FA_FORCE_BUSY, fadcID, FALOCK, FAp, and FAUNLOCK.
int faCalcMaxUnAckTriggers | ( | int | mode, |
int | ptw, | ||
int | nsa, | ||
int | nsb, | ||
int | np | ||
) |
Return the maximum number of unacknowledged triggers a specific mode can handle.
pmode | Processing Mode |
ptw | Window Width |
nsb | Number of samples before pulse over threshold |
nsa | Number of samples after pulse over threshold |
np | Number of pulses processed per window |
References FA_SUPPORTED_MODES, and FA_SUPPORTED_NMODES.
Referenced by faSetProcMode().
void faChanDisable | ( | int | id, |
unsigned short | cmask | ||
) |
Disable all channels in the specified mask.
id | Slot number |
cmask | Channel mask of channels to disable |
References faSetChannelDisableMask().
int faCheckThreshold | ( | int | id | ) |
Check and make sure readout threshold for each channel is non zero.
id | Slot number |
References fadc_struct::adc_thres, FA_MAX_ADC_CHANNELS, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faInit().
void faClear | ( | int | id | ) |
Perform a soft reset.
id | Slot number |
References fadc_struct::csr, FA_CSR_SOFT_RESET, fadcID, FALOCK, FAp, and FAUNLOCK.
void faClearError | ( | int | id | ) |
Clear latched errors.
id | Slot number |
References fadc_struct::csr, FA_CSR_ERROR_CLEAR, fadcID, FALOCK, FAp, and FAUNLOCK.
int faClearScalers | ( | int | id | ) |
Clear the scalers (and enable, if disabled)
id | Slot number |
References FA_SCALER_CTRL_ENABLE, FA_SCALER_CTRL_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::scaler_ctrl.
void faDACReset | ( | int | id | ) |
Perform a reset of the DAC chip.
id | Slot number |
References FA_RESET_DAC, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::reset.
int faDataInsertAdcParameters | ( | int | id, |
int | enable | ||
) |
Insert ADC parameter word into datastream. The data word appears as a block header continuation word.
id | Slot number |
enable | Enable flag
|
References fadc_struct::ctrl1, FA_ENABLE_ADC_PARAMETERS_DATA, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGDataInsertAdcParameters().
int faDataSuppressTriggerTime | ( | int | id, |
int | suppress | ||
) |
Enable/Disable suppression of one or both of the trigger time words in the data stream.
id | Slot number |
suppress | Suppression Flag
|
References fadc_struct::ctrl1, FA_SUPPRESS_TRIGGER_TIME_DATA, FA_SUPPRESS_TRIGGER_TIME_WORD2_DATA, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGDataSuppressTriggerTime().
void faDisable | ( | int | id, |
int | eflag | ||
) |
Disable data acquisition, triggers, and SyncReset on the module.
id | Slot number |
eflag |
|
References fadc_struct::adc_status, fadc_struct::ctrl2, FA_ADC_STATUS1_TRIG_RCV_DONE, FA_CTRL_GO, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGDisable().
void faDisableBusError | ( | int | id | ) |
Disable bus errors.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_BERR, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faEnableMultiBlock().
void faDisableClk | ( | int | id | ) |
Disable the internal clock.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_INTERNAL_CLK, fadcID, FALOCK, FAp, and FAUNLOCK.
void faDisableMultiBlock | ( | ) |
Disable multiblock transfer for all initialized fADC250s.
References fadc_struct::ctrl1, FA_ENABLE_MULTIBLOCK, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
int faDisableScalers | ( | int | id | ) |
Disable counting in the scalers.
id | Slot number |
References FA_SCALER_CTRL_ENABLE, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::scaler_ctrl.
void faDisableSoftSync | ( | int | id | ) |
Disable Software SyncReset.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_SOFT_SRESET, fadcID, FALOCK, FAp, and FAUNLOCK.
void faDisableSoftTrig | ( | int | id | ) |
Disable Software Triggers.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_SOFT_TRIG, fadcID, FALOCK, FAp, and FAUNLOCK.
void faEnable | ( | int | id, |
int | eflag, | ||
int | bank | ||
) |
Enable data acquisition, trigger, and SyncReset on the module.
id | Slot number |
eflag | Enable Internal Trigger Logic, as well |
bank | Not used |
References fadc_struct::adc_config, fadc_struct::adc_status, fadc_struct::ctrl2, FA_ADC_STATUS1_TRIG_RCV_DONE, FA_CTRL_ENABLE_INT_TRIG, FA_CTRL_ENABLE_SRESET, FA_CTRL_ENABLE_TRIG, FA_CTRL_GO, FA_MGT_ENABLE_DATA_ALIGNMENT, FA_MGT_FRONT_END_TO_CTP, FA_MGT_HITBITS_TO_CTP, fadcAlignmentDebug, fadcChanDisable, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::mgt_ctrl.
Referenced by faGEnable().
void faEnableBusError | ( | int | id | ) |
Enable bus errors to terminate a block transfer.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_BERR, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faEnableMultiBlock().
void faEnableClk | ( | int | id | ) |
Enable the internal clock.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_INTERNAL_CLK, FA_REF_CLK_INTERNAL, fadcID, FALOCK, FAp, and FAUNLOCK.
void faEnableFP | ( | int | id | ) |
Enable Front Panel Inputs.
Also disables software triggers/syncs but leaves the clock source alone
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_SOFT_SRESET, FA_ENABLE_SOFT_TRIG, FA_SRESET_FP_ISYNC, FA_SRESET_SEL_MASK, FA_TRIG_FP_ISYNC, FA_TRIG_SEL_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faEnableInternalPlaybackTrigger | ( | int | id | ) |
Enable the software playback trigger and trigger.
id | Slot number |
References fadc_struct::ctrl1, FA_TRIG_MASK, FA_TRIG_VME_PLAYBACK, fadcID, FALOCK, FAp, and FAUNLOCK.
void faEnableMultiBlock | ( | int | tflag | ) |
Enable and setup multiblock transfers for all initialized fADC250s.
tflag | Token Flag
|
References fadc_struct::ctrl1, FA_ENABLE_MULTIBLOCK, FA_FIRST_BOARD, FA_LAST_BOARD, FA_MB_TOKEN_VIA_P0, FA_MB_TOKEN_VIA_P2, fadcID, fadcMaxSlot, fadcMinSlot, faDisableBusError(), faEnableBusError(), FALOCK, FAp, FAUNLOCK, and nfadc.
int faEnableScalers | ( | int | id | ) |
Enable the scalers to count.
id | Slot number |
References FA_SCALER_CTRL_ENABLE, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::scaler_ctrl.
void faEnableSoftSync | ( | int | id | ) |
Enable Software SyncReset.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_SOFT_SRESET, FA_SRESET_MASK, FA_SRESET_VME, fadcID, FALOCK, FAp, and FAUNLOCK.
void faEnableSoftTrig | ( | int | id | ) |
Enable software triggers.
id | Slot number |
References fadc_struct::ctrl1, FA_ENABLE_SOFT_TRIG, FA_TRIG_MASK, FA_TRIG_VME, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGEnableSoftTrig().
void faEnableSyncSrc | ( | int | id | ) |
Enabled the SyncReset source.
id | Slot number |
References fadc_struct::adc_config, fadc_struct::ctrl2, FA_CTRL_ENABLE_SRESET, FA_CTRL_GO, FA_MGT_ENABLE_DATA_ALIGNMENT, FA_MGT_FRONT_END_TO_CTP, FA_MGT_HITBITS_TO_CTP, FA_MGT_RESET, FA_RELEASE_MGT_RESET, fadcAlignmentDebug, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::mgt_ctrl.
Referenced by faGEnableSyncSrc(), and faSetMGTTestMode().
void faEnableTriggerOut | ( | int | id, |
int | output | ||
) |
Enable trigger out for front panel or p0.
id | Slot number |
output |
|
References fadc_struct::ctrl1, FA_ENABLE_TRIG_OUT_FP, FA_ENABLE_TRIG_OUT_P0, fadcID, FALOCK, FAp, and FAUNLOCK.
int faForceEndOfBlock | ( | int | id, |
int | scalers | ||
) |
Allows for the insertion of a block trailer into the data stream.
Allows for the insertion of a block trailer into the data stream. This is useful for the efficient extraction of a partial block of events from the FADC (e.g. for an end of run event, or the resynchonize with other modules). Event count within block is reset, after successful execution.
id | Slot number |
scalers | If set to > 0, scalers will also be inserted with the End of Block |
References fadc_struct::adc_config, fadc_struct::csr, FA_ADC_PROC_ENABLE, FA_CSR_DATA_STREAM_SCALERS, FA_CSR_FORCE_EOB_FAILED, FA_CSR_FORCE_EOB_INSERT, FA_CSR_FORCE_EOB_SUCCESS, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGForceEndOfBlock().
void faGArmHistoryBuffer | ( | ) |
Enable the history buffer for data acquisition for all initialized fADC250s.
References faArmHistoryBuffer(), faSlot(), and nfadc.
void faGClear | ( | ) |
Perform a soft reset of all initialized fADC250s.
References fadc_struct::csr, FA_CSR_SOFT_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
void faGClearError | ( | ) |
Clear latched errors of all initialized fADC250s.
References fadc_struct::csr, FA_CSR_ERROR_CLEAR, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
void faGDACReset | ( | ) |
Perform a reset of the DAC chip for all initialized modules.
References FA_RESET_DAC, FALOCK, FAp, faSlot(), FAUNLOCK, nfadc, and fadc_struct::reset.
void faGDataInsertAdcParameters | ( | int | enable | ) |
Insert ADC parameter word into datastream. For all initialized modules. The data word appears as a block header continuation word.
enable | Enable flag
|
References faDataInsertAdcParameters(), faSlot(), and nfadc.
void faGDataSuppressTriggerTime | ( | int | suppress | ) |
Enable/Disable suppression of one or both of the trigger time words in the data stream for all initialized modules.
suppress | Suppression Flag
|
References faDataSuppressTriggerTime(), faSlot(), and nfadc.
void faGDisable | ( | int | eflag | ) |
Disable data acquisition, triggers, and SyncReset on all initialized fADC250s.
eflag |
|
References fadcID, fadcUseSDC, faDisable(), faSDC_Disable(), and nfadc.
void faGEnable | ( | int | eflag, |
int | bank | ||
) |
Enable data acquisition, trigger, and SyncReset on all initialized fADC250s.
Also enables the SDC if it is initalized and used.
eflag | Enable Internal Trigger Logic, as well |
bank | Not used |
References fadcID, fadcUseSDC, faEnable(), faSDC_Enable(), and nfadc.
void faGEnableBusError | ( | ) |
Enable bus errors to terminate a block transfer for all initialized fADC250s.
References fadc_struct::ctrl1, FA_ENABLE_BERR, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
void faGEnableSoftTrig | ( | ) |
Enable Software Triggers for all initialized fADC250s.
References fadcID, faEnableSoftTrig(), and nfadc.
void faGEnableSyncSrc | ( | ) |
Enable the SyncReset Source of all initialized fADC250s.
References fadcID, faEnableSyncSrc(), and nfadc.
int faGetChannelDAC | ( | int | id, |
int | channel | ||
) |
Readback the DAC for a specific channel by the module in the specified slot.
id | Slot number |
channel | Channel number (0-15) |
References fadc_struct::dac, FA_DAC_VALUE_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faGetDAC | ( | int | id, |
unsigned short * | indata | ||
) |
Readback the DAC values currently used by the module in the specified slot.
id | Slot number |
intdata | Local location to store DAC values. |
References fadc_struct::dac, FA_DAC_VALUE_MASK, FA_MAX_ADC_CHANNELS, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faSetDACandCheck().
void faGForceEndOfBlock | ( | int | scalers | ) |
Allows for the insertion of a block trailer into the data stream for all initialized fADC250s.
Allows for the insertion of a block trailer into the data stream. This is useful for the efficient extraction of a partial block of events from the FADC (e.g. for an end of run event, or the resynchonize with other modules). Event count within block is reset, after successful execution.
scalers | If set to > 0, scalers will also be inserted with the End of Block |
References fadcID, faForceEndOfBlock(), and nfadc.
void faGReset | ( | int | iFlag | ) |
Perform a hard reset on all initialized fADC250s.
iFlag | Decision to restore A32 readout after reset.
|
References fadc_struct::adr32, fadc_struct::adr_mb, fadc_struct::csr, FA_CSR_HARD_RESET, FA_MAX_BOARDS, FALOCK, FAp, faSlot(), FAUNLOCK, and nfadc.
void faGSetBlockLevel | ( | int | level | ) |
Set the block level for all initialized fADC250s.
level | block level |
References fadc_struct::blk_level, fadcBlockLevel, fadcID, FALOCK, FAp, FAUNLOCK, and nfadc.
int faGSetClockSource | ( | int | clkSrc | ) |
Set the clock source for all initialized modules.
This routine should be used in the case that the source clock is NOT set in faInit (and defaults to Internal). Such is the case when clocks are synchronized in a many crate system. The clock source of the FADC should ONLY be set AFTER those clocks have been set and synchronized.
clkSrc | 2 bit integer bits 1-0: defines Clock Source 0 0 Internal 250MHz Clock 0 1 Front Panel 1 0 VXS (P0) 1 1 VXS (P0) |
References FA_ENABLE_INTERNAL_CLK, FA_REF_CLK_FP, FA_REF_CLK_INTERNAL, FA_REF_CLK_MASK, FA_REF_CLK_P0, FALOCK, FAp, faSlot(), FAUNLOCK, and nfadc.
void faGSetDataFormat | ( | int | format | ) |
Set the readout data form for all initialized modules.
format | Data Format
|
References faSetDataFormat(), faSlot(), and nfadc.
void faGSetHistoryBufferThreshold | ( | int | thres | ) |
Set the threshold to trigger for the history buffer to be saved for readout for all initialized fADC250s.
thres | History Buffer Threshold |
References faSetHistoryBufferThreshold(), faSlot(), and nfadc.
void faGSetHitbitsMode | ( | int | enable | ) |
Enable/Disable Hitbits mode for all initialized fADC250s.
enable |
|
References faSetHitbitsMode(), faSlot(), and nfadc.
void faGSetProcMode | ( | int | pmode, |
unsigned int | PL, | ||
unsigned int | PTW, | ||
int | NSB, | ||
unsigned int | NSA, | ||
unsigned int | NP, | ||
unsigned int | NPED, | ||
unsigned int | MAXPED, | ||
unsigned int | NSAT | ||
) |
Configure the processing type/mode for all initialized fADC250s.
id | Slot number |
pmode | Processing Mode
|
PL | Window Latency |
PTW | Window Width |
NSB | If NSB > 0: Number of samples before pulse over threshold included in sum NSB < 0: Number of samples after threshold excluded from sum |
NSA | Number of samples after pulse over threshold to be included in sum |
NP | Number of pulses processed per window |
NPED | Number of samples to sum for pedestal |
MAXPED | Maximum value of sample to be included in pedestal sum |
NSAT | Number of consecutive samples over threshold for valid pulse |
Note:
References fadcID, faSetProcMode(), and nfadc.
void faGSetTriggerPathSamples | ( | unsigned int | TNSA, |
unsigned int | TNSAT | ||
) |
Set the number of samples that are included before and after threshold crossing that are sent through the trigger path for all initialized fADC250s.
NSB | Number of samples before threshold crossing |
NSA | Number of samples after threshold crossing |
References fadcID, faSetTriggerPathSamples(), and nfadc.
void faGSetTriggerPathThreshold | ( | unsigned int | TPT | ) |
Set the threshold used to determine what samples are sent through the trigger path for all initialized fADC250s.
threshold | Trigger Path Threshold |
References fadcID, faSetTriggerPathThreshold(), and nfadc.
int faGSuppressTriggerTime | ( | int | suppress | ) |
Suppress all, or just the MSB, of the trigger time words from the datastream.
suppress | Suppression Parameter 0 - Trigger Time not suppressed 1 - Suppress MSB of trigger time 2 - Suppress all trigger time words. |
References faSlot(), faSuppressTriggerTime(), and nfadc.
STATUS faInit | ( | UINT32 | addr, |
UINT32 | addr_inc, | ||
int | nadc, | ||
int | iFlag | ||
) |
Initialize JLAB FADC Library.
addr |
|
addr_inc |
|
nadc |
|
iFlag | 18 bit integer Low 6 bits - Specifies the default Signal distribution (clock,trigger) sources for the board (Internal, FrontPanel, VXS, VME(Soft)) bit 0: defines Sync Reset source 0 VME (Software Sync-Reset) 1 Front Panel/VXS/P2 (Depends on Clk/Trig source selection) bits 3-1: defines Trigger source 0 0 0 VME (Software Triggers) 0 0 1 Front Panel Input 0 1 0 VXS (P0) 1 0 0 Internal Trigger Logic (HITSUM FPGA) (all others Undefined - default to VME/Software) bits 5-4: defines Clock Source 0 0 Internal 250MHz Clock 0 1 Front Panel 1 0 VXS (P0) 1 1 P2 Connector (Backplane) |
Common Modes of Operation: Value = 0 CLK (Int) TRIG (Soft) SYNC (Soft) (Debug/Test Mode) 2 CLK (Int) TRIG (FP) SYNC (Soft) (Single Board 3 CLK (Int) TRIG (FP) SYNC (FP) Modes) 0x10 CLK (FP) TRIG (Soft) SYNC (Soft) 0x13 CLK (FP) TRIG (FP) SYNC (FP) (VME SDC Mode) 0x20 CLK (VXS) TRIG (Soft) SYNC (Soft) 0x25 CLK (VXS) TRIG (VXS) SYNC (VXS) (VXS SD Mode)
High 10bits - A16 Base address of FADC Signal Distribution Module This board can control up to 7 FADC Boards. Clock Source must be set to Front Panel (bit4 = 1)
bit 16: Exit before board initialization 0 Initialize FADC (default behavior) 1 Skip initialization (just setup register map pointers)
bit 17: Use fadcAddrList instead of addr and addr_inc for VME addresses. 0 Initialize with addr and addr_inc 1 Use fadcAddrList
bit 18: Skip firmware check. Useful for firmware updating. 0 Perform firmware check 1 Skip firmware check
References fadc_struct::adc_status, fadc_struct::csr, fadc_sdc_struct::ctrl, FA_A32_ENABLE, FA_ADC_VERSION_MASK, FA_BOARD_ID, FA_BOARD_MASK, FA_CSR_HARD_RESET, FA_ENABLE_INTERNAL_CLK, FA_ENABLE_SOFT_SRESET, FA_ENABLE_SOFT_TRIG, FA_FIRST_BOARD, FA_INIT_SKIP, FA_INIT_SKIP_FIRMWARE_CHECK, FA_INIT_USE_ADDRLIST, FA_LAST_BOARD, FA_MAX_A32_MEM, FA_MAX_A32MB_SIZE, FA_MGT_RESET, FA_REF_CLK_FP, FA_REF_CLK_INTERNAL, FA_REF_CLK_P0, FA_RELEASE_MGT_RESET, FA_RESET_ADC_FIFO1, FA_RESET_ADC_FPGA1, FA_RESET_ALL, FA_RESET_DAC, FA_RESET_EXT_RAM_PT, FA_SDC_ADR_MASK, FA_SLOT_ID_MASK, FA_SOURCE_MASK, FA_SOURCE_SDC, FA_SOURCE_VXS, FA_SRESET_FP_ISYNC, FA_SRESET_P0_ISYNC, FA_SRESET_VME, FA_SUPPORTED_CTRL_FIRMWARE, FA_SUPPORTED_CTRL_FIRMWARE_NUMBER, FA_SUPPORTED_PROC_FIRMWARE, FA_SUPPORTED_PROC_FIRMWARE_NUMBER, FA_TRIG_FP_ISYNC, FA_TRIG_INTERNAL, FA_TRIG_P0_ISYNC, FA_TRIG_VME, FA_VERSION_MASK, FA_VME_INT_LEVEL, FA_VME_INT_VEC, faCheckThreshold(), fadcA16Offset, fadcA24Offset, fadcA32Base, fadcA32Offset, fadcAddrList, fadcBlockLevel, fadcChanDisable, fadcID, fadcInited, fadcIntArg, fadcIntID, fadcIntLevel, fadcIntRoutine, fadcIntRunning, fadcIntVec, fadcMaxSlot, fadcMinSlot, fadcProcRev, fadcRev, fadcSource, fadcUseSDC, FAp, FApd, FApmb, faSDC_Config(), FASDC_CSR_INIT, fadc_struct::intr, nfadc, and fadc_struct::version.
int faLatchScalers | ( | int | id | ) |
Latch the current scaler count.
id | Slot number |
References FA_SCALER_CTRL_ENABLE, FA_SCALER_CTRL_LATCH, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::scaler_ctrl.
void faPPGDisable | ( | int | id | ) |
Disable the programmable pulse generator.
id | Slot number |
References fadc_struct::adc_config, FA_PPG_ENABLE, fadcID, FALOCK, FAp, and FAUNLOCK.
void faPPGEnable | ( | int | id | ) |
Enable the programmable pulse generator.
id | Slot number |
References fadc_struct::adc_config, FA_PPG_ENABLE, fadcID, FALOCK, FAp, and FAUNLOCK.
void faReset | ( | int | id, |
int | iFlag | ||
) |
Perform a hard reset.
id | Slot number |
iFlag | Decision to restore A32 readout after reset.
|
References fadc_struct::adr32, fadc_struct::adr_mb, fadc_struct::csr, FA_CSR_HARD_RESET, fadcID, FALOCK, FAp, and FAUNLOCK.
void faResetToken | ( | int | id | ) |
Reset the token.
A call to this routine will cause the module to have the token if it has been configured to the the FIRST module in the MultiBlock chain. This routine has no effect on any other module in the chain.
id | Slot number |
References FA_RESET_TOKEN, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::reset.
int faResetTriggerCount | ( | int | id | ) |
Reset the trigger count for the module.
id | Slot number |
References FA_TRIG_SCAL_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trig_scal.
int faSetAlignmentDebugMode | ( | int | enable | ) |
Enable/Disable the alignment sequence that is sent to the CTP for debugging.
enable |
|
References fadcAlignmentDebug.
int faSetBlockLevel | ( | int | id, |
int | level | ||
) |
Set the block level for the module.
id | Slot number |
level | block level |
References fadc_struct::blk_level, FA_BLOCK_LEVEL_MASK, fadcBlockLevel, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetChannelDisable | ( | int | id, |
int | channel | ||
) |
Disable the specified channel.
id | Slot number |
channel | Channel Number to Disable |
References fadc_struct::adc_config, FA_MAX_ADC_CHANNELS, fadcChanDisable, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetChannelDisableMask | ( | int | id, |
unsigned short | cmask | ||
) |
Disable all channels in the specified mask.
id | Slot number |
cmask | Channel mask of channels to disable |
References fadc_struct::adc_config, fadcChanDisable, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faChanDisable().
int faSetChannelEnable | ( | int | id, |
int | channel | ||
) |
Enable the specified channel.
id | Slot number |
channel | Channel Number to Enable |
References fadc_struct::adc_config, FA_MAX_ADC_CHANNELS, fadcChanDisable, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetChannelEnableMask | ( | int | id, |
unsigned short | enMask | ||
) |
Enable all channels in the specified mask.
id | Slot number |
cmask | Channel mask of channels to Enable |
References fadc_struct::adc_config, FA_ADC_CHAN_MASK, fadcChanDisable, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetChannelPedestal | ( | int | id, |
unsigned int | chan, | ||
unsigned int | ped | ||
) |
Set the pedestal value of specified channel.
The pedestal is the value that will be subtracted from specified channel for each sample before it is sent through the trigger path
id | Slot number |
chan | Channel Number |
ped | Pedestal value |
References fadc_struct::adc_pedestal, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetClkSource | ( | int | id, |
int | source | ||
) |
Set the Clock Source for the module.
id | Slot number |
source | Clock Source
|
References fadc_struct::ctrl1, FA_REF_CLK_INTERNAL, FA_REF_CLK_SEL_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetClockSource | ( | int | id, |
int | clkSrc | ||
) |
Set the clock source.
This routine should be used in the case that the source clock is NOT set in faInit (and defaults to Internal). Such is the case when clocks are synchronized in a many crate system. The clock source of the FADC should ONLY be set AFTER those clocks have been set and synchronized.
id | Slot Number |
clkSrc | 2 bit integer bits 1-0: defines Clock Source 0 0 Internal 250MHz Clock 0 1 Front Panel 1 0 VXS (P0) 1 1 VXS (P0) |
References FA_ENABLE_INTERNAL_CLK, FA_REF_CLK_FP, FA_REF_CLK_INTERNAL, FA_REF_CLK_MASK, FA_REF_CLK_P0, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetDAC | ( | int | id, |
unsigned short | dvalue, | ||
unsigned short | chmask | ||
) |
Set the DAC value of the specified channel mask.
id | Slot number |
dvalue | DAC Value |
chmask | Mask of channels to set |
References fadc_struct::dac, FA_DAC_VALUE_MASK, FA_DAC_WRITE_TIMEOUT_ERROR, FA_MAX_ADC_CHANNELS, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faSetDACandCheck().
int faSetDACandCheck | ( | int | id, |
unsigned short | dvalue, | ||
unsigned short | chmask | ||
) |
Set the DAC value of the specified channel mask and readback and check that it was written properly.
id | Slot number |
dvalue | DAC Value |
chmask | Mask of channels to set |
References FA_MAX_ADC_CHANNELS, fadcID, faGetDAC(), FAp, and faSetDAC().
int faSetDataFormat | ( | int | id, |
int | format | ||
) |
Set the readout data form which allows for suppression of repetitious data words.
id | Slot number |
format | Data Format
|
References fadc_struct::ctrl1, FA_CTRL1_DATAFORMAT_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGSetDataFormat().
int faSetHistoryBufferThreshold | ( | int | id, |
int | thres | ||
) |
Set the threshold to trigger for the history buffer to be saved for readout.
id | Slot number |
thres | History Buffer Threshold |
References FA_SUM_THRESHOLD_MASK, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::sum_threshold.
Referenced by faGSetHistoryBufferThreshold().
int faSetHitbitsMode | ( | int | id, |
int | enable | ||
) |
Enable/Disable Hitbits mode on the module.
id | Slot number |
enable |
|
References FA_MGT_HITBITS_TO_CTP, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::mgt_ctrl.
Referenced by faGSetHitbitsMode().
void faSetInvertedMode | ( | int | id | ) |
Configure the ADC Processing in "Inverted (positive polarity) Mode".
Call this routine to invert the digital output of the ADC chips for each channel. This routine MUST be called after faSetProcMode.
id | Slot number |
void faSetNormalMode | ( | int | id, |
int | opt | ||
) |
Configure the ADC Processing in "Normal Mode".
This routine is called in faSetProcMode
id | Slot number |
opt | Not Used |
References fadc_struct::adc_config, fadcID, FALOCK, and FAp.
int faSetPPG | ( | int | id, |
int | pmode, | ||
unsigned short * | sdata, | ||
int | nsamples | ||
) |
Setup FADC Progammable Pulse Generator.
id | Slot number |
pmode | Not used |
sdata | Array of sample data to be programmed |
nsamples | Number of samples contained in sdata |
References fadc_struct::adc_test_data, FA_PPG_MAX_SAMPLES, FA_PPG_SAMPLE_MASK, FA_PPG_WRITE_VALUE, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetProcMode | ( | int | id, |
int | pmode, | ||
unsigned int | PL, | ||
unsigned int | PTW, | ||
int | NSB, | ||
unsigned int | NSA, | ||
unsigned int | NP, | ||
unsigned int | NPED, | ||
unsigned int | MAXPED, | ||
unsigned int | NSAT | ||
) |
Configure the processing type/mode.
id | Slot number |
pmode | Processing Mode
|
PL | Window Latency |
PTW | Window Width |
NSB | If NSB > 0: Number of samples before pulse over threshold included in sum NSB < 0: Number of samples after threshold excluded from sum |
NSA | Number of samples after pulse over threshold to be included in sum |
NP | Number of pulses processed per window |
NPED | Number of samples to sum for pedestal |
MAXPED | Maximum value of sample to be included in pedestal sum |
NSAT | Number of consecutive samples over threshold for valid pulse |
Note:
References fadc_struct::adc_config, fadc_struct::adc_nsa, fadc_struct::adc_nsb, fadc_struct::adc_pl, fadc_struct::adc_ptw, fadc_struct::config3, fadc_struct::config7, FA_ADC_CONFIG1_TNSAT_MASK, FA_ADC_DEFAULT_TPT, FA_ADC_MAX_MAXPED, FA_ADC_MAX_NP, FA_ADC_MAX_NPED, FA_ADC_MAX_NSA, FA_ADC_MAX_NSAT, FA_ADC_MAX_NSB, FA_ADC_MAX_PL, FA_ADC_MAX_PTW, FA_ADC_MIN_MAXPED, FA_ADC_MIN_NP, FA_ADC_MIN_NPED, FA_ADC_MIN_NSA, FA_ADC_MIN_NSAT, FA_ADC_MIN_NSB, FA_ADC_MIN_PL, FA_ADC_MIN_PTW, FA_ADC_NSB_NEGATIVE, FA_ADC_PROC_ENABLE, FA_ADC_PROC_MODE_PULSE_PARAM, FA_ADC_PROC_MODE_RAW_PULSE_PARAM, FA_ADC_TNSA_MASK, FA_SUPPORTED_MODES, FA_SUPPORTED_NMODES, faCalcMaxUnAckTriggers(), fadcChanDisable, fadcID, FALOCK, FAp, faSetTriggerBusyCondition(), faSetTriggerStopCondition(), and FAUNLOCK.
Referenced by faGSetProcMode().
int faSetScalerBlockInterval | ( | int | id, |
unsigned int | nblock | ||
) |
Set the block interval of scaler data insertion.
Data from scalers may be inserted into the readout data stream at regular event count intervals. The interval is specified in multiples of blocks. Note: Scalers are NOT reset after their values are captured.
id | Slot number |
nblock |
|
References FA_SCALER_INTERVAL_MASK, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::scaler_interval.
int faSetSyncSource | ( | int | id, |
int | source | ||
) |
Set the SyncReset source for the module.
id | Slot number |
source |
|
References fadc_struct::ctrl1, FA_SRESET_FP_ISYNC, FA_SRESET_SEL_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetThreshold | ( | int | id, |
unsigned short | tvalue, | ||
unsigned short | chmask | ||
) |
Set the readout threshold value for specified channel mask.
id | Slot number |
tvalue | Threshold value |
chmask | Mask of channels to set |
References fadc_struct::adc_thres, FA_MAX_ADC_CHANNELS, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetTrig21Delay | ( | int | id, |
int | delay | ||
) |
Configure the delay between the software playback trigger and trigger.
id | Slot number |
delay | Delay between the playback trigger and trigger in units of 4 ns |
References FA_TRIG21_DELAY_MASK, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trig21_delay.
int faSetTriggerBusyCondition | ( | int | id, |
int | trigger_max | ||
) |
Set the maximum number of unacknowledged triggers before module asserts BUSY.
id | Slot number |
trigger_max | Limit for maximum number of unacknowledged triggers If 0, disables the condition |
References FA_TRIGCTL_BUSY_EN, FA_TRIGCTL_MAX1_MASK, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trigger_control.
Referenced by faSetProcMode().
int faSetTriggerPathSamples | ( | int | id, |
unsigned int | TNSA, | ||
unsigned int | TNSAT | ||
) |
Set the number of samples that are included before and after threshold crossing that are sent through the trigger path.
id | Slot number |
NSB | Number of samples before threshold crossing |
NSA | Number of samples after threshold crossing |
References fadc_struct::adc_config, fadc_struct::adc_nsa, FA_ADC_CONFIG1_TNSAT_MASK, FA_ADC_DEFAULT_TNSA, FA_ADC_DEFAULT_TNSAT, FA_ADC_MAX_TNSA, FA_ADC_MAX_TNSAT, FA_ADC_MIN_TNSA, FA_ADC_MIN_TNSAT, FA_ADC_NSA_READBACK_MASK, fadcID, fadcProcRev, FALOCK, FAp, and FAUNLOCK.
Referenced by faGSetTriggerPathSamples().
int faSetTriggerPathThreshold | ( | int | id, |
unsigned int | TPT | ||
) |
Set the threshold used to determine what samples are sent through the trigger path.
id | Slot number |
threshold | Trigger Path Threshold |
References fadc_struct::config3, FA_ADC_CONFIG3_TPT_MASK, FA_ADC_MAX_TPT, fadcID, fadcProcRev, FALOCK, FAp, and FAUNLOCK.
Referenced by faGSetTriggerPathThreshold().
int faSetTriggerStopCondition | ( | int | id, |
int | trigger_max | ||
) |
Set the maximum number of unacknowledged triggers before module stops accepting incoming triggers.
id | Slot number |
trigger_max | Limit for maximum number of unacknowledged triggers. If 0, disables the condition. |
References FA_TRIGCTL_MAX2_MASK, FA_TRIGCTL_TRIGSTOP_EN, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trigger_control.
Referenced by faSetProcMode().
int faSetTrigOut | ( | int | id, |
int | trigout | ||
) |
Set trigger output options.
id | Slot number |
trigout | bits: 0 1 0 Enable Front Panel Trigger Output 1 0 0 Enable VXS Trigger Output |
References fadc_struct::ctrl1, FA_TRIGOUT_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSetTrigSource | ( | int | id, |
int | source | ||
) |
Set the trigger source for the module.
id | Slot number |
source | Trigger Source
|
References fadc_struct::ctrl1, FA_TRIG_FP_ISYNC, FA_TRIG_SEL_MASK, fadcID, FALOCK, FAp, and FAUNLOCK.
int faSlot | ( | unsigned int | i | ) |
Convert an index into a slot number, where the index is the element of an array of FADCs in the order in which they were initialized.
i | Initialization number |
Referenced by faGArmHistoryBuffer(), faGDACReset(), faGDataInsertAdcParameters(), faGDataSuppressTriggerTime(), faGProcPedConfig(), faGReset(), faGSampleConfig(), faGSetClockSource(), faGSetDataFormat(), faGSetHistoryBufferThreshold(), faGSetHitbitsMode(), faGStatus(), faGSuppressTriggerTime(), and faGTokenStatus().
void faSoftReset | ( | int | id, |
int | cflag | ||
) |
Perform either a soft clear or soft reset.
id | Slot number |
cflag |
|
References fadc_struct::csr, FA_CSR_SOFT_CLEAR, FA_CSR_SOFT_RESET, fadcID, FALOCK, FAp, and FAUNLOCK.
int faStateArmBuffer | ( | int | id, |
int | enable | ||
) |
Enable/Disable Buffer to store state machine diagnostics.
id | Slot number |
enable | If enable != 0, enable buffer, otherwise disable. |
References FA250_STATE_REGS::csr, FA_STATE_CSR_ARM_BUFFER, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::state.
int faSuppressTriggerTime | ( | int | id, |
int | suppress | ||
) |
Suppress all, or just the MSB, of the trigger time words from the datastream.
id | Slot number |
suppress | Suppression Parameter 0 - Trigger Time not suppressed 1 - Suppress MSB of trigger time 2 - Suppress all trigger time words. |
References fadc_struct::ctrl1, FA_CTRL1_SUPPRESS_TT, FA_CTRL1_SUPPRESS_TT2, fadcID, FALOCK, FAp, and FAUNLOCK.
Referenced by faGSuppressTriggerTime().
void faSync | ( | int | id | ) |
Pulse a software SyncReset.
id | Slot number |
References fadc_struct::csr, fadc_struct::ctrl1, FA_CSR_SYNC, FA_ENABLE_SOFT_SRESET, fadcID, FALOCK, FAp, and FAUNLOCK.
void faTestResetSyncCounter | ( | int | id | ) |
Reset the counter of the SyncReset scaler.
Available only in System Test Mode
id | Slot number |
References FA_SYNCP0COUNT_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::syncp0count.
void faTestResetTrig1Counter | ( | int | id | ) |
Reset the counter of the trig1 scaler.
Available only in System Test Mode
id | Slot number |
References FA_TRIG1P0COUNT_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trig1p0count.
void faTestResetTrig2Counter | ( | int | id | ) |
Reset the counter of the trig2 scaler.
Available only in System Test Mode
id | Slot number |
References FA_TRIG2P0COUNT_RESET, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::trig2p0count.
void faTestSetBusyOut | ( | int | id, |
int | mode | ||
) |
Set the level of Busy Out to the SD.
Available only in System Test Mode
id | Slot number |
mode |
|
References FA_TESTBIT_BUSYOUT, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::testBit.
void faTestSetSdLink | ( | int | id, |
int | mode | ||
) |
Set the level of the SD Link.
Available only in System Test Mode
id | Slot number |
mode |
|
References FA_TESTBIT_SDLINKOUT, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::testBit.
void faTestSetSystemTestMode | ( | int | id, |
int | mode | ||
) |
Enable/Disable System test mode.
id | Slot number |
mode |
|
References fadc_struct::ctrl1, FA_CTRL1_SYSTEM_TEST_MODE, fadcID, FALOCK, FAp, and FAUNLOCK.
void faTestSetTokenOut | ( | int | id, |
int | mode | ||
) |
Set the level of Token Out to the SD.
Available only in System Test Mode
id | Slot number |
mode |
|
References FA_TESTBIT_TOKENOUT, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::testBit.
void faTestSetTrigOut | ( | int | id, |
int | mode | ||
) |
Set the level of Trig Out to the SD.
Available only in System Test Mode
id | Slot number |
mode |
|
References FA_TESTBIT_TRIGOUT, fadcID, FALOCK, FAp, FAUNLOCK, and fadc_struct::testBit.