vf48.h File Reference

Go to the source code of this file.

Defines

#define VF48_CSR_REG_RW   (DWORD) (0)
#define VF48_FIRMWARE_R   (DWORD) (0x0030)
#define VF48_PARAM_DATA_RW   (DWORD) (0x0050)
#define VF48_PARAM_ID_W   (DWORD) (0x0060)
#define VF48_NFRAME_R   (DWORD) (0x00A0)
#define VF48_GLOBAL_RESET_W   (DWORD) (0x00B0)
#define VF48_DATA_FIFO_R   (DWORD) (0x1000)

Functions

int vf48_isPresent (MVME_INTERFACE *mvme, DWORD base)
int vf48_EventRead (MVME_INTERFACE *myvme, DWORD base, DWORD *event, int *elements)
int vf48_DataRead (MVME_INTERFACE *myvme, DWORD base, DWORD *event, int *elements)
int vf48_ExtTrgSet (MVME_INTERFACE *myvme, DWORD base)
int vf48_ExtTrgClr (MVME_INTERFACE *myvme, DWORD base)
int vf48_ParameterRead (MVME_INTERFACE *myvme, DWORD base, int grp, int param)
int vf48_SegmentSizeSet (MVME_INTERFACE *mvme, DWORD base, DWORD size)
int vf48_SegmentSizeRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_TrgThresholdSet (MVME_INTERFACE *mvme, DWORD base, int grp, DWORD size)
int vf48_TrgThresholdRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_HitThresholdSet (MVME_INTERFACE *mvme, DWORD base, int grp, DWORD size)
int vf48_HitThresholdRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_ActiveChMaskSet (MVME_INTERFACE *mvme, DWORD base, int grp, DWORD size)
int vf48_ActiveChMaskRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_RawDataSuppSet (MVME_INTERFACE *mvme, DWORD base, int grp, DWORD size)
int vf48_RawDataSuppRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_ChSuppSet (MVME_INTERFACE *mvme, DWORD base, int grp, DWORD size)
int vf48_ChSuppRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_DivisorWrite (MVME_INTERFACE *mvme, DWORD base, DWORD size)
int vf48_DivisorRead (MVME_INTERFACE *mvme, DWORD base, int grp)
int vf48_Status (MVME_INTERFACE *mvme, DWORD base)


Define Documentation

#define VF48_ACTIVE_CH_MASK   (DWORD) (9)

Definition at line 106 of file vf48.h.

Referenced by vf48_ActiveChMaskRead(), and vf48_ActiveChMaskSet().

#define VF48_ALL_CHANNELS_ACTIVE   0xFF

Definition at line 127 of file vf48.h.

#define VF48_ATTENUATOR   (DWORD) (14)

Definition at line 101 of file vf48.h.

#define VF48_CFD_FEATURE   (DWORD) (0x40000000)

Definition at line 133 of file vf48.h.

#define VF48_CH_SUPPRESS_ENABLE   0x1

Definition at line 125 of file vf48.h.

#define VF48_CHANNEL   (DWORD) (0xC0000000)

Definition at line 131 of file vf48.h.

#define VF48_CLIP_DELAY   (DWORD) (3)

Definition at line 90 of file vf48.h.

#define VF48_CSR_CRC_ERROR   (DWORD) (0x00000020)

Definition at line 121 of file vf48.h.

Referenced by vf48_ParameterRead().

#define VF48_CSR_EXT_TRIGGER   (DWORD) (0x00000080)

Definition at line 122 of file vf48.h.

Referenced by vf48_ExtTrgClr(), and vf48_ExtTrgSet().

#define VF48_CSR_FE_FULL   (DWORD) (0x00008000)

Definition at line 123 of file vf48.h.

Referenced by vf48_FeFull().

#define VF48_CSR_FE_NOTEMPTY   (DWORD) (0x00000008)

Definition at line 120 of file vf48.h.

Referenced by vf48_FeNotEmpty().

#define VF48_CSR_PARM_DATA_RDY   (DWORD) (0x00000004)

Definition at line 119 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_CSR_PARM_ID_RDY   (DWORD) (0x00000002)

Definition at line 118 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_CSR_REG_RW   (DWORD) (0)

-RW-D16/32

Definition at line 29 of file vf48.h.

Referenced by vf48_AcqStart(), vf48_AcqStop(), vf48_CsrRead(), vf48_ExtTrgClr(), vf48_ExtTrgSet(), vf48_FeFull(), vf48_FeNotEmpty(), vf48_ParameterRead(), vf48_ParameterWrite(), vf48_Reset(), and vf48_Trigger().

#define VF48_CSR_START_ACQ   (DWORD) (0x00000001)

Definition at line 117 of file vf48.h.

