resolving merge from 5.2.0-rc

This commit is contained in:
maliakal_d 2021-07-15 21:16:42 +02:00
commit 5e685ea5a6
7 changed files with 125 additions and 35 deletions

View File

@ -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 Client
------ ------
1. Added settings and threshold features for Mythen3. 1. (Gotthard2) veto streaming
2. Internal modification of acquire for Mythen3. New command to enable/ disable veto streaming via 2.5GbE or/ and 10GbE (debugging).
3. Added getMaster for Mythen3 Command: vetostream, Detector::setVetoStream
4. Mythen3, API function to set pattern from memory
Gotthard2 server 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 Receiver
-------- --------
1. Current code only calls Implementation::setDetectorType from constructor, 1.
but potential memory leak if called out of constructor context. Fixed.
Client 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 3. Firmware Requirements
======================== ========================
Mythen3: 0x210201 Gotthard2: 0x210201 ???
Jungfrau: 0x210218 (1.0 pcb)
0x200721 (2.0 pcb, not changed)
Other detectors no updates from 5.0.0 Other detectors no updates from 5.1.0
4. Known Issues 4. Known Issues
=============== ===============
No updates from 5.0.0 No updates from 5.1.0

View File

@ -989,7 +989,7 @@ int setExpTime(int64_t val) {
return FAIL; return FAIL;
} }
LOG(logINFO, ("Setting exptime %lld ns\n", val)); 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); set64BitReg(val, ASIC_INT_EXPTIME_LSB_REG, ASIC_INT_EXPTIME_MSB_REG);
// validate for tolerance // validate for tolerance
@ -1014,7 +1014,7 @@ int setPeriod(int64_t val) {
// continuous // continuous
if (burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) { if (burstMode == CONTINUOUS_INTERNAL || burstMode == CONTINUOUS_EXTERNAL) {
LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", val)); LOG(logINFO, ("Setting period %lld ns [Continuous mode]\n", val));
val *= (1E-9 * systemFrequency); val = (val * 1E-9 * systemFrequency) + 0.5;
// trigger // trigger
if (getTiming() == TRIGGER_EXPOSURE) { if (getTiming() == TRIGGER_EXPOSURE) {
LOG(logINFO, LOG(logINFO,
@ -1029,7 +1029,7 @@ int setPeriod(int64_t val) {
// burst // burst
else { else {
LOG(logINFO, ("Setting period %lld ns [Burst mode]\n", val)); 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); set64BitReg(val, ASIC_INT_PERIOD_LSB_REG, ASIC_INT_PERIOD_MSB_REG);
} }
periodReg = val; periodReg = val;
@ -1067,7 +1067,7 @@ int setDelayAfterTrigger(int64_t val) {
return FAIL; return FAIL;
} }
LOG(logINFO, ("Setting delay after trigger %lld ns\n", val)); LOG(logINFO, ("Setting delay after trigger %lld ns\n", val));
val *= (1E-9 * systemFrequency); val = (val * 1E-9 * systemFrequency) + 0.5;
delayReg = val; delayReg = val;
if (getTiming() == AUTO_TIMING) { if (getTiming() == AUTO_TIMING) {
LOG(logINFO, ("\tAuto mode (not writing to register)\n")); LOG(logINFO, ("\tAuto mode (not writing to register)\n"));
@ -1097,7 +1097,7 @@ int setBurstPeriod(int64_t val) {
return FAIL; return FAIL;
} }
LOG(logINFO, ("Setting burst period %lld ns\n", val)); LOG(logINFO, ("Setting burst period %lld ns\n", val));
val *= (1E-9 * systemFrequency); val = (val * 1E-9 * systemFrequency) + 0.5;
burstPeriodReg = val; burstPeriodReg = val;
// burst and auto // burst and auto

View File

@ -1832,6 +1832,8 @@ int stopStateMachine() {
bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_STOP_ACQ_MSK); bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_STOP_ACQ_MSK);
LOG(logINFO, ("Status Register: %08x\n", bus_r(STATUS_REG))); LOG(logINFO, ("Status Register: %08x\n", bus_r(STATUS_REG)));
resetCore();
return OK; return OK;
} }

View File

@ -15,6 +15,93 @@ using sls::Detector;
using test::GET; using test::GET;
using test::PUT; 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 */ /* dacs */
TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") { TEST_CASE("Setting and reading back GOTTHARD2 dacs", "[.cmd][.dacs]") {

View File

@ -1,12 +1,12 @@
/** API versions */ /** API versions */
#define GITBRANCH "5.1.0" #define GITBRANCH "5.1.0"
#define APICTB 0x210225 #define APICTB 0x210225
#define APIGOTTHARD 0x210225 #define APIGOTTHARD 0x210225
#define APIJUNGFRAU 0x210225 #define APIJUNGFRAU 0x210714
#define APIMOENCH 0x210225 #define APIMOENCH 0x210225
#define APIEIGER 0x210225 #define APIEIGER 0x210225
#define APIMYTHEN3 0x210225 #define APIMYTHEN3 0x210225
#define APILIB 0x210225 #define APILIB 0x210225
#define APIRECEIVER 0x210225 #define APIRECEIVER 0x210225
#define APIGUI 0x210225 #define APIGUI 0x210225
#define APIGOTTHARD2 0x210715 #define APIGOTTHARD2 0x210715