JLab fADC125 Library  1.2.1
 All Data Structures Files Functions Variables Enumerations Enumerator Macros Groups
fa125Lib.h File Reference

Go to the source code of this file.

Data Structures

struct  fa125_a24_main
 
struct  fa125_a24_fe
 
struct  fa125_a24_proc
 
struct  fa125_a24
 
struct  fa125_a32
 

Macros

#define FA125_MAX_BOARDS   20
 
#define FA125_MAX_A32_MEM   0x800000 /* 8 Meg */
 
#define FA125_MAX_A32MB_SIZE   0x800000 /* 8 MB */
 
#define FA125_MAX_ADC_CHANNELS   72
 
#define FA125_MAX_DATA_PER_CHANNEL   8
 
#define FA125_ID   0xADC12500
 
#define FA125_MAIN_SUPPORTED_FIRMWARE   0x00010201
 
#define FA125_PROC_SUPPORTED_FIRMWARE   0x00010201
 
#define FA125_FE_SUPPORTED_FIRMWARE   0x00010201
 
#define FA125_PWRCTL_KEY_ON   0x3000ABCD
 
#define FA125_DACCTL_DACCS_MASK   (1<<0)
 
#define FA125_DACCTL_DACSCLK_MASK   (1<<1)
 
#define FA125_DACCTL_ADACSI_MASK   (1<<2)
 
#define FA125_DACCTL_BDACSI_MASK   (1<<3)
 
#define FA125_CLOCK_P2   (0)
 
#define FA125_CLOCK_P0   (1)
 
#define FA125_CLOCK_INTERNAL_ENABLE   (2)
 
#define FA125_CLOCK_INTERNAL   (3)
 
#define FA125_CLOCK_MASK   0xF
 
#define FA125_SLOT_GA_MASK   0x0000001F
 
#define FA125_BLOCKCSR_BLOCK_READY   (1<<2)
 
#define FA125_BLOCKCSR_BERR_ASSERTED   (1<<3)
 
#define FA125_BLOCKCSR_HAS_TOKEN   (1<<4)
 
#define FA125_BLOCKCSR_TAKE_TOKEN   (1<<5)
 
#define FA125_BLOCKCSR_PULSE_SYNC_RESET   (1<<6)
 
#define FA125_BLOCKCSR_PULSE_TRIGGER   (1<<7)
 
#define FA125_BLOCKCSR_PULSE_SOFT_RESET   (1<<8)
 
#define FA125_BLOCKCSR_PULSE_HARD_RESET   (1<<9)
 
#define FA125_CTRL1_ENABLE_BERR   (1<<2)
 
#define FA125_CTRL1_ENABLE_MULTIBLOCK   (1<<3)
 
#define FA125_CTRL1_FIRST_BOARD   (1<<4)
 
#define FA125_CTRL1_LAST_BOARD   (1<<5)
 
#define FA125_ADR32_BASE_MASK   0x0000FF80
 
#define FA125_ADR32_ENABLE   (1<<0)
 
#define FA125_ADRMB_ENABLE   (1<<0)
 
#define FA125_ADRMB_MIN_MASK   0x0000FF80
 
#define FA125_ADRMB_MAX_MASK   0xFF800000
 
#define FA125_BUSYLEVEL_MASK   0x000FFFFF
 
#define FA125_BUSYLEVEL_FORCE_BUSY   (1<<31)
 
#define FA125_BLOCKCOUNT_MASK   0x000FFFFF
 
#define FA125_CONFIGCSR_DATAREAD_MASK   0x000000FF
 
#define FA125_CONFIGCSR_BUSY   (1<<8)
 
#define FA125_CONFIGCSR_OPCODE_MASK   0x07000000
 
#define FA125_CONFIGCSR_PROG_ENABLE   (1<<31)
 
#define FA125_CONFIGADRDATA_DATA_MASK   0x000000FF
 
#define FA125_CONFIGADRDATA_BYTEADR_MASK   0x0003FF00
 
#define FA125_CONFIGADRDATA_PAGEADR_MASK   0x7FFC0000
 
#define FA125_CONFIGADRDATA_EXEC   (1<<31)
 
#define FA125_FE_TEST_COLLECT_ON   (1<<1)
 
#define FA125_FE_TEST_SYNCRESET_ENABLE   (1<<2)
 
#define FA125_FE_PTW_MASK   0x000000FF
 
