JLab fADC250-V2 Library  0x42
fadcLib.h File Reference

Go to the source code of this file.

Data Structures

struct  FA250_STATE_REGS
 
struct  fadc_struct
 
struct  fadc_data_struct
 
struct  fadc_sdc_struct
 
struct  faUpdateWatcherArgs_struct
 

Macros

#define FA_BOARD_ID   0xfadc0000
 
#define FA_MAX_BOARDS   20
 
#define FA_MAX_ADC_CHANNELS   16
 
#define FA_MAX_DATA_PER_CHANNEL   251
 
#define FA_MAX_A32_MEM   0x800000 /* 8 Meg */
 
#define FA_MAX_A32MB_SIZE   0x800000 /* 8 MB */
 
#define FA_VME_INT_LEVEL   3
 
#define FA_VME_INT_VEC   0xFA
 
#define FA_SUPPORTED_CTRL_FIRMWARE   0x42,0x82
 
#define FA_SUPPORTED_CTRL_FIRMWARE_NUMBER   2
 
#define FA_SUPPORTED_PROC_FIRMWARE   0xC0D
 
#define FA_SUPPORTED_PROC_FIRMWARE_NUMBER   1
 
#define FA_CSR_EVENT_AVAILABLE   0x1
 
#define FA_CSR_BLOCK_LEVEL_FLAG   0x2
 
#define FA_CSR_BLOCK_READY   0x4
 
#define FA_CSR_BERR_STATUS   0x8
 
#define FA_CSR_TOKEN_STATUS   0x10
 
#define FA_CSR_FIFO1_EMPTY   0x800
 
#define FA_CSR_FIFO1_ALMOST_EMPTY   0x1000
 
#define FA_CSR_FIFO1_HALF_FULL   0x2000
 
#define FA_CSR_FIFO1_ALMOST_FULL   0x4000
 
#define FA_CSR_FIFO1_FULL   0x8000
 
#define FA_CSR_PROC_FPGA_HIGH_TEMP   0x10000
 
#define FA_CSR_CTRL_FPGA_HIGH_TEMP   0x20000
 
#define FA_CSR_SOFT_PULSE_TRIG2   0x100000
 
#define FA_CSR_SOFT_CLEAR   0x200000
 
#define FA_CSR_DATA_STREAM_SCALERS   0x400000
 
#define FA_CSR_FORCE_EOB_INSERT   0x800000
 
#define FA_CSR_FORCE_EOB_SUCCESS   0x1000000
 
#define FA_CSR_FORCE_EOB_FAILED   0x2000000
 
#define FA_CSR_ERROR_MASK   0x0e030000
 
#define FA_CSR_ERROR_CLEAR   0x08000000
 
#define FA_CSR_SYNC   0x10000000
 
#define FA_CSR_TRIGGER   0x20000000
 
#define FA_CSR_SOFT_RESET   0x40000000
 
#define FA_CSR_HARD_RESET   0x80000000
 
#define FA_SOURCE_INT   0x00
 
#define FA_SOURCE_SDC   0x10
 
#define FA_SOURCE_VXS   0x20
 
#define FA_SOURCE_MASK   0x30
 
#define FA_CTRL_GO   0x1
 
#define FA_CTRL_ENABLE_TRIG   0x2
 
#define FA_CTRL_ENABLE_SRESET   0x4
 
#define FA_CTRL_ENABLE_INT_TRIG   0x8
 
#define FA_CTRL_ENABLE_MASK   0x7
 
#define FA_CTRL_ENABLED   0x7
 
#define FA_REF_CLK_INTERNAL   0x0
 
#define FA_REF_CLK_FP   0x1
 
#define FA_REF_CLK_P0   0x2
 
#define FA_REF_CLK_MASK   0x3
 
#define FA_ENABLE_INTERNAL_CLK   0x8
 
#define FA_CTRL1_SUPPRESS_TT   (1<<16)
 
#define FA_CTRL1_SUPPRESS_TT2   (1<<17)
 
#define FA_CTRL1_DATAFORMAT_MASK   0x0C000000
 
#define FA_CTRL1_DATAFORMAT_STD   0
 
#define FA_CTRL1_DATAFORMAT_INTERM_SUPPRESS   1
 
#define FA_CTRL1_DATAFORMAT_FULL_SUPPRESS   2
 
#define FA_TRIG_FP   0x00
 
#define FA_TRIG_FP_ISYNC   0x10
 
#define FA_TRIG_P0   0x20
 
#define FA_TRIG_P0_ISYNC   0x30
 
#define FA_TRIG_VME_PLAYBACK   0x50
 
#define FA_TRIG_VME   0x60
 
#define FA_TRIG_INTERNAL   0x70
 
#define FA_TRIG_MASK   0x70
 
#define FA_ENABLE_SOFT_TRIG   0x80
 
#define FA_SRESET_FP   0x000
 
#define FA_SRESET_FP_ISYNC   0x100
 
#define FA_SRESET_P0   0x200
 
#define FA_SRESET_P0_ISYNC   0x300
 
#define FA_SRESET_VME   0x600
 
#define FA_SRESET_NONE   0x700
 
#define FA_SRESET_MASK   0x700
 
#define FA_ENABLE_SOFT_SRESET   0x800
 
#define FA_ENABLE_LIVE_TRIG_OUT   0x1000
 
#define FA_ENABLE_TRIG_OUT_FP   0x2000
 
#define FA_ENABLE_TRIG_OUT_P0   0x4000
 
#define FA_TRIGOUT_MASK   0x7000
 
#define FA_ENABLE_BLKLVL_INT   0x40000
 
#define FA_ENABLE_BERR   0x100000
 
#define FA_ENABLE_MULTIBLOCK   0x200000
 
#define FA_FIRST_BOARD   0x400000
 
#define FA_LAST_BOARD   0x800000
 
#define FA_ENABLE_DEBUG   0x2000000
 
#define FA_MB_TOKEN_VIA_P0   0x10000000
 
#define FA_MB_TOKEN_VIA_P2   0x20000000
 
#define FA_ENABLE_ADC_PARAMETERS_DATA   0x8000
 
#define FA_SUPPRESS_TRIGGER_TIME_DATA   0x10000
 
#define FA_SUPPRESS_TRIGGER_TIME_WORD2_DATA   0x20000
 
#define FA_GO   0x1
 
#define FA_ENABLE_EXT_TRIGGER   0x2
 
#define FA_ENABLE_EXT_SRESET   0x4
 
#define FA_ENABLE_INT_TRIGGER   0x8
 
#define FA_ENABLE_STREAM_MODE   0x10
 
#define FA_DEBUG_XFER_INFIFO_BFIFO   0x1000
 
#define FA_DEBUG_XFER_BFIFO_OFIFO   0x2000
 
#define FA_RESET_CNTL_FPGA   0x1
 
#define FA_RESET_ADC_FPGA1   0x2
 
#define FA_RESET_ADC_FIFO1   0x100
 
#define FA_RESET_DAC   0x800
 
#define FA_RESET_EXT_RAM_PT   0x1000
 
#define FA_RESET_TOKEN   0x10000
 
#define FA_RESET_ALL   0xFFFF
 
#define FA_TRIG_SCAL_RESET   (1<<31)
 
#define FA_TRIGCTL_TRIGSTOP_EN   (1<<31)
 
#define FA_TRIGCTL_MAX2_MASK   0x00FF0000
 
#define FA_TRIGCTL_BUSY_EN   (1<<15)
 
#define FA_TRIGCTL_MAX1_MASK   0x000000FF
 
#define FA_TRIG21_DELAY_MASK   0x00000FFF
 
#define FA_RELEASE_MGT_RESET   0x0
 
#define FA_MGT_RESET   0x1
 
#define FA_MGT_FRONT_END_TO_CTP   0x2
 
#define FA_MGT_ENABLE_DATA_ALIGNMENT   0x4
 
#define FA_MGT_HITBITS_TO_CTP   0x8
 
#define FA_INT_ACTIVE   0x1000000
 
#define FA_INT_IACKSTAT_WAIT   0x2000000
 
#define FA_INT_IACKSTAT_ONBT   0x4000000
 
#define FA_RAM_DATA_MASK   0x000fffff
 
#define FA_RAM_FULL   0x00100000
 
#define FA_RAM_EMPTY   0x00200000
 
#define FA_RAM_ADR_INCREMENT   0x00100000
 
#define FA_VERSION_MASK   0x000000ff
 
#define FA_BOARD_MASK   0xffff0000
 
#define FA_CSR_MASK   0x0fffffff
 
#define FA_CONTROL_MASK   0xffffffff
 
#define FA_CONTROL2_MASK   0xc000303f
 
#define FA_EVENT_COUNT_MASK   0xffffff
 
#define FA_BLOCK_COUNT_MASK   0xfffff
 
#define FA_BLOCK_LEVEL_MASK   0xffff
 
#define FA_INT_ENABLE_MASK   0xc0000
 
#define FA_INT_VEC_MASK   0xff
 
#define FA_INT_LEVEL_MASK   0x700
 
#define FA_SLOT_ID_MASK   0x1f0000
 
#define FA_DAC_VALUE_MASK   0x0fff
 
#define FA_DAC_WRITE_TIMEOUT_ERROR   (1<<15)
 
#define FA_REF_CLK_SEL_MASK   0x7
 
#define FA_TRIG_SEL_MASK   0x70
 
#define FA_SRESET_SEL_MASK   0x700
 
#define FA_BUSY_LEVEL_MASK   0xfffff
 
#define FA_FORCE_BUSY   0x80000000
 
#define FA_A32_ENABLE   0x1
 
#define FA_AMB_ENABLE   0x1
 
#define FA_A32_ADDR_MASK   0xff80 /* 8 MB chunks */
 
#define FA_AMB_MIN_MASK   0xff80
 
#define FA_AMB_MAX_MASK   0xff800000
 
#define FA_SADR_AUTO_INCREMENT   0x10000
 
#define FA_PPG_WRITE_VALUE   0x8000
 
#define FA_PPG_SAMPLE_MASK   0x1fff
 
#define FA_PPG_MAX_SAMPLES   512
 
#define FA_PPG_ENABLE   0x80
 
#define FA_SYSMON_CTRL_TEMP_MASK   0x3FF
 
#define FA_SYSMON_FPGA_CORE_V_MASK   0x001FF800
 
#define FA_SYSMON_FPGA_AUX_V_MASK   0xFFC00000
 
#define FA_MGT_GTX1_LANE1_UP   0x1
 
#define FA_MGT_GTX1_LANE2_UP   0x2
 
#define FA_MGT_GTX1_CHANNEL_UP   0x4
 
#define FA_MGT_GTX1_HARD_ERROR   0x8
 
#define FA_MGT_GTX1_SOFT_ERROR   0x10
 
#define FA_MGT_GTX2_LANE1_UP   0x20
 
#define FA_MGT_GTX2_LANE2_UP   0x40
 