Referenced by vf48_AcqStart(), and vf48_AcqStop().

#define VF48_DATA   (DWORD) (0x00000000)

Definition at line 132 of file vf48.h.

#define VF48_DATA_FIFO_R   (DWORD) (0x1000)

-R-D32

Definition at line 40 of file vf48.h.

Referenced by vf48_DataRead(), and vf48_EventRead().

#define VF48_DELAY_A   (DWORD) (9)

Definition at line 96 of file vf48.h.

#define VF48_DELAY_B   (DWORD) (11)

Definition at line 98 of file vf48.h.

#define VF48_ERR_HW   (603)

Definition at line 28 of file vf48.h.

Referenced by vf48_AcqStart(), vf48_AcqStop(), and vf48_Reset().

#define VF48_ERR_NODATA   (503)

Definition at line 27 of file vf48.h.

Referenced by vf48_EventRead().

#define VF48_ERR_PARM   (-1)

Definition at line 26 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_ERROR   (-1)

Definition at line 25 of file vf48.h.

Referenced by vf48_EventRead(), vf48_EventRead64(), and vf48_isPresent().

#define VF48_FIRMWARE_ID   (DWORD) (13)

Definition at line 100 of file vf48.h.

#define VF48_FIRMWARE_R   (DWORD) (0x0030)

-R-D16/32

Definition at line 33 of file vf48.h.

#define VF48_GLOBAL_RESET_W   (DWORD) (0x00B0)

-W

Definition at line 39 of file vf48.h.

Referenced by vf48_Reset().

#define VF48_GRP_OFFSET   (DWORD) (12)

Definition at line 86 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_GRP_REG_RW   (DWORD) (0x0090)

Definition at line 37 of file vf48.h.

Referenced by vf48_GrpEnable(), and vf48_GrpRead().

#define VF48_HEADER   (DWORD) (0x80000000)

Definition at line 129 of file vf48.h.

Referenced by vf48_EventRead(), and vf48_EventRead64().

#define VF48_HIT_THRESHOLD   (DWORD) (2)

Definition at line 89 of file vf48.h.

Referenced by vf48_HitThresholdRead(), and vf48_HitThresholdSet().

#define VF48_IDXMAX   4096

Definition at line 20 of file vf48.h.

Referenced by vf48_EventRead64().

#define VF48_INVERSE_SIGNAL   0x8

Definition at line 126 of file vf48.h.

#define VF48_K_COEF   (DWORD) (6)

Definition at line 93 of file vf48.h.

#define VF48_L_COEF   (DWORD) (7)

Definition at line 94 of file vf48.h.

#define VF48_LATENCY   (DWORD) (12)

Definition at line 99 of file vf48.h.

Referenced by vf48_ParameterWrite().

#define VF48_M_COEF   (DWORD) (8)

Definition at line 95 of file vf48.h.

#define VF48_MAX_CHANNELS   (DWORD) 48

Definition at line 23 of file vf48.h.

#define VF48_MBIT1   (DWORD) (10)

Definition at line 97 of file vf48.h.

Referenced by vf48_RawDataSuppRead(), and vf48_RawDataSuppSet().

#define VF48_MBIT2   (DWORD) (11)

Definition at line 107 of file vf48.h.

Referenced by vf48_ChSuppRead(), vf48_ChSuppSet(), vf48_DivisorRead(), and vf48_DivisorWrite().

#define VF48_NFRAME_R   (DWORD) (0x00A0)

-R-D16/32

Definition at line 38 of file vf48.h.

Referenced by vf48_AcqStart(), vf48_AcqStop(), vf48_EventRead(), and vf48_NFrameRead().

#define VF48_PARAM_DATA_RW   (DWORD) (0x0050)

-RW-D16/32

Definition at line 34 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_PARAM_ID_W   (DWORD) (0x0060)

-W-D16/32

Definition at line 35 of file vf48.h.

Referenced by vf48_ParameterRead(), and vf48_ParameterWrite().

#define VF48_PARMA_BIT_RD   (DWORD) (0x80)

Definition at line 87 of file vf48.h.

Referenced by vf48_ParameterRead().

#define VF48_PEDESTAL   (DWORD) (1)

Definition at line 88 of file vf48.h.

#define VF48_PRE_TRIGGER   (DWORD) (4)

Definition at line 91 of file vf48.h.

Referenced by vf48_ParameterWrite().

#define VF48_Q_FEATURE   (DWORD) (0x50000000)

Definition at line 134 of file vf48.h.

#define VF48_RAW_DISABLE   0x2

Definition at line 124 of file vf48.h.

#define VF48_SEGMENT_SIZE   (DWORD) (5)

Definition at line 92 of file vf48.h.