#define FA125_FE_PL_MASK   0x0000FFFF
 
#define FA125_FE_PTW_LAST_ADR_MASK   0x00000FFF
 
#define FA125_FE_PTW_MAX_BUF_MASK   0x000000FF
 
#define FA125_FE_NSB_MASK   0x00001FFF
 
#define FA125_FE_NSA_MASK   0x00003FFF
 
#define FA125_FE_THRESHOLD_MASK   0x00000FFF
 
#define FA125_FE_CONFIG1_MASK   0x000000FF
 
#define FA125_FE_CONFIG1_MODE_MASK   0x00000007
 
#define FA125_FE_CONFIG1_ENABLE   (1<<3)
 
#define FA125_FE_CONFIG1_NPULSES_MASK   0x00000060
 
#define FA125_FE_CONFIG1_PLAYBACK_ENABLE   (1<<7)
 
#define FA125_FE_TRIG_COUNT_MASK   0x0000FFFF
 
#define FA125_FE_CONFIG2_CH_MASK   0x0000003F
 
#define FA125_FE_TEST_WAVEFORM_PPG_DATA_MASK   0x00000FFF
 
#define FA125_FE_TEST_WAVEFORM_OVERFLOW   (1<<12)
 
#define FA125_FE_TEST_WAVEFORM_WRITE_PPG_DATA   (1<<15)
 
#define FA125_PPG_MAX_SAMPLES   32*6
 
#define FA125_PROC_CSR_BUSY   (1<<0)
 
#define FA125_PROC_CSR_CLEAR   (1<<1)
 
#define FA125_PROC_CSR_RESET   (1<<2)
 
#define FA125_TRIGSRC_TRIGGER_MASK   0x00000003
 
#define FA125_TRIGSRC_TRIGGER_P0   (0<<0)
 
#define FA125_TRIGSRC_TRIGGER_SOFTWARE   (1<<0)
 
#define FA125_TRIGSRC_TRIGGER_INTERNAL_SUM   (1<<1)
 
#define FA125_TRIGSRC_TRIGGER_P2   ((1<<1)|(1<<0))
 
#define FA125_PROC_CTRL2_TRIGGER_ENABLE   (1<<0)
 
#define FA125_PROC_CTRL2_SYNCRESET_SOURCE_MASK   0xC
 
#define FA125_PROC_CTRL2_SYNCRESET_P0   (0<<2)
 
#define FA125_PROC_CTRL2_SYNCRESET_VME   (2<<2)
 
#define FA125_PROC_BLOCKLEVEL_MASK   0x0000FFFF
 
#define FA125_PROC_TRIGCOUNT_MASK   0x7FFFFFFF
 
#define FA125_PROC_TRIGCOUNT_RESET   (1<<31)
 
#define FA125_PROC_EVCOUNT_MASK   0x00FFFFFF
 
#define FA125_PROC_CLOCK125COUNT_MASK   0xFFFFFFFF
 
#define FA125_PROC_CLOCK125COUNT_RESET   0
 
#define FA125_PROC_SYNCCOUNT_MASK   0xFFFFFFFF
 
#define FA125_PROC_SYNCCOUNT_RESET   0
 
#define FA125_PROC_TRIG2COUNT_MASK   0xFFFFFFFF
 
#define FA125_PROC_TRIG2COUNT_RESET   0
 
#define FA125_PROC_PULSER_CONTROL_PULSE   (1<<0)
 
#define FA125_PROC_PULSER_CONTROL_DELAYED_TRIGGER   (1<<1)
 
#define FA125_PROC_PULSER_TRIG_DELAY_MASK   0x00000FFF
 
#define FA125_PROC_PULSER_WIDTH_MASK   0x00FFF000
 
#define FA125_DATA_FORMAT0   (0<<13)
 
#define FA125_DATA_FORMAT1   (1<<13)
 
#define FA125_DATA_FORMAT5   (5<<13)
 
#define FA125_DATA_END   0xFE00
 
#define FA125_PAD_WORD   0xF1EA
 
#define FA125_EVNUM_MASK   0x07F0
 
#define FA125_DATA_CHANNEL_MASK   0xFC00
 
#define FA125_DATA_FORMAT_MASK   0xE000
 
#define FA125_DATA_RAW_MASK   0x3FFFF
 
#define FA125_DATA_OVERFLOW_MASK   0x8000
 
