diff --git a/slsDetectorSoftware/commonFiles/sls_detector_defs.h b/slsDetectorSoftware/commonFiles/sls_detector_defs.h index d4fce83e8..ddc7d62c6 100755 --- a/slsDetectorSoftware/commonFiles/sls_detector_defs.h +++ b/slsDetectorSoftware/commonFiles/sls_detector_defs.h @@ -362,6 +362,8 @@ enum dacIndex { TEMPERATURE_DCDC, /**< temperature sensor (close to DCDC) */ TEMPERATURE_SODL, /**< temperature sensor (close to SODL) */ TEMPERATURE_SODR, /**< temperature sensor (close to SODR) */ + TEMPERATURE_FPGA2, /**< temperature sensor (fpga2 (eiger:febl) */ + TEMPERATURE_FPGA3, /**< temperature sensor (fpga3 (eiger:febr) */ V_POWER_A = 100, /**new chiptest board */ V_POWER_B = 101, /**new chiptest board */ V_POWER_C = 102, /**new chiptest board */ diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.c b/slsDetectorSoftware/eigerDetectorServer/FebControl.c index f88a2f990..e80bb06f6 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.c +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.c @@ -1654,3 +1654,22 @@ int Feb_Control_PrintCorrectedValues(){ return 1; } + +int Feb_Control_GetLeftFPGATemp(){ + unsigned int temperature=0; + Feb_Interface_ReadRegister(Module_GetTopLeftAddress (&modules[1]),FEB_REG_STATUS, &temperature); + temperature = temperature >> 16; + //division done in client to send int over network + return (int)temperature; +} + +int Feb_Control_GetRightFPGATemp(){ + unsigned int temperature=0; + Feb_Interface_ReadRegister(Module_GetTopRightAddress (&modules[1]),FEB_REG_STATUS, &temperature); + temperature = temperature >> 16; + //division done in client to send int over network + return (int)temperature; +} + + + diff --git a/slsDetectorSoftware/eigerDetectorServer/FebControl.h b/slsDetectorSoftware/eigerDetectorServer/FebControl.h index 453cdce14..8ccbb035d 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebControl.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebControl.h @@ -191,4 +191,7 @@ int Feb_Control_GetModuleNumber(); void Feb_Control_SetRateCorrectionVariable(int activate_rate_correction); int Feb_Control_PrintCorrectedValues(); + int Feb_Control_GetLeftFPGATemp(); + int Feb_Control_GetRightFPGATemp(); + #endif diff --git a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h index 1dbd97b59..93f8ea404 100644 --- a/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h +++ b/slsDetectorSoftware/eigerDetectorServer/FebRegisterDefs.h @@ -95,6 +95,7 @@ #define DAQ_STATUS_DAQ_RUNNING 0x01 #define DAQ_DATA_COLLISION_ERROR 0x02 + #define DAQ_STATUS_CURRENT_M4 0x04 #define DAQ_STATUS_CURRENT_M8 0x08 #define DAQ_STATUS_CURRENT_M12 0x00 //in 12 bit mode both are cleared @@ -149,3 +150,6 @@ #define FRAME_NUM_RESET_OFFSET 0xA0 +//temp so far +#define FEB_REG_STATUS 0xa + diff --git a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.1.14.0 b/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.1.14.0 deleted file mode 100755 index 622ab39cb..000000000 Binary files a/slsDetectorSoftware/eigerDetectorServer/bin/eigerDetectorServerv2.1.1.14.0 and /dev/null differ diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c index 53089185b..2ea8bab1c 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorFunctionList.c @@ -449,6 +449,12 @@ int getADC(enum detAdcIndex ind, int imod){ case TEMP_FPGA: retval=getBebFPGATemp()*1000; break; + case TEMP_FPGAFEBL: + retval=Feb_Control_GetLeftFPGATemp(); + break; + case TEMP_FPGAFEBR: + retval=Feb_Control_GetRightFPGATemp(); + break; case TEMP_FPGAEXT: case TEMP_10GE: case TEMP_DCDC: diff --git a/slsDetectorSoftware/eigerDetectorServer/slsDetectorServer_defs.h b/slsDetectorSoftware/eigerDetectorServer/slsDetectorServer_defs.h index c440792ed..5e821bd73 100644 --- a/slsDetectorSoftware/eigerDetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorSoftware/eigerDetectorServer/slsDetectorServer_defs.h @@ -40,7 +40,7 @@ enum detDacIndex{SVP,VTR,VRF,VRS,SVN,VTGSTV,VCMP_LL,VCMP_LR,CAL,VCMP_RL,RXB_RB,RXB_LB,VCMP_RR,VCP,VCN,VIS,VTHRESHOLD}; -enum detAdcIndex{TEMP_FPGAEXT, TEMP_10GE, TEMP_DCDC, TEMP_SODL, TEMP_SODR, TEMP_FPGA}; +enum detAdcIndex{TEMP_FPGAEXT, TEMP_10GE, TEMP_DCDC, TEMP_SODL, TEMP_SODR, TEMP_FPGA, TEMP_FPGAFEBL, TEMP_FPGAFEBR}; enum detNetworkParameter{TXN_LEFT, TXN_RIGHT, TXN_FRAME,FLOWCTRL_10G}; diff --git a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp index f26f99011..496eb1c4a 100644 --- a/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp +++ b/slsDetectorSoftware/slsDetector/slsDetectorCommand.cpp @@ -791,6 +791,15 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) { descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; i++; + descrToFuncMap[i].m_pFuncName="temp_fpgafl"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; + i++; + + descrToFuncMap[i].m_pFuncName="temp_fpgafr"; // + descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdADC; + i++; + + /* r/w timers */ descrToFuncMap[i].m_pFuncName="timing"; // @@ -3881,6 +3890,10 @@ string slsDetectorCommand::cmdADC(int narg, char *args[], int action) { adc=TEMPERATURE_SODL; else if (cmd=="temp_sodr") adc=TEMPERATURE_SODR; + else if (cmd=="temp_fpgafl") + adc=TEMPERATURE_FPGA2; + else if (cmd=="temp_fpgafr") + adc=TEMPERATURE_FPGA3; else return string("cannot decode adc ")+cmd; @@ -3909,6 +3922,8 @@ string slsDetectorCommand::helpADC(int narg, char *args[], int action) { os << "temp_dcdc " << "Cannot be set" << std::endl; os << "temp_sodl " << "Cannot be set" << std::endl; os << "temp_sodr " << "Cannot be set" << std::endl; + os << "temp_fpgafl " << "Cannot be set" << std::endl; + os << "temp_fpgafr " << "Cannot be set" << std::endl; } if (action==GET_ACTION || action==HELP_ACTION) { os << "temp_adc " << "\t gets the temperature of the adc" << std::endl; @@ -3918,6 +3933,8 @@ string slsDetectorCommand::helpADC(int narg, char *args[], int action) { os << "temp_dcdc " << "\t gets the temperature close to the dc dc converter" << std::endl; os << "temp_sodl " << "\t gets the temperature close to the left so-dimm memory" << std::endl; os << "temp_sodr " << "\t gets the temperature close to the right so-dimm memory" << std::endl; + os << "temp_fpgafl " << "\t gets the temperature of the left front end board fpga" << std::endl; + os << "temp_fpgafr " << "\t gets the temperature of the left front end board fpga" << std::endl; } return os.str(); } diff --git a/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c b/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c index bbba27be6..7bfad9fe9 100755 --- a/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c +++ b/slsDetectorSoftware/slsDetectorServer/slsDetectorServer_funcs.c @@ -1325,9 +1325,6 @@ int get_adc(int file_des) { #endif switch (ind) { #ifdef EIGERD - case TEMPERATURE_FPGA: - iadc = TEMP_FPGA; - break; case TEMPERATURE_FPGAEXT: iadc = TEMP_FPGAEXT; break; @@ -1343,6 +1340,15 @@ int get_adc(int file_des) { case TEMPERATURE_SODR: iadc = TEMP_SODR; break; + case TEMPERATURE_FPGA: + iadc = TEMP_FPGA; + break; + case TEMPERATURE_FPGA2: + iadc = TEMP_FPGAFEBL; + break; + case TEMPERATURE_FPGA3: + iadc = TEMP_FPGAFEBR; + break; #endif #ifdef GOTTHARDD case TEMPERATURE_FPGA: