|
JLab f1TDC-V2,V3 Library
V2:0x0e,V3:0x15
|
Functions | |
| int | f1ConfigRead (int id, unsigned int *config_data, int chipID) |
| Read the f1TDC Chip Registers into user specified config_data array. More... | |
| void | f1ConfigShow (int id, int chipMask) |
| Print to standard out the configuration of the f1TDC chips specified by the chipmask and module in slot id. More... | |
| int | f1GetSerialNumber (int id, char **rval) |
| Fills 'rval' with a character array containing the fa250 serial number. More... | |
| int | f1GetFirmwareVersion (int id, int pflag) |
| Get the firmware version of the FPGA. More... | |
| void | f1Status (int id, int sflag) |
| Print Status of f1TDC to standard out. More... | |
| void | f1GStatus (int sFlag) |
| Print Status of all initialized f1TDCs to standard out. More... | |
| void | f1ChipStatus (int id, int pflag) |
| Print Status of f1TDC chips to standard out. More... | |
| unsigned int | f1ErrorStatus (int id, int sflag) |
| Return the Error status for all the f1TDC chips on the module. More... | |
| unsigned int | f1GErrorStatus (int sflag) |
| Return the Error status for all the f1TDC chips on all initialized modules. More... | |
| int | f1CheckLock (int id) |
| Get Resolution lock status for all chips on the board. More... | |
| int | f1GCheckLock (int pflag) |
| Get Resolution lock status for all chips on all initialized f1TDCs. More... | |
| unsigned int | f1ScanMask () |
| Return the mask of all initialized modules. More... | |
| int | f1GetRez (int id) |
| Return the mask of f1TDCs chips on the module that are set in high resolution mode. More... | |
| unsigned int | f1ReadCSR (int id) |
| Return the value of the CSR register of the module. More... | |
| int | f1Enabled (int id) |
| Return enabled/disabled status of FPGA data fifo. More... | |
| void | f1DataDecode (int id, unsigned int data) |
| Decode a data word from an fADC250 and print to standard out. More... | |
| int f1CheckLock | ( | int | id | ) |
Get Resolution lock status for all chips on the board.
| id |
|
References F1_CHIP_RES_LOCKED, F1_MAX_TDC_CHIPS, f1ID, F1LOCK, f1Nchips, f1p, F1UNLOCK, and f1tdc_struct::stat.
Referenced by f1GCheckLock(), and f1Init().
| void f1ChipStatus | ( | int | id, |
| int | pflag | ||
| ) |
Print Status of f1TDC chips to standard out.
| id |
|
| pflag | Print to standard out flag
|
References F1_CHIP_EXTFIFO_ALMOST_FULL, F1_CHIP_EXTFIFO_EMPTY, F1_CHIP_EXTFIFO_FULL, F1_CHIP_HITFIFO_OVERFLOW, F1_CHIP_INITIALIZED, F1_CHIP_LATCH_STAT_MASK, F1_CHIP_OUTFIFO_OVERFLOW, F1_CHIP_RES_LOCKED, F1_CHIP_STAT_MASK, F1_CHIP_TRIGFIFO_OVERFLOW, F1_MAX_TDC_CHIPS, f1ID, F1LOCK, f1Nchips, f1p, F1UNLOCK, and f1tdc_struct::stat.
Referenced by f1Status(), and f1TestRead().
| int f1ConfigRead | ( | int | id, |
| unsigned int * | config_data, | ||
| int | chipID | ||
| ) |
Read the f1TDC Chip Registers into user specified config_data array.
| id |
|
| config_data |
|
| chipID |
|
References f1ID, F1LOCK, f1Nchips, f1p, and F1UNLOCK.
Referenced by f1SetWindow().
| void f1ConfigShow | ( | int | id, |
| int | chipMask | ||
| ) |
Print to standard out the configuration of the f1TDC chips specified by the chipmask and module in slot id.
| id |
|
| chipMask |
|
References F1_ALL_CHIPS, f1ClockSource, f1ID, F1LOCK, f1Nchips, f1p, and F1UNLOCK.
Referenced by f1Status().
| void f1DataDecode | ( | int | id, |
| unsigned int | data | ||
| ) |
Decode a data word from an fADC250 and print to standard out.
| id |
|
| data | 32bit f1TDC data word |
References F1_VERSION_BOARDREV_MASK, and f1Rev.
| int f1Enabled | ( | int | id | ) |
Return enabled/disabled status of FPGA data fifo.
| id |
|
References f1tdc_struct::ctrl, f1ID, F1LOCK, f1p, and F1UNLOCK.
Referenced by f1SetWindow().
| unsigned int f1ErrorStatus | ( | int | id, |
| int | sflag | ||
| ) |
Return the Error status for all the f1TDC chips on the module.
| id |
|
| sflag | Status flag
|
References f1tdc_struct::csr, F1_CHIP_ERROR_COND, F1_CHIP_RES_LOCKED, F1_CSR_ERROR_MASK, F1_MAX_TDC_CHIPS, f1ID, F1LOCK, f1Nchips, f1p, F1UNLOCK, and f1tdc_struct::stat.
| int f1GCheckLock | ( | int | pflag | ) |
Get Resolution lock status for all chips on all initialized f1TDCs.
| pflag | Print Flag
|
References f1tdc_struct::csr, F1_CSR_ERROR_MASK, f1CheckLock(), f1ID, F1LOCK, f1p, F1UNLOCK, nf1tdc, and f1tdc_struct::stat.
| unsigned int f1GErrorStatus | ( | int | sflag | ) |
Return the Error status for all the f1TDC chips on all initialized modules.
| sflag | Status flag
|
References f1tdc_struct::csr, F1_CHIP_ERROR_COND, F1_CHIP_RES_LOCKED, F1_CSR_ERROR_MASK, F1_MAX_TDC_CHIPS, f1ID, F1LOCK, f1Nchips, f1p, F1UNLOCK, nf1tdc, and f1tdc_struct::stat.
Referenced by f1ISR(), and f1TestRead().
| int f1GetFirmwareVersion | ( | int | id, |
| int | pflag | ||
| ) |
Get the firmware version of the FPGA.
| id |
|
| pflag | Print to standard out flag
|
RETURNS: FPGA Version if successful or -1 if error
References F1_VERSION_FIRMWARE_MASK, f1ID, F1LOCK, f1p, F1UNLOCK, and f1tdc_struct::version.
| int f1GetRez | ( | int | id | ) |
| int f1GetSerialNumber | ( | int | id, |
| char ** | rval | ||
| ) |
Fills 'rval' with a character array containing the fa250 serial number.
| id |
|
| rval | Where to return Serial number string |
References f1ID, f1p, and f1tdc_struct::serial_eprom.
| void f1GStatus | ( | int | sFlag | ) |
Print Status of all initialized f1TDCs to standard out.
| sflag | Status flag
|
References f1ID, f1Status(), and nf1tdc.
| unsigned int f1ReadCSR | ( | int | id | ) |
| unsigned int f1ScanMask | ( | ) |
Return the mask of all initialized modules.
Referenced by f1ISR(), and f1TestRead().
| void f1Status | ( | int | id, |
| int | sflag | ||
| ) |
Print Status of f1TDC to standard out.
| id |
|
| sflag | Status flag
|
References f1tdc_struct::adr32, f1tdc_struct::adr_mb, f1tdc_struct::block_count, f1tdc_struct::block_word_count_fifo, f1tdc_struct::blocklevel, f1tdc_struct::csr, f1tdc_struct::ctrl, f1tdc_struct::ctrl2, f1tdc_struct::ev_count, F1_A32_ADDR_MASK, F1_A32_ENABLE, F1_ALL_CHIPS, F1_AMB_ENABLE, F1_AMB_MAX_MASK, F1_AMB_MIN_MASK, F1_BLOCKLEVEL_MASK, F1_CHIP_ERROR_COND, F1_CHIP_RES_LOCKED, F1_CSR_BLOCK_READY, F1_CSR_ERROR_MASK, F1_CSR_MODULE_EMPTY, F1_ENABLE_BERR, F1_ENABLE_MULTIBLOCK, F1_EVENT_COUNT_MASK, F1_FIRST_BOARD, F1_GO_DATA, F1_INT_ENABLE, F1_INT_LEVEL_MASK, F1_INT_VEC_MASK, F1_LAST_BOARD, F1_MAX_TDC_CHIPS, F1_MB_TOKEN_P0, F1_MB_TOKEN_P2, F1_REFCLK_INTERNAL_ENABLE, F1_REFCLK_SRC_FP, F1_REFCLK_SRC_INTERNALFP, F1_START_SRC_FP, F1_START_SRC_MASK, F1_START_SRC_P0, F1_START_SRC_SOFT, F1_SYNC_RESET_SRC_FP, F1_SYNC_RESET_SRC_MASK, F1_SYNC_RESET_SRC_P0, F1_SYNC_RESET_SRC_SOFT, F1_TRIGGER_SRC_FP, F1_TRIGGER_SRC_MASK, F1_TRIGGER_SRC_P0, F1_TRIGGER_SRC_SOFT, F1_VERSION_BOARDREV_MASK, F1_VERSION_FIRMWARE_MASK, f1ChipStatus(), f1ConfigShow(), f1ID, F1LOCK, f1Nchips, f1p, f1pd, f1tdcA24Offset, F1UNLOCK, f1tdc_struct::intr, f1tdc_struct::scaler1, f1tdc_struct::stat, f1tdc_struct::sync_scaler, f1tdc_struct::trig2_scaler, and f1tdc_struct::version.
Referenced by f1GStatus().