AlcapDAQ
1
|
Go to the source code of this file.
Functions | |
uint16_t | v1290_Read16 (MVME_INTERFACE *mvme, uint32_t base, int offset) |
uint32_t | v1290_Read32 (MVME_INTERFACE *mvme, uint32_t base, int offset) |
void | v1290_Write16 (MVME_INTERFACE *mvme, uint32_t base, int offset, uint16_t value) |
int | v1290_DataRead (MVME_INTERFACE *mvme, uint32_t base, uint32_t *pdest, int nentry) |
int | v1290_MicroWrite (MVME_INTERFACE *mvme, uint32_t base, uint16_t data) |
int | v1290_MicroRead (MVME_INTERFACE *mvme, const uint32_t base) |
uint16_t | v1290_ReadMicro (MVME_INTERFACE *mvme, const uint32_t base, uint16_t opcode) |
void | v1290_WriteMicro (MVME_INTERFACE *mvme, uint32_t base, uint16_t opcode, uint16_t data) |
void | v1290_TriggerMatchingSet (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_ContinuousSet (MVME_INTERFACE *mvme, uint32_t base) |
int | v1290_AcqModeRead (MVME_INTERFACE *mvme, uint32_t base) |
int | v1290_TriggerConfRead (MVME_INTERFACE *mvme, uint32_t base, uint16_t *conf) |
void | v1290_SetWindowWidth (MVME_INTERFACE *mvme, uint32_t base, uint16_t width) |
void | v1290_SetWindowOffset (MVME_INTERFACE *mvme, uint32_t base, int16_t offset) |
void | v1290_SetExtraMargin (MVME_INTERFACE *mvme, uint32_t base, uint16_t margin) |
void | v1290_SetRejectMargin (MVME_INTERFACE *mvme, uint32_t base, uint16_t margin) |
void | v1290_EnableTriggerSubtraction (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_SetEdgeDetection (MVME_INTERFACE *mvme, uint32_t base, uint16_t edge) |
void | v1290_SetEdgeResolution (MVME_INTERFACE *mvme, uint32_t base, uint16_t res) |
uint16_t | v1290_ReadEdgeResolution (MVME_INTERFACE *mvme, uint32_t base) |
uint16_t | v1290_ReadEdgeDetection (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_SetDeadtime (MVME_INTERFACE *mvme, uint32_t base, uint16_t deadtime) |
uint16_t | v1290_ReadDeadtime (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_EnableHeader (MVME_INTERFACE *mvme, uint32_t base, bool en) |
bool | v1290_HeaderIsEnabled (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_SetMaxHits (MVME_INTERFACE *mvme, uint32_t base, uint16_t max) |
uint16_t | v1290_ReadMaxHits (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_EnableTDCErrorMark (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_EnableBypassTDC (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_SetFIFOSize (MVME_INTERFACE *mvme, uint32_t base, uint16_t size) |
uint16_t | v1290_ReadFIFOSize (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_EnableChannel (MVME_INTERFACE *mvme, uint32_t base, uint16_t chn, bool en) |
void | v1290_EnableAllChannels (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_DisableAllChannels (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_WriteEnablePattern (MVME_INTERFACE *mvme, uint32_t base, uint16_t pattern) |
uint16_t | v1290_ReadEnablePattern (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_ReadControlRegister (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_EnableBusError (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_EnableEmptyEvent (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_EnableEventFIFO (MVME_INTERFACE *mvme, uint32_t base, bool en) |
void | v1290_ReadStatusRegister (MVME_INTERFACE *mvme, uint32_t base) |
bool | v1290_IsDataReady (MVME_INTERFACE *mvme, uint32_t base) |
bool | v1290_IsAlmostFull (MVME_INTERFACE *mvme, uint32_t base) |
bool | v1290_IsFull (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_ModuleReset (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_SoftClear (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_EventReset (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_SoftTrigger (MVME_INTERFACE *mvme, uint32_t base) |
uint32_t | v1290_ReadEventCounter (MVME_INTERFACE *mvme, uint32_t base) |
uint16_t | v1290_ReadEventStored (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_SetAlmostFullLevel (MVME_INTERFACE *mvme, uint32_t base, uint16_t level) |
uint16_t | v1290_ReadAlmostFullLevel (MVME_INTERFACE *mvme, uint32_t base, uint16_t level) |
void | v1290_FWRev (MVME_INTERFACE *mvme, uint32_t base) |
void | v1290_ReadEventFIFO (MVME_INTERFACE *mvme, uint32_t base, uint16_t *dest) |
uint16_t | v1290_ReadEventFIFOStatus (MVME_INTERFACE *mvme, uint32_t base) |
int v1290_AcqModeRead | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 148 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), printf(), v1290_MicroRead(), v1290_MicroWrite(), V1290_READ_ACQ_MOD_OPCODE, and value.
void v1290_ContinuousSet | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 139 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_CONT_STORE_OPCODE, v1290_MicroWrite(), and value.
int v1290_DataRead | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint32_t * | pdest, | ||
int | nentry | ||
) |
Definition at line 47 of file v1290.c.
References MVME_BLT_BLT32, MVME_BLT_NONE, mvme_read(), mvme_set_am(), mvme_set_blt(), mvme_set_dmode(), status, V1290_AM, and V1290_BUFF_DW.
void v1290_DisableAllChannels | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 344 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), printf(), V1290_DIS_ALL_CH_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableAllChannels | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 335 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_EN_ALL_CH_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableBusError | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 376 of file v1290.c.
References V1290_CONTROL, v1290_Read16(), and v1290_Write16().
void v1290_EnableBypassTDC | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 294 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_DIS_ERROR_BYPASS_OPCODE, V1290_EN_ERROR_BYPASS_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableChannel | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | chn, | ||
bool | en | ||
) |
Definition at line 319 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_DIS_CHANNEL_OPCODE, V1290_EN_CHANNEL_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableEmptyEvent | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 385 of file v1290.c.
References V1290_CONTROL, v1290_Read16(), and v1290_Write16().
void v1290_EnableEventFIFO | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 394 of file v1290.c.
References V1290_CONTROL, v1290_Read16(), and v1290_Write16().
void v1290_EnableHeader | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 249 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_DIS_HEAD_TRAILER_OPCODE, V1290_EN_HEAD_TRAILER_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableTDCErrorMark | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 279 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_DIS_ERROR_MARK_OPCODE, V1290_EN_ERROR_MARK_OPCODE, v1290_MicroWrite(), and value.
void v1290_EnableTriggerSubtraction | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
bool | en | ||
) |
Definition at line 202 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), V1290_DIS_SUB_TRG_OPCODE, V1290_EN_SUB_TRG_OPCODE, v1290_MicroWrite(), and value.
void v1290_EventReset | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 453 of file v1290.c.
References V1290_SW_EVENT_RESET, and v1290_Write16().
void v1290_FWRev | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 485 of file v1290.c.
References showbits(), V1290_FW_REV, and v1290_Read16().
bool v1290_HeaderIsEnabled | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 264 of file v1290.c.
References V1290_READ_HEAD_TRAILER_OPCODE, and v1290_ReadMicro().
bool v1290_IsAlmostFull | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
bool v1290_IsDataReady | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 425 of file v1290.c.
References v1290_Read16(), and V1290_STATUS.
bool v1290_IsFull | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
int v1290_MicroRead | ( | MVME_INTERFACE * | mvme, |
const uint32_t | base | ||
) |
Definition at line 87 of file v1290.c.
References i, mvme_read_value(), mvme_set_am(), mvme_set_dmode(), V1290_AM, V1290_MICRO, V1290_MICRO_HND, V1290_MICRO_RD_OK, and V1290_REG_DW.
Referenced by v1290_AcqModeRead(), v1290_ReadMicro(), and v1290_TriggerConfRead().
int v1290_MicroWrite | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | data | ||
) |
Definition at line 68 of file v1290.c.
References i, mvme_read_value(), mvme_set_am(), mvme_set_dmode(), mvme_write_value(), printf(), V1290_AM, V1290_MICRO, V1290_MICRO_HND, V1290_MICRO_WR_OK, and V1290_REG_DW.
Referenced by v1290_AcqModeRead(), v1290_ContinuousSet(), v1290_DisableAllChannels(), v1290_EnableAllChannels(), v1290_EnableBypassTDC(), v1290_EnableChannel(), v1290_EnableHeader(), v1290_EnableTDCErrorMark(), v1290_EnableTriggerSubtraction(), v1290_ReadMicro(), v1290_TriggerConfRead(), v1290_TriggerMatchingSet(), and v1290_WriteMicro().
void v1290_ModuleReset | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 443 of file v1290.c.
References V1290_MOD_RESET, and v1290_Write16().
uint16_t v1290_Read16 | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
int | offset | ||
) |
Definition at line 12 of file v1290.c.
References mvme_get_dmode(), mvme_read_value(), mvme_set_am(), mvme_set_dmode(), V1290_AM, and V1290_REG_DW.
Referenced by v1290_EnableBusError(), v1290_EnableEmptyEvent(), v1290_EnableEventFIFO(), v1290_FWRev(), v1290_IsAlmostFull(), v1290_IsDataReady(), v1290_IsFull(), v1290_ReadAlmostFullLevel(), v1290_ReadControlRegister(), v1290_ReadEventFIFOStatus(), v1290_ReadEventStored(), and v1290_ReadStatusRegister().
uint32_t v1290_Read32 | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
int | offset | ||
) |
Definition at line 24 of file v1290.c.
References mvme_get_dmode(), mvme_read_value(), mvme_set_am(), mvme_set_dmode(), V1290_AM, and V1290_BUFF_DW.
Referenced by v1290_ReadEventCounter(), and v1290_ReadEventFIFO().
uint16_t v1290_ReadAlmostFullLevel | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | level | ||
) |
Definition at line 479 of file v1290.c.
References V1290_ALMOST_FULL_LVL, and v1290_Read16().
void v1290_ReadControlRegister | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
uint16_t v1290_ReadDeadtime | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 243 of file v1290.c.
References V1290_READ_DEAD_TIME_OPCODE, and v1290_ReadMicro().
uint16_t v1290_ReadEdgeDetection | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 233 of file v1290.c.
References V1290_READ_DEAD_TIME_OPCODE, and v1290_ReadMicro().
uint16_t v1290_ReadEdgeResolution | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 228 of file v1290.c.
References V1290_READ_RES_OPCODE, and v1290_ReadMicro().
uint16_t v1290_ReadEnablePattern | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 359 of file v1290.c.
References V1290_READ_EN_PATTERN_OPCODE, and v1290_ReadMicro().
uint32_t v1290_ReadEventCounter | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 463 of file v1290.c.
References V1290_EVENT_COUNTER, and v1290_Read32().
void v1290_ReadEventFIFO | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t * | dest | ||
) |
Definition at line 491 of file v1290.c.
References showbits(), V1290_EVENT_FIFO, and v1290_Read32().
uint16_t v1290_ReadEventFIFOStatus | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 499 of file v1290.c.
References V1290_EVENT_FIFO_STATUS, and v1290_Read16().
uint16_t v1290_ReadEventStored | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 468 of file v1290.c.
References V1290_EVENT_STORED, and v1290_Read16().
uint16_t v1290_ReadFIFOSize | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 314 of file v1290.c.
References V1290_READ_FIFO_SIZE_OPCODE, and v1290_ReadMicro().
uint16_t v1290_ReadMaxHits | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 274 of file v1290.c.
References V1290_READ_EVENT_SIZE_OPCODE, and v1290_ReadMicro().
uint16_t v1290_ReadMicro | ( | MVME_INTERFACE * | mvme, |
const uint32_t | base, | ||
uint16_t | opcode | ||
) |
Definition at line 106 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), v1290_MicroRead(), v1290_MicroWrite(), and value.
Referenced by v1290_HeaderIsEnabled(), v1290_ReadDeadtime(), v1290_ReadEdgeDetection(), v1290_ReadEdgeResolution(), v1290_ReadEnablePattern(), v1290_ReadFIFOSize(), and v1290_ReadMaxHits().
void v1290_ReadStatusRegister | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
void v1290_SetAlmostFullLevel | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | level | ||
) |
Definition at line 473 of file v1290.c.
References V1290_ALMOST_FULL_LVL, and v1290_Write16().
void v1290_SetDeadtime | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | deadtime | ||
) |
Definition at line 238 of file v1290.c.
References V1290_SET_DEAD_TIME_OPCODE, and v1290_WriteMicro().
void v1290_SetEdgeDetection | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | edge | ||
) |
Definition at line 218 of file v1290.c.
References V1290_SET_DETECTION_OPCODE, and v1290_WriteMicro().
void v1290_SetEdgeResolution | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | res | ||
) |
Definition at line 223 of file v1290.c.
References V1290_SET_TR_LEAD_LSB_OPCODE, and v1290_WriteMicro().
void v1290_SetExtraMargin | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | margin | ||
) |
Definition at line 192 of file v1290.c.
References V1290_SET_SW_MARGIN_OPCODE, and v1290_WriteMicro().
void v1290_SetFIFOSize | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | size | ||
) |
Definition at line 309 of file v1290.c.
References V1290_SET_FIFO_SIZE_OPCODE, and v1290_WriteMicro().
void v1290_SetMaxHits | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | max | ||
) |
Definition at line 269 of file v1290.c.
References V1290_SET_EVENT_SIZE_OPCODE, and v1290_WriteMicro().
void v1290_SetRejectMargin | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | margin | ||
) |
Definition at line 197 of file v1290.c.
References V1290_SET_REJ_MARGIN_OPCODE, and v1290_WriteMicro().
void v1290_SetWindowOffset | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
int16_t | offset | ||
) |
Definition at line 182 of file v1290.c.
References V1290_SET_WIN_OFFSET_OPCODE, and v1290_WriteMicro().
void v1290_SetWindowWidth | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | width | ||
) |
Definition at line 177 of file v1290.c.
References V1290_SET_WIN_WIDTH_OPCODE, and v1290_WriteMicro().
void v1290_SoftClear | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 448 of file v1290.c.
References V1290_SW_CLEAR, and v1290_Write16().
void v1290_SoftTrigger | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 458 of file v1290.c.
References V1290_SW_TRIGGER, and v1290_Write16().
int v1290_TriggerConfRead | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t * | conf | ||
) |
Definition at line 160 of file v1290.c.
References i, MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), printf(), v1290_MicroRead(), v1290_MicroWrite(), V1290_READ_TRG_CONF_OPCODE, and value.
void v1290_TriggerMatchingSet | ( | MVME_INTERFACE * | mvme, |
uint32_t | base | ||
) |
Definition at line 130 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), v1290_MicroWrite(), V1290_TRG_MATCH_OPCODE, and value.
void v1290_Write16 | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
int | offset, | ||
uint16_t | value | ||
) |
Definition at line 36 of file v1290.c.
References mvme_get_dmode(), mvme_set_am(), mvme_set_dmode(), mvme_write_value(), V1290_AM, and V1290_REG_DW.
Referenced by v1290_EnableBusError(), v1290_EnableEmptyEvent(), v1290_EnableEventFIFO(), v1290_EventReset(), v1290_ModuleReset(), v1290_SetAlmostFullLevel(), v1290_SoftClear(), and v1290_SoftTrigger().
void v1290_WriteEnablePattern | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | pattern | ||
) |
Definition at line 354 of file v1290.c.
References V1290_WRITE_EN_PATTERN_OPCODE, and v1290_WriteMicro().
void v1290_WriteMicro | ( | MVME_INTERFACE * | mvme, |
uint32_t | base, | ||
uint16_t | opcode, | ||
uint16_t | data | ||
) |
Definition at line 118 of file v1290.c.
References MVME_DMODE_D16, mvme_get_dmode(), mvme_set_dmode(), v1290_MicroWrite(), and value.
Referenced by v1290_SetDeadtime(), v1290_SetEdgeDetection(), v1290_SetEdgeResolution(), v1290_SetExtraMargin(), v1290_SetFIFOSize(), v1290_SetMaxHits(), v1290_SetRejectMargin(), v1290_SetWindowOffset(), v1290_SetWindowWidth(), and v1290_WriteEnablePattern().