#define FA125_DUMMY_DATA   0xf800fafa
 
#define FA125_DATA_TYPE_DEFINE   0x80000000
 
#define FA125_DATA_TYPE_MASK   0x78000000
 
#define FA125_DATA_BLOCK_HEADER   0x00000000
 
#define FA125_DATA_BLOCK_TRAILER   0x08000000
 
#define FA125_DATA_BLKNUM_MASK   0x0000003f
 
#define FA125_OPCODE_BUFFER_WRITE   0
 
#define FA125_OPCODE_MAIN_READ   1
 
#define FA125_OPCODE_BUFFER_READ   2
 
#define FA125_OPCODE_BUFFER_PUSH   3
 
#define FA125_OPCODE_ERASE   4
 
#define FA125_FIRMWARE_MAX_PAGES   8*1024
 
#define FA125_FIRMWARE_MAX_BYTE_PER_PAGE   528
 
#define FA125_INIT_VXS_TRIG   (0<<1)
 
#define FA125_INIT_INT_TIMER_TRIG   (1<<1)
 
#define FA125_INIT_INT_SUM_TRIG   (1<<2)
 
#define FA125_INIT_P2_TRIG   ((1<<1) | (1<<2))
 
#define FA125_INIT_P2_CLKSRC   (0<<4)
 
#define FA125_INIT_VXS_CLKSRC   (1<<4)
 
#define FA125_INIT_INT_CLKSRC   (1<<5)
 
#define FA125_INIT_SKIP   (1<<16)
 
#define FA125_INIT_USE_ADDRLIST   (1<<17)
 
#define FA125_INIT_SKIP_FIRMWARE_CHECK   (1<<18)
 
#define FA125_STATUS_SHOWREGS   (1<<0)
 
#define FA125_DEFAULT_PL   50
 
#define FA125_DEFAULT_PTW   50
 
#define FA125_DEFAULT_NSB   5
 
#define FA125_DEFAULT_NSA   10
 
#define FA125_DEFAULT_NP   3
 
#define FA125_MAX_PL   1000
 
#define FA125_MAX_PTW   512
 
#define FA125_MAX_NSB   500
 
#define FA125_MAX_NSA   500
 
#define FA125_MAX_NP   3
 
#define FA125_PROC_MODE_RAWWINDOW   1
 
#define FA125_SUPPORTED_MODES   FA125_PROC_MODE_RAWWINDOW
 
#define FA125_SUPPORTED_NMODES   1
 

Enumerations

enum  FA125_FIRMWARE_DEBUG_FLAGS {
  FA125_FIRMWARE_DEBUG_WRITE_BUFFER = (1<<0), FA125_FIRMWARE_DEBUG_MCS_FILE = (1<<1), FA125_FIRMWARE_DEBUG_WAIT_FOR_READY = (1<<2), FA125_FIRMWARE_DEBUG_MCS_SKIPPED_LINES = (1<<3),
  FA125_FIRMWARE_DEBUG_VERIFY_ERASE = (1<<4), FA125_FIRMWARE_DEBUG_MEASURE_TIMES = (1<<5)
}
 
enum  FA125_FIRMWARE_ERROR_FLAGS {
  FA125_FIRMWARE_ERROR_ERASE = (1<<0), FA125_FIRMWARE_ERROR_VERIFY_ERASE = (1<<1), FA125_FIRMWARE_ERROR_WRITE = (1<<2), FA125_FIRMWARE_ERROR_PUSH = (1<<3),
  FA125_FIRMWARE_ERROR_PUSH_WAIT = (1<<4), FA125_FIRMWARE_ERROR_VERIFY_WRITE = (1<<5)
}
 
enum  FA125_BLOCKERROR_FLAGS {
  FA125_BLOCKERROR_NO_ERROR = 0, FA125_BLOCKERROR_TERM_ON_WORDCOUNT = 1, FA125_BLOCKERROR_UNKNOWN_BUS_ERROR = 2, FA125_BLOCKERROR_ZERO_WORD_COUNT = 3,
  FA125_BLOCKERROR_DMADONE_ERROR = 4, FA125_BLOCKERROR_NTYPES = 5
}
 

Functions

int fa125Init (UINT32 addr, UINT32 addr_inc, int nadc, int iFlag)
 Initialize the fa125 Library. More...
 
int fa125Status (int id, int pflag)
 Print Status of fADC125 to standard out. More...
 