#define FA_MGT_GTX2_CHANNEL_UP   0x80
 
#define FA_MGT_GTX2_HARD_ERROR   0x100
 
#define FA_MGT_GTX2_SOFT_ERROR   0x200
 
#define FA_MGT_SUM_DATA_VALID   0x400
 
#define FA_MGT_RESET_ASSERTED   0x800
 
#define FA_STATUS3_PROC_TEMP_MASK   0xFFFF
 
#define FA_ADC_NS_PER_CLK   4
 
#define FA_MAX_PROC_MODE   10
 
#define FA_ADC_PROC_MASK   (1<<8)
 
#define FA_ADC_PROC_ENABLE   0x8
 
#define FA_ADC_PROC_MODE_RAW_WINDOW   1
 
#define FA_ADC_PROC_MODE_PULSE_RAW   2
 
#define FA_ADC_PROC_MODE_PULSE_INTEGRAL   3
 
#define FA_ADC_PROC_MODE_HIGH_REZ_TIME   4
 
#define FA_ADC_PROC_MODE_HIGH_REZ_TIME_INTEGRAL   7
 
#define FA_ADC_PROC_MODE_DEBUG_HI_REZ_TIME   8
 
#define FA_ADC_PROC_MODE_PULSE_PARAM   9
 
#define FA_ADC_PROC_MODE_RAW_PULSE_PARAM   10
 
#define FA_SUPPORTED_MODES   9,10
 
#define FA_SUPPORTED_NMODES   2
 
#define FA_ADC_CONFIG0_CHAN_MASK   0x0F00
 
#define FA_ADC_CONFIG0_CHAN_READ_ENABLE   (1<<12)
 
#define FA_ADC_STATUS1_TRIG_RCV_DONE   (1<<15)
 
#define FA_ADC_STATUS1_TRIGNUM_MASK   0x0FFF
 
#define FA_ADC_STATUS2_CHAN_DATA_MASK   0x0FFF
 
#define FA_ADC_CONFIG1_NSAT_MASK   0x0C00
 
#define FA_ADC_CONFIG1_TNSAT_MASK   0x3000
 
#define FA_ADC_CONFIG3_TPT_MASK   0x0FFF
 
#define FA_ADC_CONFIG6_MNPED_MASK   0x00003C00
 
#define FA_ADC_CONFIG6_PMAXPED_MASK   0x000003FF
 
#define FA_ADC_CONFIG7_NPED_MASK   0x00003C00
 
#define FA_ADC_CONFIG7_MAXPED_MASK   0x000003FF
 
#define FA_ADC_VERSION_MASK   0x7fff
 
#define FA_ADC_PLAYBACK_MODE   0x0080
 
#define FA_ADC_PEAK_MASK   0x0070
 
#define FA_ADC_CHAN_MASK   0xffff
 
#define FA_ADC_DEFAULT_PL   50
 
#define FA_ADC_DEFAULT_PTW   50
 
#define FA_ADC_DEFAULT_NSB   5
 
#define FA_ADC_DEFAULT_NSA   10
 
#define FA_ADC_DEFAULT_NP   1
 
#define FA_ADC_DEFAULT_THRESH   0
 
#define FA_ADC_DEFAULT_NPED   4
 
#define FA_ADC_DEFAULT_MAXPED   1
 
#define FA_ADC_DEFAULT_NSAT   1
 
#define FA_ADC_DEFAULT_MNPED   4
 
#define FA_ADC_DEFAULT_TNSA   10
 
#define FA_ADC_DEFAULT_TNSAT   1
 
#define FA_ADC_DEFAULT_TPT   0
 
#define FA_ADC_MAX_PL   1024
 
#define FA_ADC_MAX_PTW   512
 
#define FA_ADC_MAX_NSB   7
 
#define FA_ADC_MAX_NSA   511
 
#define FA_ADC_MAX_NP   4
 
#define FA_ADC_MAX_THRESH   0xfff
 
#define FA_ADC_MAX_NPED   15
 
#define FA_ADC_MAX_MAXPED   1023
 
#define FA_ADC_MAX_NSAT   4
 
#define FA_ADC_MAX_MNPED   15
 
#define FA_ADC_MAX_TNSA   63
 
#define FA_ADC_MAX_TNSAT   4
 
#define FA_ADC_MAX_TPT   4095
 
#define FA_ADC_MIN_PL   0
 
#define FA_ADC_MIN_PTW   6
 
#define FA_ADC_MIN_NSB   -3
 
#define FA_ADC_MIN_NSA   2
 
#define FA_ADC_MIN_NP   1
 
#define FA_ADC_MIN_THRESH   0
 
#define FA_ADC_MIN_NPED   4
 
#define FA_ADC_MIN_MAXPED   0
 
#define FA_ADC_MIN_NSAT   1
 
#define FA_ADC_MIN_MNPED   4
 
#define FA_ADC_MIN_TNSA   2
 
#define FA_ADC_MIN_TNSAT   2
 
#define FA_ADC_MIN_TPT   0
 
#define FA_ADC_NSB_READBACK_MASK   0x0000000F
 
#define FA_ADC_NSB_NEGATIVE   (1<<3)
 
#define FA_ADC_NSA_READBACK_MASK   0x000001FF
 
#define FA_ADC_TNSA_MASK   0x00007E00
 
#define FA_ADC_TPT_MASK   0xFFF
 
#define FA_ADC_PEDESTAL_MASK   0xffff
 
#define FA_ITRIG_VERSION_MASK   0x1fff
 
#define FA_ITRIG_CONFIG_MASK   0x001F
 
#define FA_ITRIG_ENABLE_MASK   0x0010
 
#define FA_ITRIG_P2OUT_MASK   0x0008
 
#define FA_ITRIG_MODE_MASK   0x0007
 
#define FA_ITRIG_TABLE_MODE   0
 
#define FA_ITRIG_COIN_MODE   1
 
#define FA_ITRIG_WINDOW_MODE   2
 
#define FA_ITRIG_UNDEF_MODE   3
 
#define FA_ITRIG_SUM_MODE   4
 
#define FA_ITRIG_DISABLED   0x0010
 
#define FA_ITRIG_HB_P2OUT   0x0008
 
#define FA_ITRIG_OUT_MASK   0x0000f000 /* Bits from ctrl1 register */
 
#define FA_ITRIG_OUT_FP   0x00003000
 
#define FA_ITRIG_MIN_WIDTH   0x01 /* 4 nsec */
 
#define FA_ITRIG_MAX_WIDTH   0x100 /* 1.024 microsec */
 
#define FA_ITRIG_MAX_DELAY   0xf00 /* 15.360 microsec */
 
#define FA_ITRIG_WINDOW_MAX_WIDTH   0x200 /* 2.048 microsec */
 
#define FA_ITRIG_MAX_HB_WIDTH   0xff /* 1020 ns */
 
#define FA_ITRIG_MAX_HB_DELAY   0xf /* 60 ns */
 
#define FA_ITRIG_HB_INFO_MASK   0xffff
 
#define FA_ITRIG_HB_WIDTH_MASK   0x00ff
 
#define FA_ITRIG_HB_DELAY_MASK   0x1f00
 
#define FA_STATE_LEVEL_CAPTURE_MASK   0x000000FF
 
#define FA_STATE_CSR_ARM_BUFFER   (1<<31)
 
#define FA_STATE_CSR_BUFFER_FULL   (1<<27)
 
#define FA_STATE_CSR_BUFFER_EMPTY   (1<<26)
 
#define FA_STATE_CSR_BUFFER_WORDS_MASK   0x000000FF
 
#define FA_STATE_VALUE_MASK   0x0000FFFF
 
#define FA_DATA_TYPE_DEFINE   0x80000000
 
#define FA_DATA_TYPE_MASK   0x78000000
 
#define FA_DATA_SLOT_MASK   0x07c00000
 
#define FA_DATA_BLOCK_HEADER   0x00000000
 
#define FA_DATA_BLOCK_TRAILER   0x08000000
 
#define FA_DATA_EVENT_HEADER   0x10000000
 
#define FA_DATA_TRIGGER_TIME   0x18000000
 
#define FA_DATA_WINDOW_RAW   0x20000000
 
#define FA_DATA_WINDOW_SUM   0x28000000
 
#define FA_DATA_PULSE_RAW   0x30000000
 
#define FA_DATA_PULSE_INTEGRAL   0x38000000
 
#define FA_DATA_PULSE_TIME   0x40000000
 
#define FA_DATA_STREAM   0x48000000
 
#define FA_DATA_INVALID   0x70000000
 
#define FA_DATA_FILLER   0x78000000
 
#define FA_DUMMY_DATA   0xf800fafa
 
#define FA_DATA_BLKNUM_MASK   0x0000003f
 
#define FA_DATA_WRDCNT_MASK   0x003fffff
 
#define FA_DATA_TRIGNUM_MASK   0x07ffffff
 
#define FA_PROMREG1_SRAM_TO_PROM1   0x0
 
#define FA_PROMREG1_SRAM_TO_PROM2   0x1
 
#define FA_PROMREG1_PROM1_TO_SRAM   0x3
 
#define FA_PROMREG1_PROM2_TO_SRAM   0x4
 
#define FA_PROMREG1_GET_ID1   0x6
 
#define FA_PROMREG1_GET_ID2   0x7
 
#define FA_PROMREG1_ERASE_PROM1   0x9
 
#define FA_PROMREG1_ERASE_PROM2   0xA
 
#define FA_PROMREG1_REBOOT_FPGA1   0xC
 
#define FA_PROMREG1_REBOOT_FPGA2   0xD
 
#define FA_PROMREG1_READY   (1<<31)
 
#define FA_MEM_ADR_INCR_MEM1   (1<<31)
 
#define FA_MEM_ADR_INCR_MEM2   (1<<30)
 
#define FA_SCALER_CTRL_ENABLE   (1<<0)
 
#define FA_SCALER_CTRL_LATCH   (1<<1)
 
#define FA_SCALER_CTRL_RESET   (1<<2)
 
#define FA_SCALER_CTRL_MASK   (0x7)
 
#define FA_SCALER_INTERVAL_MASK   0x0000FFFF
 
#define FA_SUM_THRESHOLD_DREADY   (1<<31)
 
#define FA_SUM_THRESHOLD_MASK   0x0000FFFF
 
#define FA_SUM_DATA_ARM_HISTORY_BUFFER   (1<<31)
 
#define FA_SUM_DATA_SAMPLE_MASK   0x0000FFFF
 
#define FA_SERIAL_NUMBER_ACDI   0x41434449
 
#define FA_SERIAL_NUMBER_ADV_ASSEM_MASK   0xFF000000
 
#define FA_SERIAL_NUMBER_ADV_ASSEM   0x42000000
 
#define FA_SERIAL_NUMBER_ACDI_BOARDID_MASK   0x0000FFFF
 
