Go to the documentation of this file. 20 # define INLINE static inline 44 #define U32_Status 0x000 45 # define Status_dbus_mask 0xff000000 46 # define Status_dbus_shift 24 47 # define Status_legvio 0x00010000 48 # define Status_sfpmod 0x00000080 49 # define Status_linksts 0x00000040 50 # define Status_fifostop 0x00000020 52 #define U32_Control 0x004 53 # define Control_enable 0x80000000 55 # define Control_evtfwd 0x40000000 58 # define Control_txloop 0x20000000 60 # define Control_rxloop 0x10000000 62 # define Control_outena 0x08000000 64 # define Control_sreset 0x04000000 66 # define Control_endian 0x02000000 68 # define Control_GTXio 0x01000000 70 # define Control_DCEna 0x00400000 73 # define Control_tsdbus 0x00004000 74 # define Control_tsrst 0x00002000 75 # define Control_tsltch 0x00000400 77 # define Control_mapena 0x00000200 78 # define Control_mapsel 0x00000100 80 # define Control_logrst 0x00000080 81 # define Control_logena 0x00000040 82 # define Control_logdis 0x00000020 84 # define Control_logsea 0x00000010 85 # define Control_fiforst 0x00000008 87 #define U32_IRQFlag 0x008 88 # define IRQ_EoS 0x1000 89 # define IRQ_SoS 0x0100 90 # define IRQ_LinkChg 0x40 91 # define IRQ_BufFull 0x20 92 # define IRQ_HWMapped 0x10 93 # define IRQ_Event 0x08 94 # define IRQ_Heartbeat 0x04 95 # define IRQ_FIFOFull 0x02 96 # define IRQ_RXErr 0x01 98 #define U32_IRQEnable 0x00c 100 # define IRQ_Enable 0x80000000 101 # define IRQ_PCIee 0x40000000 103 #define U32_IRQPulseMap 0x010 108 #define U32_SwEvent 0x0018 110 #define SwEvent_Ena 0x00000100 111 #define SwEvent_Pend 0x00000200 112 #define SwEvent_Code_MASK 0x000000ff 113 #define SwEvent_Code_SHIFT 0 116 #define U32_PCI_MIE 0x001C 117 #define EVG_MIE_ENABLE 0x40000000 119 #define U32_DataBufCtrl 0x020 121 # define DataBufCtrl_rx 0x8000 123 # define DataBufCtrl_stop 0x4000 124 # define DataBufCtrl_sumerr 0x2000 125 # define DataBufCtrl_mode 0x1000 126 # define DataBufCtrl_len_mask 0x0fff 128 #define U32_DataTxCtrl 0x024 129 # define DataTxCtrl_done 0x100000 130 # define DataTxCtrl_run 0x080000 131 # define DataTxCtrl_trig 0x040000 132 # define DataTxCtrl_ena 0x020000 133 # define DataTxCtrl_mode 0x010000 134 # define DataTxCtrl_len_mask 0x0007fc 136 #define U32_FWVersion 0x02c 137 # define FWVersion_type_mask 0xf0000000 138 # define FWVersion_type_shift 28 139 # define FWVersion_form_mask 0x0f000000 140 # define FWVersion_form_shift 24 141 # define FWVersion_ver_mask 0x0000ffff 142 # define FWVersion_ver_shift 0 144 #define U32_CounterPS 0x040 146 #define U32_USecDiv 0x04C 148 #define U32_ClkCtrl 0x050 149 # define ClkCtrl_plllock 0x80000000 150 # define ClkCtrl_clkmd_MASK 0x06000000 151 # define ClkCtrl_clkmd_SHIFT 25 152 # define ClkCtrl_cglock 0x00000200 154 #define U32_SRSec 0x05C 156 #define U32_TSSec 0x060 157 #define U32_TSEvt 0x064 158 #define U32_TSSecLatch 0x068 159 #define U32_TSEvtLatch 0x06c 161 #define U32_EvtFIFOSec 0x070 162 #define U32_EvtFIFOEvt 0x074 163 #define U32_EvtFIFOCode 0x078 165 #define U32_LogStatus 0x07C 167 #define U32_FracDiv 0x080 169 #define U32_RFInitPhas 0x088 171 #define U32_GPIODir 0x090 172 #define U32_GPIOIn 0x094 173 #define U32_GPIOOut 0x098 176 #define U32_SPIDData 0x0A0 177 #define U32_SPIDCtrl 0x0A4 179 #define U32_DCTarget 0x0b0 180 #define U32_DCRxVal 0x0b4 181 #define U32_DCIntVal 0x0b8 182 #define U32_DCStatus 0x0bc 183 #define U32_TOPID 0x0c0 185 #define U32_SeqControl_base 0x00e0 186 #define U32_SeqControl(n) (U32_SeqControl_base + (4*n)) 189 #define U32_ScalerN 0x100 192 #define U32_Scaler(N) (U32_ScalerN + (4*(N))) 193 # define ScalerPhasOffs_offset 0x20 195 #define U32_PulserNCtrl 0x200 196 #define U32_PulserNScal 0x204 197 #define U32_PulserNDely 0x208 198 #define U32_PulserNWdth 0x20c 199 # define PulserMax 10 202 #define U32_PulserCtrl(N) (U32_PulserNCtrl + (16*(N))) 203 # define PulserCtrl_masks 0xf0000000 204 # define PulserCtrl_masks_shift 28 205 # define PulserCtrl_enables 0x00f00000 206 # define PulserCtrl_enables_shift 20 207 # define PulserCtrl_ena 0x01 208 # define PulserCtrl_mtrg 0x02 209 # define PulserCtrl_mset 0x04 210 # define PulserCtrl_mrst 0x08 211 # define PulserCtrl_pol 0x10 212 # define PulserCtrl_srst 0x20 213 # define PulserCtrl_sset 0x40 214 # define PulserCtrl_rbv 0x80 216 #define U32_PulserScal(N) (U32_PulserNScal + (16*(N))) 217 #define U32_PulserDely(N) (U32_PulserNDely + (16*(N))) 218 #define U32_PulserWdth(N) (U32_PulserNWdth + (16*(N))) 228 #define Output_mask(N) ( ((N)&1) ? 0x0000ffff : 0xffff0000 ) 229 #define Output_shift(N) ( ((N)&1) ? 0 : 16) 232 #define U32_OutputMapFPN 0x400 233 # define OutputMapFPMax 8 236 #define U32_OutputMapFP(N) (U32_OutputMapFPN + (2*( (N) & (~0x1) ))) 239 #define U32_OutputMapFPUnivN 0x440 240 # define OutputMapFPUnivMax 10 243 #define U32_OutputMapFPUniv(N) (U32_OutputMapFPUnivN + (2*( (N) & (~0x1) ))) 246 #define U32_OutputMapRBN 0x480 247 # define OutputMapRBMax 32 250 #define U32_OutputMapRB(N) (U32_OutputMapRBN + (2*( (N) & (~0x1) ))) 253 #define U32_OutputMapBackplaneN 0x4C0 254 # define OutputMapBackplaneMax 8 257 #define U32_OutputMapBackplane(N) (U32_OutputMapBackplaneN + (2*( (N) & (~0x1) ))) 260 #define U32_InputMapFPN 0x500 261 # define InputMapFP_state 0x80000000 262 # define InputMapFP_lvl 0x20000000 263 # define InputMapFP_blvl 0x10000000 264 # define InputMapFP_elvl 0x08000000 265 # define InputMapFP_edge 0x04000000 266 # define InputMapFP_bedg 0x02000000 267 # define InputMapFP_eedg 0x01000000 268 # define InputMapFP_dbus_mask 0x00ff0000 269 # define InputMapFP_dbus_shft 16 270 # define InputMapFP_back_mask 0x0000ff00 271 # define InputMapFP_back_shft 8 272 # define InputMapFP_ext_mask 0x000000ff 273 # define InputMapFP_ext_shft 0 274 # define InputMapFPMax 32 282 #define U32_InputMapFP(N) (U32_InputMapFPN + (4*(N))) 285 #define U32_GTXDelayN 0x580 286 #define U32_GTXDelay(N) (U32_GTXDelayN + (4*(N))) 289 #define U32_OutputCMLNLow 0x600 290 #define U32_OutputCMLNRise 0x604 291 #define U32_OutputCMLNFall 0x608 292 #define U32_OutputCMLNHigh 0x60c 293 #define U32_OutputCMLNEna 0x610 294 # define OutputCMLEna_ftrig_mask 0xffff0000 295 # define OutputCMLEna_ftrig_shft 16 296 # define OutputCMLEna_type_mask 0x0c00 297 # define OutputCMLEna_type_300 0x0800 298 # define OutputCMLEna_type_203 0x0400 299 # define OutputCMLEna_type_cml 0x0000 300 # define OutputCMLEna_pha_mask 0x0300 301 # define OutputCMLEna_pha_shift 8 302 # define OutputCMLEna_cycl 0x80 303 # define OutputCMLEna_ftrg 0x40 304 # define OutputCMLEna_mode_mask 0x30 305 # define OutputCMLEna_mode_orig 0x00 306 # define OutputCMLEna_mode_freq 0x10 307 # define OutputCMLEna_mode_patt 0x20 308 # define OutputCMLEna_rst 0x04 309 # define OutputCMLEna_pow 0x02 310 # define OutputCMLEna_ena 0x01 311 #define U32_OutputCMLNCount 0x0614 312 # define OutputCMLCount_mask 0xffff 313 # define OutputCMLCount_high_shft 16 314 # define OutputCMLCount_low_shft 0 315 #define U32_OutputCMLNPatLength 0x0618 316 # define OutputCMLPatLengthMax 2047 318 #define U32_OutputCMLNPat_base 0x20000 319 #define U32_OutputCMLPat(i,N) (U32_OutputCMLNPat_base + 0x4000*(i) + 4*(N)) 321 # define OutputCMLMax 3 322 # define OutputGTXMax 8 325 #define U32_OutputCMLLow(N) (U32_OutputCMLNLow +(0x20*(N))) 326 #define U32_OutputCMLRise(N) (U32_OutputCMLNRise +(0x20*(N))) 327 #define U32_OutputCMLFall(N) (U32_OutputCMLNFall +(0x20*(N))) 328 #define U32_OutputCMLHigh(N) (U32_OutputCMLNHigh +(0x20*(N))) 329 #define U32_OutputCMLEna(N) (U32_OutputCMLNEna +(0x20*(N))) 331 #define U32_OutputCMLCount(N) (U32_OutputCMLNCount +(0x20*(N))) 332 #define U32_OutputCMLPatLength(N) (U32_OutputCMLNPatLength +(0x20*(N))) 334 #define U32_DataRx_base 0x0800 335 #define U32_DataTx_base 0x1800 336 #define U32_EventLog_base 0x2000 339 #define U32_DataRx(N) (U32_DataRx_base + (N)) 340 #define U32_DataTx(N) (U32_DataTx_base + (N)) 343 #define U32_EventLog(N) (U32_EventLog_base 351 #define U32_MappingRam_base 0x4000 353 #define MappingRamBlockInternal 0x0 354 #define MappingRamBlockTrigger 0x4 355 #define MappingRamBlockSet 0x8 356 #define MappingRamBlockReset 0xc 358 #define U32__MappingRam(M,E,N) (U32_MappingRam_base + (0x1000*(M)) + (0x10*(E)) + (N)) 359 #define U32_MappingRam(M,E,N) U32__MappingRam(M,E, MappingRamBlock##N) 362 #define ActionFIFOSave 127 363 #define ActionTSLatch 126 364 #define ActionLEDBlink 125 365 #define ActionEvtFwd 124 366 #define ActionLogStop 123 367 #define ActionLogSave 122 368 #define ActionHeartBeat 101 369 #define ActionPSRst 100 372 #define U32_SeqRamTS_base 0xc000 373 #define U32_SeqRamTS(n,m) (U32_SeqRamTS_base + (0x4000*(n)) + (8*(m))) 375 #define U32_SFPEEPROM_base 0x8200 376 #define U32_SFPEEPROM(N) (U32_SFPEEPROM_base + (N)) 377 #define U32_SFPDIAG_base 0x8300 378 #define U32_SFPDIAG(N) (U32_SFPDIAG_base + (N)) 380 #define EVR_REGMAP_SIZE 0x40000 // Total register map size = 256K