void fa125GStatus (int pflag)
 Print a summary of all initialized fADC1250s. More...
 
int fa125SetProcMode (int id, int pmode, unsigned int PL, unsigned int PTW, unsigned int NSB, unsigned int NSA, unsigned int NP)
 Configure the processing type/mode. More...
 
int fa125Slot (unsigned int i)
 Convert an index into a slot number, where the index is the element of an array of fA125s in the order in which they were initialized. More...
 
int fa125SetByteSwap (int id, int enable)
 Enable/Disable onboard byteswapping. More...
 
int fa125PowerOff (int id)
 Power Off the fADC125. More...
 
int fa125PowerOn (int id)
 Power On the fADC125. More...
 
int fa125SetOffset (int id, int chan, int dacData)
 Set the DAC offset for a specific fADC125 Channel. More...
 
int fa125SetOffsetFromFile (int id, char *filename)
 Set the DAC offset for a specific fADC125 Channel from a specified file. More...
 
unsigned short fa125ReadOffset (int id, int chan)
 Readback the DAC offset set for a specific fADC125 Channel. More...
 
int fa125ReadOffsetToFile (int id, char *filename)
 Readback the DAC offset set for a specific fADC125 Channel into a specified file. More...
 
int fa125SetThreshold (int id, unsigned short tvalue, unsigned short chan)
 Set the readout threshold for a specific fADC125 Channel. More...
 
int fa125SetChannelDisable (int id, int channel)
 Disable a specific fADC125 Channel. More...
 
int fa125SetChannelDisableMask (int id, unsigned int cmask0, unsigned int cmask1, unsigned int cmask2)
 Disable specific fADC125 Channels using three separate channel masks. More...
 
int fa125SetChannelEnable (int id, int channel)
 Enable a specific fADC125 Channel. More...
 
int fa125SetChannelEnableMask (int id, unsigned int cmask0, unsigned int cmask1, unsigned int cmask2)
 Enable specific fADC125 Channels using three separate channel masks. More...
 
int fa125SetCommonThreshold (int id, unsigned short tvalue)
 Set a common readout threshold for all fADC125 Channels. More...
 
void fa125GSetCommonThreshold (unsigned short tvalue)
 Set a common readout threshold for all fADC125 Channels for all initialized modules. More...
 
int fa125PrintThreshold (int id)
 Print to standarad out the set readout threshold for all fADC125 Channels in the specified module. More...
 
int fa125SetPulserAmplitude (int id, int chan, int dacData)
 Set the output Pulser Amplitude for the specified connector. More...
 
int fa125SetMulThreshold (int id, int dacData)
 Set the multiplicity sum for an internal trigger. More...
 
int fa125PrintTemps (int id)
 Print the temperature of the main board and mezzanine to standard out. More...
 
int fa125SetClockSource (int id, int clksrc)
 Set the clock source for the specified fADC125. More...
 
int fa125SetTriggerSource (int id, int trigsrc)
 Set the trigger source for the specified fADC125. More...
 
int fa125GetTriggerSource (int id)
 Returns the trigger source for the specified fADC125. More...
 
int fa125SetSyncResetSource (int id, int srsrc)
 Set the Sync Reset source for the specified fADC125. More...
 
int fa125Poll (int id)
 Poll the specified fADC125's busy status. More...
 
unsigned int fa125GetBerrCount ()
 Return the Bus Error count that occurred while checking the busy status. More...
 
int fa125Clear (int id)
 Clear used with serial acquisition buffers. Deprecated as this is no longer the way to readout data from the module. More...
 
int fa125Enable (int id)
 Enable buffers and FIFOs for data acquisition. More...
 
int fa125Disable (int id)
 Disable buffers and FIFOs for data acquisition. More...
 
int fa125Reset (int id, int reset)
 Perform the selected Reset to a specific fADC125. More...
 
int fa125ResetCounters (int id)
 Reset all counters (trigger count, clock count, sync reset count, trig2 count) More...
 
int fa125ResetToken (int id)
 Returns the token to the first module This routine only has an effect on the first module of the Multiblock setup. More...
 
int fa125GetTokenMask ()
 Return the slot mask of modules with the token. More...
 
int fa125SetBlocklevel (int id, int blocklevel)
 Set the number of events in the block. More...
 