#define FA_SERIAL_NUMBER_ADV_MNFID1   0x42323135
 
#define FA_SERIAL_NUMBER_ADV_MNFID2_MASK   0xFFFF0000
 
#define FA_SERIAL_NUMBER_ADV_MNFID2   0x39350000
 
#define FA_SERIAL_NUMBER_ADV_BOARDID2_MASK   0x000000FF
 
#define FA_SDC_BOARD_ID   0x0200
 
#define FA_SDC_BOARD_MASK   0xfffe
 
#define FA_SDC_ADR_MASK   0xffc0
 
#define FASDC_BUSY_MASK   0x00ff
 
#define FASDC_CSR_BUSY   0x1
 
#define FASDC_CSR_TRIG   0x20
 
#define FASDC_CSR_SRESET   0x40
 
#define FASDC_CSR_INIT   0x80
 
#define FASDC_CSR_MASK   0x00e1
 
#define FASDC_CTRL_CLK_EXT   0x1
 
#define FASDC_CTRL_NOSYNC_TRIG   0x10
 
#define FASDC_CTRL_ENABLE_SOFT_TRIG   0x20
 
#define FASDC_CTRL_NOSYNC_SRESET   0x100
 
#define FASDC_CTRL_ENABLE_SOFT_SRESET   0x200
 
#define FASDC_CTRL_ASSERT_SOFT_BUSY   0x8000
 
#define FASDC_CTRL_MASK   0x8331
 
#define FADC_FIRMWARE_LX110   0
 
#define FADC_FIRMWARE_FX70T   1
 
#define FA_CTRL1_SYSTEM_TEST_MODE   (1<<31)
 
#define FA_TESTBIT_TRIGOUT   (1<<0)
 
#define FA_TESTBIT_BUSYOUT   (1<<1)
 
#define FA_TESTBIT_SDLINKOUT   (1<<2)
 
#define FA_TESTBIT_TOKENOUT   (1<<3)
 
#define FA_TESTBIT_STATBITB   (1<<8)
 
#define FA_TESTBIT_TOKENIN   (1<<9)
 
#define FA_TESTBIT_CLOCK250_STATUS   (1<<15)
 
#define FA_CLOCK250COUNT_RESET   (0<<0)
 
#define FA_CLOCK250COUNT_START   (1<<0)
 
#define FA_SYNCP0COUNT_RESET   (0<<0)
 
#define FA_TRIG1P0COUNT_RESET   (0<<0)
 
#define FA_TRIG2P0COUNT_RESET   (0<<0)
 
#define FA_INIT_SOFT_SYNCRESET   (0<<0)
 
#define FA_INIT_EXT_SYNCRESET   (1<<0)
 
#define FA_INIT_SOFT_TRIG   (0<<1)
 
#define FA_INIT_FP_TRIG   (1<<1)
 
#define FA_INIT_VXS_TRIG   (2<<1)
 
#define FA_INIT_INT_TRIG   (4<<1)
 
#define FA_INIT_INT_CLKSRC   (0<<4)
 
#define FA_INIT_FP_CLKSRC   (1<<4)
 
#define FA_INIT_VXS_CLKSRC   (2<<4)
 
#define FA_INIT_P2_CLKSRC   ((1<<4) | (2<<4))
 
#define FA_INIT_SKIP   (1<<16)
 
#define FA_INIT_USE_ADDRLIST   (1<<17)
 
#define FA_INIT_SKIP_FIRMWARE_CHECK   (1<<18)
 
#define FA_BLOCKERROR_NO_ERROR   0
 
#define FA_BLOCKERROR_TERM_ON_WORDCOUNT   1
 
#define FA_BLOCKERROR_UNKNOWN_BUS_ERROR   2
 
#define FA_BLOCKERROR_ZERO_WORD_COUNT   3
 
#define FA_BLOCKERROR_DMADONE_ERROR   4
 
#define FA_BLOCKERROR_NTYPES   5
 

Typedefs

typedef struct faUpdateWatcherArgs_struct faUpdateWatcherArgs_t
 

Enumerations

enum  faArgs_enum {
  FA_ARGS_SHOW_ID, FA_ARGS_SHOW_PROGRESS, FA_ARGS_SHOW_DONE, FA_ARGS_SHOW_STRING,
  FA_ARGS_LAST
}
 

Functions

STATUS faInit (UINT32 addr, UINT32 addr_inc, int nadc, int iFlag)
 Initialize JLAB FADC Library. More...
 
int faCheckAddresses (int id)
 
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...
 
void faStatus (int id, int sflag)
 Print Status of fADC250 to standard out. More...
 
void faGStatus (int sflag)
 Print a summary of all initialized fADC250s. More...
 
unsigned int faGetFirmwareVersions (int id, int pflag)
 Get the firmware versions of each FPGA. 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 faReadBlock (int id, volatile UINT32 *data, int nwrds, int rflag)
 General Data readout routine. 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...
 
int faGetBlockError (int pflag)
 Return the type of error that occurred while attempting a block read from faReadBlock. More...
 
int faPrintBlock (int id, int rflag)
 Print the current available block to standard out. More...
 
void faClear (int id)
 Perform a soft reset. More...
 
void faClearError (int id)
 Clear latched errors. More...
 
unsigned int faReadCSR (int id)
 Get the value of the Control/Status Register. 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 faTokenStatus (int id)
 Return the status of the token. More...
 
int faGTokenStatus ()
 Return the slotmask of those modules that have the token. More...
 
unsigned int faGetTokenStatus (int pflag)
 Return slot mask of modules with token. More...
 
void faSetCalib (int id, unsigned short sdelay, unsigned short tdelay)
 Set the SyncReset and Trigger Delay. 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...
 
int faGetChannelMask (int id, int type)
 Get the Enabled/Disabled Channel 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...
 
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 faSetTrig21Delay (int id, int delay)
 Configure the delay between the software playback trigger and trigger. More...
 
int faGetTrig21Delay (int id)
 Return the value of 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 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...
 
unsigned int faScanMask ()
 Return the vme slot mask of all initialized fADC250s. More...
 
int faBusyLevel (int id, unsigned int val, int bflag)
 Set/Readback Busy Level. More...
 
int faBusy (int id)
 Get the busy status. More...
 
void faEnableSoftTrig (int id)
 Enable software triggers. 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 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...
 
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 faPrintThreshold (int id)
 Print the thresholds of all channels to standard out. 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 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...
 
void faPrintDAC (int id)
 Print DAC values for each channel to standard out. 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 faGetChannelPedestal (int id, unsigned int chan)
 Get the pedestal value of specified channel. More...
 
void faDataDecode (unsigned int data)
 Decode a data word from an fADC250 and print to standard out. More...
 
int faSetMGTTestMode (int id, unsigned int mode)
 Set the fa250 operation when Sync Reset is received. 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 faGetHitbitsMode (int id)
 Get the enabled/disabled status of hitbits mode for the 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 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...
 
unsigned int faGetA32 (int id)
 Return the base address of the A32 for specified module. More...
 
unsigned int faGetA32M ()
 Return the base address of the A32 Multiblock. More...
 
unsigned int faGetMinA32MB (int id)
 Get the minimum address used for multiblock. More...
 
unsigned int faGetMaxA32MB (int id)
 Get the maximum address used for multiblock. 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...
 
unsigned int faGetCtrlFPGAData (int id)
 Return raw register data from the Control FPGA containing the temperature, core voltage, and auxiliary voltage. More...
 
unsigned int faGetProcFPGAData (int id)
 Return raw register data from the Processing FPGA containing the temperature. More...
 
float faGetCtrlFPGATemp (int id, int pflag)
 Return the value of the Control FPGA temperature (in degrees Celsius) More...
 
float faGetCtrlFPGAVoltage (int id, int vtype, int pflag)
 Return the value of specified Control FPGA voltage. More...
 
float faGetProcFPGATemp (int id, int pflag)
 Return the value of the Processing FPGA temperature (in degrees Celsius) More...
 
int fadcFirmwareLoad (int id, int chip, int pFlag)
 
int fadcFirmwareGLoad (int chip, int pFlag)
 
void fadcFirmwareDownloadConfigData (int id)
 
int fadcFirmwareVerifyDownload (int id)
 
int fadcFirmwareTestReady (int id, int n_try, int pFlag)
 
int fadcFirmwareZeroSRAM (int id)
 
int fadcFirmwareCheckSRAM (int id)
 
void fadcFirmwareSetFilename (char *filename, int chip)
 
int fadcFirmwareReadFile (char *filename)
 
int fadcFirmwareGetFpgaID (int pflag)
 
int fadcFirmwareChipFromFpgaID (int pflag)
 
int fadcFirmwareRevFromFpgaID (int pflag)
 
int fadcFirmwareReadMcsFile (char *filename)
 
int fadcFirmwareAttachUpdateWatcher (VOIDFUNCPTR routine, faUpdateWatcherArgs_t arg)
 
void fadcFirmwareUpdateWatcher (faUpdateWatcherArgs_t arg)
 
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...
 
int faTestGetStatBitB (int id)
 Get the level of the StatBitB to the SD. More...
 
int faTestGetTokenIn (int id)
 Get the level of the Token In from the SD. More...
 
int faTestGetClock250CounterStatus (int id)
 Return the status of the 250Mhz Clock Counter. More...
 
unsigned int faTestGetClock250Counter (int id)
 Return the value of the 250Mhz Clock scaler. More...
 
unsigned int faTestGetSyncCounter (int id)
 Return the value of the SyncReset scaler. More...
 
unsigned int faTestGetTrig1Counter (int id)
 Return the value of the trig1 scaler. More...
 
unsigned int faTestGetTrig2Counter (int id)
 Return the value of the trig2 scaler. More...
 
void faTestResetClock250Counter (int id)
 Reset the counter of the 250MHz Clock scaler. 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...
 
unsigned int faTestGetTestBitReg (int id)
 Return the current value of the testBit register. More...
 
int faGetSerialNumber (int id, char **rval, int snfix)
 Fills 'rval' with a character array containing the fa250 serial number. More...
 
int faSetScalerBlockInterval (int id, unsigned int nblock)
 Set the block interval of scaler data insertion. More...
 
int faGetScalerBlockInterval (int id)
 
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 faGetHistoryBufferThreshold (int id)
 Get the history buffer threshold. 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 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 faStateArmBuffer (int id, int enable)
 Enable/Disable Buffer to store state machine diagnostics. More...
 
int faStateReadBuffer (int id, volatile unsigned int *data, int nwords)
 Read state machine buffer. More...
 
int faStateMap (unsigned int state_value)
 Convert state value to mapped identifier. More...
 
int faStatePrintBuffer (int id)
 Print the contents of the State Machine buffer to standard out. More...
 
int faSDC_Config (unsigned short cFlag, unsigned short bMask)
 Configure the Signal Distribution Card (SDC) More...
 
void faSDC_Status (int sFlag)
 Print status of SDC to standard out. More...
 
