00001 #ifndef __CCAENV1X90OPCODES_H 00002 #define __CCAENV1X90OPCODES_H 00003 00012 namespace CCAENV1x90Opcodes 00013 { 00014 00015 // Can't use static or const in typedef. 00016 00017 00018 #define Opcode static const unsigned short 00019 00020 00021 // Acquisition mode: 00022 00023 Opcode TRG_MATCH (0x0000); 00024 Opcode CONT_STOR (0x0100); 00025 Opcode READ_ACQ_MOD (0x0200); 00026 Opcode SET_KEEP_TOKEN (0x0300); 00027 Opcode CLEAR_KEEP_TOKEN (0x0400); 00028 Opcode LOAD_DEF_CONFIG (0x0500); 00029 Opcode SAVE_USER_CONFIG (0x0600); 00030 Opcode LOAD_USER_CONFIG (0x0700); 00031 Opcode AUTOLOAD_USER_CONFIG (0x0800); 00032 Opcode AUTOLOAD_DEF_CONFIG (0x0900); 00033 00034 // Trigger setup: 00035 00036 Opcode SET_WIN_WIDTH (0x1000); 00037 Opcode SET_WIN_OFFS (0x1100); 00038 Opcode SET_SW_MARGIN (0x1200); 00039 Opcode SET_REJ_MARGIN (0x1300); 00040 Opcode EN_SUB_TRG (0x1400); 00041 Opcode DIS_SUB_TRG (0x1500); 00042 Opcode READ_TRG_CONF (0x1600); 00043 00044 // TDC Edge detection & resolution. 00045 00046 Opcode SET_DETECTION (0x2200); 00047 Opcode READ_DETECTION (0x2300); 00048 Opcode SET_TR_LEAD_LSB (0x2400); 00049 Opcode SET_PAIR_RES (0x2500); 00050 Opcode READ_RES (0x2600); 00051 Opcode SET_DEAD_TIME (0x2800); 00052 Opcode READ_DEAD_TIME (0x2900); 00053 00054 // TDC Readout-data structure: 00055 00056 Opcode EN_HEADER_TRAILER (0x3000); 00057 Opcode DIS_HEADER_TRAILER (0x3100); 00058 Opcode READ_HEADER_TRAILER (0x3200); 00059 Opcode SET_EVENT_SIZE (0x3300); 00060 Opcode READ_EVENT_SIZE (0x3400); 00061 Opcode EN_ERROR_MARK (0x3500); 00062 Opcode DIS_ERROR_MARK (0x3600); 00063 Opcode EN_ERROR_BYPASS (0x3700); 00064 Opcode DIS_ERROR_BYPASS (0x3800); 00065 Opcode SET_ERROR_TYPES (0x3900); 00066 Opcode READ_ERROR_TYPES (0x3a00); 00067 Opcode SET_FIFO_SIZE (0x3b00); 00068 Opcode READ_FIFO_SIZE (0x3c00); 00069 00070 // Channel enable/disable control: 00071 00072 Opcode EN_CHANNEL (0x4000); 00073 Opcode DIS_CHANNEL (0x4100); 00074 Opcode EN_ALL_CH (0x4200); 00075 Opcode DIS_ALL_CH (0x4300); 00076 Opcode WRITE_EN_PATTERN (0x4400); 00077 Opcode READ_EN_PATTERN (0x4500); 00078 Opcode WRITE_EN_PATTERN32 (0x4600); 00079 Opcode READ_EN_PATTERN32 (0x4700); 00080 00081 // Adjustment opcodes. 00082 00083 Opcode SET_GLOB_OFFS (0x5000); 00084 Opcode READ_GLOB_OFFS (0x5100); 00085 Opcode SET_ADJUST_CH (0x5200); 00086 Opcode READ_ADJUST_CH (0x5300); 00087 Opcode SET_RC_ADJ (0x5400); 00088 Opcode READ_RC_ADJ (0x5500); 00089 Opcode SAVE_RC_ADJ (0x5600); 00090 00091 // Miscellaneous 00092 00093 Opcode READ_TDC_ID (0x6000); 00094 Opcode READ_MICRO_REV (0x6100); 00095 Opcode RESET_DLL_PLL (0x6200); 00096 00097 // Advanced. 00098 00099 Opcode WRITE_SETUP_REG (0x7000); 00100 Opcode READ_SETUP_REG (0x7100); 00101 Opcode UPDATE_SETUP_REG (0x7200); 00102 Opcode DEFAULT_SETUP_REG (0x7300); 00103 Opcode READ_ERROR_STATUS (0x7400); 00104 Opcode READ_DLL_LOCK (0x7500); 00105 Opcode READ_STATUS_STREAM (0x7600); 00106 00107 // Debug and test (don't use these unless you know what you are 00108 // doing. 00109 00110 Opcode WRITE_EEPROM (0xc000); 00111 Opcode READ_EEPROM (0xc100); 00112 Opcode REV_DATE_MICRO_FW (0xc200); 00113 Opcode WRITE_SPARE (0xc300); 00114 Opcode READ_SPARE (0xc400); 00115 Opcode ENABLE_TEST_MODE (0xc500); 00116 Opcode DISABLE_TEST_MODE (0xc600); 00117 Opcode SET_TDC_TEST_OUTPUT (0xc700); 00118 Opcode SET_DLL_CLOCK (0xc800); 00119 Opcode READ_SETUP_SCANPATH (0xc900); 00120 00121 }; 00122 00123 00124 00125 #endif