int fa125SoftTrigger (int id)
 Initiate a software trigger for a specific fADC125 module. More...
 
int fa125SetPulserTriggerDelay (int id, int delay)
 Set the delay between the output pulse and f1TDC trigger. More...
 
int fa125SetPulserWidth (int id, int width)
 Set the width of the output pulse. More...
 
int fa125SoftPulser (int id, int output)
 Trigger the pulser. More...
 
int fa125SetPPG (int id, int fe_chip, unsigned short *sdata, int nsamples)
 Setup fADC125 Progammable Pulse Generator. More...
 
int fa125PPGEnable (int id)
 Enable the programmable pulse generator. More...
 
int fa125PPGDisable (int id)
 Disable the programmable pulse generator. More...
 
int fa125ReadEvent (int id, volatile UINT32 *data, int nwrds, unsigned int rflag)
 General Data readout routine. Deprecated. Replaced with fa125ReadBlock. More...
 
int fa125Bready (int id)
 Return a Block Ready status. More...
 
unsigned int fa125GBready ()
 Return a Block Ready status mask for all initialized fADC125s. More...
 
unsigned int fa125ScanMask ()
 Return the vme slot mask of all initialized fADC125s. More...
 
int fa125ReadBlockStatus (int pflag)
 Return the block error flag and optionally print out the description to standard out. More...
 
int fa125ReadBlock (int id, volatile UINT32 *data, int nwrds, int rflag)
 General Data readout routine. More...
 
void fa125DecodeData (unsigned int data)
 Decode a data word from an fADC125 and print to standard out. More...
 
void fa125FirmwareSetDebug (unsigned int debug)
 Set the debugging flags for diagnosing firmware updating problems. More...
 
int fa125FirmwareGVerifyFull ()
 Verify that the firmware has been written correctly to all initialized fADC125s. More...
 
int fa125FirmwareReadMcsFile (char *filename)
 Read in the firmware from selected MCS file. More...
 
void fa125FirmwarePrintFPGAStats ()
 Prints to standard out, the memory size and location of each FPGA firmware. More...
 
void fa125FirmwarePrintPage (int page)
 Prints the selected firmware page to standard out. More...
 
int fa125FirmwareEraseFull (int id)
 Erase the entire contents of the configuration ROM of the selected fADC125. More...
 
int fa125FirmwareGEraseFull ()
 Erase the entire contents of the configuration ROM for all initialized fADC125s. More...
 
int fa125FirmwareWriteFull (int id)
 Write the contents of the read in MCS file to the selected fADC125 Configuration ROM. More...
 
int fa125FirmwareGWriteFull ()
 Write the contents of the read in MCS file to the Configuration ROM of all initialized fADC125s. More...
 
void fa125FirmwarePrintTimes ()
 Print the time it took for each firmware update step to standard out. debug = FA125_FIRMWARE_DEBUG_MEASURE_TIMES Must be selected prior to update. More...
 
int fa125FirmwareGCheckErrors ()
 Print to standard out the results of the firmware update for each initialized fADC125. More...
 

Variables

const char * fa125_mode_names [FA125_SUPPORTED_NMODES]
 
const char * fa125_blockerror_names [FA125_BLOCKERROR_NTYPES]
 

Macro Definition Documentation

#define FA125_ADR32_BASE_MASK   0x0000FF80

Referenced by fa125GStatus(), and fa125Status().

#define FA125_ADR32_ENABLE   (1<<0)
#define FA125_ADRMB_ENABLE   (1<<0)

Referenced by fa125GStatus(), and fa125Init().

#define FA125_ADRMB_MAX_MASK   0xFF800000

Referenced by fa125GStatus(), and fa125Status().

#define FA125_ADRMB_MIN_MASK   0x0000FF80

Referenced by fa125GStatus(), and fa125Status().

#define FA125_BLOCKCOUNT_MASK   0x000FFFFF

Referenced by fa125GStatus().

#define FA125_BLOCKCSR_BERR_ASSERTED   (1<<3)

Referenced by fa125ReadBlock().

#define FA125_BLOCKCSR_BLOCK_READY   (1<<2)
#define FA125_BLOCKCSR_HAS_TOKEN   (1<<4)

Referenced by fa125GetTokenMask().

#define FA125_BLOCKCSR_PULSE_HARD_RESET   (1<<9)

Referenced by fa125Reset().

#define FA125_BLOCKCSR_PULSE_SOFT_RESET   (1<<8)

