Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

serialStreams.h

00001 #ifndef SERIAL_STREAMS
00002 #define SERIAL_STREAMS
00003 
00004 #if   defined(SCT_ROD)
00005     #include "ABCDchip.h"
00006     #include "sctStructure.h"
00007 
00008     #define N_CHIPS             (N_SCT_CHIPS)
00009 
00010     #define N_MODULES           (N_SCT_MODULES)
00011     #define N_EXTMODULES        (N_SCT_EXTMODULES)
00012     #define N_TOTMODULES        (N_SCT_TOTMODULES)
00013 
00014     typedef ABCDModule Module;
00015     typedef ABCDChip   Chip;
00016 
00017 #elif defined(PIXEL_ROD)
00018     #include "pixelCommands.h"
00019     #include "pixelConfigStructures.h"
00020 
00021     #define N_CHIPS             (N_PIXEL_FE_CHIPS)
00022 
00023     #define N_MODULES           (N_PIXEL_MODULES)
00024     #define N_EXTMODULES        (N_PIXEL_EXTMODULES)
00025     #define N_TOTMODULES        (N_PIXEL_TOTMODULES)
00026 
00027     typedef PixelModule   Module;
00028     typedef PixelFEConfig Chip;
00029 #endif
00030 
00031 /* Command lists contain a series of commands which are then built into a serial
00032    stream: */
00033 #define N_CMD_LIST_CMDS   6
00034 typedef struct CmdList {
00035     UINT16  cmd[N_CMD_LIST_CMDS];
00036     UINT32 data[N_CMD_LIST_CMDS];
00037 } CmdList;
00038 
00039 /* maximum length of a command stream to configure one module= 3240 words= 0xca8;
00040    a small amount of padding is added. dpsf: true for pixels too? */
00041 #define CMD_STREAM_WMAX 0xd00
00042 
00043 typedef struct {
00044     UINT32 *data;           /* command stream buffer */
00045     UINT32 *data1;          /* command stream buffer for sp 1. not an array for
00046                                backward compatibility */
00047     UINT32 *ilBuff;         /* interleave buffer */
00048     UINT32 bufferSizeWords; /* word is 32bits wide */
00049     UINT32 bitIndex, bitIndex1; /* current write bit index (number of full bits in
00050                                    the data buffer) */
00051     UINT8  port, setCmdMask, unused[2];
00052     UINT32 cmdMask[2][2];
00053 } CmdBuff;
00054 
00055 #if 0
00056 typedef struct CmdBuff {
00057     UINT32 *data[2];   /* command stream buffers for sp 0 & 1 */
00058     UINT32 bitIndex[2]; /* current write bit index (number of full bits in
00059                            the data buffer) */
00060     UINT32 bufferSizeWords; /* word is 32bits wide */
00061     UINT8  port, setCmdMask, unused[2];
00062     
00063     //Control stream modification for bin incrementing during a scan:
00064     Module *mod;
00065     INT32  *scanFxn(struct CmdBuff *cmd, Module *mod); 
00066     
00067     //=> adjunct structure:
00068     varType, varWidth;
00069     UINT32 varBitIndex[N_CHIPS], unused;
00070     
00071 
00072     UINT32 cmdMask[2][2];
00073 } CmdBuff;
00074 #endif
00075 
00076 #define WORD_INDEX(bitIndex) ((bitIndex)/32) /* returns 32bit word index */
00077 
00078 #define ALL_MODULES 0xfe
00079 #define NO_MODULE   0xff
00080 
00081 #define MODULE_GROUP_0       0
00082 #define MODULE_GROUP_1       1
00083 #define MODULE_GROUP_2       2
00084 #define MODULE_GROUP_3       3
00085 #define MODULE_GROUP_4       4
00086 #define MODULE_GROUP_5       5
00087 #define MODULE_GROUP_6       6
00088 #define MODULE_GROUP_7       7
00089 
00090 #define MODULE_GROUP_ALL     8
00091 #define N_MODULE_GROUPS      (MODULE_GROUP_ALL)
00092 
00093 #endif /* Multiple inclusion protection */

Generated on Thu Dec 15 21:14:36 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5