1157 Commits

Author SHA1 Message Date
9625a8058c
Merge branch 'developer' into dev/issue_dont_reorder_digital_data 2025-04-11 14:30:11 +02:00
Mazzoleni Alice Francesca
3297707ab7 clang-format with clang-format version 17 2025-04-11 11:38:56 +02:00
Mazzoleni Alice Francesca
9d8f9a9ba9 autogenerated commands and make format 2025-04-11 10:45:02 +02:00
f8b12201f8 binary in 2025-04-09 18:21:54 +02:00
7c8639b8ae formatting
Some checks failed
Native CMake Build / Configure and build using cmake (push) Failing after 12s
2025-04-09 18:20:58 +02:00
Mazzoleni Alice Francesca
9fde62ae30 merged developer into feature and solved merge conflicts 2025-04-09 09:39:47 +02:00
7b531059a0 even get is not supported for timing info decoder for jungfrau hw v1.0. only hw v2.0 is uspported 2025-03-18 12:33:07 +01:00
e8ac048114 ctb: added command 'rx_dbitreorder' that sets a flag in the receiver to set the reorder flag. By default it is 1. Setting to false means 'do not reorder' and to keep what the board spits out, which is that all signals in a sample are grouped together 2025-03-12 17:31:20 +01:00
8d87a6ee4e used clang-formating 2025-03-11 16:32:31 +01:00
ab01940769 add xilinx ctb api to --versions command 2025-03-11 15:51:46 +01:00
4dcbcad435 jungfrau server binary for fw 1.6 and 2.6 2025-03-11 09:34:37 +01:00
297c3752e3
Dev/remove gotthard i (#1108)
* slsSupportLib done, at receiver rooting out in implementation

* removed from receiver and client

* removed everywhere except gui, python and client(commands.yaml and Detector.h)

* updated python

* fixed autocomplete to print what the issue is if there is one with ToString when running the autocomplete script to generate fixed.json. updated readme.md in generator folder

* formatting

* removed enums for dacs

* udpating autocomplete and generating commands

* removed gotthard from docs and release notes

* removed dac test

* bug from removing g1

* fixed virtual test for xilinx, was minor. so in this PR

* gui done

* binary in merge fix

* formatting and removing enums

* updated fixed and dump.json

* bash autocomplete

* updated doc on command line generation

* removing increments in dac enums for backward compatibility. Not required

* removed ROI from rxParameters  (only in g1), not needed to be backward compatible

* removed the phase shift option from det server staruip
2025-03-10 14:24:33 +01:00
3c2062f23e
Dev/m3 default period 0 (#1127)
* m3: default period 0, merge fix from 9.1.0

* from previous commit
2025-03-04 16:07:28 +01:00
e7247f1fee formatting 2025-03-04 10:48:13 +01:00
4b3ed22f76
jf binary in, jf: removed check to allow chipv1.0 also to set comp disable time (#1118) 2025-02-24 09:39:19 +01:00
117637863d
Xilinxctb/update reg (#1084)
* updated RegisterDefs.h from firmware update

* Revert "updated RegisterDefs.h from firmware update"

This reverts commit 64f1b2546e742f0b0513124a599cd9bcde11760c.

* updated registers and had it formatted

* Revert "updated registers and had it formatted"

This reverts commit 1641b705b0d8616bcff4a5cd796d8796d09391f2.

* udpated registers from firmware, reading config file in server (chip config, reset chip, enable_clock_pattern) specific for matterhorn,this is done when powering on chip, removed startreadout, fixed status register bits, updated firmware version

* fix for patioctrl allowed for zxilinx and adding readout pattern for scientists that like to push the acquire button

* fixing default enable clock and readout pattern for xilinx (patioctrl has to be 32 bit)

* Xilinxctb/first image (#1094)

* reduce xilinxCTB readout done checks to single register, increased clockEna pattern limits, clear FPGA FiFos and counters on powerchip, disable counters 1-3 in matterhorn configuration

* change print of xilinxctb server

* remove acquisition done check

---------

Co-authored-by: Martin Mueller <martin.mueller@psi.ch>

* binary xilinx in

* formatting

* added reset of udp buffer FIFO to xilinxCTB

---------

Co-authored-by: Martin Mueller <72937414+mmarti04@users.noreply.github.com>
Co-authored-by: Martin Mueller <martin.mueller@psi.ch>
2025-02-18 11:30:51 +01:00
e933a25453
Dev/frame synchronizer (#968)
* skeleton of structure for callbacks and funcitons updated

* updated callback header structures and implemented in receiver

* fixed bugs

* minor

* formatting

* wip: draft of frame synchronizer, semaphores not done yet

* signal handler not affecting semaphore inside lambda function

* finally works with sem

* install targets cmake error fix

* removed modified callback and instead passing by reference instead of value to the oriignal receiver data callback

* reducing the number of data call backs. incoming from developer

* added json header to receiver start acquiistion call back

* WIP: of synchronisation (#969)

* WIP of synchronisation

* working so far if everything goes right

* added all information into json headers

* valid json

* allow frame synchronizer to have access to static libzmq when compiling on conda (libzeromq-devel not installed by default

* upto date with multirecieverapp for invalid arguments and help

* formatting

* remove warnings

* changes to print

* removed prints

* no need for print frames to be called

* minor

* commnet

* adding json header in start callback, imagesize in data callback and formatted

* startcallback returns an unused int (changed to exceptions and forgotten in last modification to callbacks likely)

* fixed sanitizer issues. 1 left for ctrl+C
- zmq_msg_t should be deleted, not freed. Same with the char arrays and semaphores.

* fixed sanitizer issues and made it more readable

* moving clearing old frames to new startacq just in case it has to process soem frames before the callback

* fix cherry-pick merge of fixing sanitizer thread issues but has start callbacks signature change.fixed

---------

Co-authored-by: Felix Engelmann <felix-github@nlogn.org>
2025-02-18 11:28:21 +01:00
f1f369b48c
dev jf : bunch id decoder and auto comp disable (#1097)
* jf wip: bunch id decoder only in pcb v2.0 check and comments

* auto comp disable the same way for both chip versions. compdisabletime also available for 1.1 now

* fixed tests

* formatting

* binary in
2025-02-18 11:17:38 +01:00
315d49f8df
ctb: patwaittime and exptime (#1076)
* cli: patwaittime also takes time argument, api: patwaitclocks and patwaitinterval, tcp: patwaitinterval is 2 functions for set and get, patwaitclocks remains a single for backward compatibility with -1 for get, server (loadpattern): clks using member names (needs to be refactored). needs tobe discussed what to do with pattern files.

* all tests passed

* fixed test 
* exptime deprecated for ctb and xilinx

* pyctbgui..not there yet

* fixed in pyctbgui

* removed redundant warning for ctb and xilinx exptime in Detector class (already in module class handling all exptime signatures), patwait, patloop and patnloop have to be non inferrable commands because of support for old commands (level as suffix)

* fix formatting error from command line parsing

* fix tests for patwaittime
2025-01-31 16:48:32 +01:00
e92578f89d formatting 2025-01-31 12:27:35 +01:00
Erik Fröjdh
0123169e35
dev/ bumped pybind11 version and added setuptools on host (#1049)
* bumped pybind11 version and added setuptools on host

* updated pybind11 tarball to 2.13 and in cmakefile to get 2.13 frpm github, also updated documentation about pybind 2.13

* updated client versioing, doc

* updating readme

---------

Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2024-11-22 14:32:39 +01:00
c6c7632ef7
updated m3 fw version (#1045) 2024-11-21 12:18:59 +01:00
b79759bcff formatting 2024-11-21 11:09:38 +01:00
d9e8e1c1c2
dev: version from file to cmake and python (#1025)
- renamed conda-recipe folder
- added a check to see if build and install folder exists in build.sh (conda recipe)
- created VERSION file that has '0.0.0'for developer but can be updated using update_version.py that takes in a version. The script checks for semantic versioning and updates VERSION file
- VERSION file also copied along with py files to slsdet in python cmakelist and build_pylib.sh (for conda), also copied in root folder for installations (for no coding purpose)
- init.py and setup.py reads this file to get the version (a bit differently to find the VERSION file)
- VERSION file read into cmake to get the version and also added to compile definition. So RELEASE removed from versionAPI.h (using SLS_DET_VERSION compile definiton instead) and also removed updateRelease script.
- conda getting project version from environment variable SLS_DET_VERSION that is set in build_pylib.sh prior.
- added 3.13 python to conda build
- anything related to ctb removed from release notes as users will always use developer
- sets 0.0.0 to VERSION file by running update_version.py without an argument
2024-11-21 10:46:20 +01:00
b3d9af29fc
Dev/jungfrau temp control default enable (#1042)
* jungfrau: enabling temp control by default at server startup
2024-11-21 10:28:41 +01:00
5088e5a205
Dev/detach pthreads not joining (#1019)
* detach the pthreads that are not joining else memory leak

* removed the clean up comment, also refactored the pthread join/detach for ctb 1g
2024-11-07 11:24:46 +01:00
5f805f8789
Dev/jf firmware rollback (#1011)
* jf: rolling back firmware required to v1.5 and 2.5, updated release notes, fixed a bug when updating server (when server name same as link name:throws with no message, pedestal mode check changed for the time being for loops to be 0xFF size

* compensating for jf fw bug for pedestalmode where loops should be 16 bit, but is 8 bit in fw. to be fixed in next version

* formatting

* formatting, merge fix

* fixed python test simulator to kill previous servers

* rmeoved merge binary
2024-10-24 15:53:49 +02:00
37e65634d4
Dev/g2 fix configure chip startup (#1009)
* g2: chip reconfigure variable not set when powering on at startup because readconfig is the one configuring the chip the first time to default chip settings

* cleaning up code
2024-10-22 17:19:28 +02:00
6add9aad5d
Dev/proper free (#1005)
* first draft of fixing the free function available within the class

* removed class member function freeSharedmemory for both Detector and Module; made the free function freeSharedmemory accessible to python interface; setHostname if there is already a module in shm will recreate the Detector object while freeing shm completely and keeping detsize and intitialchecks (previous commit), sethostname called from DetectorClass in virtual command to have one point of entry (previous commit), testing Module class frees shared memory using free function

* Detector class: added copy and move constructor and assignmentoperators due to explicit destructor (DetectorImpl fwd declared), DetectorImpl class: included ZmqSocket to remove destructor (should not be virtual in any case), Module class: removed explciit destructor to allow compiler generated constructor and operators

* formatting

* minor fix for readme autocomplete

* updated client version date
2024-10-21 16:25:07 +02:00
76ab0228ac formatting and moench fw release update 2024-10-16 11:30:04 +02:00
a1e69bba37 updating release notes (superficial), package release version (superficial), client and receiver version (too old) 2024-10-16 11:18:03 +02:00
c679135138
Dev/g2 fix next frame number (#996)
* binaries in
2024-10-07 17:09:00 +02:00
0f88617477
first draft at fixing nextframenumber properly with firmware (#995)
* fixing nextframenumber properly with firmware

* updated firmware to have getnextframenumber and fixed setnextframenumber to reset also the header fifo when stopping

* fix tests for gotthard2
2024-10-04 16:53:14 +02:00
5e024153bc
Dev/g2 stop frame number (#980)
* get/set next frame number in G2 (firmware only has set, no get)
* firmware has issues: each stop keeps 2 frame header in fifo and the resetting frame number happens after that
* removed the option to set burstmode to burst external or continuwous internal
* needs to be revisited before 9.0.0
2024-10-02 15:26:06 +02:00
e59de85a33 formatting 2024-10-01 14:44:59 +02:00
f2f3817a7f
updated jungfrau timing info decoder mask (#991) 2024-10-01 11:29:48 +02:00
f43bb8eea4
jf: timing info decoder (#987)
* timing_info_decoder command with options swissfel (default) and shine. added to python, command line generation, autocomplete, tostring, tests.
2024-10-01 11:17:35 +02:00
8a7ed30676
Dev/m3 readout speed (#985)
* added readoutspeed command to m3 (fullspeed - 10, half speed - 20, quarter speed - 40), removed reaodut pll, moved up system pll clock indices, leaving pll index in common altera code, default speed is half speed, allow only system_c0 to be set, the others can be obtained, same for clkphase, maxclkphaseshift, clkfreq. added to readoutspeedlist commands, updated help and updated tests

* updated readoutspeedlist command
2024-09-30 17:22:24 +02:00
5b832cb6aa
Jf: Electron collection mode (#983)
* electron collection mode for jungfrau. also removing the config chip when using register command
* collectionMode: HOLE/ELECTRON (enum)
2024-09-30 17:15:22 +02:00
2dc0963c56
Dev/reg bit change no validate (#970)
- do not validate write reg, setbit and clearbit by default anymore
- --validate will force validation on the bitmask or entire reg
- remove return value for write reg (across server to client, but thankfully not in the Detector class)
- extend validation into writereg, setbit and clearbit for Eiger (always special)
-  need to check python (TODO)
- missed the rx_zmqip implementations in detector.h and python bindings
2024-09-30 16:54:12 +02:00
a44ba4dc35
Dev/rx callbacks (#966)
* changed rxr callback signatures to all include structs
* removed datamodify call back as size can be changed in the original data call back now
* bringing some parameters (set functions) to dataProcessor class for its callback (namely udpport, quad, fliprows, totalframes, jsonheader), resulting in also removing totalframes from 2 other function signatures

* updated MultiReceiverApp to reflect the new callback signatures
2024-09-30 16:30:13 +02:00
007330caa7 format 2024-09-26 15:39:49 +02:00
9f079b17a2
Dev/xilinx mat update (#959)
* put back code to obtain adc and dac device indexafter loading device tree and then create folder iio_device_links and create symbolic links there according to device indices found. ln -sf operation not permitted, so folder has to be deleted and created everytime. Also refactored definitions to have all the xilinx name or detector specific stuff out of programbyArm.c

* uncommented waittransceiverreset at startup (should work now) and return of powering off chip at startup (error for transceiver alignment reset)

* updated registerdefs from firmware

* minor prints and updating names from registerdefs

* waittransceiverreset has been fixed in firmware and removing warnign for that, transceiver alignment check for powering off chip is not done in fw (giving a warning and returning ok for now)

* fixing ipchecksum (not done), removed startperiphery, allowing readout command to be allowed for xilinx when acquiring
2024-09-10 16:19:03 +02:00
c6477e0ed6
fixed stop server not starting up with setup variables (#949)
* m3: fixed stop server not starting up with setup variables

* all servers except eiger fixed for virtual stop server to start up with setupDetector function called

* virtual tests work

* eiger: versions print neednt be in stop server

* jungfrau: stop server (not virtual) also needs to read config file

* ensuring master is setup for virtual and real servers
2024-09-10 15:24:51 +02:00
e848293916
Dev/zmq stream all ipv6 adn remove rx_zmqip (#958)
* enable ipv6 in zmq socket

* removed rx_zmqip API and field in gui, changed client updaterxrzip to updateclientzmqip to have the rx_hostname ip if 0. 

* updated command line for rx_zmqip to give a warning. 

* Replaced 'depreciated' to 'deprecated' everywhere

* switching from * to 0.0.0.0 works for rebinding zmq sockets

* fixed help in command line for rx_zmqip * to 0.0.0.0 and removed cmd in python

* remove publisher zmq socket ip also for moench post processing

* fixed tests

* publisher zmq ip macros to be reused
2024-09-10 15:19:08 +02:00
588d11dedf
added keepalive zmq socket option (after 60s of idle time, 10 probes every sec. Mainly because an issue at Max IV (#956) 2024-09-03 17:37:00 +02:00
1d4a5d6d29
dev: jungfrau HW 1.0: adc output clock phase to 120 (#952)
* jungfrau: change adc output clock phase from 180 to 120 for v1.0 boards for reliable readout of adc #2

* versioning

* formatting
2024-08-22 15:45:41 +02:00
9c57571a41 formatting 2024-08-20 16:28:09 +02:00
b4533ac11f
Dev/xilinx ctb test (#942)
* voltage regulators only looks at dac and not at ctrl_reg

* xilinx: change dac max to 2048, setting dac ist not inverse conversion from dac to voltage anymore, but setting power is inverse, also there is max and min to power, a different min for vio and this is checked at funcs interface, not printign or converting to mv in dac for power regulators (as its conversion max and min are different)

* Use links for dacs/adc and adapt power rglt thresholds

* Remove wait for transceiver reset

* adc and dac device not used anymore and hence removed

* udp restucturing: arm has to be multiple of 16 and no byteswap in udp_gen, option to compile locally in arm architecture, memsize of the second udp memory has to be limited

---------

Co-authored-by: Martin Brückner <martin.brueckner@psi.ch>
2024-08-20 14:33:18 +02:00
de33aff077
developer: moench empty data callback (#936)
* moench (feature to wait for post processing to be done in new sls_detector_acquire_zmq executable)

READOUT_ACTION_ZMQ added to action enums
sls_detector_acquire_zmq added to executables
empty data call back so that client listens to last dummy zmq packet from moench post processor
processor: remove NEWZMQ ifdefs and remove connect for zmq publisher socket

* fix to compile

* cmds generated and parsed
2024-08-13 11:27:06 +02:00