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

BocAddresses.h

Go to the documentation of this file.
00001 //File: BocAddresses.h
00002 
00003 #ifndef SCTPIXELROD_BOCADDRESSES_H
00004 #define SCTPIXELROD_BOCADDRESSES_H
00005 
00016 #include "../CommonWithDsp/processor.h"
00017 #include "../CommonWithDsp/memoryPartitions.h"
00018 
00019 namespace SctPixelRod {
00020 
00021 // Use only the names in this file in C++ code.
00022 
00023 //Get the BOC base address from the testBench definitions.
00024 //CE0_BASE is the start of the window for RRIF registers
00025 //Unfortunately, memoryPartitions.h does not define the BOC
00026 //offset from this base in an available form.
00027 
00028 const unsigned long BOC_ADDRESS_BASE =       CE0_BASE + 0x8000;
00029 
00030 const unsigned long BOC_ADDRESS_WINDOW =     0x1000;
00031 
00032 //The following addresses are offsets from BOC_ADDRESS_BASE for BOC1
00033 
00034 //Start with the BPM12 chips - base for channel 0
00035 const unsigned long BOC_BPM_BASE =           0x000;
00036 
00037 //Offsets within BPM12 for individual channel functions
00038 enum bocBpmRegisters {
00039     BOC_BPM_INHIBIT =        0x0,
00040     BOC_BPM_MARK_SPACE =     0x4,
00041     BOC_BPM_COARSE =         0x8,
00042     BOC_BPM_FINE =           0xC
00043 };
00044 
00045 //Start addresses for other "blocks" 
00046 const unsigned long BOC_LASER_DAC =          0x600;
00047 const unsigned long BOC_DATA_DELAY =         0x800;
00048 const unsigned long BOC_STROBE_DELAY =       0xA00;
00049 const unsigned long BOC_THRESHOLD_DAC =      0xC00;
00050 
00051 //Channel counts (useful for Pixels??)
00052 const unsigned long BOC_TRANSMIT_CHANNELS =  48;
00053 const unsigned long BOC_RECEIVE_CHANNELS =   96;
00054 const unsigned long BOC_STROBE_CHANNELS =    26;
00055 
00056 //The following addresses are for single registers.
00057 const unsigned long BOC_BPM_CLK_PHASE =      0x980;
00058 const unsigned long BOC_BREG_CLK_PHASE =     0x98C;
00059 const unsigned long BOC_VERNIER_CLK0_PHASE = 0x990;
00060 const unsigned long BOC_VERNIER_CLK1_PHASE = 0x994;
00061 
00062 const unsigned long BOC_RESET =              0xF00;
00063 const unsigned long BOC_BPM_RESET =          0xF04;
00064 const unsigned long BOC_TXDAC_CLEAR =        0xF08;
00065 const unsigned long BOC_RXDAC_CLEAR =        0xF0C;
00066 
00067 // For series BOCs, all resets are on BOC_RESET as
00068 // individual bits.
00069 enum boc_reset_bits {
00070     BOC_VPIN_RESET_BIT = 4,
00071     BOC_RXDAC_CLEAR_BIT = 5,
00072     BOC_TXDAC_CLEAR_BIT = 6,
00073     BOC_BPM_RESET_BIT = 7
00074 };
00075 
00076 const unsigned long BOC_STATUS =             0xF10;
00077 
00078 // The meanings of the BOC_STATUS bits are different for
00079 // pre-production and production BOCs. Some bits are
00080 // not used.
00081 enum boc_pre_production_status_bits {
00082     BOC_PRE_PRODUCTION_SW1 = 0,
00083     BOC_PRE_PRODUCTION_SW4 = 1,
00084     BOC_PRE_PRODUCTION_SW5 = 2,
00085     BOC_PRE_PRODUCTION_SW6 = 3,
00086     BOC_PRE_PRODUCTION_RODSENSE = 5,
00087     BOC_PRE_PRODUCTION_LOCLASEN = 6,
00088     BOC_PRE_PRODUCTION_REMLASEN = 7
00089 };
00090 //
00091 enum boc_production_status_bits {
00092         BOC_PRODUCTION_VBOK = 2,
00093         BOC_PRODUCTION_VAOK = 3,
00094         BOC_PRODUCTION_ERRFLAG = 4,
00095         BOC_PRODUCTION_RODSENSE = 5,
00096         BOC_PRODUCTION_LOCLASEN= 6,
00097         BOC_PRODUCTION_REMLASEN = 7
00098 };
00099 
00100 const unsigned long BOC_RX_DATA_MODE =       0xF14;
00101 const unsigned long BOC_VERNIER_FINE_PHASE = 0xF20;
00102 const unsigned long BOC_CLK_CONTROL =        0xF28;
00103 
00104 const unsigned long BOC_FW_REV =             0xF40;
00105 const unsigned long BOC_HW_REV =             0xF44;
00106 const unsigned long BOC_MODULE_TYPE =        0xF48;
00107 const unsigned long BOC_MANUFACTURER =       0xF4C;
00108 const unsigned long BOC_SERIAL_NUMBER =      0xF60;
00109 
00110 //Monitor ADC is new for the series BOCs. Details are different
00111 //for the Rev A and Rev B boards.
00112 
00113 const unsigned long BOC_ADC_SETUP =          0xE00;
00114 const unsigned long BOC_ADC_CONFIG =         0xE04;
00115 const unsigned long BOC_ADC_CONVERT =        0xE08;
00116 const unsigned long BOC_ADC_LSB =            0xE10;
00117 const unsigned long BOC_ADC_MSB =            0xE14;
00118 
00119 //BOC_BUSY_0 is bit 2 of RRIF_STATUS_1. I can't find the definition of
00120 //this register anywhere, so put it here for now.
00121 
00122 const unsigned long RRIF_STATUS_1 =      CE0_BASE + 0x4420;
00123 enum rrif_status_1_bits {
00124     BOC_BUSY_0 =        0x4
00125 };
00126 
00127 }; //  End namespace SctPixelRod
00128 
00129 #endif //SCTPIXELROD_BOCADDRESSES_H

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