Referenced by fa125Reset().

#define FA125_BLOCKCSR_PULSE_SYNC_RESET   (1<<6)
#define FA125_BLOCKCSR_PULSE_TRIGGER   (1<<7)
#define FA125_BLOCKCSR_TAKE_TOKEN   (1<<5)

Referenced by fa125ResetToken().

#define FA125_BUSYLEVEL_FORCE_BUSY   (1<<31)
#define FA125_BUSYLEVEL_MASK   0x000FFFFF
#define FA125_CLOCK_INTERNAL   (3)
#define FA125_CLOCK_INTERNAL_ENABLE   (2)

Referenced by fa125GStatus().

#define FA125_CLOCK_MASK   0xF

Referenced by fa125GStatus().

#define FA125_CLOCK_P0   (1)
#define FA125_CLOCK_P2   (0)
#define FA125_CONFIGADRDATA_BYTEADR_MASK   0x0003FF00
#define FA125_CONFIGADRDATA_DATA_MASK   0x000000FF
#define FA125_CONFIGADRDATA_EXEC   (1<<31)
#define FA125_CONFIGADRDATA_PAGEADR_MASK   0x7FFC0000
#define FA125_CONFIGCSR_BUSY   (1<<8)
#define FA125_CONFIGCSR_DATAREAD_MASK   0x000000FF
#define FA125_CONFIGCSR_OPCODE_MASK   0x07000000
#define FA125_CONFIGCSR_PROG_ENABLE   (1<<31)
#define FA125_CTRL1_ENABLE_BERR   (1<<2)
#define FA125_CTRL1_ENABLE_MULTIBLOCK   (1<<3)
#define FA125_CTRL1_FIRST_BOARD   (1<<4)
#define FA125_CTRL1_LAST_BOARD   (1<<5)
#define FA125_DACCTL_ADACSI_MASK   (1<<2)
#define FA125_DACCTL_BDACSI_MASK   (1<<3)
#define FA125_DACCTL_DACCS_MASK   (1<<0)
#define FA125_DACCTL_DACSCLK_MASK   (1<<1)
#define FA125_DATA_BLKNUM_MASK   0x0000003f

Referenced by fa125ReadBlock().

#define FA125_DATA_BLOCK_HEADER   0x00000000

Referenced by fa125ReadBlock().

#define FA125_DATA_BLOCK_TRAILER   0x08000000

Referenced by fa125ReadBlock().

#define FA125_DATA_CHANNEL_MASK   0xFC00
#define FA125_DATA_END   0xFE00

Referenced by fa125ReadEvent().

#define FA125_DATA_FORMAT0   (0<<13)

Referenced by fa125ReadEvent().

#define FA125_DATA_FORMAT1   (1<<13)
#define FA125_DATA_FORMAT5   (5<<13)
#define FA125_DATA_FORMAT_MASK   0xE000
#define FA125_DATA_OVERFLOW_MASK   0x8000
#define FA125_DATA_RAW_MASK   0x3FFFF
#define FA125_DATA_TYPE_DEFINE   0x80000000

Referenced by fa125ReadBlock().

#define FA125_DATA_TYPE_MASK   0x78000000

Referenced by fa125ReadBlock().

#define FA125_DEFAULT_NP   3

Referenced by fa125SetProcMode().

#define FA125_DEFAULT_NSA   10

Referenced by fa125SetProcMode().

#define FA125_DEFAULT_NSB   5

Referenced by fa125SetProcMode().

#define FA125_DEFAULT_PL   50

Referenced by fa125SetProcMode().

#define FA125_DEFAULT_PTW   50

Referenced by fa125SetProcMode().

#define FA125_DUMMY_DATA   0xf800fafa

Referenced by fa125ReadBlock().

#define FA125_EVNUM_MASK   0x07F0
#define FA125_FE_CONFIG1_ENABLE   (1<<3)
#define FA125_FE_CONFIG1_MASK   0x000000FF
#define FA125_FE_CONFIG1_MODE_MASK   0x00000007

Referenced by fa125GStatus(), and fa125Status().

#define FA125_FE_CONFIG1_NPULSES_MASK   0x00000060

Referenced by fa125GStatus(), and fa125Status().

