diff --git a/RELEASE.txt b/RELEASE.txt index 6123205c5..ff623ecca 100755 --- a/RELEASE.txt +++ b/RELEASE.txt @@ -1,7 +1,7 @@ -SLS Detector Package 5.1.0 released on 22.03.2020 (Minor Release) +SLS Detector Package 5.2.0 released on 15.07.2021 (Minor Release) =================================================================== -This document describes the differences between 5.1.0 and 5.0.1 releases. +This document describes the differences between 5.2.0 and 5.1.0 releases. @@ -22,16 +22,15 @@ This document describes the differences between 5.1.0 and 5.0.1 releases. Client ------ - 1. Added settings and threshold features for Mythen3. - 2. Internal modification of acquire for Mythen3. - 3. Added getMaster for Mythen3 - 4. Mythen3, API function to set pattern from memory - + 1. (Gotthard2) veto streaming + New command to enable/ disable veto streaming via 2.5GbE or/ and 10GbE (debugging). + Command: vetostream, Detector::setVetoStream + Gotthard2 server ---------------- - 1. Bad Channels moved to a new register + 1. Bad Channels moved to a new register @@ -42,24 +41,28 @@ This document describes the differences between 5.1.0 and 5.0.1 releases. Receiver -------- - 1. Current code only calls Implementation::setDetectorType from constructor, - but potential memory leak if called out of constructor context. Fixed. + 1. Client ------ - 1. Fixed missing scanParameters class in Python + 1. - 2. cmk.sh refactored to have better option handling + Gotthard2 Server + ---------------- - 3. Fixed hardcoded path accidentally ending up in the exported CMake package + 1. Tolerance in time parameters. + Eg. 220 ns was being set to 215 ns, instead of 222ns. - Server - -------- - 1. Bottom port not mirrored correctly for Eiger quad + Jungfrau Server + ---------------- + + 1. Stopping in trigger mode and then switching to auto timing mode + blocks data streaming from detector. Workaround fix made in + detector server to reset core until firmware release. @@ -67,18 +70,16 @@ This document describes the differences between 5.1.0 and 5.0.1 releases. 3. Firmware Requirements ======================== - Mythen3: 0x210201 - Jungfrau: 0x210218 (1.0 pcb) - 0x200721 (2.0 pcb, not changed) + Gotthard2: 0x210201 ??? - Other detectors no updates from 5.0.0 + Other detectors no updates from 5.1.0 4. Known Issues =============== - No updates from 5.0.0 + No updates from 5.1.0 diff --git a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer b/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer deleted file mode 100755 index e30851e02..000000000 Binary files a/slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer and /dev/null differ diff --git a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c index 975049e11..2ecc00439 100644 --- a/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/gotthard2DetectorServer/slsDetectorFunctionList.c @@ -989,7 +989,7 @@ int setExpTime(int64_t val) { return FAIL; } LOG(logINFO, ("Setting exptime %lld ns\n", val)); - val *= (1E-9 * systemFrequency); + val = (val * 1E-9 * systemFrequency) + 0.5; set64BitReg(val, ASIC_INT_EXPTIME_LSB_REG, ASIC_INT_EXPTIME_MSB_REG); // validate for tolerance @@ -1014,7 +1014,7 @@ int setPeriod(int64_t val) { // continuous if (burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) { LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", val)); - val *= (1E-9 * systemFrequency); + val = (val * 1E-9 * systemFrequency) + 0.5; // trigger if (getTiming() == TRIGGER_EXPOSURE) { LOG(logINFO, @@ -1029,7 +1029,7 @@ int setPeriod(int64_t val) { // burst else { LOG(logINFO, ("Setting period %lld ns [Burst mode]\n", val)); - val *= (1E-9 * systemFrequency); + val = (val * 1E-9 * systemFrequency) + 0.5; set64BitReg(val, ASIC_INT_PERIOD_LSB_REG, ASIC_INT_PERIOD_MSB_REG); } periodReg = val; @@ -1067,7 +1067,7 @@ int setDelayAfterTrigger(int64_t val) { return FAIL; } LOG(logINFO, ("Setting delay after trigger %lld ns\n", val)); - val *= (1E-9 * systemFrequency); + val = (val * 1E-9 * systemFrequency) + 0.5; delayReg = val; if (getTiming() == AUTO_TIMING) { LOG(logINFO, ("\tAuto mode (not writing to register)\n")); @@ -1097,7 +1097,7 @@ int setBurstPeriod(int64_t val) { return FAIL; } LOG(logINFO, ("Setting burst period %lld ns\n", val)); - val *= (1E-9 * systemFrequency); + val = (val * 1E-9 * systemFrequency) + 0.5; burstPeriodReg = val; // burst and auto diff --git a/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer new file mode 100755 index 000000000..37e232fd0 Binary files /dev/null and b/slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer differ diff --git a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c index aa5c97006..f9ac4032e 100644 --- a/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/jungfrauDetectorServer/slsDetectorFunctionList.c @@ -1832,6 +1832,8 @@ int stopStateMachine() { bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_STOP_ACQ_MSK); LOG(logINFO, ("Status Register: %08x\n", bus_r(STATUS_REG))); + + resetCore(); return OK; } diff --git a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp index d9db4a2c7..a42de01a8 100644 --- a/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp +++ b/slsDetectorSoftware/tests/test-CmdProxy-gotthard2.cpp @@ -15,6 +15,93 @@ using sls::Detector; using test::GET; using test::PUT; +// time specific measurements for gotthard2 +TEST_CASE("timegotthard2", "[.cmd]") { + Detector det; + CmdProxy proxy(&det); + auto det_type = det.getDetectorType().squash(); + if (det_type == defs::GOTTHARD2) { + // exptime + auto prev_val = det.getExptime(); + { + std::ostringstream oss; + proxy.Call("exptime", {"220ns"}, -1, PUT, oss); + REQUIRE(oss.str() == "exptime 220ns\n"); + } + { + std::ostringstream oss; + proxy.Call("exptime", {}, -1, GET, oss); + REQUIRE(oss.str() == "exptime 222ns\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setExptime(prev_val[i], {i}); + } + // burst period + prev_val = det.getBurstPeriod(); + { + std::ostringstream oss; + proxy.Call("burstperiod", {"220ns"}, -1, PUT, oss); + REQUIRE(oss.str() == "burstperiod 220ns\n"); + } + { + std::ostringstream oss; + proxy.Call("burstperiod", {}, -1, GET, oss); + REQUIRE(oss.str() == "burstperiod 222ns\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setBurstPeriod(prev_val[i], {i}); + } + // delay after trigger + prev_val = det.getDelayAfterTrigger(); + { + std::ostringstream oss; + proxy.Call("delay", {"220ns"}, -1, PUT, oss); + REQUIRE(oss.str() == "delay 220ns\n"); + } + { + std::ostringstream oss; + proxy.Call("delay", {}, -1, GET, oss); + REQUIRE(oss.str() == "delay 222ns\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setDelayAfterTrigger(prev_val[i], {i}); + } + // period in burst mode + auto burst_prev_val = det.getBurstMode(); + det.setBurstMode(defs::BURST_INTERNAL, {}); + prev_val = det.getPeriod(); + { + std::ostringstream oss; + proxy.Call("period", {"220ns"}, -1, PUT, oss); + REQUIRE(oss.str() == "period 220ns\n"); + } + { + std::ostringstream oss; + proxy.Call("period", {}, -1, GET, oss); + REQUIRE(oss.str() == "period 222ns\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setPeriod(prev_val[i], {i}); + } + // period in continuous mode + det.setBurstMode(defs::CONTINUOUS_INTERNAL, {}); + prev_val = det.getPeriod(); + { + std::ostringstream oss; + proxy.Call("period", {"220ns"}, -1, PUT, oss); + REQUIRE(oss.str() == "period 220ns\n"); + } + { + std::ostringstream oss; + proxy.Call("period", {}, -1, GET, oss); + REQUIRE(oss.str() == "period 222ns\n"); + } + for (int i = 0; i != det.size(); ++i) { + det.setPeriod(prev_val[i], {i}); + det.setBurstMode(burst_prev_val[i], {i}); + } + } +} /* dacs */ TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") { diff --git a/slsSupportLib/include/sls/versionAPI.h b/slsSupportLib/include/sls/versionAPI.h index df42134d3..c3c69e557 100644 --- a/slsSupportLib/include/sls/versionAPI.h +++ b/slsSupportLib/include/sls/versionAPI.h @@ -1,12 +1,12 @@ /** API versions */ #define GITBRANCH "5.1.0" -#define APICTB 0x210225 -#define APIGOTTHARD 0x210225 -#define APIJUNGFRAU 0x210225 -#define APIMOENCH 0x210225 -#define APIEIGER 0x210225 -#define APIMYTHEN3 0x210225 -#define APILIB 0x210225 -#define APIRECEIVER 0x210225 -#define APIGUI 0x210225 +#define APICTB 0x210225 +#define APIGOTTHARD 0x210225 +#define APIJUNGFRAU 0x210714 +#define APIMOENCH 0x210225 +#define APIEIGER 0x210225 +#define APIMYTHEN3 0x210225 +#define APILIB 0x210225 +#define APIRECEIVER 0x210225 +#define APIGUI 0x210225 #define APIGOTTHARD2 0x210715