void faSDC_Enable (int nsync)
 Enable Triggers and/or SyncReset on the SDC. More...
 
void faSDC_Disable ()
 Disable Triggers and SyncReset on the SDC. More...
 
void faSDC_Sync ()
 Perform a SyncReset from the SDC. More...
 
void faSDC_Trig ()
 Perform a trigger pulse from the SDC. More...
 
int faSDC_Busy ()
 Return Busy status of the SDC. More...
 
int faItrigSetMode (int id, int tmode, unsigned int wWidth, unsigned int wMask, unsigned int cMask, unsigned int sumThresh, unsigned int *tTable)
 
int faItrigInitTable (int id, unsigned int *table)
 
int faItrigSetHBwidth (int id, unsigned short hbWidth, unsigned short hbMask)
 
unsigned int faItrigGetHBwidth (int id, unsigned int chan)
 
int faItrigSetHBdelay (int id, unsigned short hbDelay, unsigned short hbMask)
 
unsigned int faItrigGetHBdelay (int id, unsigned int chan)
 
void faItrigPrintHBinfo (int id)
 
unsigned int faItrigSetOutWidth (int id, unsigned short itrigWidth)
 
void faItrigEnable (int id, int eflag)
 
void faItrigDisable (int id, int dflag)
 
int faItrigGetTableVal (int id, unsigned short pMask)
 
void faItrigSetTableVal (int id, unsigned short tval, unsigned short pMask)
 

Variables

const char * fa_mode_names [FA_MAX_PROC_MODE+1]
 

Macro Definition Documentation

◆ FA_A32_ADDR_MASK

#define FA_A32_ADDR_MASK   0xff80 /* 8 MB chunks */

Referenced by faGStatus(), and faStatus().

◆ FA_A32_ENABLE

#define FA_A32_ENABLE   0x1

Referenced by faGStatus(), faInit(), and faStatus().

◆ FA_ADC_CHAN_MASK

#define FA_ADC_CHAN_MASK   0xffff

◆ FA_ADC_CONFIG0_CHAN_MASK

#define FA_ADC_CONFIG0_CHAN_MASK   0x0F00

◆ FA_ADC_CONFIG0_CHAN_READ_ENABLE

#define FA_ADC_CONFIG0_CHAN_READ_ENABLE   (1<<12)

Referenced by faReadAllChannelSamples().

◆ FA_ADC_CONFIG1_NSAT_MASK

#define FA_ADC_CONFIG1_NSAT_MASK   0x0C00

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_CONFIG1_TNSAT_MASK

#define FA_ADC_CONFIG1_TNSAT_MASK   0x3000

◆ FA_ADC_CONFIG3_TPT_MASK

#define FA_ADC_CONFIG3_TPT_MASK   0x0FFF

◆ FA_ADC_CONFIG6_MNPED_MASK

#define FA_ADC_CONFIG6_MNPED_MASK   0x00003C00

◆ FA_ADC_CONFIG6_PMAXPED_MASK

#define FA_ADC_CONFIG6_PMAXPED_MASK   0x000003FF

◆ FA_ADC_CONFIG7_MAXPED_MASK

#define FA_ADC_CONFIG7_MAXPED_MASK   0x000003FF

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_CONFIG7_NPED_MASK

#define FA_ADC_CONFIG7_NPED_MASK   0x00003C00

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_DEFAULT_MAXPED

#define FA_ADC_DEFAULT_MAXPED   1

◆ FA_ADC_DEFAULT_MNPED

#define FA_ADC_DEFAULT_MNPED   4

◆ FA_ADC_DEFAULT_NP

#define FA_ADC_DEFAULT_NP   1

◆ FA_ADC_DEFAULT_NPED

#define FA_ADC_DEFAULT_NPED   4

◆ FA_ADC_DEFAULT_NSA

#define FA_ADC_DEFAULT_NSA   10

◆ FA_ADC_DEFAULT_NSAT

#define FA_ADC_DEFAULT_NSAT   1

◆ FA_ADC_DEFAULT_NSB

#define FA_ADC_DEFAULT_NSB   5

◆ FA_ADC_DEFAULT_PL

#define FA_ADC_DEFAULT_PL   50

◆ FA_ADC_DEFAULT_PTW

#define FA_ADC_DEFAULT_PTW   50

◆ FA_ADC_DEFAULT_THRESH

#define FA_ADC_DEFAULT_THRESH   0

◆ FA_ADC_DEFAULT_TNSA

#define FA_ADC_DEFAULT_TNSA   10

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_DEFAULT_TNSAT

#define FA_ADC_DEFAULT_TNSAT   1

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_DEFAULT_TPT

#define FA_ADC_DEFAULT_TPT   0

Referenced by faSetProcMode().

◆ FA_ADC_MAX_MAXPED

#define FA_ADC_MAX_MAXPED   1023

Referenced by faSetProcMode().

◆ FA_ADC_MAX_MNPED

#define FA_ADC_MAX_MNPED   15

Referenced by faSampleConfig().

◆ FA_ADC_MAX_NP

#define FA_ADC_MAX_NP   4

Referenced by faSetProcMode().

◆ FA_ADC_MAX_NPED

#define FA_ADC_MAX_NPED   15

Referenced by faProcPedConfig(), and faSetProcMode().

◆ FA_ADC_MAX_NSA

#define FA_ADC_MAX_NSA   511

Referenced by faSetProcMode().

◆ FA_ADC_MAX_NSAT

#define FA_ADC_MAX_NSAT   4

Referenced by faSetProcMode().

◆ FA_ADC_MAX_NSB

#define FA_ADC_MAX_NSB   7

Referenced by faSetProcMode().

◆ FA_ADC_MAX_PL

#define FA_ADC_MAX_PL   1024

Referenced by faSetProcMode().

◆ FA_ADC_MAX_PTW

#define FA_ADC_MAX_PTW   512

Referenced by faSetProcMode().

◆ FA_ADC_MAX_THRESH

#define FA_ADC_MAX_THRESH   0xfff

◆ FA_ADC_MAX_TNSA

#define FA_ADC_MAX_TNSA   63

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_MAX_TNSAT

#define FA_ADC_MAX_TNSAT   4

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_MAX_TPT

#define FA_ADC_MAX_TPT   4095

◆ FA_ADC_MIN_MAXPED

#define FA_ADC_MIN_MAXPED   0

Referenced by faSetProcMode().

◆ FA_ADC_MIN_MNPED

#define FA_ADC_MIN_MNPED   4

Referenced by faSampleConfig().

◆ FA_ADC_MIN_NP

#define FA_ADC_MIN_NP   1

Referenced by faSetProcMode().

◆ FA_ADC_MIN_NPED

#define FA_ADC_MIN_NPED   4

Referenced by faProcPedConfig(), and faSetProcMode().

◆ FA_ADC_MIN_NSA

#define FA_ADC_MIN_NSA   2

Referenced by faSetProcMode().

◆ FA_ADC_MIN_NSAT

#define FA_ADC_MIN_NSAT   1

Referenced by faSetProcMode().

◆ FA_ADC_MIN_NSB

#define FA_ADC_MIN_NSB   -3

Referenced by faSetProcMode().

◆ FA_ADC_MIN_PL

#define FA_ADC_MIN_PL   0

Referenced by faSetProcMode().

◆ FA_ADC_MIN_PTW

#define FA_ADC_MIN_PTW   6

Referenced by faSetProcMode().

◆ FA_ADC_MIN_THRESH

#define FA_ADC_MIN_THRESH   0

◆ FA_ADC_MIN_TNSA

#define FA_ADC_MIN_TNSA   2

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_MIN_TNSAT

#define FA_ADC_MIN_TNSAT   2

Referenced by faSetTriggerPathSamples().

◆ FA_ADC_MIN_TPT

#define FA_ADC_MIN_TPT   0

◆ FA_ADC_NS_PER_CLK

#define FA_ADC_NS_PER_CLK   4

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_NSA_READBACK_MASK

#define FA_ADC_NSA_READBACK_MASK   0x000001FF

◆ FA_ADC_NSB_NEGATIVE

#define FA_ADC_NSB_NEGATIVE   (1<<3)

Referenced by faGStatus(), faSetProcMode(), and faStatus().

◆ FA_ADC_NSB_READBACK_MASK

#define FA_ADC_NSB_READBACK_MASK   0x0000000F

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_PEAK_MASK

#define FA_ADC_PEAK_MASK   0x0070

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_PEDESTAL_MASK

#define FA_ADC_PEDESTAL_MASK   0xffff

Referenced by faGetChannelPedestal().

◆ FA_ADC_PLAYBACK_MODE

#define FA_ADC_PLAYBACK_MODE   0x0080

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_PROC_ENABLE

#define FA_ADC_PROC_ENABLE   0x8

◆ FA_ADC_PROC_MASK

#define FA_ADC_PROC_MASK   (1<<8)

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_PROC_MODE_DEBUG_HI_REZ_TIME

#define FA_ADC_PROC_MODE_DEBUG_HI_REZ_TIME   8

◆ FA_ADC_PROC_MODE_HIGH_REZ_TIME

#define FA_ADC_PROC_MODE_HIGH_REZ_TIME   4

◆ FA_ADC_PROC_MODE_HIGH_REZ_TIME_INTEGRAL

#define FA_ADC_PROC_MODE_HIGH_REZ_TIME_INTEGRAL   7

◆ FA_ADC_PROC_MODE_PULSE_INTEGRAL

#define FA_ADC_PROC_MODE_PULSE_INTEGRAL   3

◆ FA_ADC_PROC_MODE_PULSE_PARAM

#define FA_ADC_PROC_MODE_PULSE_PARAM   9

Referenced by faSetProcMode().

◆ FA_ADC_PROC_MODE_PULSE_RAW

#define FA_ADC_PROC_MODE_PULSE_RAW   2

◆ FA_ADC_PROC_MODE_RAW_PULSE_PARAM

#define FA_ADC_PROC_MODE_RAW_PULSE_PARAM   10

Referenced by faSetProcMode().

◆ FA_ADC_PROC_MODE_RAW_WINDOW

#define FA_ADC_PROC_MODE_RAW_WINDOW   1

◆ FA_ADC_STATUS1_TRIG_RCV_DONE

#define FA_ADC_STATUS1_TRIG_RCV_DONE   (1<<15)

Referenced by faDisable(), and faEnable().

◆ FA_ADC_STATUS1_TRIGNUM_MASK

#define FA_ADC_STATUS1_TRIGNUM_MASK   0x0FFF

◆ FA_ADC_STATUS2_CHAN_DATA_MASK

#define FA_ADC_STATUS2_CHAN_DATA_MASK   0x0FFF

Referenced by faReadAllChannelSamples().

◆ FA_ADC_TNSA_MASK

#define FA_ADC_TNSA_MASK   0x00007E00

Referenced by faGStatus(), faSetProcMode(), and faStatus().

◆ FA_ADC_TPT_MASK

