Compare commits

...

99 Commits

Author SHA1 Message Date
21db57dd89 binaries in 2023-02-24 10:44:17 +01:00
dc5db905d4 merge from 7.0.0 2023-02-24 10:39:51 +01:00
48a684b95f dev:Eiger febl febr (#601)
* eiger: get febl and febr versions in versions command, also added in python
2023-02-24 10:06:11 +01:00
276dc52196 dev:removed storage cells for moench (#603)
* removed storage cells for moench
* rxr: also setting moench like jungfrau in implementation of ports
2023-02-24 10:00:31 +01:00
e942678139 Merge branch 'main' into 7.0.0.rc 2023-02-24 09:48:22 +01:00
72a028eaf3 Update README.md 2023-02-23 17:30:47 +01:00
907257891d updated readme 2023-02-23 17:24:23 +01:00
0a79ae523b updating documentation 2023-02-23 16:52:04 +01:00
90496bcee8 updated release date and lib api date 2023-02-23 16:38:10 +01:00
ed2894dafd python additions (#686)
* python: fixed versions when no receiver, added clearbusy, serialnumber and readoutspeedlist. commandline: modified versions to look like python versions

* python: added clkphase, fixed clkdiv, maxphase

* python added adcvpp

* gaincaps for python

---------

Co-authored-by: Erik Frojdh <erik.frojdh@gmail.com>
2023-02-23 16:29:54 +01:00
a74c9498e2 m3, individual chip index back in for hw 1.2, need the linux drivers for chipdac0-9 (#685) 2023-02-23 09:13:31 +01:00
403989e2f8 trigger, blockingtrigger in python and m3 timefix 2023-02-22 18:01:46 +01:00
7e8d11098a release date 2023-02-22 17:15:51 +01:00
f9c9a53c8c fix python compare script from g to sls_detector_get 2023-02-22 17:09:47 +01:00
90b1b97ffa release notes 2023-02-22 16:30:41 +01:00
50003cbc08 release notes 2023-02-22 16:30:27 +01:00
a799c4d2e2 minor 2023-02-22 15:37:13 +01:00
700f532b5a examples udp before rx_hostame 2023-02-22 15:16:00 +01:00
a098bc4674 fixes for tests for m3 2023-02-22 14:34:01 +01:00
13bbd54a21 formatting 2023-02-22 11:42:06 +01:00
d84e9652d3 updated versions for the servers 2023-02-22 11:36:47 +01:00
1ce39c48c7 updated client versions 2023-02-22 11:29:58 +01:00
9ddff523cd minor 2023-02-22 11:28:39 +01:00
f7618fbb93 error message 'unrecognized function enum' from detector or receiver prepended with Software version mismatch to handle enum start change between v6 and v7 (#680) 2023-02-22 11:11:46 +01:00
8501e1fb1f eiger server moved to fw 31 (#681)
* eiger server moved to fw 31
2023-02-22 11:10:56 +01:00
6faa4c821f udp_srcip auto to detector ip (#683)
* udp_srcip now points to detectorip for 'auto' argument. and not allowed for G1
2023-02-22 11:09:52 +01:00
da291d535e fix ctb test, non blocking will not return for 1g (#684)
* fix ctb test, non blocking will not return for 1g
2023-02-22 11:09:18 +01:00
adcde9fd49 user friendly message added from ' dangerous to continue' to 'check firmware' (#665) 2023-02-20 16:35:33 +01:00
dde99a16b3 fixed documentation for fw upgrade and cmk script show all options (#674)
* fixed documentation for fw upgrade and cmk script show all options

* much more clear definition of the sls receiver header
2023-02-20 15:24:09 +01:00
b200a2efc1 Fix jf softwre trigger and tests with real jungfrau detector (#673)
* jungfrau: software triggers do not work, fixed

* eiger test: get highvoltage must be read twice to get the real voltage
2023-02-20 15:22:46 +01:00
fe281bd1b1 Fix stop rx stuck (#669)
stop should really stop even if receiver had crashed, so check rx status after sending stop; also ensuring restream  in acquire happens only if thers a callback
2023-02-20 15:21:22 +01:00
878eab9fc3 Fix gui browse (#662)
Choosing file path in dialog should already set file path when returning from dialog, must not wait to press enter
2023-02-20 15:20:02 +01:00
4259d49b63 added release notes from 7.0.0.rc1 to rc2 (#639)
* added release notes from 7.0.0.rc1 to rc2
2023-02-17 08:51:05 +01:00
4dac9f2193 zmq4.3 changed default buffer size to -1 instead of 0 (#667) 2023-02-15 09:45:02 +01:00
cb8e4365e3 formatting 2023-02-14 15:08:31 +01:00
0251aa9e63 fixed linking issue in arping and shm test (#659)
Co-authored-by: Erik Frojdh <erik.frojdh@psi.ch>
2023-02-14 14:49:00 +01:00
7c047cab4a udpated version to rc4 2023-02-14 10:30:45 +01:00
572332f870 fix test for eiger half module for gap pixels (#658) 2023-02-14 09:22:32 +01:00
d90bf6c7df formatting 2023-02-13 11:36:41 +01:00
5c8c3ae3f3 fix to access to shared memory that doesnt exist (#638)
* fix to access to shared memory that doesnt exist

* fix for freeing shm and then setting hostname from API

* exception error message moved to private function

* refactoring to avoid allocating intermediate string
2023-02-13 11:29:54 +01:00
18136fed9d exception messages (#656)
* fix exception messages for more printout about sockets or more detail
2023-02-13 11:22:05 +01:00
fc42720208 allow half modules and odd number of half modules to use the gui with gap pixels disabled (#655) 2023-02-13 11:21:35 +01:00
eb025b54ef Merge branch '7.0.0.rc' into developer 2023-01-18 13:59:04 +01:00
3bf6be41b4 merge from 7.0.0.rc 2023-01-17 09:48:59 +01:00
7729e47685 also for rx_hostname 2023-01-16 13:34:07 +01:00
f31fa92516 fixed hostname not split (+) in python 2023-01-16 13:34:01 +01:00
39b1f5bbf2 Moench rewrite (#597)
* copied jungfrau server to moench and adapted

* fixed image size and num packets

* read n rows allows 16

* commneted out configure_asic_timer at server startup. To be removed later the ASIC_CTRL_REG and storage cell options

* moench:removing the decrement (which was in jf)  in read n rows to register

* removed lblsamples from gui
2022-12-15 09:16:51 +01:00
7ab3b25f87 formatting 2022-12-13 10:07:13 +01:00
0f6f20a720 merge from 7.0.0.rc1 2022-12-13 10:03:57 +01:00
1340408c2d Merge branch '7.0.0.rc' into developer 2022-12-13 09:58:55 +01:00
7b7c4a2b86 Merge branch '7.0.0.rc' into developer 2022-12-08 09:01:03 +01:00
8fc45676b9 Merge branch '7.0.0.rc' into developer 2022-12-07 16:22:30 +01:00
53fe5f5116 Merge branch '7.0.0.rc' into developer 2022-12-07 11:14:02 +01:00
50f2165c55 Merge branch '7.0.0.rc' into developer 2022-12-06 11:30:14 +01:00
056f650b92 Test for moench done 2022-12-06 11:15:53 +01:00
3d54a4aa26 fix for tests ctb 2022-12-06 11:15:45 +01:00
3a89c2a61e fix tests for gottthard1 2022-12-06 11:15:31 +01:00
570a567a8c fix m3 tests 2022-12-06 11:15:22 +01:00
9874f596f6 fix to tests m3 2022-12-06 10:35:00 +01:00
984a59a9d7 fix tests to not allow setting veto stream at a single module level 2022-12-06 10:34:52 +01:00
e02b11fd1e fix tests to not allow setting udp interfaces at a single module level 2022-12-06 10:08:53 +01:00
68beba732e tests: transmission delay cannot be got for a single module for jf and m3, resetting fpga is not an option to test others 2022-12-05 17:45:00 +01:00
104bc6f619 fixed tests to get headwareversion number instead of serial number to know ic 2.0 jf boards nd also the set master fail only if more than 1 detector (fix intests only) 2022-12-05 17:44:54 +01:00
66cf1825ea fixed tests 2022-12-05 17:44:48 +01:00
d8e497dbb3 fix for changing udp socket buffer size 2022-12-05 17:44:42 +01:00
60502cfa8f datastream help, versions fix for eiger (hardwareversion not impl), fix for tests 2022-12-05 17:44:33 +01:00
b089dc90cd fix for changing udp socket buffer size 2022-12-05 16:34:13 +01:00
4caf10c12b datastream help, versions fix for eiger (hardwareversion not impl), fix for tests 2022-12-05 16:33:59 +01:00
32cbb11bb6 Corrected typo 2022-12-05 12:49:04 +01:00
339cb925c7 removed decrement for sls detector header version number for virtual servers for ctb moench jungfrau g2 and m3 2022-12-02 12:13:13 +01:00
f8a29c3000 reverted versions as the firmware dont increment (#590) 2022-11-29 16:37:28 +01:00
d431443dda allowing jungfrau to continue with just a waning if detid.txt file not found (#589) 2022-11-29 16:28:55 +01:00
ae0a54a774 Merge branch 'main' into 6.1.2.rc 2022-11-25 16:12:02 +01:00
ae33622da2 updated pybind and catch (#588)
* updated pybind and catch
* added to release notes
Co-authored-by: Erik Frojdh <erik.frojdh@psi.ch>
2022-11-25 16:08:36 +01:00
c4a453fdbd updated release version 2022-11-25 10:31:10 +01:00
672c0f4a07 updated client date 2022-11-25 10:26:23 +01:00
05af370883 update server bin 2022-11-25 10:23:49 +01:00
a6022b7cec updated release notes and eiger server 2022-11-25 10:18:37 +01:00
72316fa2ce release notes 2022-11-25 10:09:15 +01:00
65523dcc94 release notes 2022-11-25 10:08:17 +01:00
df40665c5e Using a loop to stop (#585)
* loop for stop, 10 retries
  For example, if module A got a "stop" during an acquisition, it stops to an 'Idle' state. If module B gets a "stop" before an acquisition, it will return it is in 'Idle' state and continue to start the next acquisition, but module B then waits for "ready  for trigger" synchronization from module A, which it will never get. Since module B missed the asynchronous stop command, the workaround in the client is to send another "stop" command (upto 10 retries) till it returns Idle.
2022-11-25 09:55:51 +01:00
8472cca81f naming 2022-11-17 17:15:05 +01:00
110e57ff6c Eiger stop lock (#576)
* added a lock when stopping or starting state machine in eiger server

* added 5ms right after acq started to make sure it really started

* added 100ms right after acq started to make sure it really started
2022-11-17 15:23:41 +01:00
fdd6031add renaming for version 2022-11-15 08:50:39 +01:00
e7c65f44cb returning empty fail message for eiger 2022-11-11 16:56:58 +01:00
0063cc8eb2 update release notes 2022-11-11 16:51:20 +01:00
27e6fc3c73 serverbin shortcuts 2022-11-11 16:02:57 +01:00
83e0eb8b01 removed the test for allow update for kernel and server as it is eligible if the kernel is booting up anyway 2022-11-11 16:02:17 +01:00
7f8b5ac6c0 blackfin nCE pin fix for new kernel 2022-11-11 15:31:30 +01:00
340abec016 updated release txt 2022-11-07 12:47:52 +01:00
a8b37e3932 ensure eiger hot fix server version stays the same 2022-10-24 10:54:48 +02:00
0883c73e88 not updating the client versions for 'server only hot fix' 2022-10-24 10:51:50 +02:00
ef7e9d73a5 eiger server fixes:
- removed feb reset in stop acquisition as it caused processing bit to randomly not go high (leads to infinite loop waiting for it to go high). This is anyway done at prepare acquisition and set trimbits.
- left AND right registers monitored for processing bit done
- febProcessinginprogress returns STATUS_IDLE and not IDLE
- In feb stop acquisition, if processing bit is running forever, checks for 1 s, then if acq done bit is high, returns ok, else throws
- feb stop acquisition returns 1 if success and fucntion in list calling it compares properly instead of STATUS_IDLE (no effect, but incorrect logic)
- chipsignals to trimquad should only monitor right fpga (not both as it will throw)
- fixed error messages of readregister inconsistent values
- setmodule and read frame was returning fail without setting error messages (leading to broken tcp connection due to no error message)
-
2022-10-21 16:31:17 +02:00
a8bdc1495c Update issue templates 2022-03-01 10:19:57 +01:00
1c54dea9c7 Update issue templates 2022-03-01 10:18:52 +01:00
cee286b6ad Update issue templates 2022-03-01 10:16:41 +01:00
da8e0060d3 updated release notes and project version 2022-01-04 10:44:07 +01:00
85da65ca15 update versioning (prev commit) 2022-01-04 10:38:45 +01:00
4fe067363a This commit fixes the issue #336
A delay of 100ms has been added between the generation of the stop pulse and the resetCore function call. This should give enough time to the detector to readout and streamout the ongoing frame before the internal logic is reset (even after the transmission is delayed with txndelay_frame).

Conflicts:
	slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.1.0
2022-01-04 10:37:57 +01:00
136 changed files with 5462 additions and 6593 deletions

279
README.md
View File

@ -1,102 +1,233 @@
### Note
## Dependencies
Before building from source make sure that you have the [software wiki](https://slsdetectorgroup.github.io/devdoc/dependencies.html) installed. If installing using conda, conda will manage the dependencies. Avoid also installing packages with pip.
Please do not update to any xxxx.xx.xx.dev0 tags. They are not releases, but tags for internal usage.
Use only releases with tags such as x.x.x or x.x.x-rcx.
## Documentaion
Detailed documentation can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
### Documentation
##### 5.0.0 - Latest Release
Detailed documentation on the latest release can be found in the [software wiki](https://slsdetectorgroup.github.io/devdoc/index.html) and on the [official site](https://www.psi.ch/en/detectors/software).
## Installation
##### Older Releases
Documentation is found in the package.
### 1. Install binaries using conda
Conda is not only useful to manage python environments but can also
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
are from the developer branch. Please use released tags for stability.
We have three different packages available:
* **slsdetlib** shared libraries and command line utilities
* **slsdetgui** GUI
* **slsdet** Python bindings
### Binaries
Binaries for the slsDetectorPackage are available through conda.
```
#Add conda channels
#Add channels for dependencies and our library
conda config --add channels conda-forge
conda config --add channels slsdetectorgroup
conda config --set channel_priority strict
conda install slsdetlib #only shared lib and command line
conda install slsdet #python bindings (includes slsdetlib)
conda install slsdetgui #gui (includes qt4)
#Install specific version
conda install slsdet=2020.03.02.dev0 #developer version from 3 March 2020
#create and activate an environment with our library
#replace 6.1.1 with the required tag
conda create -n myenv slsdetlib=6.1.1
conda activate myenv
#ready to use
sls_detector_get exptime
etc ...
```
### Source code
One can also obtain the source code from this repository and compile.
```
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git
# List available versions
# lib and binaries
conda search slsdetlib
# python
conda search slsdet
# gui
conda search slsdetgui
```
### 2. Build from source
##### 2.1 Download Source Code from github
```
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 7.0.0
```
**Pybind for Python**<br>
* **v7.0.0+**:
pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
* **Older versions**:
pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
```
#### Dependencies
# clone using recursive to get pybind11 submodule
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
Refer [this page](https://slsdetectorgroup.github.io/devdoc/dependencies.html) for dependencies.
#### Compilation
Compiling can be done in two ways. Either with the convenience script
cmk.sh or directly with cmake for more control.
**1. Compile using script cmk.sh**<br>
These are mainly aimed at those not familiar with using ccmake and cmake.
# update submodule when switching between releases
cd slsDetectorPackage
git submodule update --init
```
The binaries are generated in slsDetectorPackage/build/bin directory.
Usage: ./cmk.sh [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
-[no option]: only make
-c: Clean
-b: Builds/Rebuilds CMake files normal mode
-p: Builds/Rebuilds Python API
-h: Builds/Rebuilds Cmake files with HDF5 package
-d: HDF5 Custom Directory
-k: CMake command
-l: Install directory
-t: Build/Rebuilds only text client
-r: Build/Rebuilds only receiver
-g: Build/Rebuilds only gui
-s: Simulator
-u: Chip Test Gui
-j: Number of threads to compile through
-e: Debug mode
-i: Builds tests
-m: Manuals
-n: Manuals without compiling doxygen (only rst)
-z: Moench zmq processor
##### 2.2 Build from source
###### Build using CMake
```
# outside slsDetecorPackage folder
mkdir build && cd build
# configure & generate Makefiles using cmake
# by listing all your options (alternately use ccmake described below)
# cmake3 for some systems
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
# compiled to the build/bin directory
make -j12 #or whatever number of cores you are using to build
# install headers and libs in /your/install/path directory
make install
```
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
```
# ccmake3 for some systems
ccmake ..
# choose the options
# first press [c] - configure
# then press [g] - generate
```
|Example cmake options|Comment|
|---|---|
| -DSLS_USE_PYTHON=ON | Python |
| -DPython_FIND_VIRTUALENV=ONLY | Python from only the conda environment |
| -DZeroMQ_HINT=/usr/lib64 | Use system zmq instead |
| -DSLS_USE_GUI=ON | GUI |
###### Build using in-built cmk.sh script
```
The binaries are generated in slsDetectorPackage/build/bin directory.
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
[r] [s] [t] [u] [z]
-[no option]: only make
-b: Builds/Rebuilds CMake files normal mode
-c: Clean
-d: HDF5 Custom Directory
-e: Debug mode
-g: Build/Rebuilds gui
-h: Builds/Rebuilds Cmake files with HDF5 package
-i: Builds tests
-j: Number of threads to compile through
-k: CMake command
-l: Install directory
-m: Manuals
-n: Manuals without compiling doxygen (only rst)
-p: Builds/Rebuilds Python API
-q: Zmq hint directory
-r: Build/Rebuilds only receiver
-s: Simulator
-t: Build/Rebuilds only text client
-u: Chip Test Gui
-z: Moench zmq processor
# get all options
./cmk.sh -?
# display all options
./cmk.sh -?
# new build and compile in parallel:
./cmk.sh -bj5
```
**2. Compile without script**<br>
Use cmake to create out-of-source builds, by creating a build folder parallel to source directory. This would create a debug build with address sanitizers.
```
$ mkdir build
$ cd build
$ cmake ../slsDetectorPackage -DCMAKE_BUILD_TYPE=Debug -DSLS_USE_SANITIZER=ON
$ make -j12 #or whatever number of threads wanted
# new build and compile in parallel (recommended basic option):
./cmk.sh -cbj5
# new build, python and compile in parallel:
./cmk.sh -cbpj5
#To use the system zmq (/usr/lib64) instead
./cmk.sh -cbj5 -q /usr/lib64
```
To install binaries using CMake
###### Build on old distributions
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
it's possible to install a newer gcc using conda and build the slsDetectorPackage
using this compiler
```
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
mkdir build && cd build
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
make -j12 #or whatever number of cores you are using to build
make install
#Create an environment with the dependencies
conda create -n myenv gxx_linux-64 cmake zmq
conda activate myenv
# outside slsDetecorPackage folder
mkdir build && cd build
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
make -j12
```
###### Build slsDetectorGui (Qt5)
1. Using pre-built binary on conda
```
conda create -n myenv slsdetgui=7.0.0
conda activate myenv
```
2. Using system installation on RHEL7
```
yum install qt5-qtbase-devel.x86_64
yum install qt5-qtsvg-devel.x86_64
```
3. Using conda
```
#Add channels for dependencies and our library
conda config --add channels conda-forge
conda config --add channels slsdetectorgroup
conda config --set channel_priority strict
# create environment to compile
# on rhel7
conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
# on fedora or newer systems
conda create -n slsgui zeromq qt
# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
# activate environment
conda activate slsgui
# compile with cmake outside slsDetecorPackage folder
mkdir build && cd build
cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
make -j12
# or compile with cmk.sh
cd slsDetectorPackage
./cmk.sh -cbgj9
```
###### Build documentation from package
The documentation for the slsDetectorPackage is build using a combination
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
is to use conda
```
conda create -n myenv python sphinx_rtd_theme breathe
```
```
# using cmake or ccmake to enable DSLS_BUILD_DOCS
# outside slsDetecorPackage folder
mkdir build && cd build
cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
make docs # generate API docs and build Sphinx RST
make rst # rst only, saves time in case the API did not change
```
### Support
## Support
dhanya.thattil@psi.ch
erik.frojdh@psi.ch
erik.frojdh@psi.ch

View File

@ -1,828 +1,39 @@
SLS Detector Package Minor Release 7.0.0.rc1 released on 12.12.2021
===================================================================
SLS Detector Package Major Release 7.x.x released on xx.xx.2023
===============================================================
This document describes the differences between v7.0.0.rc1 and v6.1.2
This document describes the differences between v7.x.x and v7.0.0
CONTENTS
--------
1. New, Changed or Resolved Features
1.1. Compilation
1.2. Callback
1.3. Python
1.4. Client
1.5. Detector Server
1.6. Simulator
1.7. Receiver
2. On-board Detector Server Compatibility
3. Firmware Requirements
4. Kernel Requirements
5. Download, Documentation & Support
1 New, Changed or Resolved Features
1.1 Compilation
1.2 Callback
1.3 Python
1.4 Client
1.5 Detector Server
1.6 Simulator
1.7 Receiver
1.8 Gui
2 On-board Detector Server Compatibility
3 Firmware Requirements
4 Kernel Requirements
5 Download, Documentation & Support
1. New or Changed Features
==========================
1 New, Changed or Resolved Features
=====================================
1.1. Compilation
----------------
- moench being made compatible with jungfrau 2.0 boards (jungfrau structure, away from ctb)
- eiger febl and feb in versions
General:
* Custom location to find ZeroMQ
Option to provide a custom location to look for ZeroMQ, if not found
using FindZeroMQ.cmake
For example, to use the system installed zmq:
Using cmake: -DZeroMQ_HINT=/usr/lib64
Using cmk.sh script: -q /usr/lib64
* Support external build
Assuming already installed version of the slsDetectorPacakge exists,
external build of python bindings, gui, ctbgui and moench has been added.
* Catch updated to latest 2.x version due to build failure in fedora
Gui:
* Qt5 and in-built compressed Qwt 6.1.5
Ported from Qt4 to Qt5. Minimum requirement: Qt 5.9
Compressed Qwt 6.1.5 added into the package in libs. It is unpacked and built
as a static library.This allows us to remove qwt as an external dependency
and reduces the risk of picking up the wrong version.
Python:
* Install python extension
Option to copy the python extension (slsdet folder and _slsdet-..so)
to CMAKE_INSTALL_PREFIX/python using
-DSLS_INSTALL_PYTHONEXT
* Pybind11 (v2.10.0)
Pybind11 is removed as a submodule and instead built into package to
simplify for users. Now, there is no more need to clone with the '--recursive'
argument or to update submodule when switching to this package version
and above.
* Conda packages
Removed conda packages for python 3.6 and 3.7. Added for python 3.11.
1.2. Callback
-------------
* Datatype of Metadata [registerCallBackRawDataReady, registerCallBackRawDataModifyReady]
Datatype changed from char* to sls_receiver_header.
* Datatype of Size [registerCallBackRawDataReady, registerCallBackRawDataModifyReady]
Datatype changed from uint32_t to size_t
* Datatype of file name and file path [registerCallBackStartAcquisition]
Datatype changed from string to const string reference.
* Incorrect image size [registerCallBackStartAcquisition]
Fixed. It used to give +120 bytes.
* [Gotthard2] 25um Image reconstruction for 2 modules
First module (master) interleaves with second modules(slave). First channel
of master is first channel of detector.
Requires firmware update to reverse channels of slaves.
1.3. Python
-----------
* Defines in sls_detector_defs
sls_detetor_defs parsed and #defines extracted into defines.py
For exmaple, one can use slsdet.LOCALHOST_IP
* Python sub-microsecond resolution
Reading back sub-microsecond exposure times from the Python API fixed by
addig Python datetime supports only micro seconds as lowest unit.
This is fixed by introducing a new C++ type (DurationWrapper), which
holds number of nanoseconds as a uint64_t (only in python bindings) and
custom typecaster to convert to and from std::chrono::nanoseconds.
A get using API now returns in DurationWrapper, instead of datetime.
Refer exptime help for examples.
1.4. Client
-----------
Breaking API:
* Versioning
The client, receiver and detector servers now have semantic Versioning
along with the date and are managed with the Version class.
--version argument to the executable gives the complete versioning with date.
Using the client to get versions gives only the semantic version. An older
server will still give date. Hence, the return type is a string, breaking API.
Compatibility checks at hostname or rx_hostname command will only be for
backwards compatibility (ie. it only checks for the major version number).
If its an old server, then its expected to have the exact same date (as
before)
Setting intitialchecks to 0 also bypasses the receiver compatibility check.
* Detector Specific fields
bunchid ->detSpec1
reserved->detSpec2
debug->detSpec3
roundRnumber->detSpec4
Header version number stays the same in the UDP header as there is no
difference in the format from the detector. Only the structure memeber names
have changed in sls_detector_defs.h
Further details about each detector specific field can be found at:
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
* Namespace sls
All files in slsSupportLib and tests have now been moved to sls namespace
including macros. Using the LOG, for example, will require the sls qualifier.
* [Eiger] Number of UDP interfaces
Command line: numinterfaces, API: getNumberofUDPInterfaces
This command now reflects the actual number of udp interfaces for Eiger,
which is 2.
* [Eiger][Jungfrau] Row column
[Jungfrau] Fixed row column indexing for multi module 2 interfaces
[Eiger] The row indicies were switched across the Y axis for the callback
only for Eiger. This is now changed and kept similar to the other detectors.
The row indices would be in the order of the half modules in the hostname
command. Therefore, to keep the image from callback, invert the hostname
order in the config file.
* Deprecated CopyDetectorServer
Command line: copydetectorserver, API: copydetectorserver
Removed. Use updatedetectorserver
* [Eiger][Jugfrau][Mythen3] Deprecated specific transmission delay commands
txndelay_frame -> txdelay_frame
txndelay_left -> txdelay_left
txndelay_right -> txdelay_right
* [Eiger] Datastream only for 10GbE
Command line: datastream, API: getDataStream/ setDataStream
This command to enable/ disable data stream from left or right port
is now allowed only for 10GbE. Previously, it incorrectly allowed to do so.
* [Eiger][Jungfrau][Moench][Ctb] Stop command effect on next frame number
Stopping acquisition sometimes results in different next frame numbers
for different moduels. Hence, after a stop, if the next frame numbers are
different, they are all set to their maximum value + 1.
* Missing packets
Command line: rx_missingpackets, API: getNumMissingPackets
This now returns a signed 64 bit instead of unsigned. The negative polarity
depicts extra packets instead of missing packets and also takes care of
disabled ports.
* Frames caught and frame index
Command line rx_framescaught, rx_frameindex, API: getFramesCaught/ getRxCurrentFrameIndex
They now return a vector for each port when there are 2 udp interfaces
in the receiver.
* [Gotthard][Gotthard2] Num modules
Only 2 modules allowed maximum in a detector shared memory.
* [Moench][Ctb][Mythen3] Deprecated commands
Patloopx, patnloopx, patwaitx, patwaittimex
Please use instead patloop, patnloop, patwait and patwaittime commands
with the level as an argument.
Old commands work with warning, but the server expects the new ones
such as a default pattern file to be loaded at startup for Moench.
Renamed patternParameters struct member from 'loop' to 'startloop' and
'stoploop'.
* [Mythen3] Clock Divider 4 and 5
Cannot be set anymore. Only read back.
New commands:
* [Eiger][Gotthard][Gotthard2][Mythen3][Jungfrau] Master
Setting up from client:
[Eiger][Gotthard2][Jungfrau]
Command line: master, API: getMaster/ setMaster
All of them can get master mode from the client.
This can also be set up on the detector server. Please refer to notes
on that section.
* [Eiger] Top
Command line: top, API: getTop/ setTop
Sets the half module to top or bottom from the client.
This can also be set up on the detector server. Please refer to notes
on that section.
* [Mythen3][Eiger] Save settings file
Command line: trimbits (sls_detector_get), API: saveTrimbits
Added
* [Gotthard2] Parallel readout added
Command line: parallel, API: getParallelMode/ setParallelMode
Default for Gotthard2 is parallel. Non parallel mode only works in
continuous mode.
* [Jungfrau] Software trigger added
Command line: trigger, API: sendSoftwareTrigger
Send software trigger instead of harware trigger.
* [Eiger][Jungfrau] Blocking trigger
Commandline: blockingtrigger, API: sendSoftwareTrigger with argument true
Sends software trigger signal to detector and blocks until the frames
are sent out for that trigger.
* [Jungfrau] Sync
Command line: sync, API: getSynchronization/ setSynchronization
Enables or disables synchronization between modules
* [Gotthard2][Mythen3] Temperature readout
Command line: temp_fpga, API: getTemperature with TEMPERATURE_FPGA enum
Added
* [Gotthard2][Mythen3] Round robin added
Command line: udp_dstlist, API: getDestinationUDPList/ setDestinationUDPList
Command line: udp_numdst, API: getNumberofUDPDestinations
One can set up to 32 (64 for Mythen3) entries in the destination list.
* [Jungfrau] Module Id
Command line: moduleid, API: getModuleId
16 bit value (ideally unique) that is streamed out in the udp header of
the detector. The on-board detector server picks it up from a file
(if it exists) called detid_jungfrau.txt.
* [Jungfrau][[Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version
Command line: hardwareversion, API: getHardwareVersion
Gets the board or hardware version.
For example, Jungfrau returns 1.0 or 2.0.
It is also printed at on-board detector server start up.
Also printed before starting FPGA programming.
* [Eiger][Jugfrau][Mythen3] Transmission Delay
Command line: tx_delay, API: getTransmissionDelay/ setTransmissionDelay
Sets transmission delay for all modules in the detector using the step
size provided. Sets up for every module:
[Eiger] txdelay_left to (2 * mod_index * n_delay)
[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay)
[Eiger] txdelay_frame to (2 *num_modules * n_delay)
[Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay)
* [Mythen3] Bad channels
Command line: badchannels, API: getBadChannels/ setBadChannels
Set bad channels from file with a list of channels, which will be masked
out. Also does trimming. A detector level command will require the channel
numbers accordingly. The file also extended to include commas, colons range)
and removes duplicates.
* [Moench][Ctb] Starting frame number
Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber
Added and default set up on detector server start up.
* [Ctb] DAC names
Command line: daclist, API: getDacNames/ setDacNames
Can set and get dac names in the dac list now.
* [Mythen3] Polarity, interpolation, pump probe, analog pulsing, digital pulsing
Command line: polarity, interpolation, pumpprobe, apulse, dpulse
API: getPolarity/ setPolarity, getInterpolation/ setInterpolation,
getPumpProbe/ setPumpProbe, getAnalogPulsing/ setAnalogPulsing,
getDigitalPulsing/ setDigitalPulsing
Added these commands.
Enabling interpolation will also enable all counters and disable vth3.
Disabling sets to previous counter mask and previous vth values.
In pump probe mode, only vth2 enabled. Disabling sets vth2 to prevevious
value.
Setting counter mask will check interpolation and pump probe mode
requirements, else sets vthx dacs according to counter mask.
Direct overwrite of any dac (including vthx) allowed using dac command
(as before).
New commands for Receiver only:
* Arping for 10GbE
Command line: rx_arping API: getRxArping/ setRxArping
Starts a thread in the receiver to arping the interface it is listening
to in 10GbE mode every 60 s.
Changes NUM_RX_THREAD_IDS (sls_detector_defs.h) from 8 to 9.
* Receiver Region of Interest
Command line: rx_roi, API: getRxROI/ setRxROI
Command line: rx_clearroi, API: clearRxROI
One can set an ROI in the receiver to write to file. 1D detectors can set
xmin and xmax, whereas the 2D can also set ymin and ymax. -1 values signify
no ROI.
This is not at network level and can only be used to reduce size of file.
Virtual HDF5 files not created when this is enabled and also no link in
master file. No file created if module not in ROI.
There can only be one ROI per detector. Therefore, can be set only at
detector level, but can be retrieved at module level as well.
The GUI still shows the entire image, but has a yellow border around the
ROI. Status bar displays a message when Rx ROI enabled.
Additonal Features:
* Non-blocking start
Allowing non-blocking start at modular level again.
* [Jungfrau][Moench][Ctb] Additional programming checks
Also checks if the drive to write to is a special file or a normal
file. If its a normal file, it throws asking to redo the command with a
'--please-delete' argument to delete the normal file and create the device
drive and restart FPGA programming.
More readable error message insetad of "programfpga not implemented for
this detector'. This happens when 'hostname' command fails due to
server-firmware/client compatibility and the detector type becomes
'GENERIC'. Fixed to suggest if 'hostname' executed properly.
* Udp Source IP
Command line: udp_srcip(2), API: getSourceUDPIP(2)/ setSourceUDPIP(2)
One can also set this to 'auto' for 1 GbE data. It will set to IP of
rx_hostname (as in udp_dstip)
* Incrementing default receiver tcp port
Automatically incrementing the default receiver tcp port for every module
when creating shared memory.
Changes or Fixes:
* [Jungfrau][Gotthard2][Mythen3][Gotthard][Moench][Ctb] Can't stop
This bug was introduced in 6.1.1, when stopping an acquisition saying it
cannot stop, even though it was successful. It is fixed now.
* Free and config command fail
Free and config command checked mismatch of size of shared memory before
freeing or loading new config. Fixed.
* sls_detector_help or sls_detector_get -h
Should not create Detector object. Fixed.
* [Jungfrau] Storage cells in running receiver
Allowing the possibility to set this when receiver in running state.
* [Eiger] Vtr
Allow Vtrim to be interpolated for settings.
* [Mythen3] Incorrect gain caps when setting threshold energy
Gain caps overwritten with settings enum. Fixed.
* [Mythen3] Non blocking start acquisition
Non-blocking start acquisition was sent out twice to the master. Fixed.
* [Mythen3] Threshold
When settings trimbits or threshold, counter mask is set and hence,
vthx dacs are set accordingly.
setAllThresholdEnergy takes 3 values for each counter and if one of them
is -1, the trimbits and setings for that counter is picked up from the
detector.
* [Moench][Ctb] Pattern levels
Changed from 3 to 6.
* [Mythen3][Moench][Ctb] Default patwait and patloop addresses
Set default wait and loop addresses to 0x1fff (max value) for all levels
before loading pattern. Please use the pattern command instead of parameters.
This ensures defaults are set up and is faster.
* [Moench] Patsetbit and patsetmask
Command line: patsetbit API: getPatternBitMask/ setPatternBitMask
Command line: patmask API: getPatternMask/ setPatternMask
Exchanging the help and masks for patsetbit and patsetmask in the detector
server, especially in loading settings.
* [Moench][Ctb] ADC Vpp
Command line: adcvpp, API: getADCVpp/ setADCVpp
Moved from SetDAC function into into its own. One can use mV values or
option numbers as before.
* [Ctb] ADC command goes back to control server
Slow ADCs, slow ADC temperature, get measured current and voltage values
are requested via the control server again insetad of the stop server
due to configuration and definitions in the control server.
1.5. Detector Server
--------------------
Config file:
* [Eiger][Gotthard2][Gotthard] Master
Using config file with 'master' with argument (master=1, slave=0)
* [Eiger] Top
Using config file with 'top' with argument (top=1, bottom=0)
Command line arguments:
* They have precedence over config files.
* [Eiger][Gotthard2 Virtual][Mythen3 Virtual][Gotthard Virtual] Master
Using command line '--master = 1' or '-m = 1' with argument
(master = 1, slave = 0)
* [Eiger] Top
Using command line '--top = 1' or '-t = 1' with argument (top=1, bottom=0)
* Ignore config file
The config files can also be ignored by an argument from the command line,
'--ignore-config' or '-i'.
Fixes:
* [Jungfrau][Eiger] Clear UDP destination
Command line: udp_cleardst, API: clearUDPDestinations
Clearing udp destination also clears it in the FPGA now.
* [Eiger] Incorrect next frame number
Command line: nextframenumber, API: getNextFrameNumber/ setNextFrameNumber
Get next frame number for 10g was connected to 1g registers and gave
incorrect values. Fixed.
* [Mythen3][Gotthard2] System clock change effects
When changing the system clock (clkdiv 2), time settings should also be
affected (exptime, period etc.). Fixed.
[Gotthard2] System frequency should be same irrespective of timing source.
Fixed.
* [Mythen3] Kernel version compatibility test
Fix added to parse properly the kernel version with CET for corrected
version compatibility test.
* [Mythen3] Server crash for setting vthrehsold
Fixed.
* [Mythen3] Incorrect gaincaps
Setting threshold energy was overwriting gaincaps with settings enum. Fixed.
* [Ctb][Moench] Hostname fail in update mode.
Fixed
Changes:
* [Jungfrau] Temporary fix for stop in 6.1.1
Temporary fix introduced in 6.1.1 for not being able to start after a
stop command has been issued is removed. Reset core right after also has
been removed. It has been fixed in firmware instead.
* [Gotthard2] Clock Divider defaults
When chancing burst mode, clock dividers (2, 3 and 4) set to their
defaults according to burst mode.
* [Mythen3] DAC check for settings
Verify DAC values for each setting has been temporarily switched off
* [Mythen3] DAC min and max values
Vtrim minimum of 600 has been removed.
The threshold dacs minimum is 200 and maximum is 2400.
The other DACs minimum is 0 and maximum is 2800.
When out of range, will not throw, just a warning.
* [Mythen3] Vicin Dac changed to 800
* [Jungfrau][Moench][Ctb] PLL reset at server start up
PLL reset now at server start up.
* [Moench] ADC9257 Vref
ADC Vref voltage modified from 1.33V to 2V
* [Ctb] Allow all clock dividers for PLL
Fixed. For example, 133 MHz would not really be set previously. Fixed by
changing totaldiv from float to an integer.
Additional Features:
* Stop server startup errors
Stop servers now also check for errors at startup (including version
compatibility) and like the control server, it will translate to the
client when connecting for the first time (hostname command).
* [Jungfrau][Moench][Ctb] Additional server update process
Removes old server binary or target of linked file when updating
detector server for blackfin detectors as there is less space on blackfin.
Clearing up absolute and respawn path (removing double '/')
Raise error if server name to be copied is the same as final soft link name.
* [Moench][Ctb] 1 GbE Non blocking acquisition
Previously non blocking acquisition in 1 GbE would not send data.
This feature added now.
* [Gotthard2] Adapted to new HDI version
HDI module ID written to FPGA register
1.6. Simulator
--------------
* Command line arguments. Please refer to previous section on Detector Server.
* [Eiger] Only one executable
Only one executable for an Eiger virtual server. Master and top mode
can be provided via command line or config file to the detector server,
as well as via the client. See in Other New Features for more details.
One can start a module using:
eigerDetectorServer_virtual # reads default config file (top master)
eigerDetectorServer_virtual -i #ignores the config file (bottom slave)
* [Eiger][Junfrau][Gotthard2][Mythen3] Module Id
Added into udp header
* Minimum Configuration
One can setup with just:
hostname localhost
rx_hostname localhost
udp_dstip auto
* [Mythen3] Packet size
Fixed packet size calculation. Previously, sending only header with no data.
1.7. Receiver
-------------
Breaking API:
* Namespace sls
All the receiver source files have also been added to namespace sls.
* HDF5 and Binary writer version
Changed from 6.3 to 6.4
* Master file format to json
The format has been changed from ASCII to json.
* Geometry metadata
Added geometry (number of modules in each direction) to metadata in file.
* HDF5 Dataset name
Changed to just "data" to simplify for user
* File write
File write is disabled by default.
Fixes:
* Refactored and fixed minor issues
Including memory structure and udp sockets.
Fixed progress also in discard partial packaets mode and deactivated ports.
Fixed 200% progress.
Completely padded images now have detector type or version in metadata.
Fixed getting stuck at stop receiver when using zmq
Fixed clang compiler warnings
* Multiple files
This bug was introduced in v6.0.0, where 1 file was created per frame
after the first file. Fixed by resetting the number of frames in
current file when creating a new one.
* [Eiger] Datastream command order
The order of commands to set datastream from client mattered previously.
Datastream had to be set before 10GbE enable. Order does not matter anymore.
* Udp destination MAC
If it has been set before, changing udp_dstip will not update udp_dstmac.
Fixed to always set it in detector even if it had a value before.
Udp_dstmac can still be used to overwrite again. This is useful when
using a router for example.
* Stuck when using zmq
More often in 6.1.1, gets stuck at stop receiver.
* [Mythen3] Incorrect number of packets calculated or tengiga not set up
Runnig config second time (with tengiga=0, dr !=32, counters !=0x7)
calculated incorrect image size expected due to inconsistent copy of
detector parameters. Fixed
* Storage cells in receiver
Previously not updated in receiver. Fixed.
* Virtual HDF5 Parameter datasets
Corner case bug when frames caught is not a multiple of frames per file.
Not found in virtual image datasets. Fixed.
Changes:
* Master file created at end of acquisition
The file is now written at the end of acquisition. So if any metadata
is changed during an acquisition, it will reflect the last value.
* File name prefix
Slash '/' not allowed.
Additional Features:
* [Gotthard2] 25um image reconstruction in virtual HDF5
Virtual HDF5 reconstructs complete image by interleaving first module
(master) with second module (slave). First channel of master is first
channel of detector.
Requires firmware update to reverse channels of slaves.
* Memory size
Increased an internal fifo header by 8 bytes to align memory allocated for
to receive images for efficiency.
1.8. Gui
--------
* [Jungfrau][Eiger] Gap pixels
Enabled by default in the gui.
* High voltage moved from Developer tab to Settings tab.
* Gain plot zooming
Zooming disabled. Instead, it automatically zooms in when you zoom in
the main plot or if min and max of x and y axis set up in plot tab.
* [Mythen3] Inconsistent timing mode
Timing mode of the slaves should be discarded before squashing. Fixed.
* [Mythen3][Gotthard2] Crashes
Additional locking Added
2. On-board Detector Server Compatibility
2 On-board Detector Server Compatibility
==========================================
@ -849,16 +60,16 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
3. Firmware Requirements
3 Firmware Requirements
========================
Eiger 17.02.2022 (v30)
Eiger 20.02.2023 (v31)
Jungfrau 04.11.2022 (v1.4, HW v1.0)
03.11.2022 (v2.4, HW v2.0)
Mythen3 05.12.2022 (v1.4)
Mythen3 24.01.2023 (v1.4)
Gotthard2 23.11.2022 (v0.3)
@ -898,22 +109,22 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
4. Kernel Requirements
4 Kernel Requirements
======================
Blackfin
========
--------
Latest version: Fri Oct 29 00:00:00 2021
Older ones will work, but might have issues with programming firmware via
the package.
Nios
====
-----
Compatible version: Mon May 10 18:00:21 CEST 2021
Kernel Upgrade
==============
---------------
Eiger via bit files
Others via command
@ -926,7 +137,7 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
5. Download, Documentation & Support
5 Download, Documentation & Support
====================================
Download
@ -982,6 +193,9 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
https://slsdetectorgroup.github.io/devdoc/udpheader.html
https://slsdetectorgroup.github.io/devdoc/udpdetspec.html
slsReceiver Zmq Format:
https://slsdetectorgroup.github.io/devdoc/slsreceiver.html#zmq-json-header-format
TroubleShooting:
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html
https://slsdetectorgroup.github.io/devdoc/troubleshooting.html#receiver-pc-tuning-options
@ -998,4 +212,3 @@ This document describes the differences between v7.0.0.rc1 and v6.1.2
dhanya.thattil@psi.ch
erik.frojdh@psi.ch

2
cmk.sh
View File

@ -33,7 +33,7 @@ Usage: $0 [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of thread
-c: Clean
-d: HDF5 Custom Directory
-e: Debug mode
-g: Build/Rebuilds only gui
-g: Build/Rebuilds gui
-h: Builds/Rebuilds Cmake files with HDF5 package
-i: Builds tests
-j: Number of threads to compile through

View File

@ -116,12 +116,16 @@ Program from console
# Always ensure that the client and server software are of the same release.
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
# copies server, links new server to jungfrauDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
# programs fpga, reboots
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
sls_detector_put update jungfrauDetectorServervxxx pcxxx xx.pof
# v6.1.1 - present (copies server from the full path provided)
sls_detector_put update jungfrauDetectorServervxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof
@ -182,11 +186,16 @@ Program from console
# Always ensure that the client and server software are of the same release.
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
# programs fpga,
# reboots
# copies server, links new server to mythen3DetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga, reboots
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
sls_detector_put update mythen3DetectorServervxxx pcxxx xxx.rbf
# v6.1.1 - present (copies server from the full path provided)
sls_detector_put update mythen3DetectorServervxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
@ -211,11 +220,16 @@ Program from console
# Always ensure that the client and server software are of the same release.
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
# programs fpga,
# reboots
# copies server, links new server to gotthard2DetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga, reboots
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
sls_detector_put update gotthard2DetectorServervxxx pcxxx xxx.rbf
# v6.1.1 - present (copies server from the full path provided)
sls_detector_put update gotthard2DetectorServervxxx xxx.rbf
# Or only program firmware
sls_detector_put programfpga xxx.rbf
@ -257,12 +271,16 @@ Program from console
# Always ensure that the client and server software are of the same release.
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
# copies server, links new server to moenchDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
# programs fpga, reboots
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
sls_detector_put update moenchDetectorServervxxx pcxxx xx.pof
# v6.1.1 - present (copies server from the full path provided)
sls_detector_put update moenchDetectorServervxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof
@ -288,12 +306,16 @@ Program from console
# Always ensure that the client and server software are of the same release.
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
# copies server, links new server to ctbDetectorServer,
# removes old server from respawn, sets up new lnked server to respawn
# programs fpga,
# reboots
# programs fpga, reboots
# v5.0.0 - 6.0.0 (copies server from tftp folder of the pc)
sls_detector_put update ctbDetectorServervxxx pcxxx xx.pof
# v6.1.1 - present (copies server from the full path provided)
sls_detector_put update ctbDetectorServervxxx xx.pof
# Or only program firmware
sls_detector_put programfpga xxx.pof

View File

@ -1,14 +1,3 @@
.. note ::
The default branch of our git repository is developer. It contains the
latest development version. It is expected to compile and work but
features might be added or tweaked. In some cases the API might also change
without being communicated. If absolute stability of the API is needed please
use one of the release versions.
.. warning ::
Before building from source make sure that you have the
@ -161,7 +150,7 @@ Build using in-built cmk.sh script
-c: Clean
-d: HDF5 Custom Directory
-e: Debug mode
-g: Build/Rebuilds only gui
-g: Build/Rebuilds gui
-h: Builds/Rebuilds Cmake files with HDF5 package
-i: Builds tests
-j: Number of threads to compile through
@ -178,17 +167,17 @@ Build using in-built cmk.sh script
-z: Moench zmq processor
# get all options
# display all options
./cmk.sh -?
# new build and compile in parallel:
./cmk.sh -bj5
# new build and compile in parallel (recommended basic option):
./cmk.sh -cbj5
# new build, python and compile in parallel:
./cmk.sh -bpj5
./cmk.sh -cbpj5
#To use the system zmq (/usr/lib64) instead
./cmk.sh -bj5 -q /usr/lib64
./cmk.sh -cbj5 -q /usr/lib64

View File

@ -224,6 +224,45 @@ ZMQ: Json Header Format
+--------------+----------------------------------------------+
SLS Receiver Header Format
--------------------------
It is 112 bytes and consists of:
* 48 bytes of the SLS Detector Header (described in :ref:`the current detector header <detector udp header>`)
* 64 bytes of packet mask
.. code-block:: cpp
typedef struct {
uint64_t frameNumber;
uint32_t expLength;
uint32_t packetNumber;
uint64_t detSpec1;
uint64_t timestamp;
uint16_t modId;
uint16_t row;
uint16_t column;
uint16_t detSpec2;
uint32_t detSpec3;
uint16_t detSpec4;
uint8_t detType;
uint8_t version;
} sls_detector_header;
struct sls_receiver_header {
sls_detector_header detHeader; /**< is the detector header */
sls_bitset packetsMask; /**< is the packets caught bit mask */
};
.. note ::
| The packetNumber in the SLS Receiver Header will be modified to number of packets caught by receiver for that frame. For eg. Jungfrau will have 128 packets per frame. If it is less, then this is a partial frame due to missing packets.
| Furthermore, the bit mask will specify which packets have been received.
File format
--------------
@ -256,8 +295,6 @@ Some file name examples:
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
**Binary file format**
This is the default file format.

View File

@ -11,7 +11,7 @@ Current Version
**v2.0 (slsDetectorPackage v7.0.0+)**
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
.. table:: <---------------------------------------------------- 8 bytes per row --------------------------------------------->
:align: center
:widths: 30,30,30,15,15

View File

@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1910
# receiver hostname
rx_hostname mpc1922:2010
# udp destination ports
udp_dstport 50010
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2010
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp
@ -27,418 +27,7 @@ dbitclk 40
# patterns
patword 0x0000 0x0000000000000000
patword 0x0001 0x0000000000000000
patword 0x0002 0x0008000900080000
patword 0x0003 0x0008000900080000
patword 0x0004 0x0008000900080000
patword 0x0005 0x0008000900080000
patword 0x0006 0x0008000900080000
patword 0x0007 0x0008000900080000
patword 0x0008 0x0008000900080000
patword 0x0009 0x0008000900080000
patword 0x000a 0x0008000900080000
patword 0x000b 0x0008000900080000
patword 0x000c 0x0008000900080000
patword 0x000d 0x0008000900080000
patword 0x000e 0x0008000900080000
patword 0x000f 0x0008000900080000
patword 0x0010 0x0008000900080000
patword 0x0011 0x0008000900080000
patword 0x0012 0x0008000900080000
patword 0x0013 0x0008000900080000
patword 0x0014 0x0008000900080000
patword 0x0015 0x0008000900080000
patword 0x0016 0x0008400900080020
patword 0x0017 0x0008400900080020
patword 0x0018 0x0008599f0418503a
patword 0x0019 0x0008599f0418503a
patword 0x001a 0x0108599f0418503a
patword 0x001b 0x0108599f0418503a
patword 0x001c 0x0108599f0418503a
patword 0x001d 0x0108599f0418503a
patword 0x001e 0x0108599f0418503a
patword 0x001f 0x0108599f0418503a
patword 0x0020 0x0108599f0418503a
patword 0x0021 0x0108599f0418503a
patword 0x0022 0x0108599f0418503a
patword 0x0023 0x0108599f0418503a
patword 0x0024 0x0108599f0418503a
patword 0x0025 0x0108599f0418503a
patword 0x0026 0x0108599f0418503a
patword 0x0027 0x0108599f0418503a
patword 0x0028 0x0108599f0418503a
patword 0x0029 0x0108599f0418503a
patword 0x002a 0x0108599f0418503a
patword 0x002b 0x0108599f0418503a
patword 0x002c 0x0108599f0418503a
patword 0x002d 0x0108599f0418503a
patword 0x002e 0x0108599f0418503a
patword 0x002f 0x0108599f0418503a
patword 0x0030 0x0108599f0418503a
patword 0x0031 0x0108599f0418503a
patword 0x0032 0x0108599f0418503a
patword 0x0033 0x0108599f0418503a
patword 0x0034 0x0108599f0418503a
patword 0x0035 0x0108599f0418503a
patword 0x0036 0x0108599f0418503a
patword 0x0037 0x0108599f0418503a
patword 0x0038 0x0108599f0418503a
patword 0x0039 0x0108599f0418503a
patword 0x003a 0x0108599f0418503a
patword 0x003b 0x0108599f0418503a
patword 0x003c 0x0108599f0418503a
patword 0x003d 0x0108599f0418503a
patword 0x003e 0x0108599f0418503a
patword 0x003f 0x0108599f0418503a
patword 0x0040 0x0108599f0418503a
patword 0x0041 0x0108599f0418503a
patword 0x0042 0x0108599f0418503a
patword 0x0043 0x0108599f0418503a
patword 0x0044 0x0108599f0418503a
patword 0x0045 0x0108599f0418503a
patword 0x0046 0x0108599f0418503a
patword 0x0047 0x0108599f0418503a
patword 0x0048 0x0108599f0418503a
patword 0x0049 0x0108599f0418503a
patword 0x004a 0x0108599f0418503a
patword 0x004b 0x0108599f0418503a
patword 0x004c 0x0108599f0418503a
patword 0x004d 0x0108599f0418503a
patword 0x004e 0x0108599f0418503a
patword 0x004f 0x0108599f0418503a
patword 0x0050 0x0108599f0418503a
patword 0x0051 0x0108599f0418503a
patword 0x0052 0x0108599f0418503a
patword 0x0053 0x0108599f0418503a
patword 0x0054 0x0108599f0418503a
patword 0x0055 0x0108599f0418503a
patword 0x0056 0x0108599f0418503a
patword 0x0057 0x0108599f0418503a
patword 0x0058 0x0108599f0418503a
patword 0x0059 0x0108599f0418503a
patword 0x005a 0x0108599f0418503a
patword 0x005b 0x0108599f0418503a
patword 0x005c 0x0108599f0418503a
patword 0x005d 0x0108599f0418503a
patword 0x005e 0x0108599f0418503a
patword 0x005f 0x0108599f0418503a
patword 0x0060 0x0108599f0418503a
patword 0x0061 0x0108599f0418503a
patword 0x0062 0x0108599f0418503a
patword 0x0063 0x0108599f0418503a
patword 0x0064 0x0108599f0418503a
patword 0x0065 0x0108599f0418503a
patword 0x0066 0x0108599f0418503a
patword 0x0067 0x0108599f0418503a
patword 0x0068 0x0108599f0418503a
patword 0x0069 0x0108599f0418503a
patword 0x006a 0x0108599f0418503a
patword 0x006b 0x0108599f0418503a
patword 0x006c 0x0108599f0418503a
patword 0x006d 0x0108599f0418503a
patword 0x006e 0x0108599f0418503a
patword 0x006f 0x0108599f0418503a
patword 0x0070 0x0108599f0418503a
patword 0x0071 0x0108599f0418503a
patword 0x0072 0x0108599f0418503a
patword 0x0073 0x0108599f0418503a
patword 0x0074 0x0108599f0418503a
patword 0x0075 0x0108599f0418503a
patword 0x0076 0x0108599f0418503a
patword 0x0077 0x0108599f0418503a
patword 0x0078 0x0108599f0418503a
patword 0x0079 0x0108599f0418503a
patword 0x007a 0x0108599f0418503a
patword 0x007b 0x0108599f0418503a
patword 0x007c 0x0108599f0418503a
patword 0x007d 0x0108599f0418503a
patword 0x007e 0x010859960418503a
patword 0x007f 0x010859960418503a
patword 0x0080 0x010859960418503a
patword 0x0081 0x010859960418503a
patword 0x0082 0x010859960418503a
patword 0x0083 0x010859960418503a
patword 0x0084 0x010859960418503a
patword 0x0085 0x010859960418503a
patword 0x0086 0x010859960418503a
patword 0x0087 0x010859960418503a
patword 0x0088 0x010859960418503a
patword 0x0089 0x010859960418503a
patword 0x008a 0x010859960418503a
patword 0x008b 0x010859960418503a
patword 0x008c 0x010859960418503a
patword 0x008d 0x010859960418503a
patword 0x008e 0x010859960418503a
patword 0x008f 0x010859960418503a
patword 0x0090 0x010859960418503a
patword 0x0091 0x010859960418503a
patword 0x0092 0x010819960418501a
patword 0x0093 0x010819960418501a
patword 0x0094 0x010819960418501a
patword 0x0095 0x010819960418501a
patword 0x0096 0x030819960418501a
patword 0x0097 0x030819960418501a
patword 0x0098 0x030819960418501a
patword 0x0099 0x030819960418501a
patword 0x009a 0x030819960418501a
patword 0x009b 0x030819960418501a
patword 0x009c 0x030819960418501a
patword 0x009d 0x030819960418501a
patword 0x009e 0x030819960418501a
patword 0x009f 0x030819960418501a
patword 0x00a0 0x030819960418501a
patword 0x00a1 0x030819960418501a
patword 0x00a2 0x030819960418501a
patword 0x00a3 0x030819960418501a
patword 0x00a4 0x030819960418501a
patword 0x00a5 0x030819960418501a
patword 0x00a6 0x030819960418501a
patword 0x00a7 0x030819960418501a
patword 0x00a8 0x030819960418501a
patword 0x00a9 0x030819960418501a
patword 0x00aa 0x030819960418501a
patword 0x00ab 0x030819960418501a
patword 0x00ac 0x030819960008501a
patword 0x00ad 0x030819960008501a
patword 0x00ae 0x030819960008501a
patword 0x00af 0x030819960008501a
patword 0x00b0 0x030819960008501a
patword 0x00b1 0x030819960008501a
patword 0x00b2 0x030819960008501a
patword 0x00b3 0x030819960008501a
patword 0x00b4 0x030819960008501a
patword 0x00b5 0x030819960008501a
patword 0x00b6 0x030819960008501a
patword 0x00b7 0x030819960008501a
patword 0x00b8 0x030819960008501a
patword 0x00b9 0x030819960008501a
patword 0x00ba 0x030819960008501a
patword 0x00bb 0x030819960008501a
patword 0x00bc 0x030819960008501a
patword 0x00bd 0x030819960008501a
patword 0x00be 0x030819960008501a
patword 0x00bf 0x030819960008501a
patword 0x00c0 0x0308199f0008501a
patword 0x00c1 0x0308199f0008501a
patword 0x00c2 0x0308199f0008501a
patword 0x00c3 0x0308199f0008501a
patword 0x00c4 0x0308199f0008501a
patword 0x00c5 0x0308199f0008501a
patword 0x00c6 0x0308199f0008501a
patword 0x00c7 0x0308199f0008501a
patword 0x00c8 0x0308199f0008501a
patword 0x00c9 0x0308199f0008501a
patword 0x00ca 0x0308199f0008501a
patword 0x00cb 0x0308199f0008501a
patword 0x00cc 0x0308199f0008501a
patword 0x00cd 0x0308199f0008501a
patword 0x00ce 0x0308199f0008501a
patword 0x00cf 0x0308199f0008501a
patword 0x00d0 0x0308199f0008501a
patword 0x00d1 0x0308199f0008501a
patword 0x00d2 0x0308199f0008501a
patword 0x00d3 0x0308199f0008501a
patword 0x00d4 0x0308599f0008503a
patword 0x00d5 0x0308599f0008503a
patword 0x00d6 0x030c599f000850ba
patword 0x00d7 0x030c599f000850ba
patword 0x00d8 0x030c599f000850ba
patword 0x00d9 0x030c599f000850ba
patword 0x00da 0x030c599f000850ba
patword 0x00db 0x030c599f000850ba
patword 0x00dc 0x030c599f000850ba
patword 0x00dd 0x030c599f000850ba
patword 0x00de 0x030c599f000850ba
patword 0x00df 0x030c599f000850ba
patword 0x00e0 0x030c599f000850ba
patword 0x00e1 0x030c599f000850ba
patword 0x00e2 0x030c599f000850ba
patword 0x00e3 0x030c599f000850ba
patword 0x00e4 0x030c599f000850ba
patword 0x00e5 0x030c599f000850ba
patword 0x00e6 0x030c599f000850ba
patword 0x00e7 0x030c599f000850ba
patword 0x00e8 0x030c599f000850ba
patword 0x00e9 0x030c599f000850ba
patword 0x00ea 0x030c799f010858ba
patword 0x00eb 0x030c799f010858ba
patword 0x00ec 0x030c599f000850ba
patword 0x00ed 0x030c599f000850ba
patword 0x00ee 0x030c599f000850ba
patword 0x00ef 0x030c599f000850ba
patword 0x00f0 0x030c599f000850ba
patword 0x00f1 0x030c599f000850ba
patword 0x00f2 0x030c599f000850ba
patword 0x00f3 0x030c599f000850ba
patword 0x00f4 0x030c599f000850ba
patword 0x00f5 0x030c599f000850ba
patword 0x00f6 0x030c599f000850ba
patword 0x00f7 0x030c599f000850ba
patword 0x00f8 0x030c599f000850ba
patword 0x00f9 0x030c599f000850ba
patword 0x00fa 0x030c599f000850ba
patword 0x00fb 0x030c599f000850ba
patword 0x00fc 0x030c599f000850ba
patword 0x00fd 0x030c599f000850ba
patword 0x00fe 0x030c599f000850ba
patword 0x00ff 0x030c599f000850ba
patword 0x0100 0x030c599f000850ba
patword 0x0101 0x030c599f000850ba
patword 0x0102 0x030c599f400850ba
patword 0x0103 0x030c599f400850ba
patword 0x0104 0x030c599f600850ba
patword 0x0105 0x030c599f400850ba
patword 0x0106 0x030c599f400850ba
patword 0x0107 0x030c599f400850ba
patword 0x0108 0x870c599f682e50ba
patword 0x0109 0x870c599f482850ba
patword 0x010a 0x870c599f000e50ba
patword 0x010b 0x870c599f000850ba
patword 0x010c 0x870c599f000e50ba
patword 0x010d 0x870c599f000850ba
patword 0x010e 0x870c599f000e50ba
patword 0x010f 0x870c599f000850ba
patword 0x0110 0x870c599f000e50ba
patword 0x0111 0x870c599f000850ba
patword 0x0112 0x870c599f000e50ba
patword 0x0113 0x870c599f000850ba
patword 0x0114 0x870c599f000e50ba
patword 0x0115 0x870c599f000850ba
patword 0x0116 0x870c599f000e50ba
patword 0x0117 0x870c599f000850ba
patword 0x0118 0x870c599f000e50ba
patword 0x0119 0x870c599f000850ba
patword 0x011a 0x870c599f000e50ba
patword 0x011b 0x870c599f000850ba
patword 0x011c 0x870c599f000e50ba
patword 0x011d 0x870c599f000850ba
patword 0x011e 0x870c599f000e50ba
patword 0x011f 0x870c599f000850ba
patword 0x0120 0x870c599f000e50ba
patword 0x0121 0x870c599f000850ba
patword 0x0122 0x870c599f200e50ba
patword 0x0123 0x870c599f000850ba
patword 0x0124 0x870c599f000e50ba
patword 0x0125 0x870c599f000850ba
patword 0x0126 0x870c599f000e50ba
patword 0x0127 0x870c599f000850ba
patword 0x0128 0x870c599f000e50ba
patword 0x0129 0x870c599f000850ba
patword 0x012a 0x870c599f000e50ba
patword 0x012b 0x870c599f000850ba
patword 0x012c 0x870c599f000e50ba
patword 0x012d 0x870c599f000850ba
patword 0x012e 0x870c599f000e50ba
patword 0x012f 0x870c599f000850ba
patword 0x0130 0x870c599f000e50ba
patword 0x0131 0x870c599f000850ba
patword 0x0132 0x870c599f000e50ba
patword 0x0133 0x870c599f000850ba
patword 0x0134 0x870c599f000e50ba
patword 0x0135 0x870c599f000850ba
patword 0x0136 0x870c599f000e50ba
patword 0x0137 0x870c599f000850ba
patword 0x0138 0x870c599f000e50ba
patword 0x0139 0x870c599f000850ba
patword 0x013a 0x870c599f282e50ba
patword 0x013b 0x870c599f082850ba
patword 0x013c 0x870c599f000e50ba
patword 0x013d 0x870c599f000850ba
patword 0x013e 0x870c599f000e50ba
patword 0x013f 0x870c599f000850ba
patword 0x0140 0x870c599f000e50ba
patword 0x0141 0x870c599f000850ba
patword 0x0142 0x870c599f000e50ba
patword 0x0143 0x870c599f000850ba
patword 0x0144 0x870c599f000e50ba
patword 0x0145 0x870c599f000850ba
patword 0x0146 0x870c599f000e50ba
patword 0x0147 0x870c599f000850ba
patword 0x0148 0x870c599f000e50ba
patword 0x0149 0x870c599f000850ba
patword 0x014a 0x870c599f000e50ba
patword 0x014b 0x870c599f000850ba
patword 0x014c 0x870c599f000e50ba
patword 0x014d 0x870c599f000850ba
patword 0x014e 0x870c599f000e50ba
patword 0x014f 0x870c599f000850ba
patword 0x0150 0x870c599f000e50ba
patword 0x0151 0x870c599f000850ba
patword 0x0152 0x870c599f000e50ba
patword 0x0153 0x870c599f000850ba
patword 0x0154 0x870c599f200e50ba
patword 0x0155 0x870c599f000850ba
patword 0x0156 0x870c599f000e50ba
patword 0x0157 0x870c599f000850ba
patword 0x0158 0x870c599f000e50ba
patword 0x0159 0x870c599f000850ba
patword 0x015a 0x870c599f000e50ba
patword 0x015b 0x870c599f000850ba
patword 0x015c 0x870c599f000e50ba
patword 0x015d 0x870c599f000850ba
patword 0x015e 0x870c599f000e50ba
patword 0x015f 0x870c599f000850ba
patword 0x0160 0x870c599f000e50ba
patword 0x0161 0x870c599f000850ba
patword 0x0162 0x870c599f000e50ba
patword 0x0163 0x870c599f000850ba
patword 0x0164 0x870c599f000e50ba
patword 0x0165 0x870c599f000850ba
patword 0x0166 0x870c599f000e50ba
patword 0x0167 0x870c599f000850ba
patword 0x0168 0x870c599f000e50ba
patword 0x0169 0x870c599f000850ba
patword 0x016a 0x870c599f000e50ba
patword 0x016b 0x870c599f000850ba
patword 0x016c 0x070c599f000850ba
patword 0x016d 0x070c599f000850ba
patword 0x016e 0x000c599f000850ba
patword 0x016f 0x000c599f000850ba
patword 0x0170 0x0008599f200e503a
patword 0x0171 0x0008599f0008503a
patword 0x0172 0x0008599f200e503a
patword 0x0173 0x0008599f0008503a
patword 0x0174 0x0008599f0008503a
patword 0x0175 0x0008599f0008503a
patword 0x0176 0x0008599f0008503a
patword 0x0177 0x0008599f0008503a
patword 0x0178 0x0008599f0008503a
patword 0x0179 0x0008599f0008503a
patword 0x017a 0x0008599f0008503a
patword 0x017b 0x0008599f0008503a
patword 0x017c 0x0008599f0008503a
patword 0x017d 0x0008599f0008503a
patword 0x017e 0x0008599f0008503a
patword 0x017f 0x0008599f0008503a
patword 0x0180 0x0008599f0008503a
patword 0x0181 0x0008599f0008503a
patword 0x0182 0x0008599f0008503a
patword 0x0183 0x0008599f0008503a
patword 0x0184 0x0008599f0008503a
patword 0x0185 0x0008599f0008503a
patword 0x0186 0x0008599f0008503a
patword 0x0187 0x0008599f0008503a
patword 0x0188 0x0008599f0008503a
patword 0x0189 0x0008599f0008503a
patword 0x018a 0x0008599f0008503a
patword 0x018b 0x0008599f0008503a
patword 0x018c 0x0008599f0008503a
patword 0x018d 0x0008599f0008503a
patioctrl 0x8f0effff6dbffdbf
patlimits 0x0000 0x018c
patloop 0 0x013a 0x016b
patnloop 0 0x199
patloop 1 0x0400 0x0400
patnloop 1 0
patloop 2 0x0400 0x0400
patnloop 2 0
patwait 0 0x00aa
patwaittime 0 10000
patwait 1 0x0400
patwaittime 1 0
patwait 2 0x0400
patwaittime 2 0
pattern /tmp/pattern.pat
# dacs
dac 6 800

View File

@ -1,13 +1,13 @@
# detector hostname
hostname localhost:1900
# receiver hostname
rx_hostname mpc1922:2000
# udp destination ports
udp_dstport 50000
udp_dstport2 50001
# receiver hostname
rx_hostname mpc1922:2000
# udp destination ip from rx_hostname
udp_dstip auto

View File

@ -1,15 +1,15 @@
# detector hostname
hostname localhost:1900+localhost:1902+
# receiver hostname
rx_hostname mpc1922:2000+mpc1922:2001+
# udp destination ports
0:udp_dstport 50000
0:udp_dstport2 50001
1:udp_dstport 50002
1:udp_dstport2 50003
# receiver hostname
rx_hostname mpc1922:2000+mpc1922:2001+
# udp destination ip from rx_hostname
udp_dstip auto

View File

@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1904
# receiver hostname
rx_hostname mpc1922:2004
# udp destination ports
udp_dstport 50004
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2004
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp

View File

@ -1,24 +1,12 @@
# detector hostname
hostname localhost:1914
# receiver hostname
rx_hostname mpc1922:2014
# udp destination ports
udp_dstport 50014
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# output file directory
fpath /tmp
# disable file writing
fwrite 0
# enable 2nd interface for veto debugging
# udp destination port for veto
udp_dstport2 50015
@ -27,6 +15,18 @@ udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip2 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2014
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp
# disable file writing
fwrite 0
# to enable 2nd interface for veto debugging
numinterfaces 2

View File

@ -1,21 +1,21 @@
# detector hostname
hostname localhost:1906
# receiver hostname
rx_hostname mpc1922:2006
# udp destination ports
udp_dstport 50006
udp_dstport2 50007
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2006
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# output file directory
fpath /tmp

View File

@ -4,13 +4,6 @@ detsize 2048 1024
# detector hostname
virtual 4 1952
# receiver hostname and tcpports
0:rx_tcpport 1970
1:rx_tcpport 1971
2:rx_tcpport 1972
3:rx_tcpport 1973
rx_hostname mpc1922
# udp destination ports
0:udp_dstport2 50001
0:udp_dstport2 50002
@ -21,14 +14,21 @@ rx_hostname mpc1922
3:udp_dstport 50007
3:udp_dstport2 50008
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
udp_srcip2 192.168.1.100
# receiver hostname and tcpports
0:rx_tcpport 1970
1:rx_tcpport 1971
2:rx_tcpport 1972
3:rx_tcpport 1973
rx_hostname mpc1922
# udp destination ip from rx_hostname
udp_dstip auto
udp_dstip2 auto
# transmission delay frame
0:txndelay_frame 0
1:txndelay_frame 1

View File

@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1908
# receiver hostname
rx_hostname mpc1922:2008
# udp destination ports
udp_dstport 50008
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2008
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp

View File

@ -1,18 +1,18 @@
# detector hostname
hostname localhost:1912
# receiver hostname
rx_hostname mpc1922:2012
# udp destination ports
udp_dstport 50012
# udp destination ip from rx_hostname
udp_dstip auto
# udp source ip (same subnet as udp_dstip)
udp_srcip 192.168.1.100
# receiver hostname
rx_hostname mpc1922:2012
# udp destination ip from rx_hostname
udp_dstip auto
# output file directory
fpath /tmp

View File

@ -34,6 +34,7 @@ set( PYTHON_FILES
slsdet/eiger.py
slsdet/enums.py
slsdet/errors.py
slsdet/gaincaps.py
slsdet/gotthard.py
slsdet/pattern.py
slsdet/gotthard2.py

View File

@ -2,7 +2,7 @@
# Copyright (C) 2021 Contributors to the SLS Detector Package
import subprocess
import locale
out = subprocess.run(['g', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
out = subprocess.run(['sls_detector_get', 'list'], stdout = subprocess.PIPE, encoding=locale.getpreferredencoding())
cmd = out.stdout.splitlines()
cmd.pop(0)
@ -99,7 +99,6 @@ intentionally_missing = [
'temp_slowadc',
'temp_sodl',
'temp_sodr',
'trigger', #use sendSoftwareTrigger
'update', #use updateServerAndFirmare
'udp_validate', #use validateUdpConfiguration
'udp_reconfigure', #use reconfigureUdpDestination

View File

@ -11,7 +11,7 @@ from .gotthard2 import Gotthard2
from .gotthard import Gotthard
from .moench import Moench
from .pattern import Pattern, patternParameters
from .gaincaps import Mythen3GainCapsWrapper
import _slsdet
xy = _slsdet.xy

View File

@ -26,6 +26,7 @@ SHORT_STR_LENGTH=20
MAX_PATTERN_LENGTH=0x2000
MAX_PATTERN_LEVELS=6
M3_MAX_PATTERN_LEVELS=3
MAX_NUM_COUNTERS=3
DEFAULT_STREAMING_TIMER_IN_MS=500
NUM_RX_THREAD_IDS=9
MAX_NUM_PACKETS=512

View File

@ -16,6 +16,7 @@ defs = slsDetectorDefs
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
from _slsdet import xy
from .gaincaps import Mythen3GainCapsWrapper
from . import utils as ut
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
from .registers import Register, Adc_register
@ -229,9 +230,9 @@ class Detector(CppDetectorApi):
@element
def hardwareversion(self):
"""
[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector.
[Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] Hardware version of detector.
"""
return ut.lhex(self.getHardwareVersion())
return self.getHardwareVersion()
@property
@element
@ -263,6 +264,12 @@ class Detector(CppDetectorApi):
"""Receiver version """
return self.getReceiverVersion()
@property
@element
def serialnumber(self):
"""Jungfrau][Gotthard][Mythen3][Gotthard2][CTB][Moench] Serial number of detector """
return ut.lhex(self.getSerialNumber())
@property
@element
def rx_threads(self):
@ -298,7 +305,7 @@ class Detector(CppDetectorApi):
-----
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2 (quarter speed), else to 0 (full speed)\n
[Mythen3] Options: 8, 16, 32 \n
[Jungfrau][Gotthard][Ctb][Moench][Mythen3][Gotthard2] 16
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16
"""
return self.getDynamicRange()
@ -356,10 +363,9 @@ class Detector(CppDetectorApi):
-----
[Eiger] Use threshold command to load settings
[Jungfrau] GAIN0, HIGHGAIN0 \n
[Jungfrau][Moench] GAIN0, HIGHGAIN0 \n
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
[Moench] G1_HIGHGAIN, G1_LOWGAIN, G2_HIGHCAP_HIGHGAIN, G2_HIGHCAP_LOWGAIN, G2_LOWCAP_HIGHGAIN, G2_LOWCAP_LOWGAIN, G4_HIGHGAIN, G4_LOWGAIN \n
[Eiger] settings loaded from file found in settingspath
"""
return element_if_equal(self.getSettings())
@ -389,7 +395,7 @@ class Detector(CppDetectorApi):
@element
def framesl(self):
"""
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition.\n
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames left in acquisition.\n
[Gotthard2] only in continuous auto mode.
:setter: Not Implemented
@ -400,7 +406,7 @@ class Detector(CppDetectorApi):
@element
def framecounter(self):
"""
[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control.
[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames from start run control.
Note
-----
@ -429,12 +435,11 @@ class Detector(CppDetectorApi):
@element
def powerchip(self):
"""
[Jungfrau][Mythen3][Gotthard2][Moench] Power the chip.
[Jungfrau][Moench][Mythen3][Gotthard2] Power the chip.
Note
----
[Moench] Default is disabled. \n
[Jungfrau] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n
[Jungfrau][Moench] Default is disabled. Get will return power status. Can be off if temperature event occured (temperature over temp_threshold with temp_control enabled. Will configure chip (only chip v1.1).\n
[Mythen3][Gotthard2] Default is 1. If module not connected or wrong module, powerchip will fail.
"""
return self.getPowerChip()
@ -453,6 +458,56 @@ class Detector(CppDetectorApi):
def triggers(self, n_triggers):
self.setNumberOfTriggers(n_triggers)
def resetdacs(self, use_hardware_values):
self.resetToDefaultDacs(use_hardware_values)
def trigger(self):
self.sendSoftwareTrigger()
def blockingtrigger(self):
self.sendSoftwareTrigger(True)
@property
@element
def gaincaps(self):
"""
[Mythen3] Gain caps. Enum: M3_GainCaps \n
Note
----
Options: M3_GainCaps, M3_C15sh, M3_C30sh, M3_C50sh, M3_C225ACsh, M3_C15pre
Example
-------
>>> d.gaincaps
C15pre, C30sh
>>> d.gaincaps = M3_GainCaps.M3_C30sh
>>> d.gaincaps
C30sh
>>> d.gaincaps = M3_GainCaps.M3_C30sh | M3_GainCaps.M3_C15sh
>>> d.gaincaps
C15sh, C30sh
"""
res = [Mythen3GainCapsWrapper(it) for it in self.getGainCaps()]
return res
@gaincaps.setter
def gaincaps(self, caps):
#convert to int if called with Wrapper
if isinstance(caps, Mythen3GainCapsWrapper):
self.setGainCaps(caps.value)
elif isinstance(caps, dict):
corr = {}
for key, value in caps.items():
if isinstance(value, Mythen3GainCapsWrapper):
corr[key] = value.value
else:
corr[key] = value
ut.set_using_dict(self.setGainCaps, corr)
else:
self.setGainCaps(caps)
@property
def exptime(self):
"""
@ -500,7 +555,7 @@ class Detector(CppDetectorApi):
@exptime.setter
def exptime(self, t):
if self.type == detectorType.MYTHEN3 and is_iterable(t):
if self.type == detectorType.MYTHEN3 and is_iterable(t) and not isinstance(t,dict):
for i, v in enumerate(t):
if isinstance(v, int):
v = float(v)
@ -509,8 +564,6 @@ class Detector(CppDetectorApi):
ut.set_time_using_dict(self.setExptime, t)
@property
def period(self):
"""
@ -560,7 +613,7 @@ class Detector(CppDetectorApi):
@element
def periodl(self):
"""
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Period left for current frame.
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Period left for current frame.
Note
-----
@ -582,7 +635,7 @@ class Detector(CppDetectorApi):
@element
def delay(self):
"""
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
Note
-----
@ -627,7 +680,7 @@ class Detector(CppDetectorApi):
@element
def delayl(self):
"""
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
[Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
Note
-----
@ -649,6 +702,10 @@ class Detector(CppDetectorApi):
"""Start detector acquisition. Status changes to RUNNING or WAITING and automatically returns to idle at the end of acquisition."""
self.startDetector()
def clearbusy(self):
"""If acquisition aborted during acquire command, use this to clear acquiring flag in shared memory before starting next acquisition"""
self.clearAcquiringFlag()
def rx_start(self):
"""Starts receiver listener for detector data packets and create a data file (if file write enabled)."""
self.startReceiver()
@ -682,7 +739,7 @@ class Detector(CppDetectorApi):
@element
def txdelay(self):
"""
[Eiger][Jungfrau][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
[Eiger][Jungfrau][Moench][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
Note
----
@ -690,7 +747,7 @@ class Detector(CppDetectorApi):
\t\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n
\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n
\t\t[Eiger] txdelay_frame to (2 *num_modules * n_delay) \n
\t\t[Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay)\n\n
\t\t[Jungfrau][Moench][Mythen3] txdelay_frame to (num_modules * n_delay)\n\n
Please refer txdelay_left, txdelay_right and txdelay_frame for details.
"""
return self.getTransmissionDelay()
@ -703,11 +760,11 @@ class Detector(CppDetectorApi):
@element
def txdelay_frame(self):
"""
[Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
[Eiger][Jungfrau][Moench][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
Note
----
[Jungfrau] [0-31] Each value represents 1 ms. \n
[Jungfrau][Moench] [0-31] Each value represents 1 ms. \n
[Eiger] Additional delay to txdelay_left and txdelay_right. Each value represents 10ns. Typical value is 50000. \n
[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms.
"""
@ -890,7 +947,7 @@ class Detector(CppDetectorApi):
@property
@element
def numinterfaces(self):
"""[Jungfrau][Gotthard2] Number of udp interfaces to stream data from detector. Default is 1.
"""[Jungfrau][Moench][Gotthard2] Number of udp interfaces to stream data from detector. Default is 1.
Note
-----
@ -1236,11 +1293,11 @@ class Detector(CppDetectorApi):
@element
def udp_dstip2(self):
"""
[Jungfrau][Gotthard2] Ip address of the receiver (destination) udp interface 2.
[Jungfrau][Moench][Gotthard2] Ip address of the receiver (destination) udp interface 2.
Note
----
[Jungfrau] bottom half \n
[Jungfrau][Moench] bottom half \n
[Gotthard2] veto debugging \n
If 'auto' used, then ip is set to ip of rx_hostname. \n
To set IPs for individual modules, use setDestinationUDPIP2.
@ -1289,13 +1346,13 @@ class Detector(CppDetectorApi):
@element
def udp_dstmac2(self):
"""
[Jungfrau][Gotthard2] Mac address of the receiver (destination) udp interface 2.
[Jungfrau][Moench][Gotthard2] Mac address of the receiver (destination) udp interface 2.
Note
----
Not mandatory to set as udp_dstip2 retrieves it from slsReceiver process but must be set if you use a custom receiver (not slsReceiver). \n
To set MACs for individual modules, use setDestinationUDPMAC2. \n
[Jungfrau] bottom half \n
[Jungfrau][Moench] bottom half \n
[Gotthard2] veto debugging \n
Use router mac if router between detector and receiver.
@ -1340,11 +1397,11 @@ class Detector(CppDetectorApi):
@element
def udp_srcmac2(self):
"""
[Jungfrau][Gotthard2] Mac address of the receiver (source) udp interface 2.
[Jungfrau][Moench][Gotthard2] Mac address of the receiver (source) udp interface 2.
Note
----
[Jungfrau] bottom half \n
[Jungfrau][Moench] bottom half \n
[Gotthard2] veto debugging \n
To set MACs for individual modules, use setSourceUDPMAC2.
@ -1390,11 +1447,11 @@ class Detector(CppDetectorApi):
@element
def udp_srcip2(self):
"""
[Jungfrau][Gotthard2] Ip address of the detector (source) udp interface 2.
[Jungfrau][Moench][Gotthard2] Ip address of the detector (source) udp interface 2.
Note
-----
[Jungfrau] bottom half \n
[Jungfrau][Moench] bottom half \n
[Gotthard2] veto debugging \n
Must be same subnet as destination udp ip2.\n
To set IPs for individual modules, use setSourceUDPIP2.
@ -1440,7 +1497,7 @@ class Detector(CppDetectorApi):
----
Default is 50002. \n
[Eiger] right half \n
[Jungfrau] bottom half \n
[Jungfrau][Moench] bottom half \n
[Gotthard2] veto debugging \n
Ports for each module is calculated (incremented by 2) \n
To set ports for individual modules, use setDestinationUDPPort2.
@ -1460,7 +1517,7 @@ class Detector(CppDetectorApi):
-----
[Gotthard] 0, 90, 110, 120, 150, 180, 200 \n
[Eiger][Mythen3][Gotthard2] 0 - 200 \n
[Jungfrau][Ctb][Moench] 0, 60 - 200
[Jungfrau][Moench][Ctb] 0, 60 - 200
"""
return self.getHighVoltage()
@ -1583,8 +1640,8 @@ class Detector(CppDetectorApi):
@element
def master(self):
"""
[Eiger][Gotthard2][Jungfrau] Sets (half) module to master and other(s) to slaves.\n
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau] Gets if the current (half) module is master.
[Eiger][Gotthard2][Jungfrau][Moench] Sets (half) module to master and other(s) to slaves.\n
[Gotthard][Gotthard2][Mythen3][Eiger][Jungfrau][Moench] Gets if the current (half) module is master.
"""
return self.getMaster()
@ -1596,7 +1653,7 @@ class Detector(CppDetectorApi):
@element
def sync(self):
"""
[Jungfrau] Enables or disables synchronization between modules.
[Jungfrau][Moench] Enables or disables synchronization between modules.
"""
return self.getSynchronization()
@ -1725,6 +1782,11 @@ class Detector(CppDetectorApi):
"""Gets the list of timing modes (timingMode) for this detector."""
return self.getTimingModeList()
@property
def readoutspeedlist(self):
"""List of readout speed levels implemented for this detector."""
return self.getReadoutSpeedList()
@property
def templist(self):
"""List of temperature enums (dacIndex) implemented for this detector."""
@ -1745,7 +1807,7 @@ class Detector(CppDetectorApi):
@property
def adcreg(self):
"""[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc register
"""[Jungfrau][Moench][Ctb][Gotthard] Writes to an adc register
Note
-----
@ -1758,7 +1820,7 @@ class Detector(CppDetectorApi):
@property
@element
def adcinvert(self):
"""[Ctb][Moench][Jungfrau] ADC Inversion Mask.
"""[Ctb][Jungfrau][Moench] ADC Inversion Mask.
Note
-----
@ -1774,7 +1836,7 @@ class Detector(CppDetectorApi):
@element
def triggersl(self):
"""
[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of triggers left in acquisition.\n
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of triggers left in acquisition.\n
Note
----
@ -1787,7 +1849,7 @@ class Detector(CppDetectorApi):
@property
@element
def frametime(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Timestamp at a frame start.
"""[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Timestamp at a frame start.
Note
----
@ -1826,23 +1888,24 @@ class Detector(CppDetectorApi):
@property
def versions(self):
if self.type == detectorType.EIGER:
return {'type': self.type,
version_list = {'type': self.type,
'package': self.packageversion,
'client': self.clientversion,
'firmware': self.firmwareversion,
'detectorserver': self.detectorserverversion,
'kernel': self.kernelversion,
'receiver': self.rx_version}
'kernel': self.kernelversion}
return {'type': self.type,
'package': self.packageversion,
'client': self.clientversion,
'firmware': self.firmwareversion,
'detectorserver': self.detectorserverversion,
'hardware':self.hardwareversion,
'kernel': self.kernelversion,
'receiver': self.rx_version}
if self.type == detectorType.EIGER:
version_list ['firmware (Beb)'] = self.firmwareversion
version_list ['firmware(Febl)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_LEFT)
version_list ['firmware (Febr)'] = self.getFrontEndFirmwareVersion(slsDetectorDefs.fpgaPosition.FRONT_RIGHT)
else:
version_list ['firmware'] = self.firmwareversion
version_list ['hardware'] = self.hardwareversion
if self.use_receiver:
version_list ['receiver'] = self.rx_version
return version_list
@property
def virtual(self):
@ -1909,10 +1972,10 @@ class Detector(CppDetectorApi):
Note
-----
[Jungfrau] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
[Jungfrau][Moench] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
[Eiger] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED
[Gottthard2] G2_108MHZ (Default), G2_144MHZ
[Jungfrau] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
[Jungfrau][Moench] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
Also overwrites adcphase to recommended default.
"""
return element_if_equal(self.getReadoutSpeed())
@ -1998,7 +2061,7 @@ class Detector(CppDetectorApi):
Note
-----
Default: AUTO_TIMING \n
[Jungfrau][Gotthard][Ctb][Moench][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
"""
@ -2157,13 +2220,13 @@ class Detector(CppDetectorApi):
def readnrows(self):
"""
[Eiger] Number of rows to read out per half module starting from the centre.
[Jungfrau] Number of rows to read per module starting from the centre.
[Jungfrau][Moench] Number of rows to read per module starting from the centre.
Note
----
[Eiger] Options: 1 - 256. 256 is default. \n
[Eiger]The permissible values depend on dynamic range and 10Gbe enabled.\n\n
[Jungfrau] Options: 8 - 512 (multiples of 8)
[Jungfrau][Moench] Options: 8 - 512 (multiples of 8)
"""
return self.getReadNRows()
@ -2254,7 +2317,7 @@ class Detector(CppDetectorApi):
@property
@element
def tengiga(self):
"""[Eiger][Ctb][Moench][Mythen3] 10GbE Enable."""
"""[Eiger][Ctb][Mythen3] 10GbE Enable."""
return self.getTenGiga()
@tengiga.setter
@ -2274,7 +2337,7 @@ class Detector(CppDetectorApi):
@property
@element
def flowcontrol10g(self):
"""[Eiger][Jungfrau] Enable or disable 10GbE Flow Control."""
"""[Eiger][Jungfrau][Moench] Enable or disable 10GbE Flow Control."""
return self.getTenGigaFlowControl()
@flowcontrol10g.setter
@ -2294,7 +2357,7 @@ class Detector(CppDetectorApi):
@property
@element
def gappixels(self):
"""[Eiger][Jungfrau] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is disabled. """
"""[Eiger][Jungfrau][Moench] Include Gap pixels in client data call back in Detecor api. Will not be in detector streaming, receiver file or streaming. Default is disabled. """
return self.getRxAddGapPixels()
@gappixels.setter
@ -2350,7 +2413,7 @@ class Detector(CppDetectorApi):
@element
def chipversion(self):
"""
[Jungfrau] Chip version of module. Can be 1.0 or 1.1.
[Jungfrau][Moench] Chip version of module. Can be 1.0 or 1.1.
Example
-------
@ -2363,7 +2426,7 @@ class Detector(CppDetectorApi):
@property
@element
def autocompdisable(self):
"""[Jungfrau] Enable or disable auto comparator disable mode.
"""[Jungfrau][Moench] Enable or disable auto comparator disable mode.
Note
-----
@ -2379,7 +2442,7 @@ class Detector(CppDetectorApi):
@property
@element
def compdisabletime(self):
"""[Jungfrau] Time before end of exposure when comparator is disabled.
"""[Jungfrau][Moench] Time before end of exposure when comparator is disabled.
Note
-----
@ -2425,7 +2488,7 @@ class Detector(CppDetectorApi):
@property
@element
def runtime(self):
"""[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Time from detector start up.
"""[Jungfrau][Moench][Mythen3][Gotthard2][CTB] Time from detector start up.
Note
-----
@ -2518,7 +2581,7 @@ class Detector(CppDetectorApi):
@element
def temp_threshold(self):
"""
[Jungfrau] Threshold temperature in degrees.
[Jungfrau][Moench] Threshold temperature in degrees.
Note
-----
@ -2535,7 +2598,7 @@ class Detector(CppDetectorApi):
@element
def temp_event(self):
"""
[Jungfrau] 1, if a temperature event occured. \n
[Jungfrau][Moench] 1, if a temperature event occured. \n
Note
----
@ -2563,7 +2626,7 @@ class Detector(CppDetectorApi):
@element
def temp_control(self):
"""
[Jungfrau] Temperature control enable.
[Jungfrau][Moench] Temperature control enable.
Note
-----
@ -2580,7 +2643,7 @@ class Detector(CppDetectorApi):
@property
@element
def selinterface(self):
"""[Jungfrau] The udp interface to stream data from detector.
"""[Jungfrau][Moench] The udp interface to stream data from detector.
Note
-----
@ -2600,11 +2663,11 @@ class Detector(CppDetectorApi):
@property
def gainmode(self):
"""
[Jungfrau] Detector gain mode. Enum: gainMode
[Jungfrau][Moench] Detector gain mode. Enum: gainMode
Note
-----
[Jungfrau] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
[Jungfrau][Moench] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
CAUTION: Do not use FIX_G0 without caution, you can damage the detector!!!
"""
return element_if_equal(self.getGainMode())
@ -2659,14 +2722,14 @@ class Detector(CppDetectorApi):
@element
def filterresistor(self):
"""
[Gotthard2][Jungfrau] Set filter resistor. Increasing values for increasing "
[Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing values for increasing "
"resistance.
Note
----
Advanced user command.
[Gotthard2] Default is 0. Options: 0-3.
[Jungfrau] Default is 1. Options: 0-1.
[Jungfrau][Moench] Default is 1. Options: 0-1.
"""
return self.getFilterResistor()
@ -2678,11 +2741,11 @@ class Detector(CppDetectorApi):
@element
def filtercells(self):
"""
[Jungfrau] Set filter capacitor.
[Jungfrau][Moench] Set filter capacitor.
Note
----
[Jungfrau] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
[Jungfrau][Moench] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
"""
return self.getNumberOfFilterCells()
@ -3018,7 +3081,7 @@ class Detector(CppDetectorApi):
@property
@element
def adcenable(self):
"""[Ctb][Moench] ADC Enable Mask for 1Gb. Enable for each 32 ADC channel."""
"""[Ctb] ADC Enable Mask for 1Gb. Enable for each 32 ADC channel."""
return self.getADCEnableMask()
@adcenable.setter
@ -3028,7 +3091,7 @@ class Detector(CppDetectorApi):
@property
@element
def adcenable10g(self):
"""[Ctb][Moench] ADC Enable Mask for 10Gb mode for each 32 ADC channel.
"""[Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel.
Note
-----
@ -3045,7 +3108,6 @@ class Detector(CppDetectorApi):
def samples(self):
"""
[CTB] Number of samples (both analog and digitial) expected. \n
[Moench] Number of samples (analog only)
"""
return self.getNumberOfAnalogSamples()
@ -3056,7 +3118,7 @@ class Detector(CppDetectorApi):
@property
@element
def runclk(self):
"""[Ctb][Moench] Run clock in MHz."""
"""[Ctb] Run clock in MHz."""
return self.getRUNClock()
@runclk.setter
@ -3089,7 +3151,7 @@ class Detector(CppDetectorApi):
@property
@element
def asamples(self):
"""[Ctb][Moench] Number of analog samples expected. """
"""[Ctb] Number of analog samples expected. """
return element_if_equal(self.getNumberOfAnalogSamples())
@asamples.setter
@ -3109,7 +3171,7 @@ class Detector(CppDetectorApi):
@property
@element
def dbitphase(self):
"""[Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift.
"""[Ctb][Jungfrau][Moench] Phase shift of clock to latch digital bits. Absolute phase shift.
Note
-----
@ -3131,6 +3193,17 @@ class Detector(CppDetectorApi):
def dbitclk(self, value):
ut.set_using_dict(self.setDBITClock, value)
@property
@element
def adcvpp(self):
"""[Ctb][Moench] Vpp of ADC. [0 -> 1V | 1 -> 1.14V | 2 -> 1.33V | 3 -> 1.6V | 4 -> 2V] \n
Advanced User function!"""
return self.getADCVpp(False)
@adcvpp.setter
def adcvpp(self, value):
ut.set_using_dict(self.setADCVpp, value, False)
@property
@element
def dbitpipeline(self):
@ -3150,7 +3223,7 @@ class Detector(CppDetectorApi):
@property
@element
def maxdbitphaseshift(self):
"""[CTB][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits.
"""[CTB][Jungfrau][Moench] Absolute maximum Phase shift of of the clock to latch digital bits.
Note
-----
@ -3197,7 +3270,7 @@ class Detector(CppDetectorApi):
@property
@element
def maxadcphaseshift(self):
"""[Jungfrau][CTB][Moench] Absolute maximum Phase shift of ADC clock.
"""[Jungfrau][Moench][CTB] Absolute maximum Phase shift of ADC clock.
Note
-----
@ -3209,12 +3282,12 @@ class Detector(CppDetectorApi):
@property
@element
def adcphase(self):
"""[Gotthard][Jungfrau][CTB][Moench] Sets phase shift of ADC clock.
"""[Gotthard][Jungfrau][Moench][CTB] Sets phase shift of ADC clock.
Note
-----
[Jungfrau] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
[Ctb][Moench] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
[Jungfrau][Moench] Absolute phase shift. Changing Speed also resets adcphase to recommended defaults.\n
[Ctb] Absolute phase shift. Changing adcclk also resets adcphase and sets it to previous values.\n
[Gotthard] Relative phase shift.
:getter: Not implemented for Gotthard
@ -3228,7 +3301,7 @@ class Detector(CppDetectorApi):
@property
@element
def adcpipeline(self):
"""[Ctb][Moench] Sets pipeline for ADC clock. """
"""[Ctb] Sets pipeline for ADC clock. """
return self.getADCPipeline()
@adcpipeline.setter
@ -3238,7 +3311,7 @@ class Detector(CppDetectorApi):
@property
@element
def adcclk(self):
"""[Ctb][Moench] Sets ADC clock frequency in MHz. """
"""[Ctb] Sets ADC clock frequency in MHz. """
return self.getADCClock()
@adcclk.setter
@ -3249,7 +3322,7 @@ class Detector(CppDetectorApi):
@element
def syncclk(self):
"""
[Ctb][Moench] Sync clock in MHz.
[Ctb] Sync clock in MHz.
Note
-----
@ -3260,7 +3333,7 @@ class Detector(CppDetectorApi):
@property
def pattern(self):
"""[Mythen3][Moench][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
"""[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
Note
----
@ -3282,7 +3355,7 @@ class Detector(CppDetectorApi):
@property
@element
def patioctrl(self):
"""[Ctb][Moench] 64 bit mask defining input (0) and output (1) signals.
"""[Ctb] 64 bit mask defining input (0) and output (1) signals.
Example
--------
@ -3299,7 +3372,7 @@ class Detector(CppDetectorApi):
@property
@element
def patlimits(self):
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of complete pattern.
"""[Ctb][Mythen3] Limits (start and stop address) of complete pattern.
Example
---------
@ -3319,7 +3392,7 @@ class Detector(CppDetectorApi):
@property
@element
def patsetbit(self):
"""[Ctb][Moench][Mythen3] Sets the mask applied to every pattern to the selected bits.
"""[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits.
Example
--------
@ -3336,7 +3409,7 @@ class Detector(CppDetectorApi):
@property
@element
def patmask(self):
"""[Ctb][Moench][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
"""[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
Example
--------
@ -3354,7 +3427,7 @@ class Detector(CppDetectorApi):
# @element
def patwait(self):
"""
[Ctb][Moench][Mythen3] Wait address of loop level provided.
[Ctb][Mythen3] Wait address of loop level provided.
Example
-------
@ -3371,7 +3444,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwait0(self):
"""[Ctb][Moench][Mythen3] Wait 0 address.
"""[Ctb][Mythen3] Wait 0 address.
Example
--------
@ -3391,7 +3464,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwait1(self):
"""[Ctb][Moench][Mythen3] Wait 1 address.
"""[Ctb][Mythen3] Wait 1 address.
Example
--------
@ -3411,7 +3484,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwait2(self):
"""[Ctb][Moench][Mythen3] Wait 2 address.
"""[Ctb][Mythen3] Wait 2 address.
Example
--------
@ -3431,7 +3504,7 @@ class Detector(CppDetectorApi):
@property
def patwaittime(self):
"""
[Ctb][Moench][Mythen3] Wait time in clock cycles of loop level provided.
[Ctb][Mythen3] Wait time in clock cycles of loop level provided.
Example
-------
@ -3448,7 +3521,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwaittime0(self):
"""[Ctb][Moench][Mythen3] Wait 0 time in clock cycles."""
"""[Ctb][Mythen3] Wait 0 time in clock cycles."""
return self.getPatternWaitTime(0)
@patwaittime0.setter
@ -3459,7 +3532,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwaittime1(self):
"""[Ctb][Moench][Mythen3] Wait 1 time in clock cycles."""
"""[Ctb][Mythen3] Wait 1 time in clock cycles."""
return self.getPatternWaitTime(1)
@patwaittime1.setter
@ -3470,7 +3543,7 @@ class Detector(CppDetectorApi):
@property
@element
def patwaittime2(self):
"""[Ctb][Moench][Mythen3] Wait 2 time in clock cycles."""
"""[Ctb][Mythen3] Wait 2 time in clock cycles."""
return self.getPatternWaitTime(2)
@patwaittime2.setter
@ -3482,7 +3555,7 @@ class Detector(CppDetectorApi):
@property
def patloop(self):
"""
[Ctb][Moench][Mythen3] Limits (start and stop address) of the loop provided.
[Ctb][Mythen3] Limits (start and stop address) of the loop provided.
Example
-------
@ -3499,7 +3572,7 @@ class Detector(CppDetectorApi):
@property
@element
def patloop0(self):
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 0.
"""[Ctb][Mythen3] Limits (start and stop address) of loop 0.
Example
---------
@ -3519,7 +3592,7 @@ class Detector(CppDetectorApi):
@property
@element
def patloop1(self):
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 1.
"""[Ctb][Mythen3] Limits (start and stop address) of loop 1.
Example
---------
@ -3540,7 +3613,7 @@ class Detector(CppDetectorApi):
@property
@element
def patloop2(self):
"""[Ctb][Moench][Mythen3] Limits (start and stop address) of loop 2.
"""[Ctb][Mythen3] Limits (start and stop address) of loop 2.
Example
---------
@ -3562,7 +3635,7 @@ class Detector(CppDetectorApi):
@property
def patnloop(self):
"""
[Ctb][Moench][Mythen3] Number of cycles of the loop provided.
[Ctb][Mythen3] Number of cycles of the loop provided.
Example
-------
@ -3579,7 +3652,7 @@ class Detector(CppDetectorApi):
@property
@element
def patnloop0(self):
"""[Ctb][Moench][Mythen3] Number of cycles of loop 0."""
"""[Ctb][Mythen3] Number of cycles of loop 0."""
return self.getPatternLoopCycles(0)
@patnloop0.setter
@ -3590,7 +3663,7 @@ class Detector(CppDetectorApi):
@property
@element
def patnloop1(self):
"""[Ctb][Moench][Mythen3] Number of cycles of loop 1."""
"""[Ctb][Mythen3] Number of cycles of loop 1."""
return self.getPatternLoopCycles(1)
@patnloop1.setter
@ -3601,7 +3674,7 @@ class Detector(CppDetectorApi):
@property
@element
def patnloop2(self):
"""[Ctb][Moench][Mythen3] Number of cycles of loop 2."""
"""[Ctb][Mythen3] Number of cycles of loop 2."""
return self.getPatternLoopCycles(2)
@patnloop2.setter
@ -3672,7 +3745,7 @@ class Detector(CppDetectorApi):
@property
@element
def v_limit(self):
"""[Ctb][Moench] Soft limit for power supplies (ctb only) and DACS in mV."""
"""[Ctb] Soft limit for power supplies (ctb only) and DACS in mV."""
return self.getDAC(dacIndex.V_LIMIT, True)
@v_limit.setter
@ -3741,6 +3814,23 @@ class Detector(CppDetectorApi):
"""
return self.getMeasuredCurrent(dacIndex.I_POWER_IO)
@property
def clkphase(self):
"""
[Gotthard2][Mythen3] Phase shift of all clocks.
Example
-------
>>> d.clkphase[0] = 20
>>> d.clkphase
0: 20
1: 10
2: 20
3: 10
4: 10
5: 5
"""
return ClkPhaseProxy(self)
@property
def clkdiv(self):

42
python/slsdet/gaincaps.py Normal file
View File

@ -0,0 +1,42 @@
import _slsdet
gc = _slsdet.slsDetectorDefs.M3_GainCaps
class Mythen3GainCapsWrapper:
"""Holds M3_GainCaps enums and facilitates printing"""
# 'M3_C10pre', 'M3_C15pre', 'M3_C15sh', 'M3_C225ACsh', 'M3_C30sh', 'M3_C50sh'
all_bits = gc.M3_C10pre | gc.M3_C15pre | gc.M3_C15sh | gc.M3_C225ACsh | gc.M3_C30sh | gc.M3_C50sh
all_caps = (gc.M3_C10pre, gc.M3_C15pre, gc.M3_C15sh, gc.M3_C225ACsh, gc.M3_C30sh, gc.M3_C50sh)
def __init__(self, value = 0):
self._validate(value)
self.value = value
def __eq__(self, other) -> bool:
if isinstance(other, Mythen3GainCapsWrapper):
return self.value == other.value
else:
return self.value == other
def __ne__(self, other) -> bool:
return not self.__eq__(other)
def __str__(self) -> str:
s = ', '.join(str(c).rsplit('_', 1)[1] for c in self.all_caps if self.value & c)
return s
def __repr__(self) -> str:
return self.__str__()
def _validate(self, value):
"""Check that only bits representing real capacitors are set"""
if isinstance(value, gc):
return True
elif isinstance(value, int):
if value & (~self.all_bits):
raise ValueError(f"The value: {value} is not allowed for Mythen3GainCapsWrapper")
else:
raise ValueError("GainCaps can only be initialized from int or M3_GainCaps enum")

View File

@ -13,6 +13,7 @@ from .detector import Detector, freeze
from .dacs import DetectorDacs
import _slsdet
dacIndex = _slsdet.slsDetectorDefs.dacIndex
gc_enums = _slsdet.slsDetectorDefs.M3_GainCaps
from .detector_property import DetectorProperty
@ -62,4 +63,6 @@ class Mythen3(Detector):
@property
def dacs(self):
return self._dacs
return self._dacs

View File

@ -4,6 +4,7 @@ from .utils import element_if_equal
from .enums import dacIndex
from .defines import M3_MAX_PATTERN_LEVELS, MAX_PATTERN_LEVELS
from _slsdet import slsDetectorDefs
detectorType = slsDetectorDefs.detectorType
def set_proxy_using_dict(func, key, value, unpack = False):
@ -87,7 +88,10 @@ class ClkDivProxy:
def __repr__(self):
rstr = ''
for i in range(6):
num_clocks = 6
if self.det.type == detectorType.MYTHEN3:
num_clocks = 5
for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
@ -96,10 +100,35 @@ class ClkDivProxy:
return rstr.strip('\n')
class ClkPhaseProxy:
"""
Proxy class to allow for more intuitive reading clock phase
"""
def __init__(self, det):
self.det = det
def __getitem__(self, key):
return element_if_equal(self.det.getClockPhase(key))
def __setitem__(self, key, value):
set_proxy_using_dict(self.det.setClockPhase, key, value)
def __repr__(self):
rstr = ''
if self.det.type == detectorType.MYTHEN3:
num_clocks = 5
for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
else:
rstr += f'{i}: {r}\n'
return rstr.strip('\n')
class MaxPhaseProxy:
"""
Proxy class to allow for more intuitive reading clockdivider
Proxy class to allow for more intuitive reading max clock phase shift
"""
def __init__(self, det):
self.det = det
@ -109,7 +138,9 @@ class MaxPhaseProxy:
def __repr__(self):
rstr = ''
for i in range(5):
if self.det.type == detectorType.MYTHEN3:
num_clocks = 5
for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)
@ -120,7 +151,7 @@ class MaxPhaseProxy:
class ClkFreqProxy:
"""
Proxy class to allow for more intuitive reading clockdivider
Proxy class to allow for more intuitive reading clock frequency
"""
def __init__(self, det):
self.det = det
@ -130,7 +161,9 @@ class ClkFreqProxy:
def __repr__(self):
rstr = ''
for i in range(5):
if self.det.type == detectorType.MYTHEN3:
num_clocks = 5
for i in range(num_clocks):
r = element_if_equal(self.__getitem__(i))
if isinstance(r, list):
rstr += ' '.join(f'{item}' for item in r)

View File

@ -61,6 +61,11 @@ void init_det(py::module &m) {
(Result<int64_t>(Detector::*)(sls::Positions) const) &
Detector::getFirmwareVersion,
py::arg() = Positions{});
CppDetectorApi.def("getFrontEndFirmwareVersion",
(Result<int64_t>(Detector::*)(const defs::fpgaPosition,
sls::Positions) const) &
Detector::getFrontEndFirmwareVersion,
py::arg(), py::arg() = Positions{});
CppDetectorApi.def(
"getDetectorServerVersion",
(Result<std::string>(Detector::*)(sls::Positions) const) &

View File

@ -286,6 +286,11 @@ void init_enums(py::module &m) {
.value("BOTTOM", slsDetectorDefs::portPosition::BOTTOM)
.export_values();
py::enum_<slsDetectorDefs::fpgaPosition>(Defs, "fpgaPosition")
.value("FRONT_LEFT", slsDetectorDefs::fpgaPosition::FRONT_LEFT)
.value("FRONT_RIGHT", slsDetectorDefs::fpgaPosition::FRONT_RIGHT)
.export_values();
py::enum_<slsDetectorDefs::streamingInterface>(Defs, "streamingInterface",
py::arithmetic())
.value("NONE", slsDetectorDefs::streamingInterface::NONE)

View File

@ -0,0 +1,24 @@
import pytest
from slsdet import Mythen3GainCapsWrapper
from slsdet.enums import M3_GainCaps #this is the c++ enum
def test_comapre_with_int():
c = Mythen3GainCapsWrapper(128) #C10pre
assert c == 128
assert c != 5
assert c != 1280
def test_compare_with_other():
a = Mythen3GainCapsWrapper(128)
b = Mythen3GainCapsWrapper(1<<10)
c = Mythen3GainCapsWrapper(128)
assert a!=b
assert (a==b) == False
assert a==c
def test_can_be_default_constructed():
c = Mythen3GainCapsWrapper()
assert c == 0

View File

@ -0,0 +1 @@
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3

View File

@ -0,0 +1 @@
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer

View File

@ -0,0 +1 @@
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0

View File

@ -1 +0,0 @@
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc3

File diff suppressed because it is too large Load Diff

View File

@ -68,7 +68,6 @@ class qDrawPlot : public QWidget, private Ui::PlotObject {
void Zoom1DGainPlot(const QRectF &rect);
void Zoom2DGainPlot(const QRectF &rect);
void SetSaveFileName(QString val);
// void UpdatePlot();
signals:
void AcquireFinishedSignal();

View File

@ -32,7 +32,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void SetNumFrames(int val);
void SetNumTriggers(int val);
void SetNumBursts(int val);
void SetNumSamples(int val);
void SetNumGates(int val);
void SetExposureTime();
void SetAcquisitionPeriod();
@ -64,7 +63,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
void GetNumFrames();
void GetNumTriggers();
void GetNumBursts();
void GetNumSamples();
void GetNumGates();
void GetExposureTime();
void GetAcquisitionPeriod();
@ -96,7 +94,6 @@ class qTabMeasurement : public QWidget, private Ui::TabMeasurementObject {
QString errPeriodTip;
QPalette red;
bool delayImplemented;
bool sampleImplemented;
bool gateImplemented;
bool startingFnumImplemented;
bool isAcquisitionStopped{false};

View File

@ -47,6 +47,7 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
private:
void SetupWidgetWindow();
void Initialization();
bool VerifyGapPixelsAllowed();
void Select1DPlot(bool enable);
void GetGapPixels();
void GetStreamingFrequency();
@ -60,7 +61,8 @@ class qTabPlot : public QWidget, private Ui::TabPlotObject {
Detector *det;
qDrawPlot *plot;
bool is1d;
bool is1d{false};
bool isGapPixelsAllowed{false};
/** default plot and axis titles */
static QString defaultPlotTitle;

View File

@ -52,6 +52,7 @@ void qDrawPlot::SetupWidgetWindow() {
detType = det->getDetectorType().squash();
switch (detType) {
case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH:
pixelMask = ((1 << 14) - 1);
gainMask = (3 << 14);
gainOffset = 14;
@ -1142,7 +1143,8 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
break;
case 16:
if (detType == slsDetectorDefs::JUNGFRAU ||
if (detType == slsDetectorDefs::MOENCH ||
detType == slsDetectorDefs::JUNGFRAU ||
detType == slsDetectorDefs::GOTTHARD2) {
// show gain plot

View File

@ -48,6 +48,10 @@ void qTabAdvanced::SetupWidgetWindow() {
lblDiscardBits->setEnabled(true);
spinDiscardBits->setEnabled(true);
break;
case slsDetectorDefs::JUNGFRAU:
lblNumStoragecells->setEnabled(true);
spinNumStoragecells->setEnabled(true);
break;
default:
break;
}

View File

@ -40,13 +40,11 @@ void qTabDataOutput::SetupWidgetWindow() {
comboClkDivider->setEnabled(true);
chkParallel->setEnabled(true);
break;
case slsDetectorDefs::MOENCH:
chkTenGiga->setEnabled(true);
break;
case slsDetectorDefs::MYTHEN3:
chkParallel->setEnabled(true);
break;
case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH:
lblClkDivider->setEnabled(true);
comboClkDivider->setEnabled(true);
break;
@ -182,8 +180,10 @@ void qTabDataOutput::BrowseOutputDir() {
LOG(logDEBUG) << "Browsing output directory";
QString directory = QFileDialog::getExistingDirectory(
this, tr("Choose Output Directory "), dispOutputDir->text());
if (!directory.isEmpty())
if (!directory.isEmpty()) {
dispOutputDir->setText(directory);
ForceSetOutputDir();
}
}
void qTabDataOutput::SetOutputDir(bool force) {

View File

@ -111,6 +111,7 @@ void qTabDeveloper::SetupWidgetWindow() {
break;
case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH:
dacWidgets.push_back(
new qDacWidget(this, det, true,
"v vb comp: ", getSLSIndex(detType, tempid++)));
@ -139,72 +140,6 @@ void qTabDeveloper::SetupWidgetWindow() {
"Temperature ADC: ", getSLSIndex(detType, tempid++)));
break;
case slsDetectorDefs::MOENCH:
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vbp_colbuf: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vin_cm: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vb_sda: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vcasc_sfp: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vout_cm: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vipre_cds: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"ibias_sfp: ", getSLSIndex(detType, tempid++)));
break;
case slsDetectorDefs::MYTHEN3:
dacWidgets.push_back(new qDacWidget(
this, det, true, "vcassh: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vth2: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vrshaper: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vrshaper_n: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vipre_out: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vth3: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vth1: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vicin: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vcas: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vrpreamp: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vcal_p: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vipre: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vishaper: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vcal_n: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vtrim: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(new qDacWidget(
this, det, true, "vdcsh: ", getSLSIndex(detType, tempid++)));
dacWidgets.push_back(
new qDacWidget(this, det, true,
"vthreshold: ", getSLSIndex(detType, tempid++)));
adcWidgets.push_back(new qDacWidget(
this, det, false,
"Temperature FPGA: ", getSLSIndex(detType, tempid++)));
break;
case slsDetectorDefs::GOTTHARD2:
dacWidgets.push_back(
new qDacWidget(this, det, true,
@ -386,6 +321,7 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
break;
case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH:
switch (index) {
case 0:
return slsDetectorDefs::VB_COMP;
@ -411,30 +347,6 @@ qTabDeveloper::getSLSIndex(slsDetectorDefs::detectorType detType, int index) {
}
break;
case slsDetectorDefs::MOENCH:
switch (index) {
case 0:
return slsDetectorDefs::VBP_COLBUF;
case 1:
return slsDetectorDefs::VIPRE;
case 2:
return slsDetectorDefs::VIN_CM;
case 3:
return slsDetectorDefs::VB_SDA;
case 4:
return slsDetectorDefs::VCASC_SFP;
case 5:
return slsDetectorDefs::VOUT_CM;
case 6:
return slsDetectorDefs::VIPRE_CDS;
case 7:
return slsDetectorDefs::IBIAS_SFP;
default:
throw RuntimeError(std::string("Unknown dac/adc index") +
std::to_string(index));
}
break;
case slsDetectorDefs::MYTHEN3:
switch (index) {
case 0:

View File

@ -35,7 +35,6 @@ void qTabMeasurement::SetupWidgetWindow() {
// timer to update the progress bar
progressTimer = new QTimer(this);
sampleImplemented = false;
gateImplemented = false;
delayImplemented = true;
startingFnumImplemented = false;
@ -47,18 +46,11 @@ void qTabMeasurement::SetupWidgetWindow() {
// default is triggers and delay (not #bursts and burst period for gotthard2
// in auto mode)
ShowTriggerDelay();
// default is to show samples, mythen3, show gates
ShowGates();
// enabling according to det type
lblBurstMode->hide();
comboBurstMode->hide();
switch (det->getDetectorType().squash()) {
case slsDetectorDefs::MOENCH:
lblNumSamples->setEnabled(true);
spinNumSamples->setEnabled(true);
sampleImplemented = true;
break;
case slsDetectorDefs::EIGER:
delayImplemented = false;
lblNextFrameNumber->setEnabled(true);
@ -66,6 +58,7 @@ void qTabMeasurement::SetupWidgetWindow() {
startingFnumImplemented = true;
break;
case slsDetectorDefs::JUNGFRAU:
case slsDetectorDefs::MOENCH:
lblNextFrameNumber->setEnabled(true);
spinNextFrameNumber->setEnabled(true);
startingFnumImplemented = true;
@ -112,10 +105,6 @@ void qTabMeasurement::Initialization() {
connect(spinNumBursts, SIGNAL(valueChanged(int)), this,
SLOT(SetNumBursts(int)));
}
if (spinNumSamples->isEnabled()) {
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
SLOT(SetNumSamples(int)));
}
if (gateImplemented) {
connect(spinNumGates, SIGNAL(valueChanged(int)), this,
SLOT(SetNumGates(int)));
@ -198,16 +187,6 @@ void qTabMeasurement::ShowTriggerDelay() {
}
}
void qTabMeasurement::ShowGates() {
if (det->getDetectorType().squash() == slsDetectorDefs::MYTHEN3) {
stackedLblSamplesGates->setCurrentWidget(pageLblGates);
stackedSpinSamplesGates->setCurrentWidget(pageSpinGates);
} else {
stackedLblSamplesGates->setCurrentWidget(pageLblSamples);
stackedSpinSamplesGates->setCurrentWidget(pageSpinSamples);
}
}
void qTabMeasurement::SetupTimingMode() {
QStandardItemModel *model =
qobject_cast<QStandardItemModel *>(comboTimingMode->model());
@ -510,31 +489,6 @@ void qTabMeasurement::SetNumBursts(int val) {
&qTabMeasurement::GetNumBursts)
}
void qTabMeasurement::GetNumSamples() {
LOG(logDEBUG) << "Getting number of samples";
disconnect(spinNumSamples, SIGNAL(valueChanged(int)), this,
SLOT(SetNumSamples(int)));
try {
auto retval = det->getNumberOfAnalogSamples().tsquash(
"Inconsistent number of analog samples for all detectors.");
spinNumSamples->setValue(retval);
}
CATCH_DISPLAY("Could not get number of samples.",
"qTabMeasurement::GetNumSamples")
connect(spinNumSamples, SIGNAL(valueChanged(int)), this,
SLOT(SetNumSamples(int)));
}
void qTabMeasurement::SetNumSamples(int val) {
LOG(logINFO) << "Setting number of samples to " << val;
try {
det->setNumberOfAnalogSamples(val);
}
CATCH_HANDLE("Could not set number of samples.",
"qTabMeasurement::SetNumSamples", this,
&qTabMeasurement::GetNumSamples)
}
void qTabMeasurement::GetNumGates() {
LOG(logDEBUG) << "Getting number of gates";
disconnect(spinNumGates, SIGNAL(valueChanged(int)), this,
@ -1003,9 +957,6 @@ void qTabMeasurement::Refresh() {
if (spinBurstPeriod->isEnabled()) {
GetBurstPeriod();
}
if (sampleImplemented) {
GetNumSamples();
}
if (gateImplemented) {
GetNumGates();
}

View File

@ -16,7 +16,7 @@ QString qTabPlot::defaultImageYAxisTitle("Pixel");
QString qTabPlot::defaultImageZAxisTitle("Intensity");
qTabPlot::qTabPlot(QWidget *parent, Detector *detector, qDrawPlot *p)
: QWidget(parent), det(detector), plot(p), is1d(false) {
: QWidget(parent), det(detector), plot(p) {
setupUi(this);
SetupWidgetWindow();
LOG(logDEBUG) << "Plot ready";
@ -57,11 +57,12 @@ void qTabPlot::SetupWidgetWindow() {
chkGainPlot1D->setChecked(true);
plot->EnableGainPlot(true);
break;
case slsDetectorDefs::EIGER:
chkGapPixels->setEnabled(true);
break;
case slsDetectorDefs::JUNGFRAU:
chkGapPixels->setEnabled(true);
chkGainPlot->setEnabled(true);
chkGainPlot->setChecked(true);
plot->EnableGainPlot(true);
break;
case slsDetectorDefs::MOENCH:
chkGainPlot->setEnabled(true);
chkGainPlot->setChecked(true);
plot->EnableGainPlot(true);
@ -69,6 +70,8 @@ void qTabPlot::SetupWidgetWindow() {
default:
break;
}
isGapPixelsAllowed = VerifyGapPixelsAllowed();
chkGapPixels->setEnabled(isGapPixelsAllowed);
Select1DPlot(is1d);
Initialization();
@ -195,6 +198,29 @@ void qTabPlot::Initialization() {
connect(dispZMax, SIGNAL(editingFinished()), this, SLOT(isZMaxModified()));
}
bool qTabPlot::VerifyGapPixelsAllowed() {
try {
switch (det->getDetectorType().squash()) {
case slsDetectorDefs::JUNGFRAU:
return true;
case slsDetectorDefs::EIGER:
if (det->getQuad().squash(false)) {
return true;
}
// full modules
if (det->getModuleGeometry().y % 2 == 0) {
return true;
}
return false;
default:
return false;
}
}
CATCH_DISPLAY("Could not verify if gap pixels allowed.",
"qTabPlot::VerifyGapPixelsAllowed")
return false;
}
void qTabPlot::Select1DPlot(bool enable) {
LOG(logDEBUG) << "Selecting " << (enable ? "1" : "2") << "D Plot";
is1d = enable;
@ -772,23 +798,26 @@ void qTabPlot::Refresh() {
boxFrequency->setEnabled(true);
GetStreamingFrequency();
GetHwm();
// gain plot, gap pixels enable
// gain plot
switch (det->getDetectorType().squash()) {
case slsDetectorDefs::EIGER:
chkGapPixels->setEnabled(true);
GetGapPixels();
break;
case slsDetectorDefs::JUNGFRAU:
chkGainPlot->setEnabled(true);
chkGapPixels->setEnabled(true);
GetGapPixels();
break;
case slsDetectorDefs::MOENCH:
chkGainPlot->setEnabled(true);
break;
case slsDetectorDefs::GOTTHARD2:
chkGainPlot1D->setEnabled(true);
break;
default:
break;
}
// gap pixels
if (isGapPixelsAllowed) {
chkGapPixels->setEnabled(true);
GetGapPixels();
}
} else {
boxFrequency->setEnabled(false);
chkGainPlot->setEnabled(false);

View File

@ -92,7 +92,8 @@ void qTabSettings::SetupWidgetWindow() {
comboDynamicRange->setEnabled(true);
lblThreshold->setEnabled(true);
spinThreshold->setEnabled(true);
} else if (detType == slsDetectorDefs::JUNGFRAU) {
} else if (detType == slsDetectorDefs::JUNGFRAU ||
detType == slsDetectorDefs::MOENCH) {
lblSpinHV->show();
spinHV->show();
lblGainMode->setEnabled(true);
@ -100,9 +101,6 @@ void qTabSettings::SetupWidgetWindow() {
} else if (detType == slsDetectorDefs::GOTTHARD) {
comboHV->show();
lblComboHV->show();
} else if (detType == slsDetectorDefs::MOENCH) {
lblSpinHV->show();
spinHV->show();
} else if (detType == slsDetectorDefs::GOTTHARD2) {
lblSpinHV->show();
spinHV->show();

View File

@ -3,12 +3,12 @@
# empty branch = developer branch in updateAPIVersion.sh
branch=""
det_list=("ctbDetectorServer"
"gotthardDetectorServer"
"gotthard2DetectorServer"
"jungfrauDetectorServer"
"mythen3DetectorServer"
"moenchDetectorServer"
det_list=("ctbDetectorServer
gotthardDetectorServer
gotthard2DetectorServer
jungfrauDetectorServer
mythen3DetectorServer
moenchDetectorServer"
)
usage="\nUsage: compileAllServers.sh [server|all(opt)] [branch(opt)]. \n\tNo arguments mean all servers with 'developer' branch. \n\tNo 'branch' input means 'developer branch'"
@ -25,9 +25,11 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
else
# only one server
# arg not in list
if [[ $det_list != *$1* ]]; then
echo $det_list | grep -w -q $1
#if [[ $det_list != *$1* ]]; then
if ! [[ $? ]] ; then
echo -e "Invalid argument 1: $1. $usage"
return -1
return 1
fi
declare -a det=("${1}")
#echo "Compiling only $1"
@ -37,14 +39,14 @@ elif [ $# -eq 1 ] || [ $# -eq 2 ]; then
# arg in list
if [[ $det_list == *$2* ]]; then
echo -e "Invalid argument 2: $2. $usage"
return -1
return 1
fi
branch+=$2
#echo "with branch $branch"
fi
else
echo -e "Too many arguments.$usage"
return -1
return 1
fi
declare -a deterror=("OK" "OK" "OK" "OK" "OK" "OK")

View File

@ -99,7 +99,7 @@ void basictests() {
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
"Could not map to memory. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
return;
@ -109,8 +109,10 @@ void basictests() {
if ((!debugflag) && (!updateFlag) &&
((checkType() == FAIL) || (testFpga() == FAIL) ||
(testBus() == FAIL))) {
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
"Dangerous to continue.\n");
sprintf(initErrorMessage,
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
"Check Firmware. (Firmware version:0x%llx) \n",
getFirmwareVersion());
LOG(logERROR, ("%s\n\n", initErrorMessage));
initError = FAIL;
return;
@ -446,7 +448,7 @@ void initStopServer() {
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;

View File

@ -2206,6 +2206,36 @@ int Feb_Control_GetRightFPGATemp() {
return (int)temperature;
}
int64_t Feb_Control_GetFrontLeftFirmwareVersion() {
if (!Feb_Control_activated) {
return 0;
}
unsigned int value = 0;
if (!Feb_Interface_ReadRegister(Feb_Control_leftAddress, FEB_REG_STATUS,
&value)) {
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get left feb "
"fw version\n"));
return 0;
}
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
FEB_REG_STATUS_FW_VERSION_OFST);
}
int64_t Feb_Control_GetFrontRightFirmwareVersion() {
if (!Feb_Control_activated) {
return 0;
}
unsigned int value = 0;
if (!Feb_Interface_ReadRegister(Feb_Control_rightAddress, FEB_REG_STATUS,
&value)) {
LOG(logERROR, ("Trouble reading FEB_REG_STATUS reg to get right feb "
"fw version\n"));
return 0;
}
return ((value & FEB_REG_STATUS_FW_VERSION_MSK) >>
FEB_REG_STATUS_FW_VERSION_OFST);
}
int64_t Feb_Control_GetMeasuredPeriod() {
if (!Feb_Control_activated) {
return 0;

View File

@ -119,5 +119,7 @@ int Feb_Control_PrintCorrectedValues();
// adcs
int Feb_Control_GetLeftFPGATemp();
int Feb_Control_GetRightFPGATemp();
int64_t Feb_Control_GetFrontLeftFirmwareVersion();
int64_t Feb_Control_GetFrontRightFirmwareVersion();
int64_t Feb_Control_GetMeasuredPeriod();
int64_t Feb_Control_GetSubMeasuredPeriod();

View File

@ -46,6 +46,8 @@
#define FEB_REG_STATUS_WAIT_FOR_TRGGR_MSK (0x00000001 << FEB_REG_STATUS_WAIT_FOR_TRGGR_OFST)
#define FEB_REG_STATUS_ACQ_DONE_OFST (6)
#define FEB_REG_STATUS_ACQ_DONE_MSK (0x00000001 << FEB_REG_STATUS_ACQ_DONE_OFST)
#define FEB_REG_STATUS_FW_VERSION_OFST (8)
#define FEB_REG_STATUS_FW_VERSION_MSK (0x000000FF << FEB_REG_STATUS_FW_VERSION_OFST)
#define FEB_REG_STATUS_TEMP_OFST (16)
#define FEB_REG_STATUS_TEMP_MSK (0x0000FFFF << FEB_REG_STATUS_TEMP_OFST)

View File

@ -216,6 +216,27 @@ u_int64_t getFirmwareVersion() {
#endif
}
uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition) {
uint64_t retval = 0;
#ifndef VIRTUAL
sharedMemory_lockLocalLink();
switch (fpgaPosition) {
case FRONT_LEFT:
retval = Feb_Control_GetFrontLeftFirmwareVersion(fpgaPosition);
break;
case FRONT_RIGHT:
retval = Feb_Control_GetFrontRightFirmwareVersion(fpgaPosition);
break;
default:
LOG(logERROR,
("unknown index for fpga position to read firmware version\n"));
retval = -1;
}
sharedMemory_unlockLocalLink();
#endif
return retval;
}
u_int64_t getFirmwareAPIVersion() {
#ifdef VIRTUAL
return 0;
@ -1457,6 +1478,12 @@ int setHighVoltage(int val) {
sharedMemory_unlockLocalLink();
return -3;
}
// need to read the file twice to get the proper value
if (!Feb_Control_GetHighVoltage(&eiger_highvoltage)) {
LOG(logERROR, ("Could not read high voltage\n"));
sharedMemory_unlockLocalLink();
return -3;
}
sharedMemory_unlockLocalLink();
// tolerance of 5

View File

@ -5,7 +5,7 @@
#define LINKED_SERVER_NAME "eigerDetectorServer"
#define REQUIRED_FIRMWARE_VERSION (30)
#define REQUIRED_FIRMWARE_VERSION (31)
// virtual ones renamed for consistency
// real ones keep previous name for compatibility (already in production)
#ifdef VIRTUAL

View File

@ -93,7 +93,7 @@ void basictests() {
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
"Could not map to memory. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
return;
@ -105,8 +105,8 @@ void basictests() {
(checkType() == FAIL) || (testFpga() == FAIL) ||
(testBus() == FAIL))) {
sprintf(initErrorMessage,
"Could not pass basic tests of FPGA and bus. Dangerous to "
"continue. (Firmware version:0x%llx) \n",
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
"Check Firmware. (Firmware version:0x%llx) \n",
getFirmwareVersion());
LOG(logERROR, ("%s\n\n", initErrorMessage));
initError = FAIL;
@ -396,7 +396,7 @@ void initStopServer() {
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;

View File

@ -87,7 +87,7 @@ void basictests() {
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
"Could not map to memory. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
}
@ -97,7 +97,7 @@ void basictests() {
((checkType() == FAIL) || (testFpga() == FAIL) ||
(testBus() == FAIL))) {
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
"Dangerous to continue.\n");
"Cannot proceed. Check Firmware.\n");
LOG(logERROR, ("%s\n\n", initErrorMessage));
initError = FAIL;
return;
@ -381,7 +381,7 @@ void initStopServer() {
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;

View File

@ -82,7 +82,7 @@ void basictests() {
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
"Could not map to memory. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
}
@ -91,8 +91,10 @@ void basictests() {
if ((!debugflag) && (!updateFlag) &&
((checkType() == FAIL) || (testFpga() == FAIL) ||
(testBus() == FAIL))) {
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
"Dangerous to continue.\n");
sprintf(initErrorMessage,
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
"Check Firmware. (Firmware version:0x%llx) \n",
getFirmwareVersion());
LOG(logERROR, ("%s\n\n", initErrorMessage));
initError = FAIL;
return;
@ -428,7 +430,7 @@ void initStopServer() {
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
"Stop Server: Map Fail. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;
@ -2798,6 +2800,7 @@ int softwareTrigger(int block) {
LOG(logINFO, ("Sending Software Trigger\n"));
bus_w(CONTROL_REG, bus_r(CONTROL_REG) | CONTROL_SOFTWARE_TRIGGER_MSK);
bus_w(CONTROL_REG, bus_r(CONTROL_REG) & ~CONTROL_SOFTWARE_TRIGGER_MSK);
#ifndef VIRTUAL
// block till frame is sent out

View File

@ -8,35 +8,28 @@ add_executable(moenchDetectorServer_virtual
../slsDetectorServer/src/blackfin.c
../slsDetectorServer/src/common.c
../slsDetectorServer/src/commonServerFunctions.c
../slsDetectorServer/src/communication_funcs_UDP.c
../slsDetectorServer/src/UDPPacketHeaderGenerator.c
../slsDetectorServer/src/AD9257.c
../slsDetectorServer/src/ALTERA_PLL.c
../slsDetectorServer/src/LTC2620.c
../slsDetectorServer/src/MAX1932.c
../slsDetectorServer/src/programViaBlackfin.c
../slsDetectorServer/src/loadPattern.c
../slsDetectorServer/src/programViaBlackfin.c
../slsDetectorServer/src/communication_funcs_UDP.c
../slsDetectorServer/src/sharedMemory.c
../../slsSupportLib/src/md5.c
)
include_directories(
target_include_directories(moenchDetectorServer_virtual
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
../slsDetectorServer/include
../../slsSupportLib/include
../../slsDetectorSoftware/include/sls/
)
target_include_directories(moenchDetectorServer_virtual
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
)
target_compile_definitions(moenchDetectorServer_virtual
PUBLIC MOENCHD VIRTUAL STOP_SERVER
PUBLIC MOENCHD VIRTUAL STOP_SERVER #TEST_MOD_GEOMETRY
)
target_link_libraries(moenchDetectorServer_virtual
PUBLIC pthread rt slsProjectCSettings
m
)
set_target_properties(moenchDetectorServer_virtual PROPERTIES
@ -44,7 +37,9 @@ set_target_properties(moenchDetectorServer_virtual PROPERTIES
)
install(TARGETS moenchDetectorServer_virtual
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
EXPORT "${TARGETS_EXPORT_NAME}"
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
configure_file(DefaultPattern_moench.txt ${CMAKE_BINARY_DIR}/bin/DefaultPattern_moench.txt COPYONLY)
configure_file(config_moench.txt ${CMAKE_BINARY_DIR}/bin/config_moench.txt COPYONLY)
configure_file(detid_moench.txt ${CMAKE_BINARY_DIR}/bin/detid_moench.txt COPYONLY)

View File

@ -1,301 +0,0 @@
patword 0x0000 0x0008599f0418503a
patword 0x0001 0x0008599f0418503a
patword 0x0002 0x000859960418503a
patword 0x0003 0x000859960418503a
patword 0x0004 0x000859960418503a
patword 0x0005 0x000859960418503a
patword 0x0006 0x000859960418503a
patword 0x0007 0x000859960418503a
patword 0x0008 0x000859960418503a
patword 0x0009 0x000859960418503a
patword 0x000a 0x000859960418503a
patword 0x000b 0x000859960418503a
patword 0x000c 0x000859960418503a
patword 0x000d 0x000859960418503a
patword 0x000e 0x000859960418503a
patword 0x000f 0x000859960418503a
patword 0x0010 0x000859960418503a
patword 0x0011 0x000859960418503a
patword 0x0012 0x000859960418503a
patword 0x0013 0x000859960418503a
patword 0x0014 0x000859960418503a
patword 0x0015 0x000859960418503a
patword 0x0016 0x000819960418501a
patword 0x0017 0x000819960418501a
patword 0x0018 0x000819960418501a
patword 0x0019 0x000819960418501a
patword 0x001a 0x000819960418501a
patword 0x001b 0x000819960418501a
patword 0x001c 0x000819960418501a
patword 0x001d 0x000819960418501a
patword 0x001e 0x000819960418501a
patword 0x001f 0x000819960418501a
patword 0x0020 0x000819960418501a
patword 0x0021 0x000819960418501a
patword 0x0022 0x000819960418501a
patword 0x0023 0x000819960418501a
patword 0x0024 0x000819960418501a
patword 0x0025 0x000819960418501a
patword 0x0026 0x000819960418501a
patword 0x0027 0x000819960418501a
patword 0x0028 0x000819960418501a
patword 0x0029 0x000819960418501a
patword 0x002a 0x000819960418501a
patword 0x002b 0x000819960418501a
patword 0x002c 0x000819960418501a
patword 0x002d 0x000819960418501a
patword 0x002e 0x000819960418501a
patword 0x002f 0x000819960418501a
patword 0x0030 0x000819960008501a
patword 0x0031 0x000819960008501a
patword 0x0032 0x000819960008501a
patword 0x0033 0x000819960008501a
patword 0x0034 0x000819960008501a
patword 0x0035 0x000819960008501a
patword 0x0036 0x000819960008501a
patword 0x0037 0x000819960008501a
patword 0x0038 0x000819960008501a
patword 0x0039 0x000819960008501a
patword 0x003a 0x000819960008501a
patword 0x003b 0x000819960008501a
patword 0x003c 0x000819960008501a
patword 0x003d 0x000819960008501a
patword 0x003e 0x000819960008501a
patword 0x003f 0x000819960008501a
patword 0x0040 0x000819960008501a
patword 0x0041 0x000819960008501a
patword 0x0042 0x000819960008501a
patword 0x0043 0x000819960008501a
patword 0x0044 0x0008199f0008501a
patword 0x0045 0x0008199f0008501a
patword 0x0046 0x0008199f0008501a
patword 0x0047 0x0008199f0008501a
patword 0x0048 0x0008199f0008501a
patword 0x0049 0x0008199f0008501a
patword 0x004a 0x0008199f0008501a
patword 0x004b 0x0008199f0008501a
patword 0x004c 0x0008199f0008501a
patword 0x004d 0x0008199f0008501a
patword 0x004e 0x0008199f0008501a
patword 0x004f 0x0008199f0008501a
patword 0x0050 0x0008199f0008501a
patword 0x0051 0x0008199f0008501a
patword 0x0052 0x0008199f0008501a
patword 0x0053 0x0008199f0008501a
patword 0x0054 0x0008199f0008501a
patword 0x0055 0x0008199f0008501a
patword 0x0056 0x0008199f0008501a
patword 0x0057 0x0008199f0008501a
patword 0x0058 0x0008599f0008503a
patword 0x0059 0x0008599f0008503a
patword 0x005a 0x000c599f000850ba
patword 0x005b 0x000c599f000850ba
patword 0x005c 0x000c599f000850ba
patword 0x005d 0x000c599f000850ba
patword 0x005e 0x000c599f000850ba
patword 0x005f 0x000c599f000850ba
patword 0x0060 0x000c599f000850ba
patword 0x0061 0x000c599f000850ba
patword 0x0062 0x000c599f000850ba
patword 0x0063 0x000c599f000850ba
patword 0x0064 0x000c599f000850ba
patword 0x0065 0x000c599f000850ba
patword 0x0066 0x000c599f000850ba
patword 0x0067 0x000c599f000850ba
patword 0x0068 0x000c599f000850ba
patword 0x0069 0x000c599f000850ba
patword 0x006a 0x000c599f000850ba
patword 0x006b 0x000c599f000850ba
patword 0x006c 0x000c599f000850ba
patword 0x006d 0x000c599f000850ba
patword 0x006e 0x000c799f010858ba
patword 0x006f 0x000c799f010858ba
patword 0x0070 0x000c599f000850ba
patword 0x0071 0x000c599f000850ba
patword 0x0072 0x000c599f000850ba
patword 0x0073 0x000c599f000850ba
patword 0x0074 0x000c599f000850ba
patword 0x0075 0x000c599f000850ba
patword 0x0076 0x000c599f000850ba
patword 0x0077 0x000c599f000850ba
patword 0x0078 0x000c599f000850ba
patword 0x0079 0x000c599f000850ba
patword 0x007a 0x000c599f000850ba
patword 0x007b 0x000c599f000850ba
patword 0x007c 0x000c599f000850ba
patword 0x007d 0x000c599f000850ba
patword 0x007e 0x000c599f000850ba
patword 0x007f 0x000c599f000850ba
patword 0x0080 0x000c599f000850ba
patword 0x0081 0x000c599f000850ba
patword 0x0082 0x000c599f000850ba
patword 0x0083 0x000c599f000850ba
patword 0x0084 0x000c599f000850ba
patword 0x0085 0x000c599f000850ba
patword 0x0086 0x000c599f400850ba
patword 0x0087 0x000c599f400850ba
patword 0x0088 0x000c599f600850ba
patword 0x0089 0x000c599f400850ba
patword 0x008a 0x000c599f400850ba
patword 0x008b 0x000c599f400850ba
patword 0x008c 0x840c599f682e50ba
patword 0x008d 0x840c599f482850ba
patword 0x008e 0x840c599f000e50ba
patword 0x008f 0x840c599f000850ba
patword 0x0090 0x840c599f000e50ba
patword 0x0091 0x840c599f000850ba
patword 0x0092 0x840c599f000e50ba
patword 0x0093 0x840c599f000850ba
patword 0x0094 0x840c599f000e50ba
patword 0x0095 0x840c599f000850ba
patword 0x0096 0x840c599f000e50ba
patword 0x0097 0x840c599f000850ba
patword 0x0098 0x840c599f000e50ba
patword 0x0099 0x840c599f000850ba
patword 0x009a 0x840c599f000e50ba
patword 0x009b 0x840c599f000850ba
patword 0x009c 0x840c599f000e50ba
patword 0x009d 0x840c599f000850ba
patword 0x009e 0x840c599f000e50ba
patword 0x009f 0x840c599f000850ba
patword 0x00a0 0x840c599f000e50ba
patword 0x00a1 0x840c599f000850ba
patword 0x00a2 0x840c599f000e50ba
patword 0x00a3 0x840c599f000850ba
patword 0x00a4 0x840c599f000e50ba
patword 0x00a5 0x840c599f000850ba
patword 0x00a6 0x840c599f200e50ba
patword 0x00a7 0x840c599f000850ba
patword 0x00a8 0x840c599f000e50ba
patword 0x00a9 0x840c599f000850ba
patword 0x00aa 0x840c599f000e50ba
patword 0x00ab 0x840c599f000850ba
patword 0x00ac 0x840c599f000e50ba
patword 0x00ad 0x840c599f000850ba
patword 0x00ae 0x840c599f000e50ba
patword 0x00af 0x840c599f000850ba
patword 0x00b0 0x840c599f000e50ba
patword 0x00b1 0x840c599f000850ba
patword 0x00b2 0x840c599f000e50ba
patword 0x00b3 0x840c599f000850ba
patword 0x00b4 0x840c599f000e50ba
patword 0x00b5 0x840c599f000850ba
patword 0x00b6 0x840c599f000e50ba
patword 0x00b7 0x840c599f000850ba
patword 0x00b8 0x840c599f000e50ba
patword 0x00b9 0x840c599f000850ba
patword 0x00ba 0x840c599f000e50ba
patword 0x00bb 0x840c599f000850ba
patword 0x00bc 0x840c599f000e50ba
patword 0x00bd 0x840c599f000850ba
patword 0x00be 0x840c599f282e50ba
patword 0x00bf 0x840c599f082850ba
patword 0x00c0 0x840c599f000e50ba
patword 0x00c1 0x840c599f000850ba
patword 0x00c2 0x840c599f000e50ba
patword 0x00c3 0x840c599f000850ba
patword 0x00c4 0x840c599f000e50ba
patword 0x00c5 0x840c599f000850ba
patword 0x00c6 0x840c599f000e50ba
patword 0x00c7 0x840c599f000850ba
patword 0x00c8 0x840c599f000e50ba
patword 0x00c9 0x840c599f000850ba
patword 0x00ca 0x840c599f000e50ba
patword 0x00cb 0x840c599f000850ba
patword 0x00cc 0x840c599f000e50ba
patword 0x00cd 0x840c599f000850ba
patword 0x00ce 0x840c599f000e50ba
patword 0x00cf 0x840c599f000850ba
patword 0x00d0 0x840c599f000e50ba
patword 0x00d1 0x840c599f000850ba
patword 0x00d2 0x840c599f000e50ba
patword 0x00d3 0x840c599f000850ba
patword 0x00d4 0x840c599f000e50ba
patword 0x00d5 0x840c599f000850ba
patword 0x00d6 0x840c599f000e50ba
patword 0x00d7 0x840c599f000850ba
patword 0x00d8 0x840c599f200e50ba
patword 0x00d9 0x840c599f000850ba
patword 0x00da 0x840c599f000e50ba
patword 0x00db 0x840c599f000850ba
patword 0x00dc 0x840c599f000e50ba
patword 0x00dd 0x840c599f000850ba
patword 0x00de 0x840c599f000e50ba
patword 0x00df 0x840c599f000850ba
patword 0x00e0 0x840c599f000e50ba
patword 0x00e1 0x840c599f000850ba
patword 0x00e2 0x840c599f000e50ba
patword 0x00e3 0x840c599f000850ba
patword 0x00e4 0x840c599f000e50ba
patword 0x00e5 0x840c599f000850ba
patword 0x00e6 0x840c599f000e50ba
patword 0x00e7 0x840c599f000850ba
patword 0x00e8 0x840c599f000e50ba
patword 0x00e9 0x840c599f000850ba
patword 0x00ea 0x840c599f000e50ba
patword 0x00eb 0x840c599f000850ba
patword 0x00ec 0x840c599f000e50ba
patword 0x00ed 0x840c599f000850ba
patword 0x00ee 0x840c599f000e50ba
patword 0x00ef 0x840c599f000850ba
patword 0x00f0 0x040c599f000850ba
patword 0x00f1 0x040c599f000850ba
patword 0x00f2 0x000c599f000850ba
patword 0x00f3 0x000c599f000850ba
patword 0x00f4 0x0008599f200e503a
patword 0x00f5 0x0008599f0008503a
patword 0x00f6 0x0008599f200e503a
patword 0x00f7 0x0008599f0008503a
patword 0x00f8 0x0008599f0008503a
patword 0x00f9 0x0008599f0008503a
patword 0x00fa 0x0008599f0008503a
patword 0x00fb 0x0008599f0008503a
patword 0x00fc 0x0008599f0008503a
patword 0x00fd 0x0008599f0008503a
patword 0x00fe 0x0008599f0008503a
patword 0x00ff 0x0008599f0008503a
patword 0x0100 0x0008599f0008503a
patword 0x0101 0x0008599f0008503a
patword 0x0102 0x0008599f0008503a
patword 0x0103 0x0008599f0008503a
patword 0x0104 0x0008599f0008503a
patword 0x0105 0x0008599f0008503a
patword 0x0106 0x0008599f0008503a
patword 0x0107 0x0008599f0008503a
patword 0x0108 0x0008599f0008503a
patword 0x0109 0x0008599f0008503a
patword 0x010a 0x0008599f0008503a
patword 0x010b 0x0008599f0008503a
patword 0x010c 0x0008599f0008503a
patword 0x010d 0x0008599f0008503a
patword 0x010e 0x0008599f0008503a
patword 0x010f 0x0008599f0008503a
patword 0x0110 0x0008599f0008503a
patword 0x0111 0x0008599f0008503a
patioctrl 0x8f0effff6dbffdbf
patlimits 0x0000 0x0110
patloop 0 0x00be 0x00ef
patnloop 0 199
patloop 1 0x0400 0x0400
patnloop 1 0
patloop 2 0x0400 0x0400
patnloop 2 0
patwait 0 0x002e
patwaittime 0 800
patwait 1 0x0400
patwaittime 1 0
patwait 2 0x0400
patwaittime 2 0
patloop 3 0x1fff 0x1fff
patnloop 3 0
patloop 4 0x1fff 0x1fff
patnloop 4 0
patloop 5 0x1fff 0x1fff
patnloop 5 0
patwait 3 0x1fff
patwaittime 3 0
patwait 4 0x1fff
patwaittime 4 0
patwait 5 0x1fff
patwaittime 5 0

View File

@ -4,22 +4,21 @@ current_dir = $(shell pwd)
main_inc = ../slsDetectorServer/include/
main_src = ../slsDetectorServer/src/
support_lib = ../../slsSupportLib/include/
det_lib = ../../slsDetectorSoftware/include/sls/
md5_dir = ../../slsSupportLib/src/
CROSS = bfin-uclinux-
CC = $(CROSS)gcc
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DVERBOSEI #-DVERBOSE
LDLIBS += -lm -lrt -pthread
PROGS = moenchDetectorServer
DESTDIR ?= bin
INSTMODE = 0777
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)communication_funcs_UDP.c $(main_src)UDPPacketHeaderGenerator.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)loadPattern.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
SRCS = slsDetectorFunctionList.c
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)blackfin.c $(main_src)common.c $(main_src)commonServerFunctions.c $(main_src)AD9257.c $(main_src)ALTERA_PLL.c $(main_src)LTC2620.c $(main_src)MAX1932.c $(main_src)programViaBlackfin.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
OBJS = $(SRCS:.c=.o)
all: clean $(PROGS)
version: clean versioning $(PROGS)
@ -35,12 +34,12 @@ versioning:
$(PROGS): $(OBJS)
# echo $(OBJS)
mkdir -p $(DESTDIR)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
mv $(PROGS) $(DESTDIR)
cp DefaultPattern_moench.txt $(DESTDIR)
cp config_moench.txt $(DESTDIR)
cp detid_moench.txt $(DESTDIR)
rm *.gdb
rm $(main_src)*.o
rm *.o $(md5_dir)*.o
rm $(main_src)*.o $(md5_dir)*.o
clean:
rm -rf $(DESTDIR)/$(PROGS) *.o *.gdb $(main_src)*.o $(md5_dir)*.o

File diff suppressed because it is too large Load Diff

View File

@ -1,301 +0,0 @@
patword 0x0000 0x0008599f0418503a
patword 0x0001 0x0008599f0418503a
patword 0x0002 0x000859960418503a
patword 0x0003 0x000859960418503a
patword 0x0004 0x000859960418503a
patword 0x0005 0x000859960418503a
patword 0x0006 0x000859960418503a
patword 0x0007 0x000859960418503a
patword 0x0008 0x000859960418503a
patword 0x0009 0x000859960418503a
patword 0x000a 0x000859960418503a
patword 0x000b 0x000859960418503a
patword 0x000c 0x000859960418503a
patword 0x000d 0x000859960418503a
patword 0x000e 0x000859960418503a
patword 0x000f 0x000859960418503a
patword 0x0010 0x000859960418503a
patword 0x0011 0x000859960418503a
patword 0x0012 0x000859960418503a
patword 0x0013 0x000859960418503a
patword 0x0014 0x000859960418503a
patword 0x0015 0x000859960418503a
patword 0x0016 0x000819960418501a
patword 0x0017 0x000819960418501a
patword 0x0018 0x000819960418501a
patword 0x0019 0x000819960418501a
patword 0x001a 0x000819960418501a
patword 0x001b 0x000819960418501a
patword 0x001c 0x000819960418501a
patword 0x001d 0x000819960418501a
patword 0x001e 0x000819960418501a
patword 0x001f 0x000819960418501a
patword 0x0020 0x000819960418501a
patword 0x0021 0x000819960418501a
patword 0x0022 0x000819960418501a
patword 0x0023 0x000819960418501a
patword 0x0024 0x000819960418501a
patword 0x0025 0x000819960418501a
patword 0x0026 0x000819960418501a
patword 0x0027 0x000819960418501a
patword 0x0028 0x000819960418501a
patword 0x0029 0x000819960418501a
patword 0x002a 0x000819960418501a
patword 0x002b 0x000819960418501a
patword 0x002c 0x000819960418501a
patword 0x002d 0x000819960418501a
patword 0x002e 0x000819960418501a
patword 0x002f 0x000819960418501a
patword 0x0030 0x000819960008501a
patword 0x0031 0x000819960008501a
patword 0x0032 0x000819960008501a
patword 0x0033 0x000819960008501a
patword 0x0034 0x000819960008501a
patword 0x0035 0x000819960008501a
patword 0x0036 0x000819960008501a
patword 0x0037 0x000819960008501a
patword 0x0038 0x000819960008501a
patword 0x0039 0x000819960008501a
patword 0x003a 0x000819960008501a
patword 0x003b 0x000819960008501a
patword 0x003c 0x000819960008501a
patword 0x003d 0x000819960008501a
patword 0x003e 0x000819960008501a
patword 0x003f 0x000819960008501a
patword 0x0040 0x000819960008501a
patword 0x0041 0x000819960008501a
patword 0x0042 0x000819960008501a
patword 0x0043 0x000819960008501a
patword 0x0044 0x0008199f0008501a
patword 0x0045 0x0008199f0008501a
patword 0x0046 0x0008199f0008501a
patword 0x0047 0x0008199f0008501a
patword 0x0048 0x0008199f0008501a
patword 0x0049 0x0008199f0008501a
patword 0x004a 0x0008199f0008501a
patword 0x004b 0x0008199f0008501a
patword 0x004c 0x0008199f0008501a
patword 0x004d 0x0008199f0008501a
patword 0x004e 0x0008199f0008501a
patword 0x004f 0x0008199f0008501a
patword 0x0050 0x0008199f0008501a
patword 0x0051 0x0008199f0008501a
patword 0x0052 0x0008199f0008501a
patword 0x0053 0x0008199f0008501a
patword 0x0054 0x0008199f0008501a
patword 0x0055 0x0008199f0008501a
patword 0x0056 0x0008199f0008501a
patword 0x0057 0x0008199f0008501a
patword 0x0058 0x0008599f0008503a
patword 0x0059 0x0008599f0008503a
patword 0x005a 0x000c599f000850ba
patword 0x005b 0x000c599f000850ba
patword 0x005c 0x000c599f000850ba
patword 0x005d 0x000c599f000850ba
patword 0x005e 0x000c599f000850ba
patword 0x005f 0x000c599f000850ba
patword 0x0060 0x000c599f000850ba
patword 0x0061 0x000c599f000850ba
patword 0x0062 0x000c599f000850ba
patword 0x0063 0x000c599f000850ba
patword 0x0064 0x000c599f000850ba
patword 0x0065 0x000c599f000850ba
patword 0x0066 0x000c599f000850ba
patword 0x0067 0x000c599f000850ba
patword 0x0068 0x000c599f000850ba
patword 0x0069 0x000c599f000850ba
patword 0x006a 0x000c599f000850ba
patword 0x006b 0x000c599f000850ba
patword 0x006c 0x000c599f000850ba
patword 0x006d 0x000c599f000850ba
patword 0x006e 0x000c799f010858ba
patword 0x006f 0x000c799f010858ba
patword 0x0070 0x000c599f000850ba
patword 0x0071 0x000c599f000850ba
patword 0x0072 0x000c599f000850ba
patword 0x0073 0x000c599f000850ba
patword 0x0074 0x000c599f000850ba
patword 0x0075 0x000c599f000850ba
patword 0x0076 0x000c599f000850ba
patword 0x0077 0x000c599f000850ba
patword 0x0078 0x000c599f000850ba
patword 0x0079 0x000c599f000850ba
patword 0x007a 0x000c599f000850ba
patword 0x007b 0x000c599f000850ba
patword 0x007c 0x000c599f000850ba
patword 0x007d 0x000c599f000850ba
patword 0x007e 0x000c599f000850ba
patword 0x007f 0x000c599f000850ba
patword 0x0080 0x000c599f000850ba
patword 0x0081 0x000c599f000850ba
patword 0x0082 0x000c599f000850ba
patword 0x0083 0x000c599f000850ba
patword 0x0084 0x000c599f000850ba
patword 0x0085 0x000c599f000850ba
patword 0x0086 0x000c599f400850ba
patword 0x0087 0x000c599f400850ba
patword 0x0088 0x000c599f600850ba
patword 0x0089 0x000c599f400850ba
patword 0x008a 0x000c599f400850ba
patword 0x008b 0x000c599f400850ba
patword 0x008c 0x840c599f682e50ba
patword 0x008d 0x840c599f482850ba
patword 0x008e 0x840c599f000e50ba
patword 0x008f 0x840c599f000850ba
patword 0x0090 0x840c599f000e50ba
patword 0x0091 0x840c599f000850ba
patword 0x0092 0x840c599f000e50ba
patword 0x0093 0x840c599f000850ba
patword 0x0094 0x840c599f000e50ba
patword 0x0095 0x840c599f000850ba
patword 0x0096 0x840c599f000e50ba
patword 0x0097 0x840c599f000850ba
patword 0x0098 0x840c599f000e50ba
patword 0x0099 0x840c599f000850ba
patword 0x009a 0x840c599f000e50ba
patword 0x009b 0x840c599f000850ba
patword 0x009c 0x840c599f000e50ba
patword 0x009d 0x840c599f000850ba
patword 0x009e 0x840c599f000e50ba
patword 0x009f 0x840c599f000850ba
patword 0x00a0 0x840c599f000e50ba
patword 0x00a1 0x840c599f000850ba
patword 0x00a2 0x840c599f000e50ba
patword 0x00a3 0x840c599f000850ba
patword 0x00a4 0x840c599f000e50ba
patword 0x00a5 0x840c599f000850ba
patword 0x00a6 0x840c599f200e50ba
patword 0x00a7 0x840c599f000850ba
patword 0x00a8 0x840c599f000e50ba
patword 0x00a9 0x840c599f000850ba
patword 0x00aa 0x840c599f000e50ba
patword 0x00ab 0x840c599f000850ba
patword 0x00ac 0x840c599f000e50ba
patword 0x00ad 0x840c599f000850ba
patword 0x00ae 0x840c599f000e50ba
patword 0x00af 0x840c599f000850ba
patword 0x00b0 0x840c599f000e50ba
patword 0x00b1 0x840c599f000850ba
patword 0x00b2 0x840c599f000e50ba
patword 0x00b3 0x840c599f000850ba
patword 0x00b4 0x840c599f000e50ba
patword 0x00b5 0x840c599f000850ba
patword 0x00b6 0x840c599f000e50ba
patword 0x00b7 0x840c599f000850ba
patword 0x00b8 0x840c599f000e50ba
patword 0x00b9 0x840c599f000850ba
patword 0x00ba 0x840c599f000e50ba
patword 0x00bb 0x840c599f000850ba
patword 0x00bc 0x840c599f000e50ba
patword 0x00bd 0x840c599f000850ba
patword 0x00be 0x840c599f282e50ba
patword 0x00bf 0x840c599f082850ba
patword 0x00c0 0x840c599f000e50ba
patword 0x00c1 0x840c599f000850ba
patword 0x00c2 0x840c599f000e50ba
patword 0x00c3 0x840c599f000850ba
patword 0x00c4 0x840c599f000e50ba
patword 0x00c5 0x840c599f000850ba
patword 0x00c6 0x840c599f000e50ba
patword 0x00c7 0x840c599f000850ba
patword 0x00c8 0x840c599f000e50ba
patword 0x00c9 0x840c599f000850ba
patword 0x00ca 0x840c599f000e50ba
patword 0x00cb 0x840c599f000850ba
patword 0x00cc 0x840c599f000e50ba
patword 0x00cd 0x840c599f000850ba
patword 0x00ce 0x840c599f000e50ba
patword 0x00cf 0x840c599f000850ba
patword 0x00d0 0x840c599f000e50ba
patword 0x00d1 0x840c599f000850ba
patword 0x00d2 0x840c599f000e50ba
patword 0x00d3 0x840c599f000850ba
patword 0x00d4 0x840c599f000e50ba
patword 0x00d5 0x840c599f000850ba
patword 0x00d6 0x840c599f000e50ba
patword 0x00d7 0x840c599f000850ba
patword 0x00d8 0x840c599f200e50ba
patword 0x00d9 0x840c599f000850ba
patword 0x00da 0x840c599f000e50ba
patword 0x00db 0x840c599f000850ba
patword 0x00dc 0x840c599f000e50ba
patword 0x00dd 0x840c599f000850ba
patword 0x00de 0x840c599f000e50ba
patword 0x00df 0x840c599f000850ba
patword 0x00e0 0x840c599f000e50ba
patword 0x00e1 0x840c599f000850ba
patword 0x00e2 0x840c599f000e50ba
patword 0x00e3 0x840c599f000850ba
patword 0x00e4 0x840c599f000e50ba
patword 0x00e5 0x840c599f000850ba
patword 0x00e6 0x840c599f000e50ba
patword 0x00e7 0x840c599f000850ba
patword 0x00e8 0x840c599f000e50ba
patword 0x00e9 0x840c599f000850ba
patword 0x00ea 0x840c599f000e50ba
patword 0x00eb 0x840c599f000850ba
patword 0x00ec 0x840c599f000e50ba
patword 0x00ed 0x840c599f000850ba
patword 0x00ee 0x840c599f000e50ba
patword 0x00ef 0x840c599f000850ba
patword 0x00f0 0x040c599f000850ba
patword 0x00f1 0x040c599f000850ba
patword 0x00f2 0x000c599f000850ba
patword 0x00f3 0x000c599f000850ba
patword 0x00f4 0x0008599f200e503a
patword 0x00f5 0x0008599f0008503a
patword 0x00f6 0x0008599f200e503a
patword 0x00f7 0x0008599f0008503a
patword 0x00f8 0x0008599f0008503a
patword 0x00f9 0x0008599f0008503a
patword 0x00fa 0x0008599f0008503a
patword 0x00fb 0x0008599f0008503a
patword 0x00fc 0x0008599f0008503a
patword 0x00fd 0x0008599f0008503a
patword 0x00fe 0x0008599f0008503a
patword 0x00ff 0x0008599f0008503a
patword 0x0100 0x0008599f0008503a
patword 0x0101 0x0008599f0008503a
patword 0x0102 0x0008599f0008503a
patword 0x0103 0x0008599f0008503a
patword 0x0104 0x0008599f0008503a
patword 0x0105 0x0008599f0008503a
patword 0x0106 0x0008599f0008503a
patword 0x0107 0x0008599f0008503a
patword 0x0108 0x0008599f0008503a
patword 0x0109 0x0008599f0008503a
patword 0x010a 0x0008599f0008503a
patword 0x010b 0x0008599f0008503a
patword 0x010c 0x0008599f0008503a
patword 0x010d 0x0008599f0008503a
patword 0x010e 0x0008599f0008503a
patword 0x010f 0x0008599f0008503a
patword 0x0110 0x0008599f0008503a
patword 0x0111 0x0008599f0008503a
patioctrl 0x8f0effff6dbffdbf
patlimits 0x0000 0x0110
patloop 0 0x00be 0x00ef
patnloop 0 199
patloop 1 0x0400 0x0400
patnloop 1 0
patloop 2 0x0400 0x0400
patnloop 2 0
patwait 0 0x002e
patwaittime 0 800
patwait 1 0x0400
patwaittime 1 0
patwait 2 0x0400
patwaittime 2 0
patloop 3 0x1fff 0x1fff
patnloop 3 0
patloop 4 0x1fff 0x1fff
patnloop 4 0
patloop 5 0x1fff 0x1fff
patnloop 5 0
patwait 3 0x1fff
patwaittime 3 0
patwait 4 0x1fff
patwaittime 4 0
patwait 5 0x1fff
patwaittime 5 0

View File

@ -0,0 +1,4 @@
#chip version version (multiplied by 10)
chipversion 11

View File

@ -0,0 +1 @@
1234

View File

@ -4,18 +4,140 @@
#include "RegisterDefs.h"
#include "sls/sls_detector_defs.h"
#define MIN_REQRD_VRSN_T_RD_API 0x180314
#define REQRD_FRMWR_VRSN 0x221205
#define REQRD_FRMWRE_VRSN_BOARD2 0x221130 // 1.0 pcb (version = 010)
#define REQRD_FRMWRE_VRSN 0x221130 // 2.0 pcb (version = 011)
#define NUM_HARDWARE_VERSIONS (1)
#define NUM_HARDWARE_VERSIONS (2)
#define HARDWARE_VERSION_NUMBERS \
{ 0x1 }
{ 0x2, 0x3 }
#define HARDWARE_VERSION_NAMES \
{ "1.0" }
{ "1.0", "2.0" }
#define ID_FILE ("detid_moench.txt")
#define CONFIG_FILE ("config_moench.txt")
#define LINKED_SERVER_NAME "moenchDetectorServer"
#define CTRL_SRVR_INIT_TIME_US (2 * 1000 * 1000)
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
/* Hardware Definitions */
#define NCHAN (400 * 400)
#define NCHIP (1)
#define NDAC (8)
#define DYNAMIC_RANGE (16)
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
#define DATA_BYTES (NCHIP * NCHAN * NUM_BYTES_PER_PIXEL)
#define CLK_RUN (40) // MHz
#define CLK_SYNC (20) // MHz
#define ADC_CLK_INDEX (1)
#define DBIT_CLK_INDEX (0)
/** Default Parameters */
#define DEFAULT_NUM_FRAMES (1)
#define DEFAULT_STARTING_FRAME_NUMBER (1)
#define DEFAULT_NUM_CYCLES (1)
#define DEFAULT_EXPTIME (10 * 1000) // ns
#define DEFAULT_PERIOD (2 * 1000 * 1000) // ns
#define DEFAULT_DELAY (0)
#define DEFAULT_HIGH_VOLTAGE (0)
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
#define DEFAULT_SETTINGS (GAIN0)
#define DEFAULT_GAINMODE (DYNAMIC)
#define DEFAULT_TX_UDP_PORT (0x7e9a)
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
#define DEFAULT_FLIP_ROWS (0)
#define DEFAULT_FILTER_RESISTOR (1) // higher resistor
#define DEFAULT_FILTER_CELL (0)
#define HIGHVOLTAGE_MIN (60)
#define HIGHVOLTAGE_MAX (200)
#define DAC_MIN_MV (0)
#define DAC_MAX_MV (2500)
#define MAX_FILTER_CELL_VAL (12)
#define READ_N_ROWS_MULTIPLE (16) // 400 rows/50packets * 2 interfaces
#define MIN_ROWS_PER_READOUT (16)
#define MAX_ROWS_PER_READOUT (400)
#define ROWS_PER_PACKET (8)
/* 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 BIT16_MASK (0xFFFF)
#define GAIN_VAL_OFST (14)
#define GAIN_VAL_MSK (0x3 << GAIN_VAL_OFST)
// pipeline
#define ADC_PORT_INVERT_VAL (0x5A5A5A5A)
#define ADC_PORT_INVERT_BOARD2_VAL (0x453b2a9c)
// 2.0 pcb (chipv1.1)
#define SAMPLE_ADC_FULL_SPEED_CHIP11 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
SAMPLE_DGTL_SAMPLE_0_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0000
#define SAMPLE_ADC_HALF_SPEED_CHIP11 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1110
#define SAMPLE_ADC_QUARTER_SPEED_CHIP11 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
SAMPLE_DGTL_SAMPLE_2_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2230
#define ADC_PHASE_FULL_SPEED_CHIP11 (160)
#define ADC_PHASE_HALF_SPEED_CHIP11 (160)
#define ADC_PHASE_QUARTER_SPEED_CHIP11 (160)
#define DBIT_PHASE_FULL_SPEED_CHIP11 (80)
#define DBIT_PHASE_HALF_SPEED_CHIP11 (135)
#define DBIT_PHASE_QUARTER_SPEED_CHIP11 (135)
#define ADC_OFST_FULL_SPEED_VAL_CHIP11 (0x10)
#define ADC_OFST_HALF_SPEED_VAL_CHIP11 (0x08)
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP11 (0x04)
// 2.0 pcb (chipv1.0)
#define SAMPLE_ADC_FULL_SPEED_CHIP10 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0100
#define SAMPLE_ADC_HALF_SPEED_CHIP10 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1310
#define SAMPLE_ADC_QUARTER_SPEED_CHIP10 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2630
#define ADC_PHASE_FULL_SPEED_CHIP10 (160)
#define ADC_PHASE_HALF_SPEED_CHIP10 (160)
#define ADC_PHASE_QUARTER_SPEED_CHIP10 (160)
#define DBIT_PHASE_FULL_SPEED_CHIP10 (125)
#define DBIT_PHASE_HALF_SPEED_CHIP10 (175)
#define DBIT_PHASE_QUARTER_SPEED_CHIP10 (175)
#define ADC_OFST_FULL_SPEED_VAL_CHIP10 (0x10)
#define ADC_OFST_HALF_SPEED_VAL_CHIP10 (0x08)
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP10 (0x04)
// 1.0 pcb (2 resistor network)
#define SAMPLE_ADC_HALF_SPEED_BOARD2 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1300
#define SAMPLE_ADC_QUARTER_SPEED_BOARD2 \
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2610
#define ADC_PHASE_HALF_SPEED_BOARD2 (110)
#define ADC_PHASE_QUARTER_SPEED_BOARD2 (220)
#define DBIT_PHASE_HALF_SPEED_BOARD2 (150)
#define DBIT_PHASE_QUARTER_SPEED_BOARD2 (150)
#define ADC_OFST_HALF_SPEED_BOARD2_VAL (0x10)
#define ADC_OFST_QUARTER_SPEED_BOARD2_VAL (0x08)
/* Struct Definitions */
typedef struct udp_header_struct {
@ -45,111 +167,44 @@ typedef struct udp_header_struct {
#define UDP_IP_HEADER_LENGTH_BYTES (28)
/* Enums */
enum ADCINDEX { TEMP_FPGA, TEMP_ADC };
enum DACINDEX {
MO_VBP_COLBUF,
MO_VIPRE,
MO_VIN_CM,
MO_VB_SDA,
MO_VCASC_SFP,
MO_VOUT_CM,
MO_VIPRE_CDS,
MO_IBIAS_SFP
J_VB_COMP,
J_VDD_PROT,
J_VIN_COM,
J_VREF_PRECH,
J_VB_PIXBUF,
J_VB_DS,
J_VREF_DS,
J_VREF_COMP
};
#define DAC_NAMES \
"vbp_colbuf", "vipre", "vin_cm", "vb_sda", "vcasc_sfp", "vout_cm", \
"vipre_cds", "ibias_sfp"
"vb_comp", "vdd_prot", "vin_com", "vref_prech", "vb_pixbuf", "vb_ds", \
"vref_ds", "vref_comp"
#define DEFAULT_DAC_VALS \
{ \
1300, /* MO_VBP_COLBUF */ \
1000, /* MO_VIPRE */ \
1400, /* MO_VIN_CM */ \
680, /* MO_VB_SDA */ \
1428, /* MO_VCASC_SFP */ \
1200, /* MO_VOUT_CM */ \
800, /* MO_VIPRE_CDS */ \
900 /* MO_IBIAS_SFP */ \
1220, /* J_VB_COMP */ \
3000, /* J_VDD_PROT */ \
1053, /* J_VIN_COM */ \
1450, /* J_VREF_PRECH */ \
750, /* J_VB_PIXBUF */ \
1000, /* J_VB_DS */ \
480, /* J_VREF_DS */ \
420 /* J_VREF_COMP */ \
};
enum CLKINDEX { RUN_CLK, ADC_CLK, SYNC_CLK, DBIT_CLK, NUM_CLOCKS };
#define CLK_NAMES "run", "adc", "sync", "dbit"
enum MASTERINDEX { MASTER_HARDWARE, OW_MASTER, OW_SLAVE };
#define MASTER_NAMES "hardware", "master", "slave"
/* Hardware Definitions */
#define NCHAN (32)
#define NCHIP (1)
#define NDAC (8)
#define DYNAMIC_RANGE (16)
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
#define CLK_FREQ (156.25) /* MHz */
#define NSAMPLES_PER_ROW (25)
#define NCHANS_PER_ADC (25)
#define NUMSETTINGS (2)
#define NSPECIALDACS (3)
#define SPECIALDACINDEX {J_VREF_PRECH, J_VREF_DS, J_VREF_COMP};
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS \
{ 1450, 480, 420 }
#define SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS \
{ 1550, 450, 620 }
/** Default Parameters */
#define DEFAULT_PATTERN_FILE ("DefaultPattern_moench.txt")
#define DEFAULT_STARTING_FRAME_NUMBER (1)
#define DEFAULT_DATA_BYTES (NCHIP * NCHAN * NUM_BITS_PER_PIXEL)
#define DEFAULT_NUM_SAMPLES (5000)
#define DEFAULT_EXPTIME (0)
#define DEFAULT_NUM_FRAMES (1)
#define DEFAULT_NUM_CYCLES (1)
#define DEFAULT_PERIOD (1 * 1000 * 1000) // ns
#define DEFAULT_DELAY (0)
#define DEFAULT_HIGH_VOLTAGE (0)
#define DEFAULT_VLIMIT (-100)
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
#define DEFAULT_TX_UDP_PORT (0x7e9a)
#define DEFAULT_RUN_CLK_AT_STARTUP (200) // 40
#define DEFAULT_ADC_CLK_AT_STARTUP (40) // 20
#define DEFAULT_SYNC_CLK_AT_STARTUP (40) // 20
#define DEFAULT_DBIT_CLK_AT_STARTUP (200)
#define DEFAULT_RUN_CLK (40)
#define DEFAULT_ADC_CLK (20)
#define DEFAULT_DBIT_CLK (40)
#define DEFAULT_ADC_PHASE_DEG (30)
#define DEFAULT_PIPELINE (15)
#define DEFAULT_SETTINGS (G4_HIGHGAIN)
#define UDP_HEADER_MAX_FRAME_VALUE (0xFFFFFFFFFFFF)
// settings
#define DEFAULT_PATMASK (0x00000C800000800AULL)
#define G1_HIGHGAIN_PATSETBIT (0x00000C0000008008ULL)
#define G1_LOWGAIN_PATSETBIT (0x0000040000008000ULL)
#define G2_HIGHCAP_HIGHGAIN_PATSETBIT (0x0000080000000008ULL)
#define G2_HIGHCAP_LOWGAIN_PATSETBIT (0x0000000000000000ULL)
#define G2_LOWCAP_HIGHGAIN_PATSETBIT (0x00000C800000800AULL)
#define G2_LOWCAP_LOWGAIN_PATSETBIT (0x0000048000008002ULL)
#define G4_HIGHGAIN_PATSETBIT (0x000008800000000AULL)
#define G4_LOWGAIN_PATSETBIT (0x0000008000000002ULL)
#define HIGHVOLTAGE_MIN (60)
#define HIGHVOLTAGE_MAX (200) // min dac val
#define DAC_MIN_MV (0)
#define DAC_MAX_MV (2500)
/* Defines in the Firmware */
#define DIGITAL_IO_DELAY_MAXIMUM_PS \
((OUTPUT_DELAY_0_OTPT_STTNG_MSK >> OUTPUT_DELAY_0_OTPT_STTNG_OFST) * \
OUTPUT_DELAY_0_OTPT_STTNG_STEPS)
#define MAX_PHASE_SHIFTS_STEPS (8)
#define WAIT_TME_US_FR_ACQDONE_REG \
(100) // wait time in us after acquisition done to ensure there is no data
// in fifo
#define WAIT_TIME_US_PLL (10 * 1000)
#define WAIT_TIME_US_STP_ACQ (100)
#define WAIT_TIME_CONFIGURE_MAC (2 * 1000 * 1000)
#define WAIT_TIME_PATTERN_READ (10)
#define WAIT_TIME_1US_FOR_LOOP_CNT (50) // around 30 is 1 us in blackfin
/* MSB & LSB DEFINES */
#define MSB_OF_64_BIT_REG_OFST (32)
#define LSB_OF_64_BIT_REG_OFST (0)
#define BIT32_MSK (0xFFFFFFFF)
#define BIT16_MASK (0xFFFF)
#define ADC_PORT_INVERT_VAL (0x4a342593)
#define MAXIMUM_ADC_CLK (20)
#define PLL_VCO_FREQ_MHZ (800)
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
#define CLK_NAMES "run", "adc", "dbit"

View File

@ -89,7 +89,7 @@ void basictests() {
#endif
if (mapCSP0() == FAIL) {
strcpy(initErrorMessage,
"Could not map to memory. Dangerous to continue.\n");
"Could not map to memory. Cannot proceed. Check Firmware.\n");
LOG(logERROR, (initErrorMessage));
initError = FAIL;
}
@ -99,8 +99,10 @@ void basictests() {
((validateKernelVersion(KERNEL_DATE_VRSN) == FAIL) ||
(checkType() == FAIL) || (testFpga() == FAIL) ||
(testBus() == FAIL))) {
strcpy(initErrorMessage, "Could not pass basic tests of FPGA and bus. "
"Dangerous to continue.\n");
sprintf(initErrorMessage,
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
"Check Firmware. (Firmware version:0x%llx) \n",
getFirmwareVersion());
LOG(logERROR, ("%s\n\n", initErrorMessage));
initError = FAIL;
return;
@ -388,7 +390,7 @@ void initStopServer() {
if (mapCSP0() == FAIL) {
initError = FAIL;
strcpy(initErrorMessage,
"Stop Server: Map Fail. Dangerous to continue. Goodbye!\n");
"Stop Server: Map Fail. Cannot proceed. Check Firmware. \n");
LOG(logERROR, (initErrorMessage));
initCheckDone = 1;
return;

View File

@ -4,7 +4,7 @@
#include <inttypes.h>
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
/**
* Set Defines
* @param creg control register
@ -14,8 +14,9 @@
* @param prmsk pll reset mask
* @param amsk address mask
* @param aofst address offset
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau only)
* @param clk2Index clkIndex of second pll (Jungfrau only)
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau/moench
* only)
* @param clk2Index clkIndex of second pll (Jungfrau/moench only)
*/
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
@ -50,8 +51,8 @@ void ALTERA_PLL_ResetPLLAndReconfiguration();
* Set PLL Reconfig register
* @param reg register
* @param val value
* @param useDefaultWRMask only jungfrau for dbit clk (clkindex1, use second WR
* mask)
* @param useDefaultWRMask only jungfrau/moench for dbit clk (clkindex1, use
* second WR mask)
*/
void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
int useSecondWRMask);

View File

@ -6,7 +6,7 @@
#include "clogger.h"
void initializePatternAddresses();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#ifdef CHIPTESTBOARDD
#ifdef VIRTUAL
void initializePatternWord();
#endif

View File

@ -6,8 +6,8 @@
#include "AD9252.h" // old board compatibility
#include "clogger.h" // runState(enum TLogLevel)
#endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
defined(MOENCHD)
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(CHIPTESTBOARDD)
#include "AD9257.h" // commonServerFunctions.h, blackfin.h, ansi.h
#endif
@ -20,8 +20,8 @@
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
#include "nios.h"
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
defined(MOENCHD)
#elif defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(CHIPTESTBOARDD)
#include "blackfin.h"
#endif
@ -61,15 +61,16 @@ typedef struct udpStruct_s {
int isInitCheckDone();
int getInitResult(char **mess);
void basictests();
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
int checkType();
int testFpga();
int testBus();
#endif
#if defined(GOTTHARDD) || \
((defined(EIGERD) || defined(JUNGFRAUD)) && defined(VIRTUAL))
((defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)) && \
defined(VIRTUAL))
void setTestImageMode(int ival);
int getTestImageMode();
#endif
@ -77,19 +78,22 @@ int getTestImageMode();
// Ids
void getServerVersion(char *version);
u_int64_t getFirmwareVersion();
#ifdef EIGERD
uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition);
#endif
u_int64_t getFirmwareAPIVersion();
#ifndef EIGERD
void getHardwareVersion(char *version);
u_int16_t getHardwareVersionNumber();
#endif
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD)
u_int16_t getHardwareSerialNumber();
#endif
#if defined(JUNGFRAUD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
defined(GOTTHARDD)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
defined(MYTHEN3D) || defined(GOTTHARDD)
int isHardwareVersion_1_0();
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
int getChipVersion();
void setChipVersion(int version);
#endif
@ -98,7 +102,7 @@ u_int32_t getDetectorNumber();
#endif
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(MYTHEN3D) || \
defined(JUNGFRAUD)
defined(JUNGFRAUD) || defined(MOENCHD)
int getModuleId(int *ret, char *mess);
int updateModuleId();
#ifndef EIGERD
@ -125,7 +129,7 @@ void checkVirtual9MFlag();
void allocateDetectorStructureMemory();
#endif
void setupDetector();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
int updateDatabytesandAllocateRAM();
void updateDataBytes();
#endif
@ -141,7 +145,8 @@ void setASICDefaults();
#ifdef MYTHEN3D
void setADIFDefaults();
#endif
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD)
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD) || \
defined(MOENCHD)
int readConfigFile();
#endif
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \
@ -157,14 +162,13 @@ void resetToHardwareSettings();
int writeRegister(uint32_t offset, uint32_t data);
int readRegister(uint32_t offset, uint32_t *retval);
#elif GOTTHARDD
uint32_t
writeRegister16And32(uint32_t offset,
uint32_t data); // FIXME its not there in ctb or moench?
uint32_t writeRegister16And32(uint32_t offset,
uint32_t data); // FIXME its not there in ctb
uint32_t readRegister16And32(uint32_t offset);
#endif
// firmware functions (resets)
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(MYTHEN3D) || defined(GOTTHARD2D)
void cleanFifos();
void resetCore();
@ -189,11 +193,11 @@ int getDynamicRange(int *retval);
int setROI(ROI arg);
ROI getROI();
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
void setADCInvertRegister(uint32_t val);
uint32_t getADCInvertRegister();
#endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
int setADCEnableMask(uint32_t mask);
uint32_t getADCEnableMask();
void setADCEnableMask_10G(uint32_t mask);
@ -221,11 +225,11 @@ int getReadoutMode();
#endif
// parameters - timer
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD)
int selectStoragecellStart(int pos);
int getMaxStoragecellStart();
#endif
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MOENCHD) || \
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
defined(CHIPTESTBOARDD)
int setNextFrameNumber(uint64_t value);
int getNextFrameNumber(uint64_t *value);
@ -265,13 +269,13 @@ int64_t getSubDeadTime();
int64_t getMeasuredPeriod();
int64_t getMeasuredSubPeriod();
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD)
void setNumAdditionalStorageCells(int val);
int getNumAdditionalStorageCells();
int setStorageCellDelay(int64_t val);
int64_t getStorageCellDelay();
#endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
int setNumAnalogSamples(int val);
int getNumAnalogSamples();
#endif
@ -286,8 +290,8 @@ uint32_t getCounterMask();
void updatePacketizing();
#endif
#if defined(JUNGFRAUD) || defined(GOTTHARDD) || defined(CHIPTESTBOARDD) || \
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
int setDelayAfterTrigger(int64_t val);
int64_t getDelayAfterTrigger();
int64_t getNumFramesLeft();
@ -301,7 +305,7 @@ int64_t getNumBurstsLeft();
#ifdef GOTTHARDD
int64_t getExpTimeLeft();
#endif
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(MYTHEN3D) || defined(GOTTHARD2D)
int64_t getFramesFromStart();
int64_t getActualTime();
@ -312,7 +316,7 @@ int64_t getMeasurementTime();
#if defined(MYTHEN3D) || defined(EIGERD)
void getModule(sls_detector_module *myMod);
#endif
#if (!defined(CHIPTESTBOARDD)) && (!defined(MOENCHD)) && (!defined(GOTTHARD2D))
#if (!defined(CHIPTESTBOARDD)) && (!defined(GOTTHARD2D))
int setModule(sls_detector_module myMod, char *mess);
#endif
@ -328,7 +332,7 @@ int getAllTrimbits();
enum detectorSettings setSettings(enum detectorSettings sett);
#endif
enum detectorSettings getSettings();
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
enum gainMode getGainMode();
void setGainMode(enum gainMode mode);
#endif
@ -357,7 +361,7 @@ void setDAC(enum DACINDEX ind, int val, int mV);
#endif
int getDAC(enum DACINDEX ind, int mV);
int getMaxDacSteps();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
int dacToVoltage(int dac);
int checkVLimitCompliant(int mV);
int checkVLimitDacCompliant(int dac);
@ -380,14 +384,15 @@ void powerOff();
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
int getADC(enum ADCINDEX ind, int *value);
#elif !defined(MOENCHD)
#else
int getADC(enum ADCINDEX ind);
#endif
int setHighVoltage(int val);
// parameters - timing, extsig
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD)
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(JUNGFRAUD) || \
defined(MOENCHD)
int setMaster(enum MASTERINDEX m);
#endif
#ifdef EIGERD
@ -395,11 +400,11 @@ int setTop(enum TOPINDEX t);
int isTop(int *retval);
#endif
#if defined(MYTHEN3D) || defined(EIGERD) || defined(GOTTHARDD) || \
defined(GOTTHARD2D) || defined(JUNGFRAUD)
defined(GOTTHARD2D) || defined(JUNGFRAUD) || defined(MOENCHD)
int isMaster(int *retval);
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
int getSynchronization();
void setSynchronization(int enable);
#endif
@ -430,29 +435,30 @@ int getExtSignal(int signalIndex);
#ifdef GOTTHARDD
void calcChecksum(mac_conf *mac, int sourceip, int destip);
#endif
#if defined(JUNGFRAUD) || defined(GOTTHARD2D)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D)
void setNumberofUDPInterfaces(int val);
#endif
int getNumberofUDPInterfaces();
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MYTHEN3D) || \
defined(GOTTHARD2D)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
defined(MYTHEN3D) || defined(GOTTHARD2D)
int getNumberofDestinations(int *retval);
int setNumberofDestinations(int value);
#endif
#if defined(JUNGFRAUD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(MYTHEN3D) || \
defined(GOTTHARD2D)
int getFirstUDPDestination();
void setFirstUDPDestination(int value);
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
void selectPrimaryInterface(int val);
int getPrimaryInterface();
void setupHeader(int iRxEntry, enum interfaceType type, uint32_t destip,
uint64_t destmac, uint32_t destport, uint64_t sourcemac,
uint32_t sourceip, uint32_t sourceport);
#endif
#if defined(JUNGFRAUD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARD2D) || \
defined(MYTHEN3D) || defined(CHIPTESTBOARDD)
void calcChecksum(udp_header *udp);
#endif
#ifdef GOTTHARDD
@ -471,22 +477,15 @@ int getInterruptSubframe();
int setReadNRows(int value);
int getReadNRows();
#endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(EIGERD) || \
defined(MYTHEN3D)
#if defined(CHIPTESTBOARDD) || defined(EIGERD) || defined(MYTHEN3D)
int enableTenGigabitEthernet(int val);
#endif
// very detector specific
// moench specific - powerchip
#ifdef MOENCHD
int powerChip(int on);
int setAnalogOnlyReadout();
#endif
// chip test board or moench specific - configure frequency, phase, pll,
// chip test board specific - configure frequency, phase, pll,
// flashing firmware
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
int setPhase(enum CLKINDEX ind, int val, int degrees);
int getPhase(enum CLKINDEX ind, int degrees);
int getMaxPhase(enum CLKINDEX ind);
@ -505,9 +504,9 @@ int setLEDEnable(int enable);
void setDigitalIODelay(uint64_t pinMask, int delay);
#endif
// jungfrau specific - powerchip, autocompdisable, clockdiv, asictimer, clock,
// pll, flashing firmware
#ifdef JUNGFRAUD
// jungfrau/moench specific - powerchip, autocompdisable, clockdiv, asictimer,
// clock, pll, flashing firmware
#if defined(JUNGFRAUD) || defined(MOENCHD)
int setReadNRows(int value);
int getReadNRows();
void initReadoutConfiguration();
@ -517,7 +516,9 @@ void configureChip();
int autoCompDisable(int on);
int setComparatorDisableTime(int64_t val);
int64_t getComparatorDisableTime();
#ifndef MOENCHD
void configureASICTimer();
#endif
int setReadoutSpeed(int val);
int getReadoutSpeed(int *retval);
int setPhase(enum CLKINDEX ind, int val, int degrees);
@ -637,11 +638,12 @@ int setBadChannels(int numChannels, int *channelList);
int *getBadChannels(int *numChannels);
#endif
#if defined(JUNGFRAUD) || defined(EIGERD)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD)
int getTenGigaFlowControl();
int setTenGigaFlowControl(int value);
#endif
#if defined(JUNGFRAUD) || defined(EIGERD) || defined(MYTHEN3D)
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(EIGERD) || \
defined(MYTHEN3D)
int getTransmissionDelayFrame();
int setTransmissionDelayFrame(int value);
#endif
@ -661,14 +663,14 @@ int stopStateMachine();
#ifdef MYTHEN3D
int softwareTrigger();
#endif
#if defined(EIGERD) || defined(JUNGFRAUD)
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)
int softwareTrigger(int block);
#endif
#if defined(EIGERD) || defined(MYTHEN3D)
int startReadOut();
#endif
enum runStatus getRunStatus();
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
void readFrames(int *ret, char *mess);
#endif
#ifdef EIGERD
@ -676,7 +678,7 @@ void waitForAcquisitionEnd(int *ret, char *mess);
#else
void waitForAcquisitionEnd();
#endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#if defined(CHIPTESTBOARDD)
void readandSendUDPFrames(int *ret, char *mess);
void unsetFifoReadStrobes();
void readSample(int ns);
@ -685,8 +687,8 @@ int checkFifoForEndOfAcquisition();
int readFrameFromFifo();
#endif
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || \
defined(MOENCHD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
u_int32_t runBusy();
#endif
@ -697,7 +699,7 @@ u_int32_t runState(enum TLogLevel lev);
// common
int calculateDataBytes();
int getTotalNumberOfChannels();
#if defined(MOENCHD) || defined(CHIPTESTBOARDD)
#if defined(CHIPTESTBOARDD)
void getNumberOfChannels(int *nchanx, int *nchany);
#endif
int getNumberOfChips();

View File

@ -306,3 +306,4 @@ int get_module(int);
int get_synchronization(int);
int set_synchronization(int);
int get_hardware_version(int);
int get_frontend_firmware_version(int);

View File

@ -300,7 +300,7 @@ void AD9257_Configure() {
AD9257_CLK_CH_IFCO_MSK);
// vref
#if defined(GOTTHARDD) || defined(MOENCHD)
#ifdef GOTTHARDD
LOG(logINFO, ("\tVref default at 2.0\n"));
AD9257_SetVrefVoltage(AD9257_VREF_DEFAULT_VAL, 0);
#else

View File

@ -127,7 +127,7 @@ uint32_t ALTERA_PLL_Cntrl_Reg = 0x0;
uint32_t ALTERA_PLL_Param_Reg = 0x0;
uint32_t ALTERA_PLL_Cntrl_RcnfgPrmtrRstMask = 0x0;
uint32_t ALTERA_PLL_Cntrl_WrPrmtrMask = 0x0;
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
uint32_t ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask = 0x0;
int ALTERA_PLL_Cntrl_DBIT_ClkIndex = 0;
@ -136,7 +136,7 @@ uint32_t ALTERA_PLL_Cntrl_PLLRstMask = 0x0;
uint32_t ALTERA_PLL_Cntrl_AddrMask = 0x0;
int ALTERA_PLL_Cntrl_AddrOfst = 0;
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
int aofst, uint32_t wd2msk, int clk2Index) {
@ -201,7 +201,7 @@ void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
reg, val, useSecondWRMask));
uint32_t wrmask = ALTERA_PLL_Cntrl_WrPrmtrMask;
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
if (useSecondWRMask) {
wrmask = ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask;
}
@ -252,7 +252,7 @@ void ALTERA_PLL_SetPhaseShift(int32_t phase, int clkIndex, int pos) {
LOG(logDEBUG1, ("C%d phase word:0x%08x\n", clkIndex, value));
int useSecondWR = 0;
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
if (clkIndex == ALTERA_PLL_Cntrl_DBIT_ClkIndex) {
useSecondWR = 1;
}

View File

@ -224,10 +224,10 @@ int getModuleIdInFile(int *ret, char *mess, char *fileName) {
// open id file
FILE *fd = fopen(fname, "r");
if (fd == NULL) {
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(MOENCHD)
*ret = OK;
LOG(logWARNING,
("Could not find detid_jungfrau.txt to set module id\n"));
LOG(logWARNING, ("Could not find detid file to set module id. "
"Continuing without.\n"));
return 0;
#else
*ret = FAIL;
@ -485,7 +485,7 @@ int setupDetectorServer(char *mess, char *sname) {
// blackfin boards (respawn) (only kept for backwards compatibility)
#ifndef VIRTUAL
#if defined(JUNGFRAUD) || defined(CHIPTESTBOARDD) || defined(MOENCHD) || \
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(CHIPTESTBOARDD) || \
defined(GOTTHARDD)
// delete every line with DetectorServer in /etc/inittab
strcpy(cmd, "sed -i '/DetectorServer/d' /etc/inittab");

View File

@ -13,7 +13,7 @@
extern enum TLogLevel trimmingPrint;
#endif
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#ifdef CHIPTESTBOARDD
#ifdef VIRTUAL
uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
#endif
@ -40,7 +40,7 @@ void initializePatternAddresses() {
}
}
#if defined(CHIPTESTBOARDD) || defined(MOENCHD)
#ifdef CHIPTESTBOARDD
#ifdef VIRTUAL
void initializePatternWord() {
memset(virtual_pattern, 0, sizeof(virtual_pattern));
@ -128,7 +128,7 @@ int validate_writePatternWord(char *message, int addr, uint64_t word) {
// validate result
int ret = OK;
// cannot validate for moench, ctb ( same as executing pattern word)
// cannot validate for ctb ( same as executing pattern word)
#ifdef MYTHEN3D
uint64_t retval = readPatternWord(addr);
LOG(logDEBUG1, ("Pattern word (addr:0x%x) retval: 0x%llx\n", addr,

Some files were not shown because too many files have changed in this diff Show More