7 #ifndef PXAR_CONSTANTS_H
8 #define PXAR_CONSTANTS_H
13 #define DTB_SOURCE_BLOCK_SIZE 8192
14 #define DTB_SOURCE_BUFFER_SIZE 50000000
15 #define DTB_DAQ_FIFO_OVFL 4 // bit 2 = DAQ fast HW FIFO overflow
16 #define DTB_DAQ_MEM_OVFL 2 // bit 1 = DAQ RAM FIFO overflow
17 #define DTB_DAQ_STOPPED 1 // bit 0 = DAQ stopped (because of overflow)
31 #define TBM_REG_COUNTER_SWITCHES 0x00
32 #define TBM_REG_SET_MODE 0x02
33 #define TBM_REG_CLEAR_INJECT 0x04
34 #define TBM_REG_SET_PKAM_COUNTER 0x08
35 #define TBM_REG_SET_DELAYS 0x0A
36 #define TBM_REG_TEMPERATURE_CONTROL 0x0C
37 #define TBM_REG_CORES_A_B 0x0E
41 #define ROC_NUMROWS 80
42 #define ROC_NUMCOLS 52
43 #define MOD_NUMROCS 16
46 #define ROC_PSI46V2 0x01
47 #define ROC_PSI46XDB 0x02
48 #define ROC_PSI46DIG 0x03
49 #define ROC_PSI46DIG_TRIG 0x04
50 #define ROC_PSI46DIGV2_B 0x05
51 #define ROC_PSI46DIGV2 0x06
52 #define ROC_PSI46DIGV21 0x07
53 #define ROC_PSI46DIGV21RESPIN 0x08
57 #define ROC_DAC_Vdig 0x01
58 #define ROC_DAC_Vana 0x02
59 #define ROC_DAC_Vsh 0x03
60 #define ROC_DAC_Vcomp 0x04
61 #define ROC_DAC_Vleak_comp 0x05
62 #define ROC_DAC_VrgPr 0x06
63 #define ROC_DAC_VwllPr 0x07
64 #define ROC_DAC_VrgSh 0x08
65 #define ROC_DAC_VwllSh 0x09
66 #define ROC_DAC_VhldDel 0x0A
67 #define ROC_DAC_Vtrim 0x0B
68 #define ROC_DAC_VthrComp 0x0C
69 #define ROC_DAC_VIBias_Bus 0x0D
70 #define ROC_DAC_Vbias_sf 0x0E
71 #define ROC_DAC_VoffsetOp 0x0F
72 #define ROC_DAC_VIbiasOp 0x10
73 #define ROC_DAC_VoffsetRO 0x11
74 #define ROC_DAC_VIon 0x12
75 #define ROC_DAC_VIbias_PH 0x13
76 #define ROC_DAC_VIbias_DAC 0x14
77 #define ROC_DAC_VIbias_roc 0x15
78 #define ROC_DAC_VIColOr 0x16
79 #define ROC_DAC_Vnpix 0x17
80 #define ROC_DAC_VsumCol 0x18
81 #define ROC_DAC_Vcal 0x19
82 #define ROC_DAC_CalDel 0x1A
83 #define ROC_DAC_CtrlReg 0xFD
84 #define ROC_DAC_WBC 0xFE
85 #define ROC_DAC_Readback 0xFF
93 #define SIG_RDA_TOUT 4
95 #define SIG_LEVEL 0xFC
96 #define SIG_LOOP_TRIGGER_DELAY 0xFD
97 #define SIG_DESER160PHASE 0xFE
99 #define SIG_MODE_NORMAL 0
100 #define SIG_MODE_LO 1
101 #define SIG_MODE_HI 2
105 #define CLK_SRC_INT 0
106 #define CLK_SRC_EXT 1
109 #define STRETCH_AFTER_TRG 0
110 #define STRETCH_AFTER_CAL 1
111 #define STRETCH_AFTER_RES 2
112 #define STRETCH_AFTER_SYNC 3
126 #define PROBE_SDA_SEND 3
127 #define PROBE_PG_TOK 4
128 #define PROBE_PG_TRG 5
129 #define PROBE_PG_CAL 6
130 #define PROBE_PG_RES_ROC 7
131 #define PROBE_PG_RES_TBM 8
132 #define PROBE_PG_SYNC 9
135 #define PROBE_TOUT 12
136 #define PROBE_CLK_PRESEN 13
137 #define PROBE_CLK_GOOD 14
138 #define PROBE_DAQ0_WR 15
140 #define PROBE_ADC_RUNNING 19
141 #define PROBE_ADC_RUN 20
142 #define PROBE_ADC_PGATE 21
143 #define PROBE_ADC_START 22
144 #define PROBE_ADC_SGATE 23
145 #define PROBE_ADC_S 24
147 #define PROBE_TBM0_GATE 100
148 #define PROBE_TBM0_DATA 101
149 #define PROBE_TBM0_TBMHDR 102
150 #define PROBE_TBM0_ROCHDR 103
151 #define PROBE_TBM0_TBMTRL 104
153 #define PROBE_TBM1_GATE 105
154 #define PROBE_TBM1_DATA 106
155 #define PROBE_TBM1_TBMHDR 107
156 #define PROBE_TBM1_ROCHDR 108
157 #define PROBE_TBM1_TBMTRL 109
159 #define PROBE_TBM2_GATE 110
160 #define PROBE_TBM2_DATA 111
161 #define PROBE_TBM2_TBMHDR 112
162 #define PROBE_TBM2_ROCHDR 113
163 #define PROBE_TBM2_TBMTRL 114
165 #define PROBE_TBM3_GATE 115
166 #define PROBE_TBM3_DATA 116
167 #define PROBE_TBM3_TBMHDR 117
168 #define PROBE_TBM3_ROCHDR 118
169 #define PROBE_TBM3_TBMTRL 119
171 #define PROBE_TBM4_GATE 120
172 #define PROBE_TBM4_DATA 121
173 #define PROBE_TBM4_TBMHDR 122
174 #define PROBE_TBM4_ROCHDR 123
175 #define PROBE_TBM4_TBMTRL 124
177 #define PROBE_TBM5_GATE 125
178 #define PROBE_TBM5_DATA 126
179 #define PROBE_TBM5_TBMHDR 127
180 #define PROBE_TBM5_ROCHDR 128
181 #define PROBE_TBM5_TBMTRL 129
186 #define PROBEA_SDATA1 1
187 #define PROBEA_SDATA2 2
191 #define PROBEA_TOUT 6
201 #define PG_NONE 0x0000
202 #define PG_TOK 0x0100
203 #define PG_TRG 0x0200
204 #define PG_CAL 0x0400
205 #define PG_RESR 0x0800
206 #define PG_REST 0x1000
207 #define PG_SYNC 0x2000