#define FA_ADC_TPT_MASK   0xFFF

Referenced by faGStatus(), and faStatus().

◆ FA_ADC_VERSION_MASK

#define FA_ADC_VERSION_MASK   0x7fff

◆ FA_AMB_ENABLE

#define FA_AMB_ENABLE   0x1

Referenced by faGStatus(), and faStatus().

◆ FA_AMB_MAX_MASK

#define FA_AMB_MAX_MASK   0xff800000

Referenced by faGetMaxA32MB(), faGStatus(), and faStatus().

◆ FA_AMB_MIN_MASK

#define FA_AMB_MIN_MASK   0xff80

Referenced by faGetMinA32MB(), faGStatus(), and faStatus().

◆ FA_BLOCK_COUNT_MASK

#define FA_BLOCK_COUNT_MASK   0xfffff

Referenced by faDready(), faGStatus(), and faStatus().

◆ FA_BLOCK_LEVEL_MASK

#define FA_BLOCK_LEVEL_MASK   0xffff

◆ FA_BLOCKERROR_DMADONE_ERROR

#define FA_BLOCKERROR_DMADONE_ERROR   4

Referenced by faReadBlock().

◆ FA_BLOCKERROR_NO_ERROR

#define FA_BLOCKERROR_NO_ERROR   0

Referenced by faGetBlockError(), and faReadBlock().

◆ FA_BLOCKERROR_NTYPES

#define FA_BLOCKERROR_NTYPES   5

Referenced by faGetBlockError().

◆ FA_BLOCKERROR_TERM_ON_WORDCOUNT

#define FA_BLOCKERROR_TERM_ON_WORDCOUNT   1

Referenced by faReadBlock().

◆ FA_BLOCKERROR_UNKNOWN_BUS_ERROR

#define FA_BLOCKERROR_UNKNOWN_BUS_ERROR   2

Referenced by faReadBlock().

◆ FA_BLOCKERROR_ZERO_WORD_COUNT

#define FA_BLOCKERROR_ZERO_WORD_COUNT   3

Referenced by faReadBlock().

◆ FA_BOARD_ID

#define FA_BOARD_ID   0xfadc0000

Referenced by faInit().

◆ FA_BOARD_MASK

#define FA_BOARD_MASK   0xffff0000

Referenced by faInit(), and faStatus().

◆ FA_BUSY_LEVEL_MASK

#define FA_BUSY_LEVEL_MASK   0xfffff

Referenced by faBusy(), and faBusyLevel().

◆ FA_CLOCK250COUNT_RESET

#define FA_CLOCK250COUNT_RESET   (0<<0)

◆ FA_CLOCK250COUNT_START

#define FA_CLOCK250COUNT_START   (1<<0)

◆ FA_CONTROL2_MASK

#define FA_CONTROL2_MASK   0xc000303f

Referenced by faStatus().

◆ FA_CONTROL_MASK

#define FA_CONTROL_MASK   0xffffffff

Referenced by faStatus().

◆ FA_CSR_BERR_STATUS

#define FA_CSR_BERR_STATUS   0x8

Referenced by faReadBlock(), and faReadBlockStatus().

◆ FA_CSR_BLOCK_LEVEL_FLAG

#define FA_CSR_BLOCK_LEVEL_FLAG   0x2

◆ FA_CSR_BLOCK_READY

#define FA_CSR_BLOCK_READY   0x4

◆ FA_CSR_CTRL_FPGA_HIGH_TEMP

#define FA_CSR_CTRL_FPGA_HIGH_TEMP   0x20000

Referenced by faGStatus().

◆ FA_CSR_DATA_STREAM_SCALERS

#define FA_CSR_DATA_STREAM_SCALERS   0x400000

Referenced by faForceEndOfBlock().

◆ FA_CSR_ERROR_CLEAR

#define FA_CSR_ERROR_CLEAR   0x08000000

Referenced by faClearError(), and faGClearError().

◆ FA_CSR_ERROR_MASK

#define FA_CSR_ERROR_MASK   0x0e030000

Referenced by faGStatus(), and faStatus().

◆ FA_CSR_EVENT_AVAILABLE

#define FA_CSR_EVENT_AVAILABLE   0x1

Referenced by faStatus().

◆ FA_CSR_FIFO1_ALMOST_EMPTY

#define FA_CSR_FIFO1_ALMOST_EMPTY   0x1000

◆ FA_CSR_FIFO1_ALMOST_FULL

#define FA_CSR_FIFO1_ALMOST_FULL   0x4000

◆ FA_CSR_FIFO1_EMPTY

#define FA_CSR_FIFO1_EMPTY   0x800

◆ FA_CSR_FIFO1_FULL

#define FA_CSR_FIFO1_FULL   0x8000

◆ FA_CSR_FIFO1_HALF_FULL

#define FA_CSR_FIFO1_HALF_FULL   0x2000

◆ FA_CSR_FORCE_EOB_FAILED

#define FA_CSR_FORCE_EOB_FAILED   0x2000000

Referenced by faForceEndOfBlock().

◆ FA_CSR_FORCE_EOB_INSERT

#define FA_CSR_FORCE_EOB_INSERT   0x800000

Referenced by faForceEndOfBlock().

◆ FA_CSR_FORCE_EOB_SUCCESS

#define FA_CSR_FORCE_EOB_SUCCESS   0x1000000

Referenced by faForceEndOfBlock().

◆ FA_CSR_HARD_RESET

#define FA_CSR_HARD_RESET   0x80000000

Referenced by faGReset(), faInit(), and faReset().

◆ FA_CSR_MASK

#define FA_CSR_MASK   0x0fffffff

Referenced by faStatus().

◆ FA_CSR_PROC_FPGA_HIGH_TEMP

#define FA_CSR_PROC_FPGA_HIGH_TEMP   0x10000

Referenced by faGStatus().

◆ FA_CSR_SOFT_CLEAR

#define FA_CSR_SOFT_CLEAR   0x200000

Referenced by faSoftReset().

◆ FA_CSR_SOFT_PULSE_TRIG2

#define FA_CSR_SOFT_PULSE_TRIG2   0x100000

Referenced by faTrig2().

◆ FA_CSR_SOFT_RESET

#define FA_CSR_SOFT_RESET   0x40000000

Referenced by faClear(), faGClear(), and faSoftReset().

◆ FA_CSR_SYNC

#define FA_CSR_SYNC   0x10000000

Referenced by faSync().

◆ FA_CSR_TOKEN_STATUS

#define FA_CSR_TOKEN_STATUS   0x10

Referenced by faTokenStatus().

◆ FA_CSR_TRIGGER

#define FA_CSR_TRIGGER   0x20000000

Referenced by faTrig().

◆ FA_CTRL1_DATAFORMAT_FULL_SUPPRESS

#define FA_CTRL1_DATAFORMAT_FULL_SUPPRESS   2

◆ FA_CTRL1_DATAFORMAT_INTERM_SUPPRESS

#define FA_CTRL1_DATAFORMAT_INTERM_SUPPRESS   1

◆ FA_CTRL1_DATAFORMAT_MASK

#define FA_CTRL1_DATAFORMAT_MASK   0x0C000000

Referenced by faSetDataFormat().

◆ FA_CTRL1_DATAFORMAT_STD

#define FA_CTRL1_DATAFORMAT_STD   0

◆ FA_CTRL1_SUPPRESS_TT

#define FA_CTRL1_SUPPRESS_TT   (1<<16)

Referenced by faStatus(), and faSuppressTriggerTime().

◆ FA_CTRL1_SUPPRESS_TT2

#define FA_CTRL1_SUPPRESS_TT2   (1<<17)

Referenced by faStatus(), and faSuppressTriggerTime().

◆ FA_CTRL1_SYSTEM_TEST_MODE

#define FA_CTRL1_SYSTEM_TEST_MODE   (1<<31)

Referenced by faTestSetSystemTestMode().

◆ FA_CTRL_ENABLE_INT_TRIG

#define FA_CTRL_ENABLE_INT_TRIG   0x8

Referenced by faEnable().

◆ FA_CTRL_ENABLE_MASK

#define FA_CTRL_ENABLE_MASK   0x7

Referenced by faGStatus(), and faStatus().

◆ FA_CTRL_ENABLE_SRESET

#define FA_CTRL_ENABLE_SRESET   0x4

Referenced by faEnable(), and faEnableSyncSrc().

◆ FA_CTRL_ENABLE_TRIG

#define FA_CTRL_ENABLE_TRIG   0x2

Referenced by faEnable().

◆ FA_CTRL_ENABLED

#define FA_CTRL_ENABLED   0x7

Referenced by faStatus().

◆ FA_CTRL_GO

#define FA_CTRL_GO   0x1

◆ FA_DAC_VALUE_MASK

#define FA_DAC_VALUE_MASK   0x0fff

◆ FA_DAC_WRITE_TIMEOUT_ERROR

#define FA_DAC_WRITE_TIMEOUT_ERROR   (1<<15)

Referenced by faSetDAC().

◆ FA_DATA_BLKNUM_MASK

#define FA_DATA_BLKNUM_MASK   0x0000003f

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_BLOCK_HEADER

#define FA_DATA_BLOCK_HEADER   0x00000000

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_BLOCK_TRAILER

#define FA_DATA_BLOCK_TRAILER   0x08000000

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_EVENT_HEADER

#define FA_DATA_EVENT_HEADER   0x10000000

◆ FA_DATA_FILLER

#define FA_DATA_FILLER   0x78000000

◆ FA_DATA_INVALID

#define FA_DATA_INVALID   0x70000000

Referenced by faPrintBlock().

◆ FA_DATA_PULSE_INTEGRAL

#define FA_DATA_PULSE_INTEGRAL   0x38000000

◆ FA_DATA_PULSE_RAW

#define FA_DATA_PULSE_RAW   0x30000000

◆ FA_DATA_PULSE_TIME

#define FA_DATA_PULSE_TIME   0x40000000

◆ FA_DATA_SLOT_MASK

#define FA_DATA_SLOT_MASK   0x07c00000

◆ FA_DATA_STREAM

#define FA_DATA_STREAM   0x48000000

◆ FA_DATA_TRIGGER_TIME

#define FA_DATA_TRIGGER_TIME   0x18000000

◆ FA_DATA_TRIGNUM_MASK

#define FA_DATA_TRIGNUM_MASK   0x07ffffff

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_TYPE_DEFINE

#define FA_DATA_TYPE_DEFINE   0x80000000

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_TYPE_MASK

#define FA_DATA_TYPE_MASK   0x78000000

Referenced by faPrintBlock(), and faReadBlock().

◆ FA_DATA_WINDOW_RAW

#define FA_DATA_WINDOW_RAW   0x20000000

◆ FA_DATA_WINDOW_SUM

#define FA_DATA_WINDOW_SUM   0x28000000

◆ FA_DATA_WRDCNT_MASK

