mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-04 00:50:42 +02:00
8.0.2.rc (#974)
* moench: changed max shifts of adc clk from 240 to 200 (#909) * moench server name and version renaming * 802/moench default speed (#910) * moench:change default speed to half speed * Protect from getenv("HOME") returning nullptr (#907) * Protect from getenv("HOME") returning nullptr (e.g., in case running in systemd) * Write proper warning in Module.cpp * moench: min exptime and also a firmware update required (#911) * moench server: changed default values of adcphase for full speed from 300 to 150 and dac vipre_cds from 800 to 1280 (#921) * client bug fix: m3 multi module bad channel file throws bad allocation when modules skipped, needed to add vectors in 2d vector of bad channel list (#919) * 8.0.2.rc: client: blocking acquire stop with slave temporarily in waiting (#925) * client: stopping a blocking acquire of multi modules checks status to catch slaves that might still be in waiting. Problem is (gotthard2 25um at least) slave is in waiting only temporarily before going go idle/stopped. So a 50ms sleep is necessary ot not throw an unnecessary error * client: when stopping blocking acquire, wait up to 1s in 50ms increments for slave to stop waiting temporarily * fix to rapidjson for build with gcc 14 (#928) * 8.0.2.rc: m3 clkdiv0 20 (#923) * m3: clk 0 changed from 10 to 20 (100MHz to 50MHz) * g2: startup clk div back to 10 as in firmware but setting in software startup to 20 * 8.0.2.rc: moench empty data callback (#935) * moench: empty data call back so that zmq sockets are still made and listened to in acquire that it waits for the dummy packet to be done * moench zmq postprocessor: remove NEWZMQ ifdefs and remove connect for publisher socket * changed enum from READOUT_ACTION_ZMQ to READOUT_ZMQ_ACTION for consistency * 8.0.2.rc: client: status for blocking acquire stop with slave temporarily in waiting (#943) * acq finish call back gets status squashed with default error but before that need to wait for gotthard slaves to catch up from waiting to stopped * bug fixes related to file saving (#931) * fix the file path resetting issue of GUI in the case where different modules have different fpath setting. * fix stack-buffer-overflow issue when using HDF5 HDF5DataFile::parameterDataTypes have 64bit type (i.e. STD_U64LE), the size of fill_value should be at least 8 bytes. * change the type of fill_value to uint64_t * updated documentation from martin (#947) * 802: jungfrau HW 1.0: adc output clock phase to 120 (#951) * jungfrau: change adc output clock phase from 180 to 120 for v1.0 boards for reliable readout of adc #2 * formatting * 802/release notes (#954) * updated release notes * versioning * fixed a warning about narrowing conversion from size_t to int (#962) * updating client versioning * dont build doc for Tobi Schluter from libzmq, which uses iso-8859-1 and the umlaut cause compilation to fail on some machines (#972) * updated release notes --------- Co-authored-by: Filip Leonarski <filip.leonarski@psi.ch> Co-authored-by: Erik Fröjdh <erik.frojdh@gmail.com> Co-authored-by: Z.H. Li <zhenghenge@gmail.com>
This commit is contained in:
parent
97f0c1fe46
commit
4880f87791
@ -2,7 +2,7 @@
|
||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
cmake_minimum_required(VERSION 3.14)
|
||||
project(slsDetectorPackage)
|
||||
set(PROJECT_VERSION 8.0.1)
|
||||
set(PROJECT_VERSION 8.0.2)
|
||||
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||
|
||||
|
114
RELEASE.txt
114
RELEASE.txt
@ -1,7 +1,7 @@
|
||||
SLS Detector Package Major Release 8.0.1 released on 16.01.2024
|
||||
===============================================================
|
||||
SLS Detector Package Bug Fix Release 8.0.2 released on 18.09.2024
|
||||
=================================================================
|
||||
|
||||
This document describes the differences between v8.0.1 and v8.0.0
|
||||
This document describes the differences between v8.0.2 and v8.0.1
|
||||
|
||||
|
||||
|
||||
@ -24,20 +24,101 @@ This document describes the differences between v8.0.1 and v8.0.0
|
||||
-----------
|
||||
|
||||
|
||||
* Fixed compilation error when building without zmq-devel installed
|
||||
and removed dependency on zeromq in conda build.
|
||||
* Rapidjson compilation with gcc 14
|
||||
Fixed a compile issue with gcc 14. Same fix in later commits to rapidjson.
|
||||
|
||||
|
||||
* Fixed libzmq compilation error to build the package as a submodule.
|
||||
Client
|
||||
------
|
||||
|
||||
|
||||
Calibration
|
||||
-----------
|
||||
* getenv("HOME") returning nullptr
|
||||
When this happens, especially for systemd, it segfaults. Protection
|
||||
provided by using empty string in this case.
|
||||
|
||||
|
||||
* [Moench] Fixed Moench calibration
|
||||
* [Mythen3] Bad channel list for multi module
|
||||
Exception thrown when loading multi module bad channel file skipping
|
||||
modules in between. Fixed.
|
||||
|
||||
|
||||
* [Gotthard2] Stopping a blocking acquisition
|
||||
A check added in v8.0.0 to catch slaves that might be in waiting forever
|
||||
also catches Gotthard2 25um slaves that might only be in waiting
|
||||
temporarily. This is fixed with a 50ms sleep before checking again
|
||||
(upto 1s).
|
||||
|
||||
|
||||
* [Moench] Acquire finished processing call back
|
||||
New executable 'sls_detector_acquire_zmq' added to listen to all zmq
|
||||
packets from post processor or external process to signal end of post
|
||||
processing. Post processor refactoring of zmq socket creation added.
|
||||
|
||||
|
||||
Gui / Callback
|
||||
--------------
|
||||
|
||||
|
||||
* [Gotthard2] Stopping a blocking acquisition
|
||||
From the previous issue, call back for acquisition finished status gives
|
||||
error for inconsistent states. Again, a check every 50ms upto 1s is
|
||||
added to let go the temporarily waiting slave.
|
||||
|
||||
|
||||
* Different file paths
|
||||
Fixes file path resetting when different modules have different fpath set.
|
||||
|
||||
|
||||
Receiver
|
||||
--------
|
||||
|
||||
|
||||
* HDF5 fill value
|
||||
Fix the fill value to accomodate all datatypes.
|
||||
|
||||
|
||||
Firmware
|
||||
--------
|
||||
|
||||
|
||||
* [Moench] Overflow with exptime of 0
|
||||
Fixed overflow when subtracting 1 clock cycle from exptime.
|
||||
|
||||
|
||||
On-board Detector Server
|
||||
------------------------
|
||||
|
||||
|
||||
* [Moench] Few changes in Server:
|
||||
- Max shifts of adc clock changed from 240 to 200.
|
||||
|
||||
- Fixed overflow when subtracting 2 clock cycles from exptime of 0ms.
|
||||
|
||||
- Default readout speed to half speed from quarter.
|
||||
|
||||
- Change default ADC phase to 150 for full readout speed.
|
||||
|
||||
- Change default vipre_cds dac from 800 to 1280.
|
||||
|
||||
|
||||
* [Mythen3] Change Clk divider from 10 (100MHz) to 20 (50MHz) at startup.
|
||||
|
||||
|
||||
* [Jungfrau] Fix for HW v1.0 boards for unreliable ADC 2
|
||||
Issues sometimes seen on some HW v 1.0 boards are fixed with phase
|
||||
relationship of 120 degrees. HW v2.0 boards are not affected.
|
||||
|
||||
|
||||
Documentation
|
||||
-------------
|
||||
|
||||
|
||||
* Updated troubleshooting documentaion to check links and disable firewall
|
||||
|
||||
|
||||
* Excluded non UTF-8 encoded libzmq documents due to machine dependent
|
||||
compilation issues.
|
||||
|
||||
|
||||
|
||||
2 On-board Detector Server Compatibility
|
||||
@ -45,11 +126,11 @@ This document describes the differences between v8.0.1 and v8.0.0
|
||||
|
||||
|
||||
Eiger 8.0.0
|
||||
Jungfrau 8.0.0
|
||||
Mythen3 8.0.0
|
||||
Jungfrau 8.0.2
|
||||
Mythen3 8.0.2
|
||||
Gotthard2 8.0.0
|
||||
Gotthard 8.0.0
|
||||
Moench 8.0.0
|
||||
Moench 8.0.2
|
||||
Ctb 8.0.0
|
||||
|
||||
|
||||
@ -58,8 +139,6 @@ This document describes the differences between v8.0.1 and v8.0.0
|
||||
|
||||
From v6.1.0 (without tftp):
|
||||
Using command 'updatedetectorserver'
|
||||
From 5.0.0 (with tftp):
|
||||
Using command 'copydetectorserver'
|
||||
|
||||
Instructions available at
|
||||
https://slsdetectorgroup.github.io/devdoc/serverupgrade.html
|
||||
@ -83,7 +162,8 @@ This document describes the differences between v8.0.1 and v8.0.0
|
||||
Gotthard 08.02.2018 (50um and 25um Master)
|
||||
09.02.2018 (25 um Slave)
|
||||
|
||||
Moench 10.07.2023 (v0.3.2) (updated in 8.0.0, under development)
|
||||
Moench 26.10.2023 (v0.3.2) (updated in 8.0.2,
|
||||
under development)
|
||||
|
||||
Ctb 28.08.2023 (v1.2) (updated in 8.0.0)
|
||||
|
||||
@ -104,10 +184,10 @@ This document describes the differences between v8.0.1 and v8.0.0
|
||||
|
||||
Except Eiger,
|
||||
upgrade
|
||||
Using command 'programfpga' or
|
||||
using command 'programfpga' or
|
||||
|
||||
udpate both server and firmware simultaneously
|
||||
Using command 'update'
|
||||
using command 'update'
|
||||
|
||||
|
||||
Instructions available at
|
||||
|
@ -890,7 +890,7 @@ EXCLUDE_SYMLINKS = NO
|
||||
# Note that the wildcards are matched against the file with absolute path, so to
|
||||
# exclude all test directories for example use the pattern */test/*
|
||||
|
||||
EXCLUDE_PATTERNS = */docs/* */tests/* */python/* */manual */slsDetectorServers/* */libs/* */integrationTests *README* */slsDetectorGui/* */ctbGui/* */slsDetectorCalibration/*
|
||||
EXCLUDE_PATTERNS = */docs/* */tests/* */python/* */manual */slsDetectorServers/* */libs/* */integrationTests *README* */slsDetectorGui/* */ctbGui/* */slsDetectorCalibration/* *TobiSchluter*
|
||||
|
||||
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
|
||||
# (namespaces, classes, functions, etc.) that should be excluded from the
|
||||
|
@ -22,6 +22,8 @@ Common
|
||||
* Check transeiver and fibers are compatible (all MMF 850nm or all SMF 1030nm)
|
||||
* Check fiber
|
||||
* Check fiber polarity (if short range, unplug the link anywhere, and look at the light/dark pattern: dark has to mate with light)
|
||||
* For Jungfrau, check if the blue sfp light is blinking rapidly (even when it is not sending data). If so, most likely the link is down and something is wrong with the board. If it connected to a switch, then you do not see it with the ethtool command if link is down. One option is to connect it directly to a pc to see if link is down.
|
||||
* With nc, try "nc -u -p 50001 -l" in receiving pc, and from another pc try "echo hallo | nc -u 10.1.2.172 50001" to send something to the recieving pc interface to see if the link is up and see if the other nc console receives the hallo.
|
||||
|
||||
#. Detector is not acquiring (Not Eiger)
|
||||
* Take an acquisition with many images and using the following steps instead of acquire:
|
||||
@ -47,11 +49,20 @@ Common
|
||||
* Ensure that the interfaces (on NIC and the switch) used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
||||
|
||||
|
||||
#. Check if 'rx_frames' counter in 'ifconfig' do not increment for interface.
|
||||
#. Check if 'rx packets' counter in 'ifconfig' do not increment for interface.
|
||||
* If no, check switch configuration if present. Port counters of switch can also help to identify problem.
|
||||
* If yes, but receiver software does not see it:
|
||||
|
||||
* Check no firewall (eg. firewalld) is present or add rules
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
# Stop and disable firewall
|
||||
service firewalld stop
|
||||
systemctl disable firewalld
|
||||
# Check status
|
||||
service firewalld status
|
||||
|
||||
* Check that selinux is disabled ( or add rules)
|
||||
|
||||
#. Source UDP IP in config file (Not Eiger)
|
||||
|
@ -316,7 +316,8 @@ struct GenericStringRef {
|
||||
|
||||
GenericStringRef(const GenericStringRef& rhs) : s(rhs.s), length(rhs.length) {}
|
||||
|
||||
GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
// Removed to fix failing build in GCC 14
|
||||
// GenericStringRef& operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
|
||||
|
||||
//! implicit conversion to plain CharType pointer
|
||||
operator const Ch *() const { return s; }
|
||||
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.0
|
1
serverBin/jungfrauDetectorServerv8.0.2
Symbolic link
1
serverBin/jungfrauDetectorServerv8.0.2
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.0
|
1
serverBin/moenchDetectorServerv8.0.2
Symbolic link
1
serverBin/moenchDetectorServerv8.0.2
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2
|
@ -1 +0,0 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.0
|
1
serverBin/mythen3DetectorServerv8.0.2
Symbolic link
1
serverBin/mythen3DetectorServerv8.0.2
Symbolic link
@ -0,0 +1 @@
|
||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv8.0.2
|
@ -183,8 +183,8 @@ int main(int argc, char *argv[]) {
|
||||
gainfname = args["gainfile"];
|
||||
etafname = args["etafilefile"];
|
||||
|
||||
if (atoi(args["nuninterfaces"].c_str())>1){
|
||||
cprintf(RED, "Sorry, at the moment only a single interface is supported instead of %d\n",atoi(args["nuninterfaces"].c_str()));
|
||||
if (atoi(args["numinterfaces"].c_str())>1){
|
||||
cprintf(RED, "Sorry, at the moment only a single interface is supported instead of %d\n",atoi(args["numinterfaces"].c_str()));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@ -272,54 +272,35 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
sls::ZmqSocket *zmqsocket = NULL;
|
||||
|
||||
#ifdef NEWZMQ
|
||||
// receive socket
|
||||
try {
|
||||
#endif
|
||||
|
||||
zmqsocket = new sls::ZmqSocket(socketip.c_str(), portnum);
|
||||
|
||||
#ifdef NEWZMQ
|
||||
} catch (...) {
|
||||
cprintf(RED,
|
||||
"Error: Could not create Zmq socket on port %d with ip %s\n",
|
||||
"Error: Could not create Zmq receiving socket on port %d with ip %s\n",
|
||||
portnum, socketip.c_str());
|
||||
delete zmqsocket;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NEWZMQ
|
||||
if (zmqsocket->IsError()) {
|
||||
cprintf(RED,
|
||||
"Error: Could not create Zmq socket on port %d with ip %s\n",
|
||||
portnum, socketip.c_str());
|
||||
delete zmqsocket;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
#endif
|
||||
if (zmqsocket->Connect()) {
|
||||
cprintf(RED, "Error: Could not connect to socket %s\n",
|
||||
cprintf(RED, "Error: Could not connect to zmq receiving socket %s\n",
|
||||
(zmqsocket->GetZmqServerAddress()).c_str());
|
||||
delete zmqsocket;
|
||||
return EXIT_FAILURE;
|
||||
} else
|
||||
printf("Zmq Client at %s\n", zmqsocket->GetZmqServerAddress().c_str());
|
||||
|
||||
printf("Zmq receiving at %s\n", zmqsocket->GetZmqServerAddress().c_str());
|
||||
|
||||
// send socket
|
||||
sls::ZmqSocket *zmqsocket2 = 0;
|
||||
// cout << "zmq2 " << endl;
|
||||
if (send) {
|
||||
#ifdef NEWZMQ
|
||||
// receive socket
|
||||
try {
|
||||
#endif
|
||||
zmqsocket2 = new sls::ZmqSocket(portnum2, socketip2.c_str());
|
||||
|
||||
#ifdef NEWZMQ
|
||||
zmqsocket2 = new sls::ZmqSocket(portnum2, socketip2.c_str());
|
||||
} catch (...) {
|
||||
cprintf(RED,
|
||||
"Error: Could not create Zmq socket server on port %d and "
|
||||
"Error: Could not create Zmq sending socket on port %d and "
|
||||
"ip %s\n",
|
||||
portnum2, socketip2.c_str());
|
||||
// delete zmqsocket2;
|
||||
@ -328,28 +309,7 @@ int main(int argc, char *argv[]) {
|
||||
// return EXIT_FAILURE;
|
||||
send = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef NEWZMQ
|
||||
if (zmqsocket2->IsError()) {
|
||||
cprintf(RED,
|
||||
"AAA Error: Could not create Zmq socket server on port %d "
|
||||
"and ip %s\n",
|
||||
portnum2, socketip2.c_str());
|
||||
// delete zmqsocket2;
|
||||
// delete zmqsocket;
|
||||
// return EXIT_FAILURE;
|
||||
send = false;
|
||||
}
|
||||
#endif
|
||||
if (zmqsocket2->Connect()) {
|
||||
cprintf(RED, "BBB Error: Could not connect to socket %s\n",
|
||||
zmqsocket2->GetZmqServerAddress().c_str());
|
||||
// delete zmqsocket2;
|
||||
send = false;
|
||||
// return EXIT_FAILURE;
|
||||
} else
|
||||
printf("Zmq Client at %s\n",
|
||||
printf("Zmq sending socket at %s\n",
|
||||
zmqsocket2->GetZmqServerAddress().c_str());
|
||||
}
|
||||
|
||||
|
@ -839,8 +839,8 @@ void qTabMeasurement::UpdateProgress() {
|
||||
int qTabMeasurement::VerifyOutputDirectoryError() {
|
||||
try {
|
||||
auto retval = det->getFilePath();
|
||||
for (auto &it : retval) {
|
||||
det->setFilePath(it);
|
||||
for (int i = 0; i < static_cast<int>(retval.size()); ++i) {
|
||||
det->setFilePath(retval[i], {i});
|
||||
}
|
||||
return slsDetectorDefs::OK;
|
||||
}
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2
Executable file
BIN
slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv8.0.2
Executable file
Binary file not shown.
@ -488,6 +488,7 @@ void setupDetector() {
|
||||
AD9257_SetDefines(ADC_SPI_REG, ADC_SPI_SRL_CS_OTPT_MSK,
|
||||
ADC_SPI_SRL_CLK_OTPT_MSK, ADC_SPI_SRL_DT_OTPT_MSK,
|
||||
ADC_SPI_SRL_DT_OTPT_OFST);
|
||||
AD9257_Set_Jungfrau_Hardware_Version_1_0(isHardwareVersion_1_0());
|
||||
AD9257_Disable();
|
||||
AD9257_Configure();
|
||||
|
||||
|
Binary file not shown.
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2
Executable file
BIN
slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv8.0.2
Executable file
Binary file not shown.
@ -481,7 +481,6 @@ void setupDetector() {
|
||||
return;
|
||||
}
|
||||
|
||||
setReadoutSpeed(DEFAULT_SPEED);
|
||||
cleanFifos();
|
||||
resetCore();
|
||||
|
||||
@ -495,6 +494,7 @@ void setupDetector() {
|
||||
initReadoutConfiguration();
|
||||
|
||||
// Initialization of acquistion parameters
|
||||
setReadoutSpeed(DEFAULT_SPEED);
|
||||
setSettings(DEFAULT_SETTINGS);
|
||||
setNumFrames(DEFAULT_NUM_FRAMES);
|
||||
setNumTriggers(DEFAULT_NUM_CYCLES);
|
||||
@ -699,14 +699,12 @@ int setExpTime(int64_t val) {
|
||||
}
|
||||
LOG(logINFO, ("Setting exptime %lld ns\n", (long long int)val));
|
||||
val *= (1E-3 * CLK_RUN);
|
||||
val -= ACQ_TIME_MIN_CLOCK;
|
||||
if (val < 0) {
|
||||
val = 0;
|
||||
}
|
||||
set64BitReg(val, SET_EXPTIME_LSB_REG, SET_EXPTIME_MSB_REG);
|
||||
|
||||
// validate for tolerance
|
||||
val += ACQ_TIME_MIN_CLOCK;
|
||||
int64_t retval = getExpTime();
|
||||
val /= (1E-3 * CLK_RUN);
|
||||
if (val != retval) {
|
||||
@ -716,8 +714,7 @@ int setExpTime(int64_t val) {
|
||||
}
|
||||
|
||||
int64_t getExpTime() {
|
||||
return (get64BitReg(SET_EXPTIME_LSB_REG, SET_EXPTIME_MSB_REG) +
|
||||
ACQ_TIME_MIN_CLOCK) /
|
||||
return get64BitReg(SET_EXPTIME_LSB_REG, SET_EXPTIME_MSB_REG) /
|
||||
(1E-3 * CLK_RUN);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#include "sls/sls_detector_defs.h"
|
||||
|
||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x444445 // 1.0 pcb (version = 010)
|
||||
#define REQRD_FRMWRE_VRSN 0x230710 // 2.0 pcb (version = 011)
|
||||
#define REQRD_FRMWRE_VRSN 0x231026 // 2.0 pcb (version = 011)
|
||||
|
||||
#define NUM_HARDWARE_VERSIONS (2)
|
||||
#define HARDWARE_VERSION_NUMBERS \
|
||||
@ -58,11 +58,10 @@
|
||||
/* Defines in the Firmware */
|
||||
#define MAX_TIMESLOT_VAL (0x1F)
|
||||
#define MAX_THRESHOLD_TEMP_VAL (127999) // millidegrees
|
||||
#define ACQ_TIME_MIN_CLOCK (2)
|
||||
#define ASIC_FILTER_MAX_RES_VALUE (1)
|
||||
#define MAX_SELECT_CHIP10_VAL (63)
|
||||
|
||||
#define MAX_PHASE_SHIFTS (240)
|
||||
#define MAX_PHASE_SHIFTS (200)
|
||||
#define BIT16_MASK (0xFFFF)
|
||||
|
||||
#define ADC_DECMT_QUARTER_SPEED (0x3)
|
||||
@ -71,7 +70,7 @@
|
||||
|
||||
#define ADC_PHASE_DEG_QUARTER_SPEED (0)
|
||||
#define ADC_PHASE_DEG_HALF_SPEED (0)
|
||||
#define ADC_PHASE_DEG_FULL_SPEED (300)
|
||||
#define ADC_PHASE_DEG_FULL_SPEED (150)
|
||||
|
||||
#define ADC_OFST_QUARTER_SPEED (0x12)
|
||||
#define ADC_OFST_HALF_SPEED (0x12)
|
||||
@ -134,7 +133,7 @@ enum DACINDEX {
|
||||
680, /* MO_VB_SDA */ \
|
||||
1428, /* MO_VCASC_SFP */ \
|
||||
1200, /* MO_VOUT_CM */ \
|
||||
800, /* MO_VIPRE_CDS */ \
|
||||
1280, /* MO_VIPRE_CDS */ \
|
||||
900 /* MO_IBIAS_SFP */ \
|
||||
};
|
||||
|
||||
|
Binary file not shown.
@ -479,6 +479,11 @@ void setupDetector() {
|
||||
READOUT_PLL_VCO_FREQ_HZ, SYSTEM_PLL_VCO_FREQ_HZ);
|
||||
ALTERA_PLL_C10_ResetPLL(READOUT_PLL);
|
||||
ALTERA_PLL_C10_ResetPLL(SYSTEM_PLL);
|
||||
// change startup clock divider in software
|
||||
// because firmware only sets max clock divider
|
||||
setClockDividerWithTimeUpdateOption(READOUT_C0, DEFAULT_READOUT_C0_STARTUP,
|
||||
0);
|
||||
|
||||
// hv
|
||||
DAC6571_SetDefines(HV_HARD_MAX_VOLTAGE, HV_DRIVER_FILE_NAME);
|
||||
// dac
|
||||
@ -2331,6 +2336,7 @@ int setClockDividerWithTimeUpdateOption(enum CLKINDEX ind, int val,
|
||||
return FAIL;
|
||||
}
|
||||
if (val < 2 || val > getMaxClockDivider()) {
|
||||
LOG(logERROR, ("Invalid clock divider %d\n", val));
|
||||
return FAIL;
|
||||
}
|
||||
char *clock_names[] = {CLK_NAMES};
|
||||
|
@ -64,6 +64,8 @@
|
||||
#define DEFAULT_SYSTEM_C2 (5) //(200000000) // smp_clk, 200 MHz const
|
||||
#define DEFAULT_TRIMMING_RUN_CLKDIV (40) // (25000000) // 25 MHz
|
||||
|
||||
#define DEFAULT_READOUT_C0_STARTUP (20) //(50000000) // rdo_clk, 50 MHz
|
||||
|
||||
#define DEFAULT_ASIC_LATCHING_NUM_PULSES (10)
|
||||
#define DEFAULT_MSTR_OTPT_P1_NUM_PULSES (20)
|
||||
#define DEFAULT_ADIF_PIPELINE_VAL (8)
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
#ifdef JUNGFRAUD
|
||||
void AD9257_Set_Jungfrau_Hardware_Version_1_0(int val);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Set Defines
|
||||
* @param reg spi register
|
||||
|
@ -172,6 +172,14 @@ uint32_t AD9257_DigMask = 0x0;
|
||||
int AD9257_DigOffset = 0x0;
|
||||
int AD9257_VrefVoltage = 0;
|
||||
|
||||
#ifdef JUNGFRAUD
|
||||
int AD9257_is_Jungfrau_Hardware_Version_1_0 = 0;
|
||||
|
||||
void AD9257_Set_Jungfrau_Hardware_Version_1_0(int val) {
|
||||
AD9257_is_Jungfrau_Hardware_Version_1_0 = val;
|
||||
}
|
||||
#endif
|
||||
|
||||
void AD9257_SetDefines(uint32_t reg, uint32_t cmsk, uint32_t clkmsk,
|
||||
uint32_t dmsk, int dofst) {
|
||||
AD9257_Reg = reg;
|
||||
@ -286,8 +294,18 @@ void AD9257_Configure() {
|
||||
AD9257_OUT_BINARY_OFST_VAL | AD9257_OUT_LVDS_IEEE_VAL);
|
||||
|
||||
// output clock phase
|
||||
#ifdef JUNGFRAUD
|
||||
if (AD9257_is_Jungfrau_Hardware_Version_1_0) {
|
||||
LOG(logINFO, ("\tOutput clock phase: 120\n"));
|
||||
AD9257_Set(AD9257_OUT_PHASE_REG, AD9257_OUT_CLK_120_VAL);
|
||||
} else {
|
||||
LOG(logINFO, ("\tOutput clock phase: 180\n"));
|
||||
AD9257_Set(AD9257_OUT_PHASE_REG, AD9257_OUT_CLK_180_VAL);
|
||||
}
|
||||
#else
|
||||
LOG(logINFO, ("\tOutput clock phase: 180\n"));
|
||||
AD9257_Set(AD9257_OUT_PHASE_REG, AD9257_OUT_CLK_180_VAL);
|
||||
#endif
|
||||
|
||||
// all devices on chip to receive next command
|
||||
LOG(logINFO, ("\tAll devices on chip to receive next command\n"));
|
||||
|
@ -2533,7 +2533,7 @@ int set_exptime(int file_des) {
|
||||
if (gateIndex != -1) {
|
||||
ret = FAIL;
|
||||
sprintf(mess,
|
||||
"Could not get exposure time. Gate index not implemented "
|
||||
"Could not set exposure time. Gate index not implemented "
|
||||
"for this detector\n");
|
||||
LOG(logERROR, (mess));
|
||||
} else {
|
||||
|
@ -79,9 +79,10 @@ if(SLS_USE_TEXTCLIENT)
|
||||
# Loop over list to generate command line binaries
|
||||
set(bin_names "sls_detector_put"
|
||||
"sls_detector_get"
|
||||
"sls_detector_acquire"
|
||||
"sls_detector_acquire"
|
||||
"sls_detector_acquire_zmq"
|
||||
"sls_detector_help")
|
||||
set(cmd_name "PUT" "GET" "READOUT" "HELP")
|
||||
set(cmd_name "PUT" "GET" "READOUT" "READOUTZMQ" "HELP")
|
||||
list(LENGTH bin_names len1)
|
||||
math(EXPR len2 "${len1} - 1")
|
||||
|
||||
|
@ -30,6 +30,10 @@ int main(int argc, char *argv[]) {
|
||||
int action = slsDetectorDefs::READOUT_ACTION;
|
||||
#endif
|
||||
|
||||
#ifdef READOUTZMQ
|
||||
int action = slsDetectorDefs::READOUT_ZMQ_ACTION;
|
||||
#endif
|
||||
|
||||
#ifdef HELP
|
||||
int action = slsDetectorDefs::HELP_ACTION;
|
||||
#endif
|
||||
@ -46,7 +50,8 @@ int main(int argc, char *argv[]) {
|
||||
parser.Parse(argc, argv);
|
||||
|
||||
// If we called sls_detector_acquire, add the acquire command
|
||||
if (action == slsDetectorDefs::READOUT_ACTION)
|
||||
if (action == slsDetectorDefs::READOUT_ACTION ||
|
||||
action == slsDetectorDefs::READOUT_ZMQ_ACTION)
|
||||
parser.setCommand("acquire");
|
||||
|
||||
if (parser.isHelp())
|
||||
|
@ -205,6 +205,11 @@ std::string CmdProxy::VirtualServer(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
void CmdProxy::EmptyDataCallBack(detectorData *data, uint64_t frameIndex,
|
||||
uint32_t subFrameIndex, void *this_pointer) {
|
||||
LOG(logDEBUG) << "EmptyDataCallBack to start up zmq sockets";
|
||||
}
|
||||
|
||||
std::string CmdProxy::Acquire(int action) {
|
||||
std::ostringstream os;
|
||||
if (action == defs::HELP_ACTION) {
|
||||
@ -226,6 +231,9 @@ std::string CmdProxy::Acquire(int action) {
|
||||
throw RuntimeError("Individual detectors not allowed for readout.");
|
||||
}
|
||||
|
||||
if (action == defs::READOUT_ZMQ_ACTION) {
|
||||
det->registerDataCallback(&(EmptyDataCallBack), this);
|
||||
}
|
||||
det->acquire();
|
||||
|
||||
if (det->getUseReceiverFlag().squash(false)) {
|
||||
|
@ -1350,6 +1350,8 @@ class CmdProxy {
|
||||
std::string GapPixels(int action);
|
||||
std::string BadChannels(int action);
|
||||
/* acquisition parameters */
|
||||
static void EmptyDataCallBack(detectorData *data, uint64_t frameIndex,
|
||||
uint32_t subFrameIndex, void *this_pointer);
|
||||
std::string Acquire(int action);
|
||||
std::string Exptime(int action);
|
||||
std::string ReadoutSpeed(int action);
|
||||
|
@ -1221,10 +1221,14 @@ int DetectorImpl::acquire() {
|
||||
|
||||
if (acquisition_finished != nullptr) {
|
||||
// status
|
||||
runStatus status = IDLE;
|
||||
auto statusList = Parallel(&Module::getRunStatus, {});
|
||||
status = statusList.squash(ERROR);
|
||||
// difference, but none error
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, {});
|
||||
}
|
||||
runStatus status = statusList.squash(ERROR);
|
||||
// inconsistent status (squash error), but none of them in error
|
||||
if (status == ERROR && (!statusList.any(ERROR))) {
|
||||
// handle jf sync issue (master idle, slaves stopped)
|
||||
if (statusList.contains_only(IDLE, STOPPED)) {
|
||||
@ -1320,8 +1324,13 @@ void DetectorImpl::startAcquisition(const bool blocking, Positions pos) {
|
||||
Parallel(&Module::startAndReadAll, masters);
|
||||
// ensure all status normal (slaves not blocking)
|
||||
// to catch those slaves that are still 'waiting'
|
||||
auto status = Parallel(&Module::getRunStatus, pos);
|
||||
if (!status.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
auto statusList = Parallel(&Module::getRunStatus, pos);
|
||||
// if any slave still waiting, wait up to 1s (gotthard)
|
||||
for (int i = 0; i != 20 && statusList.any(WAITING); ++i) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
statusList = Parallel(&Module::getRunStatus, pos);
|
||||
}
|
||||
if (!statusList.contains_only(IDLE, STOPPED, RUN_FINISHED)) {
|
||||
throw RuntimeError("Acquisition not successful. "
|
||||
"Unexpected detector status");
|
||||
}
|
||||
@ -1977,7 +1986,7 @@ void DetectorImpl::setBadChannels(const std::vector<int> list, Positions pos) {
|
||||
|
||||
// update to multi values if multi modules
|
||||
if (isAllPositions(pos)) {
|
||||
std::vector<std::vector<int>> badchannels;
|
||||
std::vector<std::vector<int>> badchannels(modules.size());
|
||||
int nchan = modules[0]->getNumberOfChannels().x;
|
||||
if (shm()->detType == MYTHEN3) {
|
||||
// assuming single counter
|
||||
@ -1996,16 +2005,9 @@ void DetectorImpl::setBadChannels(const std::vector<int> list, Positions pos) {
|
||||
std::to_string(badchannel) +
|
||||
" out of bounds.");
|
||||
}
|
||||
if (badchannels.size() != imod + 1) {
|
||||
badchannels.push_back(std::vector<int>{});
|
||||
}
|
||||
badchannels[imod].push_back(ch);
|
||||
}
|
||||
for (size_t imod = 0; imod != modules.size(); ++imod) {
|
||||
// add empty vector if no bad channels in this module
|
||||
if (badchannels.size() != imod + 1) {
|
||||
badchannels.push_back(std::vector<int>{});
|
||||
}
|
||||
Parallel(&Module::setBadChannels, {static_cast<int>(imod)},
|
||||
badchannels[imod]);
|
||||
}
|
||||
|
@ -3332,7 +3332,13 @@ void Module::initializeModuleStructure(detectorType type) {
|
||||
shm()->numberOfModule.y = 0;
|
||||
shm()->controlPort = DEFAULT_TCP_CNTRL_PORTNO;
|
||||
shm()->stopPort = DEFAULT_TCP_STOP_PORTNO;
|
||||
strcpy_safe(shm()->settingsDir, getenv("HOME"));
|
||||
char *home_directory = getenv("HOME");
|
||||
if (home_directory != nullptr)
|
||||
strcpy_safe(shm()->settingsDir, home_directory);
|
||||
else {
|
||||
strcpy_safe(shm()->settingsDir, "");
|
||||
LOG(logWARNING) << "HOME directory not set";
|
||||
}
|
||||
strcpy_safe(shm()->rxHostname, "none");
|
||||
shm()->rxTCPPort = DEFAULT_TCP_RX_PORTNO + moduleIndex;
|
||||
shm()->useReceiverFlag = false;
|
||||
|
@ -186,7 +186,7 @@ void HDF5DataFile::CreateFile() {
|
||||
// property list
|
||||
H5::DSetCreatPropList plist;
|
||||
H5::DSetCreatPropList plistPara;
|
||||
int fill_value = -1;
|
||||
uint64_t fill_value = -1;
|
||||
plist.setFillValue(dataType, &fill_value);
|
||||
// plistPara.setFillValue(dataType, &fill_value);
|
||||
plist.setChunk(DATA_RANK, dimsChunk);
|
||||
|
@ -215,7 +215,7 @@ std::string CreateVirtualHDF5File(
|
||||
|
||||
// property list
|
||||
H5::DSetCreatPropList plist;
|
||||
int fill_value = -1;
|
||||
uint64_t fill_value = -1;
|
||||
plist.setFillValue(dataType, &fill_value);
|
||||
std::vector<H5::DSetCreatPropList> plistPara(paraSize);
|
||||
// ignoring last fill (string)
|
||||
|
@ -215,7 +215,13 @@ typedef struct {
|
||||
/**
|
||||
type of action performed (for text client)
|
||||
*/
|
||||
enum { GET_ACTION, PUT_ACTION, READOUT_ACTION, HELP_ACTION };
|
||||
enum {
|
||||
GET_ACTION,
|
||||
PUT_ACTION,
|
||||
READOUT_ACTION,
|
||||
HELP_ACTION,
|
||||
READOUT_ZMQ_ACTION
|
||||
};
|
||||
|
||||
/**
|
||||
dimension indexes
|
||||
|
@ -20,6 +20,7 @@ Still this is better than strcpy and a buffer overflow...
|
||||
*/
|
||||
template <size_t array_size>
|
||||
void strcpy_safe(char (&destination)[array_size], const char *source) {
|
||||
assert(source != nullptr);
|
||||
assert(array_size > strlen(source));
|
||||
strncpy(destination, source, array_size - 1);
|
||||
destination[array_size - 1] = '\0';
|
||||
|
@ -1,13 +1,13 @@
|
||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||
/** API versions */
|
||||
#define RELEASE "8.0.1"
|
||||
#define APIRECEIVER "8.0.0 0x231108"
|
||||
#define RELEASE "8.0.2"
|
||||
#define APICTB "8.0.0 0x231109"
|
||||
#define APIGOTTHARD "8.0.0 0x231109"
|
||||
#define APIGOTTHARD2 "8.0.0 0x231109"
|
||||
#define APIJUNGFRAU "8.0.0 0x231109"
|
||||
#define APIMYTHEN3 "8.0.0 0x231109"
|
||||
#define APIMOENCH "8.0.0 0x231109"
|
||||
#define APIEIGER "8.0.0 0x231109"
|
||||
#define APILIB "8.0.1 0x240112"
|
||||
#define APIJUNGFRAU "8.0.2 0x240827"
|
||||
#define APIMOENCH "8.0.2 0x240827"
|
||||
#define APIMYTHEN3 "8.0.2 0x240827"
|
||||
#define APILIB "8.0.2 0x240916"
|
||||
#define APIRECEIVER "8.0.2 0x240916"
|
||||
|
Loading…
x
Reference in New Issue
Block a user