#define FA125_FE_CONFIG1_PLAYBACK_ENABLE   (1<<7)
#define FA125_FE_CONFIG2_CH_MASK   0x0000003F
#define FA125_FE_NSA_MASK   0x00003FFF
#define FA125_FE_NSB_MASK   0x00001FFF
#define FA125_FE_PL_MASK   0x0000FFFF
#define FA125_FE_PTW_LAST_ADR_MASK   0x00000FFF
#define FA125_FE_PTW_MASK   0x000000FF
#define FA125_FE_PTW_MAX_BUF_MASK   0x000000FF
#define FA125_FE_SUPPORTED_FIRMWARE   0x00010201

Referenced by fa125Init().

#define FA125_FE_TEST_COLLECT_ON   (1<<1)

Referenced by fa125Disable(), and fa125Enable().

#define FA125_FE_TEST_SYNCRESET_ENABLE   (1<<2)

Referenced by fa125SetSyncResetSource().

#define FA125_FE_TEST_WAVEFORM_OVERFLOW   (1<<12)
#define FA125_FE_TEST_WAVEFORM_PPG_DATA_MASK   0x00000FFF

Referenced by fa125SetPPG().

#define FA125_FE_TEST_WAVEFORM_WRITE_PPG_DATA   (1<<15)

Referenced by fa125SetPPG().

#define FA125_FE_THRESHOLD_MASK   0x00000FFF

Referenced by fa125SetThreshold().

#define FA125_FE_TRIG_COUNT_MASK   0x0000FFFF
#define FA125_FIRMWARE_MAX_BYTE_PER_PAGE   528

Referenced by fa125FirmwarePrintPage().

#define FA125_FIRMWARE_MAX_PAGES   8*1024
#define FA125_ID   0xADC12500

Referenced by fa125Init().

#define FA125_INIT_INT_CLKSRC   (1<<5)
#define FA125_INIT_INT_SUM_TRIG   (1<<2)
#define FA125_INIT_INT_TIMER_TRIG   (1<<1)
#define FA125_INIT_P2_CLKSRC   (0<<4)
#define FA125_INIT_P2_TRIG   ((1<<1) | (1<<2))
#define FA125_INIT_SKIP   (1<<16)

Referenced by fa125Init().

#define FA125_INIT_SKIP_FIRMWARE_CHECK   (1<<18)

Referenced by fa125Init().

#define FA125_INIT_USE_ADDRLIST   (1<<17)

Referenced by fa125Init().

#define FA125_INIT_VXS_CLKSRC   (1<<4)
#define FA125_INIT_VXS_TRIG   (0<<1)
#define FA125_MAIN_SUPPORTED_FIRMWARE   0x00010201

Referenced by fa125Init().

#define FA125_MAX_A32_MEM   0x800000 /* 8 Meg */

Referenced by fa125Init().

#define FA125_MAX_A32MB_SIZE   0x800000 /* 8 MB */

Referenced by fa125Init().

#define FA125_MAX_BOARDS   20
#define FA125_MAX_DATA_PER_CHANNEL   8

Referenced by fa125ReadBlock().

#define FA125_MAX_NP   3
#define FA125_MAX_NSA   500

Referenced by fa125SetProcMode().

#define FA125_MAX_NSB   500

Referenced by fa125SetProcMode().

#define FA125_MAX_PL   1000

Referenced by fa125SetProcMode().

#define FA125_MAX_PTW   512

Referenced by fa125SetProcMode().

#define FA125_OPCODE_BUFFER_PUSH   3
#define FA125_OPCODE_BUFFER_READ   2
#define FA125_OPCODE_BUFFER_WRITE   0
#define FA125_OPCODE_ERASE   4
#define FA125_OPCODE_MAIN_READ   1
#define FA125_PAD_WORD   0xF1EA

Referenced by fa125ReadEvent().

#define FA125_PPG_MAX_SAMPLES   32*6

Referenced by fa125SetPPG().

#define FA125_PROC_BLOCKLEVEL_MASK   0x0000FFFF

Referenced by fa125GStatus().

#define FA125_PROC_CLOCK125COUNT_MASK   0xFFFFFFFF
#define FA125_PROC_CLOCK125COUNT_RESET   0

Referenced by fa125ResetCounters().

#define FA125_PROC_CSR_BUSY   (1<<0)

Referenced by fa125Poll().

#define FA125_PROC_CSR_CLEAR   (1<<1)

Referenced by fa125Clear().

