fdhwlib  2.0.25
/home/kopmann/git-mirror/fdhwlib/fdhwlib/hw4/fltdef.h
Go to the documentation of this file.
00001 /***************************************************************************
00002     FltDef.h  -  description
00003 
00004     begin                : Tue Jul 18 2000
00005     copyright            : (C) 2000 by Andreas Kopmann
00006     email                : kopmann@hpe.fzk.de
00007  ***************************************************************************/
00008 
00009 #ifndef _HW4_FLTDEF_H_INCLUDED
00010 #define _HW4_FLTDEF_H_INCLUDED
00011 
00012 // USCT
00013 #ifdef USCT
00014 # define FLT_VER 220
00015 #endif // USCT
00016 
00017 #ifndef FLT_VER
00018 // Version of the FLT description
00019 //  1.00 First version with 4bit register address
00020 //# define FLT_VER 100
00021 //  2.00 Extended register address (6bit)
00022 //# define FLT_VER 200
00023 //  2.10 Modification in Hitrate control, PeriphStatus and Stat. Functions
00024 //# define FLT_VER 210
00025 //  2.20 Modifications of the statistics
00026 //# define FLT_VER 220
00027 //  3.00 Increased ADC Memmory -> Address scheme shifted
00028 //# define FLT_VER 300
00029 //  4.00 The V4 series of hardware (HEAT, KATRIN, USCT,...)
00030 # define FLT_VER 400
00031 #endif
00032 
00033 // Adress modell
00034 #if defined (FLT_VER) && (FLT_VER >= 400) // Version 4
00035 
00037 #define FLT_CHANNELS 22
00038 
00040 #define FLT_PAGE_SIZE 2000
00041 
00043 #define FLT_PAGES 64
00044 
00045 #endif // FLT_VER 400
00046 
00047 
00048 // Flags of the IR mask
00049 #if 0
00050 # define FLT_IRMASK_P1_SYNC_ERR  0x01
00051 # define FLT_IRMASK_P2_SYNC_ERR  0x02
00052 # define FLT_IRMASK_P3_SYNC_ERR  0x04
00053 # define FLT_IRMASK_P4_SYNC_ERR  0x08
00054 # define FLT_IRMASK_SYNC_ERR     0x0f
00055 
00056 # define FLT_IRMASK_THRESH_OTR    0x10
00057 # define FLT_IRMASK_HITRATE_ERR   0x20
00058 # define FLT_IRMASK_GAIN_ERR      0x80
00059 #endif
00060 
00061 
00062 #define SELECT_ALL_SLOTS          (0x1F <<17)
00063 
00064 
00065 // new constants for V4, I prefer them to be in a namespace
00066 
00067 namespace hw4 {
00068 
00070   static const int kFLT_VER = FLT_VER;
00071 
00073   static const int kFLT_CHANNELS = 22 /* FLT_CHANNELS */;
00074 
00076   static const int kFLT_PAGE_SIZE = 2000 /* FLT_PAGE_SIZE */;
00077 
00079   static const int kFLT_PAGES = 64 /* FLT_PAGES */;
00080   
00082   static const int kFLT_MAX_HRC_STEPSIZE = 15;
00083   
00085   static const int kFLT_MIN_FILTER_LENGTH = 4;
00086 
00088   static const int kFLT_MAX_FILTER_LENGTH = 63;
00089 
00090 } // namespace hw4
00091 #endif // _HW4_FLTDEF_H_INCLUDED
00092