Referenced by vf48_ParameterWrite(), vf48_SegmentSizeRead(), vf48_SegmentSizeSet(), and vf48_Setup().

#define VF48_SELECTIVE_CLR_W   (DWORD) (0x0014)

Definition at line 31 of file vf48.h.

Referenced by vf48_AcqStop().

#define VF48_SELECTIVE_SET_W   (DWORD) (0x0010)

Definition at line 30 of file vf48.h.

Referenced by vf48_AcqStart().

#define VF48_SOFT_TRIG_W   (DWORD) (0x0070)

Definition at line 36 of file vf48.h.

Referenced by vf48_Trigger().

#define VF48_SUCCESS   (1)

Definition at line 24 of file vf48.h.

Referenced by vf48_AcqStart(), vf48_AcqStop(), vf48_EventRead(), vf48_ExtTrgClr(), vf48_ExtTrgSet(), vf48_GrpEnable(), vf48_isPresent(), vf48_ParameterRead(), vf48_ParameterWrite(), vf48_Reset(), vf48_Status(), and vf48_Trigger().

#define VF48_TEST_REG_RW   (DWORD) (0x0020)

Definition at line 32 of file vf48.h.

Referenced by vf48_Reset().

#define VF48_TIME_STAMP   (DWORD) (0xA0000000)

Definition at line 130 of file vf48.h.

#define VF48_TRAILER   (DWORD) (0xE0000000)

Definition at line 135 of file vf48.h.

Referenced by vf48_EventRead(), and vf48_EventRead64().

#define VF48_TRIG_THRESHOLD   (DWORD) (15)

Definition at line 102 of file vf48.h.

Referenced by vf48_TrgThresholdRead(), and vf48_TrgThresholdSet().


Function Documentation

int vf48_AcqStart ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 427 of file vf48.c.

int vf48_AcqStop ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 452 of file vf48.c.

int vf48_ActiveChMaskRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the channel enable mask for a given group.

Definition at line 710 of file vf48.c.

int vf48_ActiveChMaskSet ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
DWORD  size 
)

Enable the channel within the given group. By default all 8 channels are enabled.

Definition at line 695 of file vf48.c.

int vf48_ChSuppRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the channel suppression flag for a given group.

Definition at line 779 of file vf48.c.

int vf48_ChSuppSet ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
DWORD  value 
)

Enable the suppression of channel based on the hit threshold for a given group. Currently the MBIT2 contains the divisor parameter too. This function will overwrite this parameter. Apply this function prior the divisor.

Definition at line 760 of file vf48.c.

int vf48_CsrRead ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 530 of file vf48.c.

int vf48_DataRead ( MVME_INTERFACE mvme,
DWORD  base,
DWORD pdest,
int *  nentry 
)

vf48_DataRead Read N entries (32bit) from the VF48 data FIFO using the MBLT64 mode

Parameters:
mvme vme structure
base VF48 base address
pdest Destination pointer
Returns:
nentry

Definition at line 185 of file vf48.c.

Referenced by vf48_EventRead64().

int vf48_DivisorRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the divisor parameter of the given group. All the groups should read the same value.

Definition at line 827 of file vf48.c.

Referenced by vf48_DivisorWrite().

int vf48_DivisorWrite ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  value 
)

write the sub-sampling divisor factor to all 6 groups. Value of 0 : base sampling Value of x>0 : base sampling / x

Definition at line 796 of file vf48.c.

int vf48_EventRead ( MVME_INTERFACE mvme,
DWORD  base,
DWORD pdest,
int *  nentry 
)

vf48_EventRead Read one Event (in 32bit mode)

Parameters:
mvme vme structure
base VF48 base address
pdest Pointer to destination
nentry Number of DWORD to transfer
Returns:
status VF48_ERROR, SUCCESS

Definition at line 128 of file vf48.c.

int vf48_EventRead64 ( MVME_INTERFACE myvme,
DWORD  base,
DWORD event,
int *  elements 
)

Definition at line 29 of file vf48.c.

int vf48_EvtEmpty ( MVME_INTERFACE myvme,
DWORD  base 
)

int vf48_ExtTrgClr ( MVME_INTERFACE mvme,
DWORD  base 
)

Clear External Trigger enable

Parameters:
mvme vme structure
base VMEIO base address
Returns:
vf48_SUCCESS

Definition at line 502 of file vf48.c.

int vf48_ExtTrgSet ( MVME_INTERFACE mvme,
DWORD  base 
)

Set External Trigger enable

Parameters:
mvme vme structure
base VF48 base address
Returns:
VF48_SUCCESS

Definition at line 483 of file vf48.c.

Referenced by vf48_Setup().

int vf48_FeFull ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 542 of file vf48.c.

int vf48_GroupRead ( MVME_INTERFACE myvme,
DWORD  base,
DWORD event,
int  grp,
int *  elements 
)