#define FA125_PROC_CSR_RESET   (1<<2)
#define FA125_PROC_CTRL2_SYNCRESET_P0   (0<<2)
#define FA125_PROC_CTRL2_SYNCRESET_SOURCE_MASK   0xC
#define FA125_PROC_CTRL2_SYNCRESET_VME   (2<<2)
#define FA125_PROC_CTRL2_TRIGGER_ENABLE   (1<<0)
#define FA125_PROC_EVCOUNT_MASK   0x00FFFFFF

Referenced by fa125ReadBlock().

#define FA125_PROC_MODE_RAWWINDOW   1

Referenced by fa125SetProcMode().

#define FA125_PROC_PULSER_CONTROL_DELAYED_TRIGGER   (1<<1)

Referenced by fa125SoftPulser().

#define FA125_PROC_PULSER_CONTROL_PULSE   (1<<0)

Referenced by fa125SoftPulser().

#define FA125_PROC_PULSER_TRIG_DELAY_MASK   0x00000FFF
#define FA125_PROC_PULSER_WIDTH_MASK   0x00FFF000

Referenced by fa125SetPulserWidth().

#define FA125_PROC_SUPPORTED_FIRMWARE   0x00010201

Referenced by fa125Init().

#define FA125_PROC_SYNCCOUNT_MASK   0xFFFFFFFF
#define FA125_PROC_SYNCCOUNT_RESET   0

Referenced by fa125ResetCounters().

#define FA125_PROC_TRIG2COUNT_MASK   0xFFFFFFFF
#define FA125_PROC_TRIG2COUNT_RESET   0

Referenced by fa125ResetCounters().

#define FA125_PROC_TRIGCOUNT_MASK   0x7FFFFFFF
#define FA125_PROC_TRIGCOUNT_RESET   (1<<31)

Referenced by fa125ResetCounters().

#define FA125_PWRCTL_KEY_ON   0x3000ABCD

Referenced by fa125PowerOn().

#define FA125_SLOT_GA_MASK   0x0000001F
#define FA125_STATUS_SHOWREGS   (1<<0)

Referenced by fa125Status().

#define FA125_SUPPORTED_MODES   FA125_PROC_MODE_RAWWINDOW

Referenced by fa125SetProcMode().

#define FA125_SUPPORTED_NMODES   1

Referenced by fa125SetProcMode().

#define FA125_TRIGSRC_TRIGGER_INTERNAL_SUM   (1<<1)
#define FA125_TRIGSRC_TRIGGER_MASK   0x00000003

Referenced by fa125GStatus(), and fa125Status().

#define FA125_TRIGSRC_TRIGGER_P0   (0<<0)
#define FA125_TRIGSRC_TRIGGER_P2   ((1<<1)|(1<<0))
#define FA125_TRIGSRC_TRIGGER_SOFTWARE   (1<<0)

Referenced by fa125SetTriggerSource().

Enumeration Type Documentation

Enumerator
FA125_BLOCKERROR_NO_ERROR 
FA125_BLOCKERROR_TERM_ON_WORDCOUNT 
FA125_BLOCKERROR_UNKNOWN_BUS_ERROR 
FA125_BLOCKERROR_ZERO_WORD_COUNT 
FA125_BLOCKERROR_DMADONE_ERROR 
FA125_BLOCKERROR_NTYPES 
Enumerator
FA125_FIRMWARE_DEBUG_WRITE_BUFFER 
FA125_FIRMWARE_DEBUG_MCS_FILE 
FA125_FIRMWARE_DEBUG_WAIT_FOR_READY 
FA125_FIRMWARE_DEBUG_MCS_SKIPPED_LINES 
FA125_FIRMWARE_DEBUG_VERIFY_ERASE 
FA125_FIRMWARE_DEBUG_MEASURE_TIMES 
Enumerator
FA125_FIRMWARE_ERROR_ERASE 
FA125_FIRMWARE_ERROR_VERIFY_ERASE 
FA125_FIRMWARE_ERROR_WRITE 
FA125_FIRMWARE_ERROR_PUSH 
FA125_FIRMWARE_ERROR_PUSH_WAIT 
FA125_FIRMWARE_ERROR_VERIFY_WRITE 

Variable Documentation

const char* fa125_blockerror_names[FA125_BLOCKERROR_NTYPES]
const char* fa125_mode_names[FA125_SUPPORTED_NMODES]

Referenced by fa125Status().