mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
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@522 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
parent
6ca969e08f
commit
507debd7f4
@ -295,7 +295,7 @@ int setDAQRegister()
|
||||
|
||||
//depended on pcb rev
|
||||
int tokenTiming = TOKEN_TIMING_REV2;
|
||||
if(bus_r(PCB_REV_REG)==1)
|
||||
if((bus_r(PCB_REV_REG)&BOARD_REVISION_MASK)==1)
|
||||
tokenTiming= TOKEN_TIMING_REV1;
|
||||
|
||||
|
||||
|
Binary file not shown.
@ -134,6 +134,14 @@
|
||||
#define SHIFTMOD 2
|
||||
#define SHIFTFIFO 9
|
||||
|
||||
/** for PCB_REV_REG */
|
||||
#define DETECTOR_TYPE_MASK 0xF0000
|
||||
#define DETECTOR_TYPE_OFFSET 16
|
||||
#define BOARD_REVISION_MASK 0xFFFF
|
||||
#define MOENCH_MODULE 2
|
||||
|
||||
|
||||
|
||||
|
||||
/* for control register */
|
||||
#define START_ACQ_BIT 0x00000001
|
||||
|
@ -35,6 +35,8 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (argc==1) {
|
||||
portno = DEFAULT_PORTNO;
|
||||
sprintf(cmd,"%s %d &",argv[0],DEFAULT_PORTNO+1);
|
||||
|
@ -54,17 +54,26 @@ int digitalTestBit = 0;
|
||||
|
||||
|
||||
|
||||
void check_detector_type(){
|
||||
if (((bus_r(PCB_REV_REG) & DETECTOR_TYPE_MASK)>> DETECTOR_TYPE_OFFSET) == MOENCH_MODULE){
|
||||
printf("This is a MOENCH detector. Exiting Gotthard Server.\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
int init_detector( int b) {
|
||||
#ifndef PICASSOD
|
||||
|
||||
printf("This is a GOTTHARD detector with %d chips per module\n", NCHIP);
|
||||
#else
|
||||
printf("This is a PICASSO detector with %d chips per module\n", NCHIP);
|
||||
#endif
|
||||
|
||||
if (mapCSP0()==FAIL) { printf("Could not map memory\n");
|
||||
exit(1);
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
//check if it is really gotthard
|
||||
check_detector_type();
|
||||
|
||||
//testFpga();
|
||||
if (b) {
|
||||
#ifdef MCB_FUNCS
|
||||
|
@ -23,7 +23,7 @@ int sockfd;
|
||||
int function_table();
|
||||
|
||||
int decode_function(int);
|
||||
|
||||
void check_detector_type();
|
||||
int init_detector(int);
|
||||
|
||||
int M_nofunc(int);
|
||||
|
Loading…
x
Reference in New Issue
Block a user