a check in gotthard server to ensure that it is really gotthard and not moench module

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@523 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d 2013-04-26 08:36:29 +00:00
parent 507debd7f4
commit 055c557931

View File

@ -65,34 +65,34 @@ void check_detector_type(){
int init_detector( int b) { int init_detector( int b) {
printf("This is a GOTTHARD detector with %d chips per module\n", NCHIP); if (mapCSP0()==FAIL) {
printf("Could not map memory\n");
if (mapCSP0()==FAIL) { printf("Could not map memory\n");
exit(-1); exit(-1);
} }
//check if it is really gotthard //check if it is really gotthard
check_detector_type(); check_detector_type();
printf("\n***This is a GOTTHARD detector with %d chips per module***\n", NCHIP);
//testFpga(); //testFpga();
if (b) { if (b) {
#ifdef MCB_FUNCS #ifdef MCB_FUNCS
initDetector(); initDetector();
printf("\n***initdetector done*** \n\n"); printf("Initializing Detector completed.\n\n");
#endif #endif
testFpga(); testFpga();
testRAM(); testRAM();
//gotthard specific //gotthard specific
setPhaseShiftOnce(); setPhaseShiftOnce();
prepareADC(); prepareADC();
setADC(-1); //already does setdaqreg and clean fifo setADC(-1); //already does setdaqreg and clean fifo
printf("in chip of interes reg:%d\n",bus_r(CHIP_OF_INTRST_REG)); printf("in chip of interest reg:0x%x\n",bus_r(CHIP_OF_INTRST_REG));
int reg = (NCHAN*NCHIP)<<CHANNEL_OFFSET; int reg = (NCHAN*NCHIP)<<CHANNEL_OFFSET;
reg&=CHANNEL_MASK; reg&=CHANNEL_MASK;
reg|=ACTIVE_ADC_MASK; reg|=ACTIVE_ADC_MASK;
bus_w(CHIP_OF_INTRST_REG,reg); bus_w(CHIP_OF_INTRST_REG,reg);
printf("in chip of interes reg:%d\n",bus_r(CHIP_OF_INTRST_REG)); printf("in chip of interest reg:0x%x\n",bus_r(CHIP_OF_INTRST_REG));
setSettings(GET_SETTINGS,-1); setSettings(GET_SETTINGS,-1);
//Initialization //Initialization
setFrames(1); setFrames(1);