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

bocStructure.h

Go to the documentation of this file.
00001 /************************************************************************************
00002  * bocStructure.h                                            
00003  *
00004  *  synopsis:  Collects together all the BOC settings for a given set of command &
00005  *             data links. This structure is intended to be incorporated into the
00006  *             ABCDModule & PixelModule structures.    
00007  *
00008  *  Douglas Ferguson, UW Madison                              dpferguson@lbl.gov
00009  *  Peter W Phillips, Oxford University                       P.W.Phillips@rl.ac.uk
00010  *  John Richardson, Lawrence Berkeley Laboratory             john.richardson@cern.ch
00011  *  Joseph Virzi, University of California                    jsvirzi@lbl.gov
00012  ************************************************************************************/
00013 #ifndef BOC_STRUCTURE_H
00014 #define BOC_STRUCTURE_H
00015 /* register definitions for the BOC setting routines' case statements; note that some
00016    of these closely match the RRIF register definitions in registerIndices.h they are
00017    abbreviated here. (Some of the indices in rI.h are for register sets and so do not
00018    work well in the case statement). */
00019 #define BOC_TXFINE       0x00
00020 #define BOC_TXCOARSE     0x01
00021 #define BOC_TXMARKSPACE  0x02
00022 #define BOC_TXINHIBIT    0x03
00023 #define BOC_TXCURRENT    0x04
00024 
00025 #define BOC_RXTHRESHOLD  0x10
00026 #define BOC_RXDELAY      0x11
00027 
00028 #define BOC_BPM_CLOCK_PHASE            0x20
00029 #define BOC_BREG_CLOCK_PHASE           0x21
00030 #define BOC_VERNIER_CLOCK_STEPPHASE0   0x22
00031 #define BOC_VERNIER_CLOCK_STEPPHASE1   0x23
00032 #define BOC_VERNIER_CLOCK_FINEPHASE    0x24
00033 
00034 #define BOC_BOCRESET       0x30
00035 #define BOC_BPMRESET       0x31
00036 #warning "These conflict with BocCard!!!!"
00037 /* #define BOC_TXDAC_CLEAR    0x32 */
00038 /* #define BOC_RXDAC_CLEAR    0x33 */
00039 
00040 #define BOC_STAT           0x40
00041 #define BOC_RXDATAMODE     0x41
00042 #define BOC_CLOCKCTRLBITS  0x42
00043 
00044 #define BOC_FIRMWARE_REV    0x50
00045 #define BOC_HARDWARE_REV    0x51
00046 #define BOC_MODULETYPE      0x52
00047 #define BOC_MNFT            0x53
00048 #define BOC_SERIALNO        0x54
00049 
00050 typedef struct {
00051   UINT8 txFineDelay;      //transmitter fine delay. 
00052   UINT8 txCoarseDelay;    //transmitter coarse delay.
00053   UINT8 txMarkSpace;      //transmitter markSpace ratio.
00054   UINT8 txStreamInhibit;  //0 ==> inhibit channel.
00055 
00056   UINT8 txCurrent;        //Laser current.
00057   UINT8 unused[3];
00058 } BOCTxParams;
00059 
00060 typedef struct {
00061   UINT8 rxThreshold;      //receiver threshold.
00062   UINT8 rxDelay;          //receiver delay.
00063 } BOCRxParams;
00064 
00065 typedef struct {
00066   UINT8 bpmClockPhase;
00067   UINT8 bRegClockPhase;
00068   UINT8 vernierClockStepPhase[2];
00069   UINT8 vernierClockFinePhase;
00070 
00071   UINT8 bocReset;  //needed?
00072   UINT8 bpmReset;  //  "
00073   UINT8 txDacClear; // " 
00074   UINT8 rxDacClear; // " 
00075 
00076   UINT8 status;
00077   UINT8 rxDataMode;
00078   UINT8 clockCtrlBits;
00079 
00080   UINT8 firmwareRev;
00081   UINT8 hardwareRev;
00082   UINT8 moduleType;
00083   UINT8 manufacturer;
00084   UINT8 serialNumber;
00085 
00086   UINT8 unused[3];    //data alignment.
00087   UINT32 unused1[3];
00088 } BOCGlobalParams;
00089 
00090 typedef struct {
00091   BOCTxParams      bocTxParams[48];
00092   BOCRxParams      bocRxParams[96];
00093   BOCGlobalParams  bocGlobalParams;
00094 } BOCConfig;
00095 
00096 #endif
00097 

Generated on Mon Dec 15 19:35:58 2003 for SCT DAQ/DCS Software by doxygen1.3-rc3