#define FA_DATA_WRDCNT_MASK   0x003fffff

◆ FA_DEBUG_XFER_BFIFO_OFIFO

#define FA_DEBUG_XFER_BFIFO_OFIFO   0x2000

◆ FA_DEBUG_XFER_INFIFO_BFIFO

#define FA_DEBUG_XFER_INFIFO_BFIFO   0x1000

◆ FA_DUMMY_DATA

#define FA_DUMMY_DATA   0xf800fafa

Referenced by faReadBlock().

◆ FA_ENABLE_ADC_PARAMETERS_DATA

#define FA_ENABLE_ADC_PARAMETERS_DATA   0x8000

◆ FA_ENABLE_BERR

#define FA_ENABLE_BERR   0x100000

◆ FA_ENABLE_BLKLVL_INT

#define FA_ENABLE_BLKLVL_INT   0x40000

Referenced by faStatus().

◆ FA_ENABLE_DEBUG

#define FA_ENABLE_DEBUG   0x2000000

◆ FA_ENABLE_EXT_SRESET

#define FA_ENABLE_EXT_SRESET   0x4

◆ FA_ENABLE_EXT_TRIGGER

#define FA_ENABLE_EXT_TRIGGER   0x2

◆ FA_ENABLE_INT_TRIGGER

#define FA_ENABLE_INT_TRIGGER   0x8

◆ FA_ENABLE_INTERNAL_CLK

#define FA_ENABLE_INTERNAL_CLK   0x8

◆ FA_ENABLE_LIVE_TRIG_OUT

#define FA_ENABLE_LIVE_TRIG_OUT   0x1000

◆ FA_ENABLE_MULTIBLOCK

#define FA_ENABLE_MULTIBLOCK   0x200000

◆ FA_ENABLE_SOFT_SRESET

#define FA_ENABLE_SOFT_SRESET   0x800

◆ FA_ENABLE_SOFT_TRIG

#define FA_ENABLE_SOFT_TRIG   0x80

◆ FA_ENABLE_STREAM_MODE

#define FA_ENABLE_STREAM_MODE   0x10

◆ FA_ENABLE_TRIG_OUT_FP

#define FA_ENABLE_TRIG_OUT_FP   0x2000

Referenced by faEnableTriggerOut().

◆ FA_ENABLE_TRIG_OUT_P0

#define FA_ENABLE_TRIG_OUT_P0   0x4000

Referenced by faEnableTriggerOut().

◆ FA_EVENT_COUNT_MASK

#define FA_EVENT_COUNT_MASK   0xffffff

◆ FA_FIRST_BOARD

#define FA_FIRST_BOARD   0x400000

◆ FA_FORCE_BUSY

#define FA_FORCE_BUSY   0x80000000

Referenced by faBusyLevel().

◆ FA_GO

#define FA_GO   0x1

◆ FA_INIT_EXT_SYNCRESET

#define FA_INIT_EXT_SYNCRESET   (1<<0)

◆ FA_INIT_FP_CLKSRC

#define FA_INIT_FP_CLKSRC   (1<<4)

◆ FA_INIT_FP_TRIG

#define FA_INIT_FP_TRIG   (1<<1)

◆ FA_INIT_INT_CLKSRC

#define FA_INIT_INT_CLKSRC   (0<<4)

◆ FA_INIT_INT_TRIG

#define FA_INIT_INT_TRIG   (4<<1)

◆ FA_INIT_P2_CLKSRC

#define FA_INIT_P2_CLKSRC   ((1<<4) | (2<<4))

◆ FA_INIT_SKIP

#define FA_INIT_SKIP   (1<<16)

Referenced by faInit().

◆ FA_INIT_SKIP_FIRMWARE_CHECK

#define FA_INIT_SKIP_FIRMWARE_CHECK   (1<<18)

Referenced by faInit().

◆ FA_INIT_SOFT_SYNCRESET

#define FA_INIT_SOFT_SYNCRESET   (0<<0)

◆ FA_INIT_SOFT_TRIG

#define FA_INIT_SOFT_TRIG   (0<<1)

◆ FA_INIT_USE_ADDRLIST

#define FA_INIT_USE_ADDRLIST   (1<<17)

Referenced by faInit().

◆ FA_INIT_VXS_CLKSRC

#define FA_INIT_VXS_CLKSRC   (2<<4)

◆ FA_INIT_VXS_TRIG

#define FA_INIT_VXS_TRIG   (2<<1)

◆ FA_INT_ACTIVE

#define FA_INT_ACTIVE   0x1000000

◆ FA_INT_ENABLE_MASK

#define FA_INT_ENABLE_MASK   0xc0000

Referenced by faStatus().

◆ FA_INT_IACKSTAT_ONBT

#define FA_INT_IACKSTAT_ONBT   0x4000000

◆ FA_INT_IACKSTAT_WAIT

#define FA_INT_IACKSTAT_WAIT   0x2000000

◆ FA_INT_LEVEL_MASK

#define FA_INT_LEVEL_MASK   0x700

Referenced by faStatus().

◆ FA_INT_VEC_MASK

#define FA_INT_VEC_MASK   0xff

Referenced by faStatus().

◆ FA_ITRIG_COIN_MODE

#define FA_ITRIG_COIN_MODE   1

◆ FA_ITRIG_CONFIG_MASK

#define FA_ITRIG_CONFIG_MASK   0x001F

◆ FA_ITRIG_DISABLED

#define FA_ITRIG_DISABLED   0x0010

◆ FA_ITRIG_ENABLE_MASK

#define FA_ITRIG_ENABLE_MASK   0x0010

◆ FA_ITRIG_HB_DELAY_MASK

#define FA_ITRIG_HB_DELAY_MASK   0x1f00

◆ FA_ITRIG_HB_INFO_MASK

#define FA_ITRIG_HB_INFO_MASK   0xffff

◆ FA_ITRIG_HB_P2OUT

#define FA_ITRIG_HB_P2OUT   0x0008

◆ FA_ITRIG_HB_WIDTH_MASK

#define FA_ITRIG_HB_WIDTH_MASK   0x00ff

◆ FA_ITRIG_MAX_DELAY

#define FA_ITRIG_MAX_DELAY   0xf00 /* 15.360 microsec */

◆ FA_ITRIG_MAX_HB_DELAY

#define FA_ITRIG_MAX_HB_DELAY   0xf /* 60 ns */

◆ FA_ITRIG_MAX_HB_WIDTH

#define FA_ITRIG_MAX_HB_WIDTH   0xff /* 1020 ns */

◆ FA_ITRIG_MAX_WIDTH

#define FA_ITRIG_MAX_WIDTH   0x100 /* 1.024 microsec */

◆ FA_ITRIG_MIN_WIDTH

#define FA_ITRIG_MIN_WIDTH   0x01 /* 4 nsec */

◆ FA_ITRIG_MODE_MASK

#define FA_ITRIG_MODE_MASK   0x0007

◆ FA_ITRIG_OUT_FP

#define FA_ITRIG_OUT_FP   0x00003000

◆ FA_ITRIG_OUT_MASK

#define FA_ITRIG_OUT_MASK   0x0000f000 /* Bits from ctrl1 register */

◆ FA_ITRIG_P2OUT_MASK

#define FA_ITRIG_P2OUT_MASK   0x0008

◆ FA_ITRIG_SUM_MODE

#define FA_ITRIG_SUM_MODE   4

◆ FA_ITRIG_TABLE_MODE

#define FA_ITRIG_TABLE_MODE   0

◆ FA_ITRIG_UNDEF_MODE

#define FA_ITRIG_UNDEF_MODE   3

◆ FA_ITRIG_VERSION_MASK

#define FA_ITRIG_VERSION_MASK   0x1fff

◆ FA_ITRIG_WINDOW_MAX_WIDTH

#define FA_ITRIG_WINDOW_MAX_WIDTH   0x200 /* 2.048 microsec */

◆ FA_ITRIG_WINDOW_MODE

#define FA_ITRIG_WINDOW_MODE   2

◆ FA_LAST_BOARD

#define FA_LAST_BOARD   0x800000

◆ FA_MAX_A32_MEM

#define FA_MAX_A32_MEM   0x800000 /* 8 Meg */

Referenced by faInit().

◆ FA_MAX_A32MB_SIZE

#define FA_MAX_A32MB_SIZE   0x800000 /* 8 MB */

Referenced by faInit().

◆ FA_MAX_ADC_CHANNELS

◆ FA_MAX_BOARDS

#define FA_MAX_BOARDS   20

Referenced by faGReset().

◆ FA_MAX_DATA_PER_CHANNEL

#define FA_MAX_DATA_PER_CHANNEL   251

Referenced by faReadBlock(), and faReadBlockStatus().

◆ FA_MAX_PROC_MODE

#define FA_MAX_PROC_MODE   10

◆ FA_MB_TOKEN_VIA_P0

#define FA_MB_TOKEN_VIA_P0   0x10000000

◆ FA_MB_TOKEN_VIA_P2

#define FA_MB_TOKEN_VIA_P2   0x20000000

◆ FA_MEM_ADR_INCR_MEM1

#define FA_MEM_ADR_INCR_MEM1   (1<<31)

◆ FA_MEM_ADR_INCR_MEM2

#define FA_MEM_ADR_INCR_MEM2   (1<<30)

◆ FA_MGT_ENABLE_DATA_ALIGNMENT

#define FA_MGT_ENABLE_DATA_ALIGNMENT   0x4

◆ FA_MGT_FRONT_END_TO_CTP

#define FA_MGT_FRONT_END_TO_CTP   0x2

◆ FA_MGT_GTX1_CHANNEL_UP

#define FA_MGT_GTX1_CHANNEL_UP   0x4

◆ FA_MGT_GTX1_HARD_ERROR

#define FA_MGT_GTX1_HARD_ERROR   0x8

Referenced by faGStatus(), and faStatus().

◆ FA_MGT_GTX1_LANE1_UP

#define FA_MGT_GTX1_LANE1_UP   0x1

◆ FA_MGT_GTX1_LANE2_UP

#define FA_MGT_GTX1_LANE2_UP   0x2

◆ FA_MGT_GTX1_SOFT_ERROR

#define FA_MGT_GTX1_SOFT_ERROR   0x10

Referenced by faGStatus(), and faStatus().

◆ FA_MGT_GTX2_CHANNEL_UP

#define FA_MGT_GTX2_CHANNEL_UP   0x80

◆ FA_MGT_GTX2_HARD_ERROR

#define FA_MGT_GTX2_HARD_ERROR   0x100

Referenced by faGStatus(), and faStatus().

◆ FA_MGT_GTX2_LANE1_UP

#define FA_MGT_GTX2_LANE1_UP   0x20

◆ FA_MGT_GTX2_LANE2_UP

#define FA_MGT_GTX2_LANE2_UP   0x40

◆ FA_MGT_GTX2_SOFT_ERROR

