Commit Graph

36 Commits

Author SHA1 Message Date
Martin Mueller 0837de2a5a CTB frequency rounding, CTB frequency measurement, CTB frequency units (#1423)
* round CTB clocks to next closest possible value, added freq measurement

* added time for firmware to measrue actual value after frequency change

* add check for backwards compatibility

* change CTB and XCTB clock values to MHz, TODO: units and validation errors

* changed runclk command to use units and float, TODO: dbit, adcclk, why is everything called StringTo ?

* do the same for dbit and adcclk

* added tolerance to exptime, fixed test

* update default values in server defs

* added virtual check in Altera_PLL, update testcases

* change python and pyctbgui to accept and return floating point MHz

* update help and comments

* Dev/ctb clocks fix (#1434)

* introduced new type Hz, typetraits, String conversions, command generation (not yet generated)

* incorrect unit typo

* cmd generation and compiles

* default to MHz, removed space between units for consistency with timers, min and max checks for clks

* in python, but need to change the default to Hz again for clean code and intuition

* allow ints, doubles, implicit conversions

* dont allow raw ints, doubles and implicit conversions

* fixed tests

* added operators for Hz in python

* fix test for min clk for xilinx ctb

* fix test

* fix python tests

* fixed xilinx period and default clks

* test fix

* removed the 3 clock cycle check for ctb and implemented properly the max adc clk frq for altera ctb

* removing 3 clock cycle code from xilinx as well

* formatting

* loadpattern before 3 clk cycles code

* actualtime and measurement time to be implemented in 100ns already in fw

* fix tests

* pyzmq dependency forthe tests

* fixed pyctbgui for freq

* insert tolerance check again

* also added tolerance check for patwaittime

* formatting

* minor: rounding test

* removed Rep redundant in ToString for freq

* intro frequency unit enums, removed unnecessary template behavior for ToString with freq unit, switching from parsing string unit argument to the enum argument for ToString, adding parsing string to unit at CLI boundary

* minor, and binaries

* minor, default clk vals are 0 but set up at detector setup

* get frequency only for that unit

* tolerance process

* missed in previous commit

* some more changes to exptime and validations

* ctb is probably done

* periodleft and delayleft

* fixed xilinx freq conv as well

* fixed m3 bug, binaries

* xilinx: setup also done in stop server so that the clk is not 0

* missed a test marker

* binaries in

* review fixes, simpler validation of timers in ctb and xilinx ctb

* typo fix

* format

* fix tests

---------

Co-authored-by: Martin Mueller <martin.mueller@psi.ch>
Co-authored-by: Dhanya Thattil <dhanya.thattil@psi.ch>
2026-05-06 15:52:13 +02:00
maliakal_d 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
maliakal_d c13049f144 G2: reconfigure chip (#927)
* changed common.c readADCFromFile to make it more general and move temperature calculation for Eiger out of this function and inside whereever it is called.
* g2 and m2: gethighvoltage was just a variable set in server, it is now moved to a get inside DAC5671 implementation (but not reading a measured value, instead what is set from a file), high voltage variable used inside DAC5671 for virtual servers
* g2: switching off hv (ifrom non zero to zero value) will wait for 10s; powering on chip reconfigures chip; powering off chip unconfigures chip; powering off chip also includes check if hv = 0, if not throw exception; chip configuration checked before acquring; at start up: hv switched off and chip powered on, so does not wait 10s to switch off hv;
* included test to check powering off chip when hv is on should throw an exception
* g2:  check if chip configured before acquiring

* nios: read hv value set from file and virtual still goes into DAC5671 for conversions to and fro dac to V, change common readadc to readparameter to generalize, make sethighvoltage into a get and set to catch errors in get as well, g2: if not at startup, remmeber hv value before setting it and after check if value was being switched off (from a non zero value) and wait 10s if it was (10s wait only for switching off from non zero and not at startup)
2024-08-02 12:46:39 +02:00
Dhanya Thattil 46bb9bc2d7 nios temp (#557)
* fixed temp read nios

* divide for eiger and dont print
2022-10-18 15:47:23 +02:00
maliakal_d 9d2d8fe1d7 resolve for doubel slashes, wip 2022-04-04 11:17:41 +02:00
maliakal_d 8b1851e652 wip, copy server delete old name 2022-04-01 17:52:27 +02:00
maliakal_d 904af4de06 fix to allowing update mode functions in update mode and removing exception about set_position for hostname in update mode 2021-11-16 09:55:29 +01:00
maliakal_d eb69d7cb69 update mode added. need to fix why udpatemode get and set not in allowed functions 2021-11-12 17:18:26 +01:00
maliakal_d 0ffd30e147 works virutally for virtual servers 2021-11-12 15:18:42 +01:00
maliakal_d c532ecc2e8 moved movefile and writefile to common and avoiding need to send different named files for nios 2021-11-11 10:43:17 +01:00
maliakal_d 169361d459 blackfin requires a few writes 2021-11-10 18:54:02 +01:00
maliakal_d 32d664a77d actually writing the server binary from memory to file before linking, sycing, permissions etc 2021-11-10 17:48:18 +01:00
maliakal_d 15aa42d328 wip 2021-11-10 10:58:29 +01:00
maliakal_d 64a25a242b server side fixed 2021-11-08 17:24:51 +01:00
maliakal_d eff64f99f2 addd kernel version 2021-11-03 11:46:46 +01:00
maliakal_d 340d708b12 updated m3 kernel version 2021-11-02 17:07:55 +01:00
maliakal_d 3f517420af updated kernel date for gotthard2, checking kernel code similar for blackfin and nios, need to add date for m3 2021-11-02 16:59:54 +01:00
maliakal_d 45b3514118 moved verifykernelversion to common 2021-10-29 16:43:48 +02:00
maliakal_d 4de7bb51ed updated all .h files with license notice and copyright notice 2021-10-14 18:10:56 +02:00
maliakal_d 7d927a794e moduleid made into dec not hex 2021-10-05 13:23:09 +02:00
maliakal_d b924723082 updated make files for virtual to have correct md5 path 2021-09-16 16:38:42 +02:00
maliakal_d 9cb352dec7 wip 2021-09-10 17:23:06 +02:00
maliakal_d b844cc7702 wip 2021-09-10 15:41:17 +02:00
maliakal_d a657450035 wip 2021-09-10 14:08:42 +02:00
maliakal_d b8086dcd70 fix for flash 2021-09-10 13:25:17 +02:00
maliakal_d a9f82985bc programs, but flashes checksum wrong 2021-09-09 17:52:36 +02:00
maliakal_d 790d995eab wip 2021-09-07 17:07:49 +02:00
maliakal_d 664c2ca80f wip done with md5 2021-09-07 16:33:52 +02:00
maliakal_d a51deda2a4 moduleid for eiger m3 and g2, but set only for g2 2021-09-01 17:06:34 +02:00
maliakal_d 028edd0d08 wip 2021-06-17 07:13:27 +02:00
maliakal_d a9f892483d wip 2021-06-11 17:29:01 +02:00
maliakal_d 00f780665f using common.c to extract date and using nios.c to check kernel version(a bit specific to nios) and using c api instead of system command to get uname 2020-09-10 18:41:31 +02:00
Erik Frojdh 5faf3c7336 format 2020-07-23 14:01:59 +02:00
Dhanya Thattil ad297e9c51 Readlink (#117)
* gotthard config file path using readlink

* gotthard2

* eiger

* eieger, mnythen3, moench

* binaries in

* moved readlink to a common function

* binaries in
2020-07-23 12:17:46 +02:00
maliakal_d 671cf45fd7 format slsdetectorservers 2020-05-05 15:23:11 +02:00
Dhanya Thattil 0d35b966ff Separate headers (#57)
* WIP, ctb

* WIP, eiger

* WIP, gotthard

* WIP, jungfrau

* WIP, gotthard2

* WIP, mythen3

* WIP, moench

* fixed gotthard apiversioning mismatch with gotthard2
2019-08-30 11:17:37 +02:00