Low-Energy Muon (LEM) Experiment
0.5.2
|
Go to the source code of this file.
Functions | |
int | sis3820_key_reset (int device, u_int32_t sis3820_base) |
int | sis3820_key_enable (int device, u_int32_t sis3820_base) |
int | sis3820_key_disable (int device, u_int32_t sis3820_base) |
int | sis3820_control_read (int device, u_int32_t sis3820_base, u_int32_t *control_status) |
int | sis3820_control_write (int device, u_int32_t sis3820_base, u_int32_t control_status) |
int | sis3820_modid_read (int device, u_int32_t sis3820_base, u_int32_t *modid) |
int | sis3820_operation_mode_read (int device, u_int32_t sis3820_base, u_int32_t *mode) |
int | sis3820_operation_mode_write (int device, u_int32_t sis3820_base, u_int32_t mode) |
int | sis3820_copy_disable_channel (int device, u_int32_t sis3820_base, u_int32_t channel_disable) |
int | sis3820_scaler_read (int device, u_int32_t sis3820_base, int mode, int nwords, u_int32_t *data) |
#define A32_2eVME 3 |
Definition at line 208 of file sis3820.h.
Referenced by sis3820_scaler_read().
#define A32BLT32 1 |
Definition at line 206 of file sis3820.h.
Referenced by read_scaler_event(), and sis3820_scaler_read().
#define A32MBLT64 2 |
Definition at line 207 of file sis3820.h.
Referenced by sis3820_scaler_read().
#define CTRL_REFERENCE_CH1_DISABLE 0x400000 |
Definition at line 147 of file sis3820.h.
Referenced by scaler_mode().
#define CTRL_REFERENCE_CH1_ENABLE 0x40 |
Definition at line 148 of file sis3820.h.
Referenced by scaler_mode().
#define CTRL_USER_LED_OFF 0x10000 /* default after Reset */ |
#define SIS3820_ACQUISITION_PRESET 0x10 /* read/write; D32 */ |
#define SIS3820_CBLT_BROADCAST_SETUP 0x30 /* read/write; D32 */ |
#define SIS3820_CONTROL_INPUT_MODE0 0x00000 |
Definition at line 176 of file sis3820.h.
Referenced by scaler_mode().
#define SIS3820_CONTROL_INPUT_MODE3 0x30000 |
Definition at line 179 of file sis3820.h.
Referenced by scaler_mode().
#define SIS3820_CONTROL_STATUS 0x0 /* read/write; D32 */ |
Definition at line 30 of file sis3820.h.
Referenced by sis3820_control_read(), and sis3820_control_write().
#define SIS3820_COPY_DISABLE 0x104 /* read/write; D32 */ |
Definition at line 55 of file sis3820.h.
Referenced by sis3820_copy_disable_channel().
#define SIS3820_COUNTER_CH1 0xA00 |
Definition at line 85 of file sis3820.h.
Referenced by sis3820_scaler_read().
#define SIS3820_COUNTER_INHIBIT 0x200 /* read/write; D32 */ |
#define SIS3820_COUNTER_OVERFLOW 0x208 /* read/write; D32 */ |
#define SIS3820_FIFO_WORDCOUNT_THRESHOLD 0x3C /* read/write; D32 */ |
#define SIS3820_HISCAL_START_PRESET 0x40 /* read/write; D32 */ |
#define SIS3820_KEY_OPERATION_DISABLE 0x41C |
Definition at line 77 of file sis3820.h.
Referenced by sis3820_key_disable().
#define SIS3820_KEY_OPERATION_ENABLE 0x418 |
Definition at line 76 of file sis3820.h.
Referenced by sis3820_key_enable().
#define SIS3820_KEY_RESET 0x400 |
Definition at line 69 of file sis3820.h.
Referenced by sis3820_key_reset().
#define SIS3820_LNE_CHANNEL_SELECT 0x108 /* read/write; D32 */ |
#define SIS3820_MODID 0x4 /* read only; D32 */ |
Definition at line 31 of file sis3820.h.
Referenced by sis3820_modid_read().
#define SIS3820_OPERATION_MODE 0x100 /* read/write; D32 */ |
Definition at line 54 of file sis3820.h.
Referenced by sis3820_operation_mode_read(), and sis3820_operation_mode_write().
#define SIS3820_PRESET_CHANNEL_SELECT 0x10C /* read/write; D32 */ |
#define SIS3820_PRESET_ENABLE_HIT 0x28 /* read/write; D32 */ |
#define SIS3820_SCALER_DATA_FORMAT_24BIT 0x4 |
Definition at line 163 of file sis3820.h.
Referenced by scaler_mode().
#define SIS3820_SCALER_DATA_FORMAT_32BIT 0x0 |
Definition at line 162 of file sis3820.h.
Referenced by scaler_mode().
#define SIS3820_SDRAM_BASE 0x800000 |
Definition at line 88 of file sis3820.h.
Referenced by sis3820_scaler_read().
#define SIS3820_SDRAM_EEPROM_CTRL_STAT 0x300 /* read/write; D32 */ |
int sis3820_control_read | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t * | control_status | ||
) |
Definition at line 191 of file sis3820.c.
References SIS3820_CONTROL_STATUS.
Referenced by init_sis3820(), and scaler_mode().
int sis3820_control_write | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t | control_status | ||
) |
Defines the operation mode by writing to Control status register SIS3820_CONTROL_STATUS = 0x0.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
control_status | can be |
CTRL_USER_LED_OFF 0x10000
CTRL_USER_LED_ON 0x1
CTRL_COUNTER_TEST_25MHZ_DISABLE 0x100000
CTRL_COUNTER_TEST_25MHZ_ENABLE 0x10
CTRL_COUNTER_TEST_MODE_DISABLE 0x200000
CTRL_COUNTER_TEST_MODE_ENABLE 0x20
CTRL_REFERENCE_CH1_DISABLE 0x400000
CTRL_REFERENCE_CH1_ENABLE 0x40
Definition at line 229 of file sis3820.c.
References SIS3820_CONTROL_STATUS.
Referenced by scaler_mode().
int sis3820_copy_disable_channel | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t | channel_disable | ||
) |
Disables channels in the SIS3820 multi-scaler in MCS mode.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
channel_disable | specifies the channels to be disabled, for example, channel_disable=0xFFFFFFF0 disables channels 5-32. |
Definition at line 253 of file sis3820.c.
References SIS3820_COPY_DISABLE.
int sis3820_key_disable | ( | int | device, |
u_int32_t | sis3820_base | ||
) |
Disables the SIS3820 for counting.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
Definition at line 84 of file sis3820.c.
References SIS3820_KEY_OPERATION_DISABLE.
Referenced by begin_of_run(), and resume_run().
int sis3820_key_enable | ( | int | device, |
u_int32_t | sis3820_base | ||
) |
Enables the SIS3820 for counting. Without Key enable the scaler channels will not count.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
Definition at line 62 of file sis3820.c.
References SIS3820_KEY_OPERATION_ENABLE.
Referenced by begin_of_run(), init_sis3820(), and resume_run().
int sis3820_key_reset | ( | int | device, |
u_int32_t | sis3820_base | ||
) |
Resets the SIS3820 to its power up default settings.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
Definition at line 39 of file sis3820.c.
References SIS3820_KEY_RESET.
Referenced by begin_of_run(), frontend_exit(), init_sis3820(), and resume_run().
int sis3820_modid_read | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t * | modid | ||
) |
int sis3820_operation_mode_read | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t * | mode | ||
) |
Definition at line 97 of file sis3820.c.
References SIS3820_OPERATION_MODE.
Referenced by init_sis3820(), and scaler_mode().
int sis3820_operation_mode_write | ( | int | device, |
u_int32_t | sis3820_base, | ||
u_int32_t | mode | ||
) |
Defines the operation mode by writing to register SIS3820_OPERATION_MODE = 0x100.
The user front panel input can be accessed by choosing SIS3820_SCALER_DATA_FORMAT_24BIT and, for example, SIS3820_CONTROL_MODE3. The channel number and input bit information is in the upper 8 bits, scaler data are truncated to 24 bit.
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
mode | can be |
SIS3820_CLEARING_MODE 0x0
SIS3820_NON_CLEARING_MODE 0x1
SIS3820_MCS_DATA_FORMAT_32BIT 0x0
SIS3820_MCS_DATA_FORMAT_24BIT 0x4
SIS3820_MCS_DATA_FORMAT_16BIT 0x8
SIS3820_MCS_DATA_FORMAT_8BIT 0xC
SIS3820_SCALER_DATA_FORMAT_32BIT 0x0
SIS3820_SCALER_DATA_FORMAT_24BIT 0x4
SIS3820_LNE_SOURCE_VME 0x0
SIS3820_LNE_SOURCE_CONTROL_SIGNAL 0x10
SIS3820_LNE_SOURCE_INTERNAL_10MHZ 0x20
SIS3820_LNE_SOURCE_CHANNEL_N 0x30
SIS3820_LNE_SOURCE_PRESET 0x40
SIS3820_ARM_ENABLE_CONTROL_SIGNAL 0x000
SIS3820_ARM_ENABLE_CHANNEL_N 0x100
SIS3820_FIFO_MODE 0x0000
SIS3820_SDRAM_MODE 0x1000
SIS3820_SDRAM_ADD_MODE 0x2000
SIS3820_HISCAL_START_SOURCE_VME 0x0000
SIS3820_HISCAL_START_SOURCE_EXTERN 0x4000
SIS3820_CONTROL_INPUT_MODE0 0x00000
SIS3820_CONTROL_INPUT_MODE1 0x10000
SIS3820_CONTROL_INPUT_MODE2 0x20000
SIS3820_CONTROL_INPUT_MODE3 0x30000
SIS3820_CONTROL_INPUT_MODE4 0x40000
SIS3820_CONTROL_INPUT_MODE5 0x50000
SIS3820_CONTROL_INPUTS_INVERT 0x80000
SIS3820_CONTROL_OUTPUT_MODE0 0x000000
SIS3820_CONTROL_OUTPUT_MODE1 0x100000
SIS3820_CONTROL_OUTPUTS_INVERT 0x800000
SIS3820_OP_MODE_SCALER 0x00000000
SIS3820_OP_MODE_MULTI_CHANNEL_SCALER 0x20000000
SIS3820_OP_MODE_VME_FIFO_WRITE 0x70000000
Definition at line 165 of file sis3820.c.
References SIS3820_OPERATION_MODE.
Referenced by scaler_mode().
int sis3820_scaler_read | ( | int | device, |
u_int32_t | sis3820_base, | ||
int | mode, | ||
int | nwords, | ||
u_int32_t * | data | ||
) |
Readout of SIS3820 in different modes. Scaler counts are automatically cleared after each read operation if non-clearing mode in SIS3820_OPERATION_MODE is set to 0 (default value).
Return:
device | is the is the handle to the VME-PCI device |
sis3820_base | is the SIS3820 VME address |
mode | defines read out mode: possible values are A32BLT32 and for MCS operation: A32MBLT64 or A32_2eVME; a A32BLT32 |
nwords | number of words to be read |
data | array where scaler data are written |
Definition at line 281 of file sis3820.c.
References A32_2eVME, A32BLT32, A32MBLT64, SIS3820_COUNTER_CH1, and SIS3820_SDRAM_BASE.
Referenced by read_scaler_event().