#define FA_MGT_GTX2_SOFT_ERROR   0x200

Referenced by faGStatus(), and faStatus().

◆ FA_MGT_HITBITS_TO_CTP

#define FA_MGT_HITBITS_TO_CTP   0x8

◆ FA_MGT_RESET

#define FA_MGT_RESET   0x1

◆ FA_MGT_RESET_ASSERTED

#define FA_MGT_RESET_ASSERTED   0x800

◆ FA_MGT_SUM_DATA_VALID

#define FA_MGT_SUM_DATA_VALID   0x400

◆ FA_PPG_ENABLE

#define FA_PPG_ENABLE   0x80

Referenced by faPPGDisable(), and faPPGEnable().

◆ FA_PPG_MAX_SAMPLES

#define FA_PPG_MAX_SAMPLES   512

Referenced by faSetPPG().

◆ FA_PPG_SAMPLE_MASK

#define FA_PPG_SAMPLE_MASK   0x1fff

Referenced by faSetPPG().

◆ FA_PPG_WRITE_VALUE

#define FA_PPG_WRITE_VALUE   0x8000

Referenced by faSetPPG().

◆ FA_PROMREG1_ERASE_PROM1

#define FA_PROMREG1_ERASE_PROM1   0x9

◆ FA_PROMREG1_ERASE_PROM2

#define FA_PROMREG1_ERASE_PROM2   0xA

◆ FA_PROMREG1_GET_ID1

#define FA_PROMREG1_GET_ID1   0x6

◆ FA_PROMREG1_GET_ID2

#define FA_PROMREG1_GET_ID2   0x7

◆ FA_PROMREG1_PROM1_TO_SRAM

#define FA_PROMREG1_PROM1_TO_SRAM   0x3

◆ FA_PROMREG1_PROM2_TO_SRAM

#define FA_PROMREG1_PROM2_TO_SRAM   0x4

◆ FA_PROMREG1_READY

#define FA_PROMREG1_READY   (1<<31)

◆ FA_PROMREG1_REBOOT_FPGA1

#define FA_PROMREG1_REBOOT_FPGA1   0xC

◆ FA_PROMREG1_REBOOT_FPGA2

#define FA_PROMREG1_REBOOT_FPGA2   0xD

◆ FA_PROMREG1_SRAM_TO_PROM1

#define FA_PROMREG1_SRAM_TO_PROM1   0x0

◆ FA_PROMREG1_SRAM_TO_PROM2

#define FA_PROMREG1_SRAM_TO_PROM2   0x1

◆ FA_RAM_ADR_INCREMENT

#define FA_RAM_ADR_INCREMENT   0x00100000

◆ FA_RAM_DATA_MASK

#define FA_RAM_DATA_MASK   0x000fffff

Referenced by faBusy(), faGStatus(), and faStatus().

◆ FA_RAM_EMPTY

#define FA_RAM_EMPTY   0x00200000

◆ FA_RAM_FULL

#define FA_RAM_FULL   0x00100000

◆ FA_REF_CLK_FP

#define FA_REF_CLK_FP   0x1

◆ FA_REF_CLK_INTERNAL

#define FA_REF_CLK_INTERNAL   0x0

◆ FA_REF_CLK_MASK

#define FA_REF_CLK_MASK   0x3

◆ FA_REF_CLK_P0

#define FA_REF_CLK_P0   0x2

◆ FA_REF_CLK_SEL_MASK

#define FA_REF_CLK_SEL_MASK   0x7

Referenced by faSetClkSource().

◆ FA_RELEASE_MGT_RESET

#define FA_RELEASE_MGT_RESET   0x0

◆ FA_RESET_ADC_FIFO1

#define FA_RESET_ADC_FIFO1   0x100

Referenced by faInit().

◆ FA_RESET_ADC_FPGA1

#define FA_RESET_ADC_FPGA1   0x2

Referenced by faInit().

◆ FA_RESET_ALL

#define FA_RESET_ALL   0xFFFF

Referenced by faInit().

◆ FA_RESET_CNTL_FPGA

#define FA_RESET_CNTL_FPGA   0x1

◆ FA_RESET_DAC

#define FA_RESET_DAC   0x800

Referenced by faDACReset(), faGDACReset(), and faInit().

◆ FA_RESET_EXT_RAM_PT

#define FA_RESET_EXT_RAM_PT   0x1000

Referenced by faInit().

◆ FA_RESET_TOKEN

#define FA_RESET_TOKEN   0x10000

Referenced by faResetToken().

◆ FA_SADR_AUTO_INCREMENT

#define FA_SADR_AUTO_INCREMENT   0x10000

◆ FA_SCALER_CTRL_ENABLE

#define FA_SCALER_CTRL_ENABLE   (1<<0)

◆ FA_SCALER_CTRL_LATCH

#define FA_SCALER_CTRL_LATCH   (1<<1)

◆ FA_SCALER_CTRL_MASK

#define FA_SCALER_CTRL_MASK   (0x7)

Referenced by faPrintScalers(), and faReadScalers().

◆ FA_SCALER_CTRL_RESET

#define FA_SCALER_CTRL_RESET   (1<<2)

◆ FA_SCALER_INTERVAL_MASK

#define FA_SCALER_INTERVAL_MASK   0x0000FFFF

◆ FA_SDC_ADR_MASK

#define FA_SDC_ADR_MASK   0xffc0

Referenced by faInit().

◆ FA_SDC_BOARD_ID

#define FA_SDC_BOARD_ID   0x0200

◆ FA_SDC_BOARD_MASK

#define FA_SDC_BOARD_MASK   0xfffe

◆ FA_SERIAL_NUMBER_ACDI

#define FA_SERIAL_NUMBER_ACDI   0x41434449

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ACDI_BOARDID_MASK

#define FA_SERIAL_NUMBER_ACDI_BOARDID_MASK   0x0000FFFF

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ADV_ASSEM

#define FA_SERIAL_NUMBER_ADV_ASSEM   0x42000000

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ADV_ASSEM_MASK

#define FA_SERIAL_NUMBER_ADV_ASSEM_MASK   0xFF000000

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ADV_BOARDID2_MASK

#define FA_SERIAL_NUMBER_ADV_BOARDID2_MASK   0x000000FF

◆ FA_SERIAL_NUMBER_ADV_MNFID1

#define FA_SERIAL_NUMBER_ADV_MNFID1   0x42323135

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ADV_MNFID2

#define FA_SERIAL_NUMBER_ADV_MNFID2   0x39350000

Referenced by faGetSerialNumber().

◆ FA_SERIAL_NUMBER_ADV_MNFID2_MASK

#define FA_SERIAL_NUMBER_ADV_MNFID2_MASK   0xFFFF0000

Referenced by faGetSerialNumber().

◆ FA_SLOT_ID_MASK

#define FA_SLOT_ID_MASK   0x1f0000

Referenced by faInit().

◆ FA_SOURCE_INT

#define FA_SOURCE_INT   0x00

◆ FA_SOURCE_MASK

#define FA_SOURCE_MASK   0x30

Referenced by faInit().

◆ FA_SOURCE_SDC

#define FA_SOURCE_SDC   0x10

Referenced by faInit().

◆ FA_SOURCE_VXS

#define FA_SOURCE_VXS   0x20

Referenced by faInit().

◆ FA_SRESET_FP

#define FA_SRESET_FP   0x000

Referenced by faGStatus(), and faStatus().

◆ FA_SRESET_FP_ISYNC

#define FA_SRESET_FP_ISYNC   0x100

◆ FA_SRESET_MASK

#define FA_SRESET_MASK   0x700

◆ FA_SRESET_NONE

#define FA_SRESET_NONE   0x700

◆ FA_SRESET_P0

#define FA_SRESET_P0   0x200

Referenced by faGStatus(), and faStatus().

◆ FA_SRESET_P0_ISYNC

#define FA_SRESET_P0_ISYNC   0x300

Referenced by faGStatus(), faInit(), and faStatus().

◆ FA_SRESET_SEL_MASK

#define FA_SRESET_SEL_MASK   0x700

Referenced by faEnableFP(), and faSetSyncSource().

◆ FA_SRESET_VME

#define FA_SRESET_VME   0x600

◆ FA_STATE_CSR_ARM_BUFFER

#define FA_STATE_CSR_ARM_BUFFER   (1<<31)

Referenced by faStateArmBuffer().

◆ FA_STATE_CSR_BUFFER_EMPTY

#define FA_STATE_CSR_BUFFER_EMPTY   (1<<26)

◆ FA_STATE_CSR_BUFFER_FULL

#define FA_STATE_CSR_BUFFER_FULL   (1<<27)

◆ FA_STATE_CSR_BUFFER_WORDS_MASK

#define FA_STATE_CSR_BUFFER_WORDS_MASK   0x000000FF

Referenced by faStateReadBuffer().

◆ FA_STATE_LEVEL_CAPTURE_MASK

#define FA_STATE_LEVEL_CAPTURE_MASK   0x000000FF

◆ FA_STATE_VALUE_MASK

#define FA_STATE_VALUE_MASK   0x0000FFFF

Referenced by faStateReadBuffer().

◆ FA_STATUS3_PROC_TEMP_MASK

#define FA_STATUS3_PROC_TEMP_MASK   0xFFFF

Referenced by faGetProcFPGATemp().

◆ FA_SUM_DATA_ARM_HISTORY_BUFFER

#define FA_SUM_DATA_ARM_HISTORY_BUFFER   (1<<31)

◆ FA_SUM_DATA_SAMPLE_MASK

#define FA_SUM_DATA_SAMPLE_MASK   0x0000FFFF

Referenced by faReadHistoryBuffer().

◆ FA_SUM_THRESHOLD_DREADY

#define FA_SUM_THRESHOLD_DREADY   (1<<31)

Referenced by faHistoryBufferDReady().

◆ FA_SUM_THRESHOLD_MASK

#define FA_SUM_THRESHOLD_MASK   0x0000FFFF

◆ FA_SUPPORTED_CTRL_FIRMWARE

#define FA_SUPPORTED_CTRL_FIRMWARE   0x42,0x82

Referenced by faInit().

◆ FA_SUPPORTED_CTRL_FIRMWARE_NUMBER

#define FA_SUPPORTED_CTRL_FIRMWARE_NUMBER   2

Referenced by faInit().

◆ FA_SUPPORTED_MODES

#define FA_SUPPORTED_MODES   9,10

◆ FA_SUPPORTED_NMODES

#define FA_SUPPORTED_NMODES   2

◆ FA_SUPPORTED_PROC_FIRMWARE

#define FA_SUPPORTED_PROC_FIRMWARE   0xC0D

Referenced by faInit().

◆ FA_SUPPORTED_PROC_FIRMWARE_NUMBER

#define FA_SUPPORTED_PROC_FIRMWARE_NUMBER   1

Referenced by faInit().

◆ FA_SUPPRESS_TRIGGER_TIME_DATA

#define FA_SUPPRESS_TRIGGER_TIME_DATA   0x10000

◆ FA_SUPPRESS_TRIGGER_TIME_WORD2_DATA

#define FA_SUPPRESS_TRIGGER_TIME_WORD2_DATA   0x20000

◆ FA_SYNCP0COUNT_RESET

#define FA_SYNCP0COUNT_RESET   (0<<0)

Referenced by faTestResetSyncCounter().

◆ FA_SYSMON_CTRL_TEMP_MASK

#define FA_SYSMON_CTRL_TEMP_MASK   0x3FF

Referenced by faGetCtrlFPGATemp().

◆ FA_SYSMON_FPGA_AUX_V_MASK

#define FA_SYSMON_FPGA_AUX_V_MASK   0xFFC00000

Referenced by faGetCtrlFPGAVoltage().

◆ FA_SYSMON_FPGA_CORE_V_MASK

#define FA_SYSMON_FPGA_CORE_V_MASK   0x001FF800

Referenced by faGetCtrlFPGAVoltage().

◆ FA_TESTBIT_BUSYOUT

#define FA_TESTBIT_BUSYOUT   (1<<1)

Referenced by faTestSetBusyOut().

◆ FA_TESTBIT_CLOCK250_STATUS

#define FA_TESTBIT_CLOCK250_STATUS   (1<<15)

◆ FA_TESTBIT_SDLINKOUT

#define FA_TESTBIT_SDLINKOUT   (1<<2)

Referenced by faTestSetSdLink().

◆ FA_TESTBIT_STATBITB

#define FA_TESTBIT_STATBITB   (1<<8)

Referenced by faTestGetStatBitB().

◆ FA_TESTBIT_TOKENIN

#define FA_TESTBIT_TOKENIN   (1<<9)

Referenced by faTestGetTokenIn().

◆ FA_TESTBIT_TOKENOUT

#define FA_TESTBIT_TOKENOUT   (1<<3)

Referenced by faTestSetTokenOut().

◆ FA_TESTBIT_TRIGOUT

#define FA_TESTBIT_TRIGOUT   (1<<0)

Referenced by faTestSetTrigOut().

◆ FA_TRIG1P0COUNT_RESET

#define FA_TRIG1P0COUNT_RESET   (0<<0)

Referenced by faTestResetTrig1Counter().

◆ FA_TRIG21_DELAY_MASK

#define FA_TRIG21_DELAY_MASK   0x00000FFF

◆ FA_TRIG2P0COUNT_RESET

#define FA_TRIG2P0COUNT_RESET   (0<<0)

Referenced by faTestResetTrig2Counter().

◆ FA_TRIG_FP

#define FA_TRIG_FP   0x00

Referenced by faGStatus(), and faStatus().

◆ FA_TRIG_FP_ISYNC

#define FA_TRIG_FP_ISYNC   0x10

◆ FA_TRIG_INTERNAL

#define FA_TRIG_INTERNAL   0x70

Referenced by faGStatus(), faInit(), and faStatus().

◆ FA_TRIG_MASK

#define FA_TRIG_MASK   0x70

◆ FA_TRIG_P0

#define FA_TRIG_P0   0x20

Referenced by faGStatus(), and faStatus().

◆ FA_TRIG_P0_ISYNC

#define FA_TRIG_P0_ISYNC   0x30

Referenced by faGStatus(), faInit(), and faStatus().

◆ FA_TRIG_SCAL_RESET

#define FA_TRIG_SCAL_RESET   (1<<31)

Referenced by faResetTriggerCount().

◆ FA_TRIG_SEL_MASK

#define FA_TRIG_SEL_MASK   0x70

Referenced by faEnableFP(), and faSetTrigSource().

◆ FA_TRIG_VME

#define FA_TRIG_VME   0x60

◆ FA_TRIG_VME_PLAYBACK

#define FA_TRIG_VME_PLAYBACK   0x50

◆ FA_TRIGCTL_BUSY_EN

#define FA_TRIGCTL_BUSY_EN   (1<<15)

◆ FA_TRIGCTL_MAX1_MASK

#define FA_TRIGCTL_MAX1_MASK   0x000000FF

◆ FA_TRIGCTL_MAX2_MASK

#define FA_TRIGCTL_MAX2_MASK   0x00FF0000

◆ FA_TRIGCTL_TRIGSTOP_EN

#define FA_TRIGCTL_TRIGSTOP_EN   (1<<31)

◆ FA_TRIGOUT_MASK

#define FA_TRIGOUT_MASK   0x7000

Referenced by faSetTrigOut().

◆ FA_VERSION_MASK

#define FA_VERSION_MASK   0x000000ff

Referenced by faInit(), and faStatus().

◆ FA_VME_INT_LEVEL

#define FA_VME_INT_LEVEL   3

Referenced by faInit().

◆ FA_VME_INT_VEC

#define FA_VME_INT_VEC   0xFA

Referenced by faInit().

◆ FADC_FIRMWARE_FX70T

#define FADC_FIRMWARE_FX70T   1

◆ FADC_FIRMWARE_LX110

#define FADC_FIRMWARE_LX110   0

◆ FASDC_BUSY_MASK

#define FASDC_BUSY_MASK   0x00ff

Referenced by faSDC_Status().

◆ FASDC_CSR_BUSY

#define FASDC_CSR_BUSY   0x1

Referenced by faSDC_Busy().

◆ FASDC_CSR_INIT

#define FASDC_CSR_INIT   0x80

Referenced by faInit(), and faSDC_Config().

◆ FASDC_CSR_MASK

#define FASDC_CSR_MASK   0x00e1

◆ FASDC_CSR_SRESET

#define FASDC_CSR_SRESET   0x40

Referenced by faSDC_Sync().

◆ FASDC_CSR_TRIG

#define FASDC_CSR_TRIG   0x20

Referenced by faSDC_Trig().

◆ FASDC_CTRL_ASSERT_SOFT_BUSY

#define FASDC_CTRL_ASSERT_SOFT_BUSY   0x8000

◆ FASDC_CTRL_CLK_EXT

#define FASDC_CTRL_CLK_EXT   0x1

Referenced by faSDC_Status().

◆ FASDC_CTRL_ENABLE_SOFT_SRESET

#define FASDC_CTRL_ENABLE_SOFT_SRESET   0x200

◆ FASDC_CTRL_ENABLE_SOFT_TRIG

#define FASDC_CTRL_ENABLE_SOFT_TRIG   0x20

◆ FASDC_CTRL_MASK

#define FASDC_CTRL_MASK   0x8331

Referenced by faSDC_Status().

◆ FASDC_CTRL_NOSYNC_SRESET

#define FASDC_CTRL_NOSYNC_SRESET   0x100

Referenced by faSDC_Config(), and faSDC_Status().

◆ FASDC_CTRL_NOSYNC_TRIG

#define FASDC_CTRL_NOSYNC_TRIG   0x10

Referenced by faSDC_Config(), and faSDC_Status().

Typedef Documentation

◆ faUpdateWatcherArgs_t

Enumeration Type Documentation

◆ faArgs_enum

Enumerator
FA_ARGS_SHOW_ID 
FA_ARGS_SHOW_PROGRESS 
FA_ARGS_SHOW_DONE 
FA_ARGS_SHOW_STRING 
FA_ARGS_LAST 

Function Documentation

◆ faCheckAddresses()

int faCheckAddresses ( int  id)

References fadcID, and FAp.

◆ fadcFirmwareAttachUpdateWatcher()

int fadcFirmwareAttachUpdateWatcher ( VOIDFUNCPTR  routine,
faUpdateWatcherArgs_t  arg 
)

◆ fadcFirmwareCheckSRAM()

int fadcFirmwareCheckSRAM ( int  id)

◆ fadcFirmwareChipFromFpgaID()

int fadcFirmwareChipFromFpgaID ( int  pflag)

◆ fadcFirmwareDownloadConfigData()

void fadcFirmwareDownloadConfigData ( int  id)

◆ fadcFirmwareGetFpgaID()

int fadcFirmwareGetFpgaID ( int  pflag)

◆ fadcFirmwareGLoad()

int fadcFirmwareGLoad ( int  chip,
int  pFlag 
)

◆ fadcFirmwareLoad()

int fadcFirmwareLoad ( int  id,
int  chip,
int  pFlag 
)

◆ fadcFirmwareReadFile()

int fadcFirmwareReadFile ( char *  filename)

◆ fadcFirmwareReadMcsFile()

int fadcFirmwareReadMcsFile ( char *  filename)

◆ fadcFirmwareRevFromFpgaID()

int fadcFirmwareRevFromFpgaID ( int  pflag)

◆ fadcFirmwareSetFilename()

void fadcFirmwareSetFilename ( char *  filename,
int  chip 
)

◆ fadcFirmwareTestReady()

int fadcFirmwareTestReady ( int  id,
int  n_try,
int  pFlag 
)

◆ fadcFirmwareUpdateWatcher()

void fadcFirmwareUpdateWatcher ( faUpdateWatcherArgs_t  arg)

◆ fadcFirmwareVerifyDownload()

int fadcFirmwareVerifyDownload ( int  id)

◆ fadcFirmwareZeroSRAM()

int fadcFirmwareZeroSRAM ( int  id)

◆ faItrigDisable()

void faItrigDisable ( int  id,
int  dflag 
)

◆ faItrigEnable()

void faItrigEnable ( int  id,
int  eflag 
)

◆ faItrigGetHBdelay()

unsigned int faItrigGetHBdelay ( int  id,
unsigned int  chan 
)

◆ faItrigGetHBwidth()

unsigned int faItrigGetHBwidth ( int  id,
unsigned int  chan 
)

◆ faItrigGetTableVal()

int faItrigGetTableVal ( int  id,
unsigned short  pMask 
)

◆ faItrigInitTable()

int faItrigInitTable ( int  id,
unsigned int *  table 
)

◆ faItrigPrintHBinfo()

void faItrigPrintHBinfo ( int  id)

◆ faItrigSetHBdelay()

int faItrigSetHBdelay ( int  id,
unsigned short  hbDelay,
unsigned short  hbMask 
)

◆ faItrigSetHBwidth()

int faItrigSetHBwidth ( int  id,
unsigned short  hbWidth,
unsigned short  hbMask 
)

◆ faItrigSetMode()

int faItrigSetMode ( int  id,
int  tmode,
unsigned int  wWidth,
unsigned int  wMask,
unsigned int  cMask,
unsigned int  sumThresh,
unsigned int *  tTable 
)

◆ faItrigSetOutWidth()

unsigned int faItrigSetOutWidth ( int  id,
unsigned short  itrigWidth 
)

◆ faItrigSetTableVal()

void faItrigSetTableVal ( int  id,
unsigned short  tval,
unsigned short  pMask 
)

Variable Documentation

◆ fa_mode_names

const char* fa_mode_names[FA_MAX_PROC_MODE+1]

Referenced by faStatus().