int vf48_GrpEnable ( MVME_INTERFACE myvme,
DWORD  base,
int  grpbit 
)

Definition at line 566 of file vf48.c.

int vf48_GrpOperationMode ( MVME_INTERFACE myvme,
DWORD  base,
int  grp,
int  opmode 
)

int vf48_GrpRead ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 579 of file vf48.c.

int vf48_HitThresholdRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the hit threshold for a given group.

Definition at line 679 of file vf48.c.

int vf48_HitThresholdSet ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
DWORD  size 
)

Set the hit threshold for the given group. the threshold value correspond to the difference of 2 sampling values separated by 2 points (s6-s3). It is compared to a positive value. If the slope of the signal is negative, the signal should be inverted. The hit threshold is used for channel suppression in case none of the described condition is satisfied.

Definition at line 664 of file vf48.c.

int vf48_isPresent ( MVME_INTERFACE mvme,
DWORD  base 
)

vf48_isPresent

Parameters:
mvme vme structure
base VF48 base address
Returns:
status VF48_ERROR if module is not present, SUCCESS

Definition at line 948 of file vf48.c.

Referenced by vf48_ParameterRead(), and vf48_Reset().

int vf48_NFrameRead ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 516 of file vf48.c.

Referenced by vf48_EventRead64().

int vf48_ParameterCheck ( MVME_INTERFACE myvme,
DWORD  base,
int  what 
)

int vf48_ParameterRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
int  param 
)

Read any Parameter for a given group. Each group (0..5) handles 8 consecutive input channels.

Parameters:
mvme vme structure
base VMEIO base address
grp group number (0..5)
Returns:
VF48_SUCCESS, VF48_ERR_PARM

Definition at line 293 of file vf48.c.

Referenced by vf48_ActiveChMaskRead(), vf48_ChSuppRead(), vf48_ChSuppSet(), vf48_DivisorRead(), vf48_DivisorWrite(), vf48_HitThresholdRead(), vf48_ParameterWrite(), vf48_RawDataSuppRead(), vf48_SegmentSizeRead(), vf48_Setup(), vf48_Status(), and vf48_TrgThresholdRead().

int vf48_ParameterWrite ( MVME_INTERFACE myvme,
DWORD  base,
int  grp,
int  param,
int  value 
)

Definition at line 205 of file vf48.c.

Referenced by vf48_ActiveChMaskSet(), vf48_ChSuppSet(), vf48_DivisorWrite(), vf48_HitThresholdSet(), vf48_RawDataSuppSet(), vf48_SegmentSizeSet(), vf48_Setup(), and vf48_TrgThresholdSet().

int vf48_RawDataSuppRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the flag of the raw data suppression of a given channel.

Definition at line 741 of file vf48.c.

int vf48_RawDataSuppSet ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
DWORD  size 
)

Suppress the transmission of the raw data (wave form) of all the channels of a given group. Feature Q,T are always present expect if channel masked.

Definition at line 726 of file vf48.c.

int vf48_Reset ( MVME_INTERFACE myvme,
DWORD  base 
)

Definition at line 396 of file vf48.c.

int vf48_SegmentSizeRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the segment size from a given group. This value should be the same for all the groups.

Definition at line 611 of file vf48.c.

int vf48_SegmentSizeSet ( MVME_INTERFACE mvme,
DWORD  base,
DWORD  size 
)

Set the segment size for all 6 groups

Definition at line 594 of file vf48.c.

int vf48_Setup ( MVME_INTERFACE mvme,
DWORD  base,
int  mode 
)

Definition at line 851 of file vf48.c.

int vf48_Status ( MVME_INTERFACE mvme,
DWORD  base 
)

vf48_Status

Parameters:
mvme vme structure
base VF48 base address
Returns:
status VF48_ERROR, SUCCESS

Definition at line 891 of file vf48.c.

int vf48_TrgThresholdRead ( MVME_INTERFACE mvme,
DWORD  base,
int  grp 
)

Read the trigger threshold for a given group.

Definition at line 644 of file vf48.c.

int vf48_TrgThresholdSet ( MVME_INTERFACE mvme,
DWORD  base,
int  grp,
DWORD  size 
)

Set the trigger threshold for the given group. the threshold value correspond to the difference of 2 sampling values separated by 2 points (s6-s3). It is compared to a positive value. If the slope of the signal is negative, the signal should be inverted.

Definition at line 629 of file vf48.c.

int vf48_Trigger ( MVME_INTERFACE mvme,
DWORD  base 
)

Definition at line 840 of file vf48.c.


Midas DOC Version 2.0.2 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel - Doxygen - Peter Green - Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Exaos Lee - Rudi Meier - Glenn Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou - Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk