mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
update mode to skip firmware checks and setupDetector, kernel check added to m3and g2
This commit is contained in:
@ -21,6 +21,7 @@
|
||||
|
||||
// Global variable from slsDetectorServer_funcs
|
||||
extern int debugflag;
|
||||
extern int updateFlag;
|
||||
extern int checkModuleFlag;
|
||||
extern udpStruct udpDetails;
|
||||
extern const enum detectorType myDetectorType;
|
||||
@ -80,8 +81,9 @@ void basictests() {
|
||||
return;
|
||||
}
|
||||
// does check only if flag is 0 (by default), set by command line
|
||||
if ((!debugflag) && ((checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((checkKernelVersion() == FAIL) || (checkType() == FAIL) ||
|
||||
(testFpga() == FAIL) || (testBus() == FAIL))) {
|
||||
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
|
||||
"Dangerous to continue.\n");
|
||||
LOG(logERROR, ("%s\n\n", initErrorMessage));
|
||||
@ -117,7 +119,7 @@ void basictests() {
|
||||
(long long int)client_sw_apiversion));
|
||||
|
||||
// return if flag is not zero, debug mode
|
||||
if (debugflag) {
|
||||
if (debugflag || updateFlag) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -161,6 +163,25 @@ void basictests() {
|
||||
#endif
|
||||
}
|
||||
|
||||
int checkKernelVersion() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
char output[256];
|
||||
memset(output, 0, 256);
|
||||
FILE *sysFile = popen("uname -a | cut -d ' ' -f5-10", "r");
|
||||
fgets(output, sizeof(output), sysFile);
|
||||
pclose(sysFile);
|
||||
|
||||
if (strstr(output, KERNEL_DATE_VRSN) == NULL) {
|
||||
LOG(logERROR, ("Kernel Version Incompatible! Expected: %s, Got: %s\n",
|
||||
KERNEL_DATE_VRSN, output));
|
||||
return FAIL;
|
||||
}
|
||||
LOG(logINFO, ("Kernel Version Compatible: %s\n", output));
|
||||
return OK;
|
||||
}
|
||||
|
||||
int checkType() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
@ -313,7 +334,7 @@ u_int32_t getDetectorIP() {
|
||||
/* initialization */
|
||||
|
||||
void initControlServer() {
|
||||
if (initError == OK) {
|
||||
if (!updateFlag && initError == OK) {
|
||||
setupDetector();
|
||||
}
|
||||
initCheckDone = 1;
|
||||
|
@ -2,6 +2,7 @@
|
||||
#include "sls_detector_defs.h"
|
||||
|
||||
#define REQRD_FRMWRE_VRSN 0x190000
|
||||
#define KERNEL_DATE_VRSN "Wed May 20 13:58:38 CEST 2020"
|
||||
|
||||
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
||||
|
||||
@ -24,24 +25,25 @@
|
||||
#define MAX_EXT_SIGNALS (8)
|
||||
|
||||
/** Default Parameters */
|
||||
#define DEFAULT_PATTERN_FILE ("DefaultPattern_mythen3.txt")
|
||||
#define DEFAULT_INTERNAL_GATES (1)
|
||||
#define DEFAULT_EXTERNAL_GATES (1)
|
||||
#define DEFAULT_DYNAMIC_RANGE (32)
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_GATE_WIDTH (100 * 1000 * 1000) // ns
|
||||
#define DEFAULT_GATE_DELAY (0)
|
||||
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY_AFTER_TRIGGER (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_READOUT_C0 (8) //(125000000) // rdo_clk, 125 MHz
|
||||
#define DEFAULT_READOUT_C1 (8) //(125000000) // rdo_x2_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C0 (4) //(250000000) // run_clk, 250 MHz
|
||||
#define DEFAULT_SYSTEM_C1 (8) //(125000000) // sync_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C2 (8) //(125000000) // str_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C3 (5) //(200000000) // smp_clk, 200 MHz (only for timing receiver)
|
||||
#define DEFAULT_PATTERN_FILE ("DefaultPattern_mythen3.txt")
|
||||
#define DEFAULT_INTERNAL_GATES (1)
|
||||
#define DEFAULT_EXTERNAL_GATES (1)
|
||||
#define DEFAULT_DYNAMIC_RANGE (32)
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DEFAULT_GATE_WIDTH (100 * 1000 * 1000) // ns
|
||||
#define DEFAULT_GATE_DELAY (0)
|
||||
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
|
||||
#define DEFAULT_DELAY_AFTER_TRIGGER (0)
|
||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
#define DEFAULT_READOUT_C0 (8) //(125000000) // rdo_clk, 125 MHz
|
||||
#define DEFAULT_READOUT_C1 (8) //(125000000) // rdo_x2_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C0 (4) //(250000000) // run_clk, 250 MHz
|
||||
#define DEFAULT_SYSTEM_C1 (8) //(125000000) // sync_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C2 (8) //(125000000) // str_clk, 125 MHz
|
||||
#define DEFAULT_SYSTEM_C3 \
|
||||
(5) //(200000000) // smp_clk, 200 MHz (only for timing receiver)
|
||||
#define DEFAULT_ASIC_LATCHING_NUM_PULSES (10)
|
||||
#define DEFAULT_MSTR_OTPT_P1_NUM_PULSES (20)
|
||||
|
||||
@ -110,7 +112,8 @@ enum CLKINDEX {
|
||||
NUM_CLOCKS
|
||||
};
|
||||
#define CLK_NAMES \
|
||||
"READOUT_C0", "READOUT_C1", "SYSTEM_C0", "SYSTEM_C1", "SYSTEM_C2", "SYSTEM_C3"
|
||||
"READOUT_C0", "READOUT_C1", "SYSTEM_C0", "SYSTEM_C1", "SYSTEM_C2", \
|
||||
"SYSTEM_C3"
|
||||
enum PLLINDEX { READOUT_PLL, SYSTEM_PLL };
|
||||
|
||||
/* Struct Definitions */
|
||||
|
Reference in New Issue
Block a user