mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 23:37:14 +02:00
Compare commits
7 Commits
Author | SHA1 | Date | |
---|---|---|---|
641b40ffe0 | |||
bd1a125154 | |||
ffe7728966 | |||
b69e053bb4 | |||
daec0dc389 | |||
c8bb70f876 | |||
9a08ecc5a5 |
@ -33,7 +33,7 @@ else()
|
||||
# Standard behaviour use libzmq included in this repo (libs/libzmq)
|
||||
FetchContent_Declare(
|
||||
libzmq
|
||||
URL ${CMAKE_SOURCE_DIR}/libs/libzmq/libzmq-4.3.4.tar.gz
|
||||
URL ${CMAKE_CURRENT_SOURCE_DIR}/libs/libzmq/libzmq-4.3.4.tar.gz
|
||||
URL_HASH MD5=cc20b769ac10afa352e5ed2769bb23b3
|
||||
)
|
||||
endif()
|
||||
|
@ -232,7 +232,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def hardwareversion(self):
|
||||
"""
|
||||
[Jungfrau][Moench][Gotthard2][Myhten3][Gotthard][Ctb] Hardware version of detector. \n
|
||||
Hardware version of detector. \n
|
||||
[Eiger] Hardware version of front FPGA on detector.
|
||||
"""
|
||||
return self.getHardwareVersion()
|
||||
@ -308,7 +308,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][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16
|
||||
"""
|
||||
return self.getDynamicRange()
|
||||
|
||||
@ -400,7 +400,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def framesl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of frames left in acquisition.\n
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of frames left in acquisition.\n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -1951,7 +1951,7 @@ class Detector(CppDetectorApi):
|
||||
@element
|
||||
def triggersl(self):
|
||||
"""
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB] Number of triggers left in acquisition.\n
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][CTB][Xilinx CTB] Number of triggers left in acquisition.\n
|
||||
|
||||
Note
|
||||
----
|
||||
@ -2180,7 +2180,7 @@ class Detector(CppDetectorApi):
|
||||
Note
|
||||
-----
|
||||
Default: AUTO_TIMING \n
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
"""
|
||||
@ -3477,7 +3477,7 @@ class Detector(CppDetectorApi):
|
||||
|
||||
@property
|
||||
def pattern(self):
|
||||
"""[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||
"""[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line).
|
||||
|
||||
:getter: Not Implemented
|
||||
|
||||
@ -3495,7 +3495,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patfname(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default
|
||||
[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default
|
||||
file
|
||||
"""
|
||||
return self.getPatterFileName()
|
||||
@ -3520,7 +3520,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patlimits(self):
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of complete pattern.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of complete pattern.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3540,7 +3540,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patsetbit(self):
|
||||
"""[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3557,7 +3557,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patmask(self):
|
||||
"""[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3575,7 +3575,7 @@ class Detector(CppDetectorApi):
|
||||
# @element
|
||||
def patwait(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Wait address of loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait address of loop level provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3592,7 +3592,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait0(self):
|
||||
"""[Ctb][Mythen3] Wait 0 address.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 0 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3612,7 +3612,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait1(self):
|
||||
"""[Ctb][Mythen3] Wait 1 address.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 1 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3632,7 +3632,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwait2(self):
|
||||
"""[Ctb][Mythen3] Wait 2 address.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 2 address.
|
||||
|
||||
Example
|
||||
--------
|
||||
@ -3652,7 +3652,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patwaittime(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Wait time in clock cycles of loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles of loop level provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3669,7 +3669,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime0(self):
|
||||
"""[Ctb][Mythen3] Wait 0 time in clock cycles."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 0 time in clock cycles."""
|
||||
return self.getPatternWaitTime(0)
|
||||
|
||||
@patwaittime0.setter
|
||||
@ -3680,7 +3680,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime1(self):
|
||||
"""[Ctb][Mythen3] Wait 1 time in clock cycles."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 1 time in clock cycles."""
|
||||
return self.getPatternWaitTime(1)
|
||||
|
||||
@patwaittime1.setter
|
||||
@ -3691,7 +3691,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patwaittime2(self):
|
||||
"""[Ctb][Mythen3] Wait 2 time in clock cycles."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Wait 2 time in clock cycles."""
|
||||
return self.getPatternWaitTime(2)
|
||||
|
||||
@patwaittime2.setter
|
||||
@ -3703,7 +3703,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patloop(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Limits (start and stop address) of the loop provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of the loop provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3720,7 +3720,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop0(self):
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 0.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 0.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3740,7 +3740,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop1(self):
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 1.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 1.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3761,7 +3761,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patloop2(self):
|
||||
"""[Ctb][Mythen3] Limits (start and stop address) of loop 2.
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Limits (start and stop address) of loop 2.
|
||||
|
||||
Example
|
||||
---------
|
||||
@ -3783,7 +3783,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
def patnloop(self):
|
||||
"""
|
||||
[Ctb][Mythen3] Number of cycles of the loop provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop provided.
|
||||
|
||||
Example
|
||||
-------
|
||||
@ -3800,7 +3800,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop0(self):
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 0."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 0."""
|
||||
return self.getPatternLoopCycles(0)
|
||||
|
||||
@patnloop0.setter
|
||||
@ -3811,7 +3811,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop1(self):
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 1."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 1."""
|
||||
return self.getPatternLoopCycles(1)
|
||||
|
||||
@patnloop1.setter
|
||||
@ -3822,7 +3822,7 @@ class Detector(CppDetectorApi):
|
||||
@property
|
||||
@element
|
||||
def patnloop2(self):
|
||||
"""[Ctb][Mythen3] Number of cycles of loop 2."""
|
||||
"""[Ctb][Mythen3][Xilinx Ctb] Number of cycles of loop 2."""
|
||||
return self.getPatternLoopCycles(2)
|
||||
|
||||
@patnloop2.setter
|
||||
|
@ -8,7 +8,8 @@ det_list=("ctbDetectorServer
|
||||
gotthard2DetectorServer
|
||||
jungfrauDetectorServer
|
||||
mythen3DetectorServer
|
||||
moenchDetectorServer"
|
||||
moenchDetectorServer
|
||||
xilinx_ctbDetectorServer"
|
||||
)
|
||||
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'"
|
||||
|
||||
|
@ -9,6 +9,7 @@ det_list=("ctbDetectorServer"
|
||||
"jungfrauDetectorServer"
|
||||
"mythen3DetectorServer"
|
||||
"moenchDetectorServer"
|
||||
"xilinx_ctbDetectorServer"
|
||||
)
|
||||
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'"
|
||||
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -482,7 +482,6 @@ void setupDetector() {
|
||||
return;
|
||||
}
|
||||
|
||||
setReadoutSpeed(DEFAULT_SPEED);
|
||||
cleanFifos();
|
||||
resetCore();
|
||||
|
||||
@ -496,6 +495,7 @@ void setupDetector() {
|
||||
initReadoutConfiguration();
|
||||
|
||||
// Initialization of acquistion parameters
|
||||
setReadoutSpeed(DEFAULT_SPEED);
|
||||
setSettings(DEFAULT_SETTINGS);
|
||||
setNumFrames(DEFAULT_NUM_FRAMES);
|
||||
setNumTriggers(DEFAULT_NUM_CYCLES);
|
||||
|
Binary file not shown.
@ -5,6 +5,8 @@
|
||||
#include <inttypes.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
int mapCSP0(void);
|
||||
void bus_w(u_int32_t offset, u_int32_t data);
|
||||
u_int32_t bus_r(u_int32_t offset);
|
||||
u_int32_t bus_r(u_int32_t offset);
|
||||
uint64_t getU64BitReg(int aLSB, int aMSB);
|
||||
void setU64BitReg(uint64_t value, int aLSB, int aMSB);
|
||||
int mapCSP0(void);
|
||||
|
@ -6,10 +6,12 @@
|
||||
#include "clogger.h"
|
||||
|
||||
void initializePatternAddresses();
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||
#ifdef VIRTUAL
|
||||
void initializePatternWord();
|
||||
#endif
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) // TODO || defined(XILINX_CHIPTESTBOARDD)
|
||||
uint64_t validate_readPatternIOControl();
|
||||
int validate_writePatternIOControl(char *message, uint64_t arg);
|
||||
void writePatternIOControl(uint64_t word);
|
||||
|
@ -65,10 +65,8 @@ typedef struct udpStruct_s {
|
||||
int isInitCheckDone();
|
||||
int getInitResult(char **mess);
|
||||
void basictests();
|
||||
#if !defined(EIGERD)
|
||||
int checkType();
|
||||
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int testFpga();
|
||||
int testBus();
|
||||
#endif
|
||||
@ -88,8 +86,8 @@ uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition);
|
||||
#endif
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
u_int64_t getFirmwareAPIVersion();
|
||||
void getHardwareVersion(char *version);
|
||||
#endif
|
||||
void getHardwareVersion(char *version);
|
||||
#ifdef EIGERD
|
||||
int getHardwareVersionNumber();
|
||||
#else
|
||||
@ -199,10 +197,8 @@ void setMasterSlaveConfiguration();
|
||||
#endif
|
||||
|
||||
// parameters - dr, roi
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
int setDynamicRange(int dr);
|
||||
int getDynamicRange(int *retval);
|
||||
#endif
|
||||
#ifdef GOTTHARDD
|
||||
int setROI(ROI arg);
|
||||
ROI getROI();
|
||||
@ -251,11 +247,11 @@ int getMaxStoragecellStart();
|
||||
int setNextFrameNumber(uint64_t value);
|
||||
int getNextFrameNumber(uint64_t *value);
|
||||
#endif
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
void setNumFrames(int64_t val);
|
||||
int64_t getNumFrames();
|
||||
void setNumTriggers(int64_t val);
|
||||
int64_t getNumTriggers();
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
#ifndef MYTHEN3D
|
||||
int setExpTime(int64_t val);
|
||||
int64_t getExpTime();
|
||||
@ -311,12 +307,15 @@ uint32_t getCounterMask();
|
||||
void updatePacketizing();
|
||||
#endif
|
||||
|
||||
#ifndef EIGERD
|
||||
int64_t getNumFramesLeft();
|
||||
int64_t getNumTriggersLeft();
|
||||
#endif
|
||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
int setDelayAfterTrigger(int64_t val);
|
||||
int64_t getDelayAfterTrigger();
|
||||
int64_t getNumFramesLeft();
|
||||
int64_t getNumTriggersLeft();
|
||||
|
||||
int64_t getDelayAfterTriggerLeft();
|
||||
int64_t getPeriodLeft();
|
||||
#endif
|
||||
@ -447,10 +446,8 @@ void setSynchronization(int enable);
|
||||
void updatingRegisters();
|
||||
int updateClockDivs();
|
||||
#endif
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
void setTiming(enum timingMode arg);
|
||||
enum timingMode getTiming();
|
||||
#endif
|
||||
#ifdef MYTHEN3D
|
||||
void setInitialExtSignals();
|
||||
int setChipStatusRegister(int csr);
|
||||
@ -501,9 +498,7 @@ void calcChecksum(udp_header *udp);
|
||||
int getAdcConfigured();
|
||||
#endif
|
||||
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
int configureMAC();
|
||||
#endif
|
||||
int setDetectorPosition(int pos[]);
|
||||
int *getDetectorPosition();
|
||||
|
||||
@ -715,9 +710,7 @@ int softwareTrigger(int block);
|
||||
#if defined(EIGERD) || defined(MYTHEN3D) || defined(CHIPTESTBOARDD)
|
||||
int startReadOut();
|
||||
#endif
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
enum runStatus getRunStatus();
|
||||
#endif
|
||||
#ifdef EIGERD
|
||||
void waitForAcquisitionEnd(int *ret, char *mess);
|
||||
#else
|
||||
@ -748,9 +741,11 @@ u_int32_t runState(enum TLogLevel lev);
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
int calculateDataBytes();
|
||||
int getTotalNumberOfChannels();
|
||||
#if defined(CHIPTESTBOARDD)
|
||||
#endif
|
||||
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||
void getNumberOfChannels(int *nchanx, int *nchany);
|
||||
#endif
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
int getNumberOfChips();
|
||||
int getNumberOfDACs();
|
||||
int getNumberOfChannelsPerChip();
|
||||
|
@ -10,9 +10,8 @@
|
||||
#include <fcntl.h> // open
|
||||
#include <sys/mman.h> // mmap
|
||||
|
||||
|
||||
/* global variables */
|
||||
#define CSP0 (0xB0010000)/// 0xB008_0000
|
||||
#define CSP0 (0xB0010000)
|
||||
#define MEM_SIZE 0x100000
|
||||
|
||||
u_int32_t *csp0base = 0;
|
||||
@ -59,8 +58,8 @@ int mapCSP0(void) {
|
||||
return FAIL;
|
||||
}
|
||||
LOG(logDEBUG1, ("/dev/mem opened\n"));
|
||||
csp0base = (u_int32_t*)mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE,
|
||||
MAP_FILE | MAP_SHARED, fd, CSP0);
|
||||
csp0base = (u_int32_t *)mmap(0, MEM_SIZE, PROT_READ | PROT_WRITE,
|
||||
MAP_FILE | MAP_SHARED, fd, CSP0);
|
||||
if (csp0base == MAP_FAILED) {
|
||||
LOG(logERROR, ("Can't map memmory area\n"));
|
||||
return FAIL;
|
||||
@ -72,4 +71,3 @@ int mapCSP0(void) {
|
||||
LOG(logINFO, ("Memory already mapped before\n"));
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
@ -134,7 +134,6 @@ int getKernelVersion(char *retvals) {
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
int validateKernelVersion(char *expectedVersion) {
|
||||
// extract kernel date string
|
||||
char version[255] = {0};
|
||||
@ -167,7 +166,7 @@ int validateKernelVersion(char *expectedVersion) {
|
||||
#endif
|
||||
#endif
|
||||
currentVersion[sizeof(currentVersion) - 1] = '\0';
|
||||
|
||||
|
||||
// convert kernel date string into time
|
||||
time_t kernelDate;
|
||||
if (getTimeFromString(currentVersion, &kernelDate) == FAIL) {
|
||||
|
@ -13,7 +13,7 @@
|
||||
extern enum TLogLevel trimmingPrint;
|
||||
#endif
|
||||
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||
#ifdef VIRTUAL
|
||||
uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
|
||||
#endif
|
||||
@ -21,8 +21,8 @@ uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
|
||||
|
||||
extern void bus_w(u_int32_t offset, u_int32_t data);
|
||||
extern u_int32_t bus_r(u_int32_t offset);
|
||||
extern int64_t get64BitReg(int aLSB, int aMSB);
|
||||
extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB);
|
||||
// extern int64_t get64BitReg(int aLSB, int aMSB); TODO for all servers (only
|
||||
// uint64_t) extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB);
|
||||
extern uint64_t getU64BitReg(int aLSB, int aMSB);
|
||||
extern void setU64BitReg(uint64_t value, int aLSB, int aMSB);
|
||||
|
||||
@ -44,13 +44,15 @@ void initializePatternAddresses() {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CHIPTESTBOARDD
|
||||
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||
#ifdef VIRTUAL
|
||||
void initializePatternWord() {
|
||||
memset(virtual_pattern, 0, sizeof(virtual_pattern));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CHIPTESTBOARDD) // TODO || defined(XILINX_CHIPTESTBOARDD)
|
||||
uint64_t validate_readPatternIOControl() {
|
||||
return getU64BitReg(PATTERN_IO_CNTRL_LSB_REG, PATTERN_IO_CNTRL_MSB_REG);
|
||||
}
|
||||
@ -101,7 +103,7 @@ uint64_t readPatternWord(int addr) {
|
||||
// the first word in RAM as base plus the offset of the word to write (addr)
|
||||
uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2;
|
||||
uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2;
|
||||
return get64BitReg(reg_lsb, reg_msb);
|
||||
return getU64BitReg(reg_lsb, reg_msb);
|
||||
#else
|
||||
LOG(logDEBUG1, (" Reading (Executing) Pattern Word (addr:0x%x)\n", addr));
|
||||
uint32_t reg = PATTERN_CNTRL_REG;
|
||||
@ -118,7 +120,7 @@ uint64_t readPatternWord(int addr) {
|
||||
|
||||
// read value
|
||||
#ifndef VIRTUAL
|
||||
return get64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG);
|
||||
return getU64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG);
|
||||
#else
|
||||
return virtual_pattern[addr];
|
||||
#endif
|
||||
@ -160,7 +162,7 @@ void writePatternWord(int addr, uint64_t word) {
|
||||
uint32_t reg = PATTERN_CNTRL_REG;
|
||||
|
||||
// write word
|
||||
set64BitReg(word, PATTERN_IN_LSB_REG, PATTERN_IN_MSB_REG);
|
||||
setU64BitReg(word, PATTERN_IN_LSB_REG, PATTERN_IN_MSB_REG);
|
||||
|
||||
// overwrite with only addr
|
||||
bus_w(reg, ((addr << PATTERN_CNTRL_ADDR_OFST) & PATTERN_CNTRL_ADDR_MSK));
|
||||
@ -178,7 +180,7 @@ void writePatternWord(int addr, uint64_t word) {
|
||||
// the first word in RAM as base plus the offset of the word to write (addr)
|
||||
uint32_t reg_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2;
|
||||
uint32_t reg_msb = PATTERN_STEP0_MSB_REG + addr * REG_OFFSET * 2;
|
||||
set64BitReg(word, reg_lsb, reg_msb);
|
||||
setU64BitReg(word, reg_lsb, reg_msb);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -311,24 +313,24 @@ int validate_getPatternWaitTime(char *message, int level, uint64_t *waittime) {
|
||||
uint64_t getPatternWaitTime(int level) {
|
||||
switch (level) {
|
||||
case 0:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||
case 1:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||
case 2:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||
#ifndef MYTHEN3D
|
||||
case 3:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||
case 4:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||
case 5:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
@ -369,29 +371,29 @@ void setPatternWaitTime(int level, uint64_t t) {
|
||||
(long long int)t));
|
||||
switch (level) {
|
||||
case 0:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||
break;
|
||||
case 1:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||
break;
|
||||
case 2:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||
break;
|
||||
#ifndef MYTHEN3D
|
||||
case 3:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||
break;
|
||||
case 4:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||
break;
|
||||
case 5:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
@ -775,7 +777,7 @@ int loadPattern(char *message, enum TLogLevel printLevel,
|
||||
}
|
||||
}
|
||||
// iocontrol
|
||||
#ifndef MYTHEN3D
|
||||
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO
|
||||
if (ret == OK) {
|
||||
ret = validate_writePatternIOControl(message, pat->ioctrl);
|
||||
}
|
||||
@ -835,7 +837,7 @@ int getPattern(char *message, patternParameters *pat) {
|
||||
pat->word[i] = retval64;
|
||||
}
|
||||
// iocontrol
|
||||
#ifndef MYTHEN3D
|
||||
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO
|
||||
if (ret == OK) {
|
||||
validate_readPatternIOControl();
|
||||
}
|
||||
@ -956,7 +958,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
||||
uint64_t word = 0;
|
||||
|
||||
// cannot scan values
|
||||
#ifdef VIRTUAL
|
||||
#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD)
|
||||
if (sscanf(line, "%s 0x%x 0x%lx", command, &addr, &word) != 3) {
|
||||
#else
|
||||
if (sscanf(line, "%s 0x%x 0x%llx", command, &addr, &word) != 3) {
|
||||
@ -971,7 +973,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
||||
}
|
||||
|
||||
// patioctrl
|
||||
#ifndef MYTHEN3D
|
||||
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) // TODO
|
||||
if (!strncmp(line, "patioctrl", strlen("patioctrl"))) {
|
||||
uint64_t arg = 0;
|
||||
|
||||
@ -1063,7 +1065,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
||||
uint64_t waittime = 0;
|
||||
|
||||
// cannot scan values
|
||||
#ifdef VIRTUAL
|
||||
#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD)
|
||||
if (sscanf(line, "%s %d %ld", command, &level, &waittime) != 3) {
|
||||
#else
|
||||
if (sscanf(line, "%s %d %lld", command, &level, &waittime) != 3) {
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include "sls/sls_detector_funcs.h"
|
||||
#include "slsDetectorFunctionList.h"
|
||||
|
||||
#if defined(CHIPTESTBOARDD) || defined(MYTHEN3D)
|
||||
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) || \
|
||||
defined(MYTHEN3D)
|
||||
#include "Pattern.h"
|
||||
#include "loadPattern.h"
|
||||
#endif
|
||||
@ -719,9 +720,6 @@ int set_timing_mode(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Setting external communication mode to %d\n", arg));
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// set
|
||||
if (((int)arg != GET_FLAG) && (Server_VerifyLock() == OK)) {
|
||||
switch (arg) {
|
||||
@ -758,7 +756,7 @@ int set_timing_mode(int file_des) {
|
||||
validate(&ret, mess, (int)arg, (int)retval, "set timing mode", DEC);
|
||||
#endif
|
||||
LOG(logDEBUG1, ("Timing Mode: %d\n", retval));
|
||||
#endif
|
||||
|
||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
@ -2219,9 +2217,6 @@ int get_num_frames(int file_des) {
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
if (!scan) {
|
||||
retval = getNumFrames();
|
||||
@ -2231,7 +2226,6 @@ int get_num_frames(int file_des) {
|
||||
LOG(logDEBUG1, ("retval num frames (num scan steps) %lld\n",
|
||||
(long long int)retval));
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
@ -2244,9 +2238,6 @@ int set_num_frames(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Setting number of frames %lld\n", (long long int)arg));
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
// only set number of frames if normal mode (not scan)
|
||||
@ -2292,7 +2283,6 @@ int set_num_frames(int file_des) {
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, NULL, 0);
|
||||
}
|
||||
|
||||
@ -2301,13 +2291,9 @@ int get_num_triggers(int file_des) {
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int64_t retval = -1;
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
retval = getNumTriggers();
|
||||
LOG(logDEBUG1, ("retval num triggers %lld\n", (long long int)retval));
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
@ -2320,9 +2306,6 @@ int set_num_triggers(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Setting number of triggers %lld\n", (long long int)arg));
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
#if JUNGFRAUD
|
||||
@ -2342,7 +2325,6 @@ int set_num_triggers(int file_des) {
|
||||
validate64(&ret, mess, arg, retval, "set number of triggers", DEC);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT64, NULL, 0);
|
||||
}
|
||||
|
||||
@ -2896,7 +2878,8 @@ int get_frames_left(int file_des) {
|
||||
int64_t retval = -1;
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
|
||||
!defined(XILINX_CHIPTESTBOARDD)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -2912,7 +2895,8 @@ int get_triggers_left(int file_des) {
|
||||
int64_t retval = -1;
|
||||
|
||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
|
||||
!defined(XILINX_CHIPTESTBOARDD)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -3062,9 +3046,6 @@ int set_dynamic_range(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Setting dr to %d\n", dr));
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// set & get
|
||||
if ((dr == GET_FLAG) || (Server_VerifyLock() == OK)) {
|
||||
// check dr
|
||||
@ -3085,7 +3066,8 @@ int set_dynamic_range(int file_des) {
|
||||
case 32:
|
||||
#endif
|
||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||
defined(CHIPTESTBOARDD) || defined(GOTTHARD2D)
|
||||
defined(CHIPTESTBOARDD) || defined(GOTTHARD2D) || \
|
||||
defined(XILINX_CHIPTESTBOARDD)
|
||||
case 16:
|
||||
#endif
|
||||
if (dr >= 0) {
|
||||
@ -3113,7 +3095,6 @@ int set_dynamic_range(int file_des) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
@ -3359,7 +3340,8 @@ int set_pattern_word(int file_des) {
|
||||
|
||||
if (receiveData(file_des, args, sizeof(args), INT64) < 0)
|
||||
return printSocketReadError();
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
int addr = (int)args[0];
|
||||
@ -3387,7 +3369,8 @@ int set_pattern_loop_addresses(int file_des) {
|
||||
|
||||
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
int loopLevel = args[0];
|
||||
@ -3433,7 +3416,8 @@ int set_pattern_loop_cycles(int file_des) {
|
||||
|
||||
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
int loopLevel = args[0];
|
||||
@ -3462,7 +3446,8 @@ int set_pattern_wait_addr(int file_des) {
|
||||
|
||||
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
int loopLevel = args[0];
|
||||
@ -3491,7 +3476,8 @@ int set_pattern_wait_time(int file_des) {
|
||||
|
||||
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||
return printSocketReadError();
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
int loopLevel = (int)args[0];
|
||||
@ -3521,7 +3507,8 @@ int set_pattern_mask(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Set Pattern Mask to %d\n", arg));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
@ -3549,7 +3536,8 @@ int get_pattern_mask(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Get Pattern Mask\n"));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only get
|
||||
@ -3570,7 +3558,8 @@ int set_pattern_bit_mask(int file_des) {
|
||||
return printSocketReadError();
|
||||
LOG(logDEBUG1, ("Set Pattern Bit Mask to %d\n", arg));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
@ -3599,7 +3588,8 @@ int get_pattern_bit_mask(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Get Pattern Bit Mask\n"));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only get
|
||||
@ -3622,7 +3612,8 @@ int write_adc_register(int file_des) {
|
||||
uint32_t val = args[1];
|
||||
LOG(logDEBUG1, ("Writing 0x%x to ADC Register 0x%x\n", val, addr));
|
||||
|
||||
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D)
|
||||
#if defined(EIGERD) || defined(GOTTHARD2D) || defined(MYTHEN3D) || \
|
||||
defined(XILINX_CHIPTESTBOARDD)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
#ifndef VIRTUAL
|
||||
@ -4017,7 +4008,7 @@ int reset_fpga(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Reset FPGA\n"));
|
||||
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \
|
||||
defined(MYTHEN3D)
|
||||
defined(MYTHEN3D) || defined(XILINX_CHIPTESTBOARDD)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
@ -5026,9 +5017,6 @@ int set_detector_position(int file_des) {
|
||||
LOG(logDEBUG, ("Setting detector positions: [maxy:%u, modIndex:%u]\n",
|
||||
args[0], args[1]));
|
||||
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// only set
|
||||
if (Server_VerifyLock() == OK) {
|
||||
// if in update mode, there is no need to do this (also detector not set
|
||||
@ -5039,14 +5027,10 @@ int set_detector_position(int file_des) {
|
||||
calculate_and_set_position();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
}
|
||||
|
||||
int check_detector_idle(const char *s) {
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
return FAIL;
|
||||
#else
|
||||
enum runStatus status = getRunStatus();
|
||||
if (status != IDLE && status != RUN_FINISHED && status != STOPPED &&
|
||||
status != ERROR) {
|
||||
@ -5058,7 +5042,6 @@ int check_detector_idle(const char *s) {
|
||||
LOG(logERROR, (mess));
|
||||
}
|
||||
return ret;
|
||||
#endif
|
||||
}
|
||||
|
||||
int is_udp_configured() {
|
||||
@ -5125,7 +5108,6 @@ int is_udp_configured() {
|
||||
}
|
||||
|
||||
void configure_mac() {
|
||||
#ifndef XILINX_CHIPTESTBOARDD
|
||||
if (isControlServer) {
|
||||
if (is_udp_configured() == OK) {
|
||||
ret = configureMAC();
|
||||
@ -5152,7 +5134,6 @@ void configure_mac() {
|
||||
}
|
||||
configured = FAIL;
|
||||
LOG(logWARNING, ("Configure FAIL, not all parameters configured yet\n"));
|
||||
#endif
|
||||
}
|
||||
|
||||
int set_source_udp_ip(int file_des) {
|
||||
@ -7105,7 +7086,7 @@ int get_num_channels(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Getting number of channels\n"));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -7827,7 +7808,8 @@ int set_pattern(int file_des) {
|
||||
char args[MAX_STR_LENGTH];
|
||||
memset(args, 0, MAX_STR_LENGTH);
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
|
||||
@ -7864,7 +7846,8 @@ int get_pattern_file(int file_des) {
|
||||
|
||||
LOG(logDEBUG1, ("Getting pattern file name\n"));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
// get only
|
||||
@ -7878,7 +7861,8 @@ int get_pattern(int file_des) {
|
||||
ret = OK;
|
||||
memset(mess, 0, sizeof(mess));
|
||||
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && \
|
||||
!defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||
#else
|
||||
@ -9753,9 +9737,7 @@ int get_kernel_version(int file_des) {
|
||||
memset(retvals, 0, MAX_STR_LENGTH);
|
||||
|
||||
LOG(logDEBUG1, ("Getting kernel version\n"));
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
|
||||
// get only
|
||||
ret = getKernelVersion(retvals);
|
||||
if (ret == FAIL) {
|
||||
@ -9768,7 +9750,6 @@ int get_kernel_version(int file_des) {
|
||||
} else {
|
||||
LOG(logDEBUG1, ("kernel version: [%s]\n", retvals));
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
|
||||
}
|
||||
|
||||
@ -10530,12 +10511,10 @@ int get_hardware_version(int file_des) {
|
||||
memset(mess, 0, sizeof(mess));
|
||||
char retvals[MAX_STR_LENGTH];
|
||||
memset(retvals, 0, MAX_STR_LENGTH);
|
||||
#ifdef XILINX_CHIPTESTBOARDD
|
||||
functionNotImplemented();
|
||||
#else
|
||||
|
||||
getHardwareVersion(retvals);
|
||||
LOG(logDEBUG1, ("hardware version retval: %s\n", retvals));
|
||||
#endif
|
||||
|
||||
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ add_executable(xilinx_ctbDetectorServer_virtual
|
||||
../slsDetectorServer/src/arm64.c
|
||||
../slsDetectorServer/src/common.c
|
||||
../slsDetectorServer/src/sharedMemory.c
|
||||
../slsDetectorServer/src/loadPattern.c
|
||||
../../slsSupportLib/src/md5.c
|
||||
)
|
||||
|
||||
|
@ -18,7 +18,7 @@ DESTDIR ?= bin
|
||||
INSTMODE = 0777
|
||||
|
||||
SRCS = slsDetectorFunctionList.c
|
||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)arm64.c $(main_src)common.c $(main_src)/sharedMemory.c $(md5_dir)md5.c
|
||||
SRCS += $(main_src)slsDetectorServer.c $(main_src)slsDetectorServer_funcs.c $(main_src)communication_funcs.c $(main_src)arm64.c $(main_src)common.c $(main_src)/sharedMemory.c $(main_src)/loadPattern.c $(md5_dir)md5.c
|
||||
|
||||
OBJS = $(SRCS:.c=.o)
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -7,10 +7,11 @@
|
||||
#include "sharedMemory.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
#include "loadPattern.h"
|
||||
|
||||
#include <arpa/inet.h> // INET_ADDRSTRLEN
|
||||
#include <string.h>
|
||||
#include <unistd.h> // usleep
|
||||
#include <arpa/inet.h> // INET_ADDRSTRLEN
|
||||
|
||||
|
||||
// Global variable from slsDetectorServer_funcs
|
||||
extern int debugflag;
|
||||
@ -51,14 +52,10 @@ void basictests() {
|
||||
}
|
||||
|
||||
#ifndef VIRTUAL
|
||||
/*if ((!debugflag) && (!updateFlag) &&
|
||||
((validateKernelVersion(KERNEL_DATE_VRSN) == FAIL) ||
|
||||
(checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {*/
|
||||
if ((!debugflag) && (!updateFlag) &&
|
||||
((validateKernelVersion(KERNEL_DATE_VRSN) == FAIL) ||
|
||||
(checkType() == FAIL) /*|| (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL)*/)) {
|
||||
(checkType() == FAIL) || (testFpga() == FAIL) ||
|
||||
(testBus() == FAIL))) {
|
||||
sprintf(initErrorMessage,
|
||||
"Could not pass basic tests of FPGA and bus. Cannot proceed. "
|
||||
"Check Firmware. (Firmware version:0x%lx) \n",
|
||||
@ -92,8 +89,7 @@ int checkType() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
u_int32_t type =
|
||||
((bus_r(FPGAVERSIONREG) & DETTYPE_MSK) >> DETTYPE_OFST);
|
||||
u_int32_t type = ((bus_r(FPGAVERSIONREG) & DETTYPE_MSK) >> DETTYPE_OFST);
|
||||
if (type != XILINX_CHIPTESTBOARD) {
|
||||
LOG(logERROR,
|
||||
("This is not a Xilinx CTB firmware (read %d, expected %d)\n", type,
|
||||
@ -103,6 +99,122 @@ int checkType() {
|
||||
return OK;
|
||||
}
|
||||
|
||||
int testFpga() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
LOG(logINFO, ("Testing FPGA:\n"));
|
||||
|
||||
// fixed pattern
|
||||
int ret = OK;
|
||||
|
||||
/* TODO: FIX PATTERN not defined in firmware
|
||||
uint32_t val = bus_r(FIX_PATT_REG);
|
||||
if (val == FIX_PATT_VAL) {
|
||||
LOG(logINFO, ("\tFixed pattern: successful match (0x%08x)\n", val));
|
||||
} else {
|
||||
LOG(logERROR,
|
||||
("Fixed pattern does not match! Read 0x%08x, expected 0x%08x\n",
|
||||
val, FIX_PATT_VAL));
|
||||
ret = FAIL;
|
||||
}
|
||||
*/
|
||||
|
||||
if (ret == OK) {
|
||||
// Delay LSB reg
|
||||
LOG(logINFO, ("\tTesting Delay LSB Register:\n"));
|
||||
uint32_t addr = DELAYINREG1;
|
||||
|
||||
// store previous delay value
|
||||
uint32_t previousValue = bus_r(addr);
|
||||
|
||||
volatile uint32_t val = 0, readval = 0;
|
||||
int times = 1000 * 1000;
|
||||
for (int i = 0; i < times; ++i) {
|
||||
val = 0x5A5A5A5A - i;
|
||||
bus_w(addr, val);
|
||||
readval = bus_r(addr);
|
||||
if (readval != val) {
|
||||
LOG(logERROR, ("1:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n",
|
||||
i, val, readval));
|
||||
ret = FAIL;
|
||||
break;
|
||||
}
|
||||
val = (i + (i << 10) + (i << 20));
|
||||
bus_w(addr, val);
|
||||
readval = bus_r(addr);
|
||||
if (readval != val) {
|
||||
LOG(logERROR, ("2:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n",
|
||||
i, val, readval));
|
||||
ret = FAIL;
|
||||
break;
|
||||
}
|
||||
val = 0x0F0F0F0F;
|
||||
bus_w(addr, val);
|
||||
readval = bus_r(addr);
|
||||
if (readval != val) {
|
||||
LOG(logERROR, ("3:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n",
|
||||
i, val, readval));
|
||||
ret = FAIL;
|
||||
break;
|
||||
}
|
||||
val = 0xF0F0F0F0;
|
||||
bus_w(addr, val);
|
||||
readval = bus_r(addr);
|
||||
if (readval != val) {
|
||||
LOG(logERROR, ("4:Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n",
|
||||
i, val, readval));
|
||||
ret = FAIL;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// write back previous value
|
||||
bus_w(addr, previousValue);
|
||||
if (ret == OK) {
|
||||
LOG(logINFO,
|
||||
("\tSuccessfully tested FPGA Delay LSB Register %d times\n",
|
||||
times));
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
int testBus() {
|
||||
#ifdef VIRTUAL
|
||||
return OK;
|
||||
#endif
|
||||
LOG(logINFO, ("Testing Bus:\n"));
|
||||
|
||||
int ret = OK;
|
||||
uint32_t addr = DELAYINREG1;
|
||||
|
||||
// store previous delay value
|
||||
uint32_t previousValue = bus_r(addr);
|
||||
|
||||
volatile uint32_t val = 0, readval = 0;
|
||||
int times = 1000 * 1000;
|
||||
|
||||
for (int i = 0; i < times; ++i) {
|
||||
val += 0xbbbbb;
|
||||
bus_w(addr, val);
|
||||
readval = bus_r(addr);
|
||||
if (readval != val) {
|
||||
LOG(logERROR, ("Mismatch! Loop(%d): Wrote 0x%x, read 0x%x\n", i,
|
||||
val, readval));
|
||||
ret = FAIL;
|
||||
}
|
||||
}
|
||||
|
||||
// write back previous value
|
||||
bus_w(addr, previousValue);
|
||||
|
||||
if (ret == OK) {
|
||||
LOG(logINFO, ("\tSuccessfully tested bus %d times\n", times));
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Ids */
|
||||
|
||||
void getServerVersion(char *version) { strcpy(version, APIXILINXCTB); }
|
||||
@ -114,6 +226,8 @@ uint64_t getFirmwareVersion() {
|
||||
return ((bus_r(FPGAVERSIONREG) & COMPDATE_MSK) >> COMPDATE_OFST);
|
||||
}
|
||||
|
||||
void getHardwareVersion(char *version) { strcpy(version, "Not applicable"); }
|
||||
|
||||
u_int64_t getDetectorMAC() {
|
||||
#ifdef VIRTUAL
|
||||
return 0;
|
||||
@ -194,18 +308,128 @@ void initStopServer() {
|
||||
/* set up detector */
|
||||
|
||||
void setupDetector() {
|
||||
LOG(logINFO, ("This Server is for 1 Xilinx Chip Test Board\n"));
|
||||
LOG(logINFO, ("Setting up Server for 1 Xilinx Chip Test Board\n"));
|
||||
#ifdef VIRTUAL
|
||||
sharedMemory_setStatus(IDLE);
|
||||
initializePatternWord();
|
||||
#endif
|
||||
LOG(logINFO, ("Goodbye...\n"));
|
||||
|
||||
LOG(logINFOBLUE, ("Setting Default parameters\n"));
|
||||
initializePatternAddresses();
|
||||
|
||||
setNumFrames(DEFAULT_NUM_FRAMES);
|
||||
setNumTriggers(DEFAULT_NUM_CYCLES);
|
||||
setTiming(DEFAULT_TIMING_MODE);
|
||||
}
|
||||
|
||||
/* set parameters - dr */
|
||||
|
||||
int setDynamicRange(int dr) {
|
||||
if (dr == 16)
|
||||
return OK;
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
int getDynamicRange(int *retval) {
|
||||
*retval = DYNAMIC_RANGE;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* parameters - timer */
|
||||
|
||||
void setNumFrames(int64_t val) {
|
||||
if (val > 0) {
|
||||
LOG(logINFO, ("Setting number of frames %ld\n", val));
|
||||
setU64BitReg(val, FRAMESINREG1, FRAMESINREG2);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t getNumFrames() { return getU64BitReg(FRAMESINREG1, FRAMESINREG2); }
|
||||
|
||||
void setNumTriggers(int64_t val) {
|
||||
if (val > 0) {
|
||||
LOG(logINFO, ("Setting number of triggers %ld\n", val));
|
||||
setU64BitReg(val, CYCLESINREG1, CYCLESINREG2);
|
||||
}
|
||||
}
|
||||
|
||||
int64_t getNumTriggers() { return getU64BitReg(CYCLESINREG1, CYCLESINREG2); }
|
||||
|
||||
int64_t getNumFramesLeft() {
|
||||
return getU64BitReg(FRAMESOUTREG1, FRAMESOUTREG2);
|
||||
}
|
||||
|
||||
int64_t getNumTriggersLeft() {
|
||||
return getU64BitReg(CYCLESOUTREG1, CYCLESOUTREG2);
|
||||
}
|
||||
|
||||
/* parameters - timing, extsig */
|
||||
|
||||
void setTiming(enum timingMode arg) {
|
||||
switch (arg) {
|
||||
case AUTO_TIMING:
|
||||
LOG(logINFO, ("Set Timing: Auto\n"));
|
||||
bus_w(FLOWCONTROLREG, bus_r(FLOWCONTROLREG) & ~TRIGGERENABLE_MSK);
|
||||
break;
|
||||
case TRIGGER_EXPOSURE:
|
||||
LOG(logINFO, ("Set Timing: Trigger\n"));
|
||||
bus_w(FLOWCONTROLREG, bus_r(FLOWCONTROLREG) | TRIGGERENABLE_MSK);
|
||||
break;
|
||||
default:
|
||||
LOG(logERROR, ("Unknown timing mode %d\n", arg));
|
||||
}
|
||||
}
|
||||
|
||||
enum timingMode getTiming() {
|
||||
if (bus_r(FLOWCONTROLREG) == TRIGGERENABLE_MSK)
|
||||
return TRIGGER_EXPOSURE;
|
||||
return AUTO_TIMING;
|
||||
}
|
||||
|
||||
int setDetectorPosition(int pos[]) {
|
||||
memcpy(detPos, pos, sizeof(detPos));
|
||||
// TODO
|
||||
return OK;
|
||||
}
|
||||
|
||||
int configureMAC() {
|
||||
// TODO
|
||||
LOG(logINFO, ("Configuring MAC\n"));
|
||||
return OK;
|
||||
}
|
||||
|
||||
int *getDetectorPosition() { return detPos; }
|
||||
|
||||
int getNumberofUDPInterfaces() { return 1; }
|
||||
int getNumberofUDPInterfaces() { return 1; }
|
||||
|
||||
/* aquisition */
|
||||
|
||||
enum runStatus getRunStatus() {
|
||||
LOG(logDEBUG1, ("Getting status\n"));
|
||||
// scan error or running
|
||||
if (sharedMemory_getScanStatus() == ERROR) {
|
||||
LOG(logINFOBLUE, ("Status: scan ERROR\n"));
|
||||
return ERROR;
|
||||
}
|
||||
if (sharedMemory_getScanStatus() == RUNNING) {
|
||||
LOG(logINFOBLUE, ("Status: scan RUNNING\n"));
|
||||
return RUNNING;
|
||||
}
|
||||
#ifdef VIRTUAL
|
||||
if (sharedMemory_getStatus() == RUNNING) {
|
||||
LOG(logINFOBLUE, ("Status: RUNNING\n"));
|
||||
return RUNNING;
|
||||
}
|
||||
LOG(logINFOBLUE, ("Status: IDLE\n"));
|
||||
return IDLE;
|
||||
#endif
|
||||
// TODO: get status
|
||||
LOG(logINFOBLUE, ("Status: IDLE\n"));
|
||||
return IDLE;
|
||||
}
|
||||
|
||||
void getNumberOfChannels(int *nchanx, int *nchany) {
|
||||
// TODO
|
||||
*nchanx = NCHAN;
|
||||
*nchany = 1;
|
||||
}
|
@ -16,3 +16,12 @@
|
||||
|
||||
enum ADCINDEX { V_PWR_IO };
|
||||
enum DACINDEX { D0 };
|
||||
|
||||
/** Default Parameters */
|
||||
#define DEFAULT_NUM_FRAMES (1)
|
||||
#define DEFAULT_NUM_CYCLES (1)
|
||||
#define DYNAMIC_RANGE (16)
|
||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||
|
||||
/* Defines in the Firmware */
|
||||
#define WAIT_TIME_PATTERN_READ (10)
|
@ -585,7 +585,7 @@ patioctrl:
|
||||
function: setPatternIOControl
|
||||
|
||||
patmask:
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern."
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern."
|
||||
inherit_actions: INTEGER_COMMAND_HEX_WIDTH16
|
||||
actions:
|
||||
GET:
|
||||
@ -594,7 +594,7 @@ patmask:
|
||||
function: setPatternMask
|
||||
|
||||
patsetbit:
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits."
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits."
|
||||
inherit_actions: INTEGER_COMMAND_HEX_WIDTH16
|
||||
actions:
|
||||
GET:
|
||||
@ -688,7 +688,7 @@ column:
|
||||
function: setColumn
|
||||
|
||||
timing:
|
||||
help: "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
help: "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger] [auto|trigger|gating|burst_trigger]"
|
||||
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||
actions:
|
||||
GET:
|
||||
@ -1506,7 +1506,7 @@ triggers:
|
||||
|
||||
dr:
|
||||
inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16"
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16"
|
||||
actions:
|
||||
GET:
|
||||
function: getDynamicRange
|
||||
@ -1835,7 +1835,7 @@ parameters:
|
||||
|
||||
savepattern:
|
||||
inherit_actions: EXECUTE_SET_COMMAND_NOID_1ARG
|
||||
help: "\n\t[Ctb][Mythen3] Saves pattern to file (ascii). \n\t[Ctb] Also executes pattern."
|
||||
help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii). \n\t[Ctb] Also executes pattern."
|
||||
actions:
|
||||
PUT:
|
||||
function: savePattern
|
||||
@ -1850,7 +1850,7 @@ detectorserverversion:
|
||||
|
||||
hardwareversion:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector. \n\t[Eiger] Hardware version of front FPGA on detector."
|
||||
help: "\n\tHardware version of detector. \n\t[Eiger] Hardware version of front FPGA on detector."
|
||||
actions:
|
||||
GET:
|
||||
function: getHardwareVersion
|
||||
@ -1885,14 +1885,14 @@ type:
|
||||
|
||||
framesl:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
actions:
|
||||
GET:
|
||||
function: getNumberOfFramesLeft
|
||||
|
||||
triggersl:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of triggers left in acquisition. Only when external trigger used."
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used."
|
||||
actions:
|
||||
GET:
|
||||
function: getNumberOfTriggersLeft
|
||||
@ -1997,7 +1997,7 @@ syncclk:
|
||||
|
||||
patfname:
|
||||
inherit_actions: GET_COMMAND
|
||||
help: "\n\t[Ctb][Mythen3] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file"
|
||||
help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file"
|
||||
actions:
|
||||
GET:
|
||||
function: getPatterFileName
|
||||
@ -3842,7 +3842,7 @@ diodelay:
|
||||
|
||||
# pattern is a keyword in yaml, so patternX is used to avoid it
|
||||
patternX:
|
||||
help: "[fname]\n\t[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line)"
|
||||
help: "[fname]\n\t[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line)"
|
||||
command_name: "pattern"
|
||||
actions:
|
||||
PUT:
|
||||
@ -3855,7 +3855,7 @@ patternX:
|
||||
output: [ 'args.front()' ]
|
||||
|
||||
patword:
|
||||
help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 bit pattern at address of pattern memory.\n\t[Ctb] read is same as executing pattern"
|
||||
help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] 64 bit pattern at address of pattern memory.\n\t[Ctb] read is same as executing pattern"
|
||||
actions:
|
||||
GET:
|
||||
argc: 1
|
||||
@ -3875,7 +3875,7 @@ patword:
|
||||
output: [ "'['", "ToStringHex(arg0, 4)", '", "', "ToStringHex(arg1, 16)", '"]"' ]
|
||||
|
||||
patlimits:
|
||||
help: "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of complete pattern"
|
||||
help: "[start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of complete pattern"
|
||||
actions:
|
||||
GET:
|
||||
argc: -1
|
||||
@ -3895,7 +3895,7 @@ patlimits:
|
||||
output: [ "'['" , "ToStringHex(arg1, 4)" , '", "' , "ToStringHex(arg2, 4)", "']'" ]
|
||||
|
||||
patloop:
|
||||
help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of the loop level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of the loop level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
actions:
|
||||
GET:
|
||||
argc: -1
|
||||
@ -3944,7 +3944,7 @@ patloop2:
|
||||
inherit_actions: patloop0
|
||||
|
||||
patnloop:
|
||||
help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3] Number of cycles of the loop level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
actions:
|
||||
GET:
|
||||
argc: -1
|
||||
@ -3991,7 +3991,7 @@ patnloop2:
|
||||
inherit_actions: patnloop0
|
||||
|
||||
patwait:
|
||||
help: "[0-6] [addr] \n\t[Ctb][Mythen3] Wait address for loop level provided. \n\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided. \n\t[Mythen3] Level options: 0-3 only."
|
||||
actions:
|
||||
GET:
|
||||
argc: -1
|
||||
@ -4037,7 +4037,7 @@ patwait2:
|
||||
inherit_actions: patwait0
|
||||
|
||||
patwaittime:
|
||||
help: "[0-6] [n_clk] \n\t[Ctb][Mythen3] Wait time in clock cycles for the loop provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [n_clk] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for the loop provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
actions:
|
||||
GET:
|
||||
argc: -1
|
||||
|
@ -2703,8 +2703,8 @@ dr:
|
||||
function_alias: dr
|
||||
help: "[value]\n\tDynamic Range or number of bits per pixel in detector.\n\t[Eiger]\
|
||||
\ Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to\
|
||||
\ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2]\
|
||||
\ 16"
|
||||
\ 0.\n\t[Mythen3] Options: 8, 16, 32\n\t[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx\
|
||||
\ Ctb] 16"
|
||||
infer_action: true
|
||||
template: true
|
||||
drlist:
|
||||
@ -3970,8 +3970,8 @@ framesl:
|
||||
store_result_in_t: true
|
||||
command_name: framesl
|
||||
function_alias: framesl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of frames\
|
||||
\ left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\
|
||||
\ of frames left in acquisition. \n\t[Gotthard2] only in continuous auto mode."
|
||||
infer_action: true
|
||||
template: true
|
||||
frametime:
|
||||
@ -4703,8 +4703,8 @@ hardwareversion:
|
||||
store_result_in_t: true
|
||||
command_name: hardwareversion
|
||||
function_alias: hardwareversion
|
||||
help: "\n\t[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version\
|
||||
\ of detector. \n\t[Eiger] Hardware version of front FPGA on detector."
|
||||
help: "\n\tHardware version of detector. \n\t[Eiger] Hardware version of front FPGA\
|
||||
\ on detector."
|
||||
infer_action: true
|
||||
template: true
|
||||
highvoltage:
|
||||
@ -5730,9 +5730,9 @@ patfname:
|
||||
store_result_in_t: true
|
||||
command_name: patfname
|
||||
function_alias: patfname
|
||||
help: "\n\t[Ctb][Mythen3] Gets the pattern file name including path of the last\
|
||||
\ pattern uploaded. Returns an empty if nothing was uploaded or via a server default\
|
||||
\ file"
|
||||
help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path\
|
||||
\ of the last pattern uploaded. Returns an empty if nothing was uploaded or via\
|
||||
\ a server default file"
|
||||
infer_action: true
|
||||
template: true
|
||||
patioctrl:
|
||||
@ -5826,7 +5826,8 @@ patlimits:
|
||||
store_result_in_t: false
|
||||
command_name: patlimits
|
||||
function_alias: patlimits
|
||||
help: "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of complete pattern"
|
||||
help: "[start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of complete\
|
||||
\ pattern"
|
||||
infer_action: true
|
||||
patloop:
|
||||
actions:
|
||||
@ -5899,8 +5900,8 @@ patloop:
|
||||
store_result_in_t: false
|
||||
command_name: patloop
|
||||
function_alias: patloop
|
||||
help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of the loop level\
|
||||
\ provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [start addr] [stop addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Limits of the\
|
||||
\ loop level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
infer_action: true
|
||||
patloop0:
|
||||
actions:
|
||||
@ -6145,8 +6146,8 @@ patmask:
|
||||
store_result_in_t: false
|
||||
command_name: patmask
|
||||
function_alias: patmask
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3] Selects the bits that will have a pattern\
|
||||
\ mask applied to the selected patmask for every pattern."
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have\
|
||||
\ a pattern mask applied to the selected patmask for every pattern."
|
||||
infer_action: true
|
||||
template: true
|
||||
patnloop:
|
||||
@ -6209,8 +6210,8 @@ patnloop:
|
||||
store_result_in_t: false
|
||||
command_name: patnloop
|
||||
function_alias: patnloop
|
||||
help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3] Number of cycles of the loop level provided.\n\
|
||||
\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [n_cycles] \n\t[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop\
|
||||
\ level provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
infer_action: true
|
||||
patnloop0:
|
||||
actions:
|
||||
@ -6422,8 +6423,8 @@ patsetbit:
|
||||
store_result_in_t: false
|
||||
command_name: patsetbit
|
||||
function_alias: patsetbit
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3] Sets the mask applied to every pattern to\
|
||||
\ the selected bits."
|
||||
help: "[64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every\
|
||||
\ pattern to the selected bits."
|
||||
infer_action: true
|
||||
template: true
|
||||
patternX:
|
||||
@ -6448,8 +6449,8 @@ patternX:
|
||||
store_result_in_t: false
|
||||
command_name: pattern
|
||||
function_alias: pattern
|
||||
help: "[fname]\n\t[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead\
|
||||
\ of executing line by line)"
|
||||
help: "[fname]\n\t[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to\
|
||||
\ server (instead of executing line by line)"
|
||||
infer_action: true
|
||||
patternstart:
|
||||
actions:
|
||||
@ -6532,8 +6533,8 @@ patwait:
|
||||
store_result_in_t: false
|
||||
command_name: patwait
|
||||
function_alias: patwait
|
||||
help: "[0-6] [addr] \n\t[Ctb][Mythen3] Wait address for loop level provided. \n\t\
|
||||
[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [addr] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided.\
|
||||
\ \n\t[Mythen3] Level options: 0-3 only."
|
||||
infer_action: true
|
||||
patwait0:
|
||||
actions:
|
||||
@ -6769,8 +6770,8 @@ patwaittime:
|
||||
store_result_in_t: false
|
||||
command_name: patwaittime
|
||||
function_alias: patwaittime
|
||||
help: "[0-6] [n_clk] \n\t[Ctb][Mythen3] Wait time in clock cycles for the loop provided.\n\
|
||||
\t[Mythen3] Level options: 0-3 only."
|
||||
help: "[0-6] [n_clk] \n\t[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for\
|
||||
\ the loop provided.\n\t[Mythen3] Level options: 0-3 only."
|
||||
infer_action: true
|
||||
patwaittime0:
|
||||
actions:
|
||||
@ -6998,8 +6999,8 @@ patword:
|
||||
store_result_in_t: false
|
||||
command_name: patword
|
||||
function_alias: patword
|
||||
help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 bit pattern at address\
|
||||
\ of pattern memory.\n\t[Ctb] read is same as executing pattern"
|
||||
help: "[step or address] [64 bit mask]\n\t[Ctb][Mythen3][Xilinx Ctb] 64 bit pattern\
|
||||
\ at address of pattern memory.\n\t[Ctb] read is same as executing pattern"
|
||||
infer_action: true
|
||||
pedestalmode:
|
||||
actions:
|
||||
@ -9438,8 +9439,8 @@ savepattern:
|
||||
store_result_in_t: false
|
||||
command_name: savepattern
|
||||
function_alias: savepattern
|
||||
help: "\n\t[Ctb][Mythen3] Saves pattern to file (ascii). \n\t[Ctb] Also executes\
|
||||
\ pattern."
|
||||
help: "\n\t[Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii). \n\t[Ctb] Also\
|
||||
\ executes pattern."
|
||||
infer_action: true
|
||||
template: true
|
||||
scan:
|
||||
@ -11229,8 +11230,8 @@ timing:
|
||||
store_result_in_t: false
|
||||
command_name: timing
|
||||
function_alias: timing
|
||||
help: "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2]\
|
||||
\ [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger]\
|
||||
help: "[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx\
|
||||
\ Ctb] [auto|trigger]\n\t[Mythen3] [auto|trigger|gating|trigger_gating]\n\t[Eiger]\
|
||||
\ [auto|trigger|gating|burst_trigger]"
|
||||
infer_action: true
|
||||
template: true
|
||||
@ -11459,8 +11460,8 @@ triggersl:
|
||||
store_result_in_t: true
|
||||
command_name: triggersl
|
||||
function_alias: triggersl
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of triggers\
|
||||
\ left in acquisition. Only when external trigger used."
|
||||
help: "\n\t[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number\
|
||||
\ of triggers left in acquisition. Only when external trigger used."
|
||||
infer_action: true
|
||||
template: true
|
||||
trimbits:
|
||||
|
@ -322,11 +322,11 @@ class Detector {
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */
|
||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
* [Gotthard2] only in continuous auto mode */
|
||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||
* Only when external trigger used */
|
||||
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
|
||||
|
||||
@ -343,7 +343,7 @@ class Detector {
|
||||
/**
|
||||
* [Eiger] Options: 4, 8, 12, 16, 32. If i is 32, also sets clkdivider to 2,
|
||||
* else sets clkdivider to 1 \n [Mythen3] Options: 8, 16, 32 \n
|
||||
* [Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16
|
||||
* [Jungfrau][Moench][Gotthard][CTB][Mythen3][Gotthard2][Xilinx CTB] 16
|
||||
*/
|
||||
void setDynamicRange(int value);
|
||||
|
||||
@ -353,10 +353,10 @@ class Detector {
|
||||
Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2] Options:
|
||||
* AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||
* [Mythen3] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||
* [Eiger] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2][Xilinx CTB]
|
||||
* Options: AUTO_TIMING, TRIGGER_EXPOSURE \n [Mythen3] Options: AUTO_TIMING,
|
||||
* TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n [Eiger] Options: AUTO_TIMING,
|
||||
* TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||
*/
|
||||
void setTimingMode(defs::timingMode value, Positions pos = {});
|
||||
|
||||
@ -1846,20 +1846,20 @@ class Detector {
|
||||
* Pattern *
|
||||
* *
|
||||
* ************************************************/
|
||||
/** [CTB][Mythen3] Gets the pattern file name including path of the last
|
||||
* pattern uploaded. \n Returns an empty if nothing was uploaded or via a
|
||||
* server default file*/
|
||||
/** [CTB][Mythen3][Xilinx CTB] Gets the pattern file name including path of
|
||||
* the last pattern uploaded. \n Returns an empty if nothing was uploaded or
|
||||
* via a server default file*/
|
||||
Result<std::string> getPatterFileName(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] Loads ASCII pattern file directly to server
|
||||
/** [CTB][Mythen3][Xilinx CTB] Loads ASCII pattern file directly to server
|
||||
* (instead of executing line by line)*/
|
||||
void setPattern(const std::string &fname, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] Loads pattern parameters structure directly to
|
||||
* server */
|
||||
/** [CTB][Mythen3][Xilinx CTB] Loads pattern parameters structure directly
|
||||
* to server */
|
||||
void setPattern(const Pattern &pat, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] [Ctb][Mythen3] Saves pattern to file
|
||||
/** [CTB][Mythen3][Xilinx CTB] Saves pattern to file
|
||||
* (ascii). \n [Ctb] Also executes pattern.*/
|
||||
void savePattern(const std::string &fname);
|
||||
|
||||
@ -1872,57 +1872,57 @@ class Detector {
|
||||
/** [CTB] */
|
||||
void setPatternIOControl(uint64_t word, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] same as executing for ctb */
|
||||
/** [CTB][Mythen3][Xilinx CTB] same as executing for ctb */
|
||||
Result<uint64_t> getPatternWord(int addr, Positions pos = {});
|
||||
|
||||
/** [CTB] Caution: If word is -1 reads the addr (same as
|
||||
/** [CTB][Xilinx CTB] Caution: If word is -1 reads the addr (same as
|
||||
* executing the pattern)
|
||||
* [Mythen3] */
|
||||
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
||||
|
||||
/**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/**[CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels
|
||||
* @returns array of start address and stop address
|
||||
*/
|
||||
Result<std::array<int, 2>>
|
||||
getPatternLoopAddresses(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/** [CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
void setPatternLoopAddresses(int level, int start, int stop,
|
||||
Positions pos = {});
|
||||
|
||||
/**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2
|
||||
/**[CTB][Mythen3][Xilinx CTB] Options: level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2
|
||||
/** [CTB][Mythen3][Xilinx CTB] n: 0-2, level: -1 (complete pattern) and 0-2
|
||||
* levels */
|
||||
void setPatternLoopCycles(int level, int n, Positions pos = {});
|
||||
|
||||
/**[CTB][Mythen3] */
|
||||
/**[CTB][Mythen3][Xilinx CTB] */
|
||||
Result<int> getPatternWaitAddr(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] Options: level 0-2 */
|
||||
/** [CTB][Mythen3][Xilinx CTB] Options: level 0-2 */
|
||||
void setPatternWaitAddr(int level, int addr, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] */
|
||||
/** [CTB][Mythen3][Xilinx CTB] */
|
||||
Result<uint64_t> getPatternWaitTime(int level, Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] Options: level 0-2 */
|
||||
/** [CTB][Mythen3][Xilinx CTB] Options: level 0-2 */
|
||||
void setPatternWaitTime(int level, uint64_t t, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] */
|
||||
/** [CTB][Mythen3][Xilinx CTB] */
|
||||
Result<uint64_t> getPatternMask(Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] Selects the bits that will have a pattern mask
|
||||
* applied to the selected patmask for every pattern. */
|
||||
/** [CTB][Mythen3][Xilinx CTB] Selects the bits that will have a pattern
|
||||
* mask applied to the selected patmask for every pattern. */
|
||||
void setPatternMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
/** [CTB][Mythen3] */
|
||||
/** [CTB][Mythen3][Xilinx CTB] */
|
||||
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
||||
|
||||
/** [CTB][Mythen3] Sets the mask applied to every pattern to the
|
||||
/** [CTB][Mythen3][Xilinx CTB] Sets the mask applied to every pattern to the
|
||||
* selected bits */
|
||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||
|
||||
|
@ -3516,7 +3516,7 @@ std::string Caller::dr(int action) {
|
||||
Dynamic Range or number of bits per pixel in detector.
|
||||
[Eiger] Options: 4, 8, 12, 16, 32. If set to 32, also sets clkdivider to 2, else to 0.
|
||||
[Mythen3] Options: 8, 16, 32
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2] 16 )V0G0N"
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Mythen3][Gotthard2][Xilinx Ctb] 16 )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -5242,7 +5242,7 @@ std::string Caller::framesl(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: framesl" << std::endl;
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of frames left in acquisition.
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of frames left in acquisition.
|
||||
[Gotthard2] only in continuous auto mode. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -6039,7 +6039,7 @@ std::string Caller::hardwareversion(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: hardwareversion" << std::endl;
|
||||
os << R"V0G0N(
|
||||
[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector.
|
||||
Hardware version of detector.
|
||||
[Eiger] Hardware version of front FPGA on detector. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -7668,7 +7668,7 @@ std::string Caller::patfname(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patfname" << std::endl;
|
||||
os << R"V0G0N(
|
||||
[Ctb][Mythen3] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file )V0G0N"
|
||||
[Ctb][Mythen3][Xilinx Ctb] Gets the pattern file name including path of the last pattern uploaded. Returns an empty if nothing was uploaded or via a server default file )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -7771,7 +7771,7 @@ std::string Caller::patlimits(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patlimits" << std::endl;
|
||||
os << R"V0G0N([start addr] [stop addr]
|
||||
[Ctb][Mythen3] Limits of complete pattern )V0G0N"
|
||||
[Ctb][Mythen3][Xilinx Ctb] Limits of complete pattern )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -7824,7 +7824,7 @@ std::string Caller::patloop(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patloop" << std::endl;
|
||||
os << R"V0G0N([0-6] [start addr] [stop addr]
|
||||
[Ctb][Mythen3] Limits of the loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Limits of the loop level provided.
|
||||
[Mythen3] Level options: 0-3 only. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -8047,7 +8047,7 @@ std::string Caller::patmask(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patmask" << std::endl;
|
||||
os << R"V0G0N([64 bit mask]
|
||||
[Ctb][Mythen3] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern. )V0G0N"
|
||||
[Ctb][Mythen3][Xilinx Ctb] Selects the bits that will have a pattern mask applied to the selected patmask for every pattern. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -8110,7 +8110,7 @@ std::string Caller::patnloop(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patnloop" << std::endl;
|
||||
os << R"V0G0N([0-6] [n_cycles]
|
||||
[Ctb][Mythen3] Number of cycles of the loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop level provided.
|
||||
[Mythen3] Level options: 0-3 only. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -8325,7 +8325,7 @@ std::string Caller::patsetbit(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patsetbit" << std::endl;
|
||||
os << R"V0G0N([64 bit mask]
|
||||
[Ctb][Mythen3] Sets the mask applied to every pattern to the selected bits. )V0G0N"
|
||||
[Ctb][Mythen3][Xilinx Ctb] Sets the mask applied to every pattern to the selected bits. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -8388,7 +8388,7 @@ std::string Caller::pattern(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patternX" << std::endl;
|
||||
os << R"V0G0N([fname]
|
||||
[Mythen3][Ctb] Loads ASCII pattern file directly to server (instead of executing line by line) )V0G0N"
|
||||
[Mythen3][Ctb][Xilinx Ctb] Loads ASCII pattern file directly to server (instead of executing line by line) )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
@ -8468,7 +8468,7 @@ std::string Caller::patwait(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patwait" << std::endl;
|
||||
os << R"V0G0N([0-6] [addr]
|
||||
[Ctb][Mythen3] Wait address for loop level provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait address for loop level provided.
|
||||
[Mythen3] Level options: 0-3 only. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -8679,7 +8679,7 @@ std::string Caller::patwaittime(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patwaittime" << std::endl;
|
||||
os << R"V0G0N([0-6] [n_clk]
|
||||
[Ctb][Mythen3] Wait time in clock cycles for the loop provided.
|
||||
[Ctb][Mythen3][Xilinx Ctb] Wait time in clock cycles for the loop provided.
|
||||
[Mythen3] Level options: 0-3 only. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -8893,7 +8893,7 @@ std::string Caller::patword(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: patword" << std::endl;
|
||||
os << R"V0G0N([step or address] [64 bit mask]
|
||||
[Ctb][Mythen3] 64 bit pattern at address of pattern memory.
|
||||
[Ctb][Mythen3][Xilinx Ctb] 64 bit pattern at address of pattern memory.
|
||||
[Ctb] read is same as executing pattern )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -12328,7 +12328,7 @@ std::string Caller::savepattern(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: savepattern" << std::endl;
|
||||
os << R"V0G0N(
|
||||
[Ctb][Mythen3] Saves pattern to file (ascii).
|
||||
[Ctb][Mythen3][Xilinx Ctb] Saves pattern to file (ascii).
|
||||
[Ctb] Also executes pattern. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
@ -14727,7 +14727,7 @@ std::string Caller::timing(int action) {
|
||||
os << "Command: timing" << std::endl;
|
||||
os << R"V0G0N([auto|trigger|gating|burst_trigger]
|
||||
Timing Mode of detector.
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2] [auto|trigger]
|
||||
[Jungfrau][Moench][Gotthard][Ctb][Gotthard2][Xilinx Ctb] [auto|trigger]
|
||||
[Mythen3] [auto|trigger|gating|trigger_gating]
|
||||
[Eiger] [auto|trigger|gating|burst_trigger] )V0G0N"
|
||||
<< std::endl;
|
||||
@ -15134,7 +15134,7 @@ std::string Caller::triggersl(int action) {
|
||||
if (action == slsDetectorDefs::HELP_ACTION) {
|
||||
os << "Command: triggersl" << std::endl;
|
||||
os << R"V0G0N(
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
[Gotthard][Jungfrau][Moench][Mythen3][Gotthard2][Ctb][Xilinx Ctb] Number of triggers left in acquisition. Only when external trigger used. )V0G0N"
|
||||
<< std::endl;
|
||||
return os.str();
|
||||
}
|
||||
|
@ -653,7 +653,6 @@ std::vector<defs::dacIndex> Detector::getTemperatureList() const {
|
||||
std::vector<defs::dacIndex> retval;
|
||||
switch (getDetectorType().squash()) {
|
||||
case defs::CHIPTESTBOARD:
|
||||
case defs::XILINX_CHIPTESTBOARD:
|
||||
return std::vector<defs::dacIndex>{defs::SLOW_ADC_TEMP};
|
||||
case defs::JUNGFRAU:
|
||||
case defs::MOENCH:
|
||||
|
@ -24,7 +24,8 @@ TEST_CASE("CALLER::dacname", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2);
|
||||
std::string str_dac_index = "2";
|
||||
auto prev = det.getDacName(ind);
|
||||
@ -58,7 +59,8 @@ TEST_CASE("CALLER::dacindex", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2);
|
||||
std::string str_dac_index = "2";
|
||||
|
||||
@ -83,7 +85,8 @@ TEST_CASE("CALLER::adclist", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev = det.getAdcNames();
|
||||
|
||||
REQUIRE_THROWS(caller.call("adclist", {"a", "s", "d"}, -1, PUT));
|
||||
@ -115,7 +118,8 @@ TEST_CASE("CALLER::adcname", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
int ind = 2;
|
||||
std::string str_adc_index = "2";
|
||||
auto prev = det.getAdcName(ind);
|
||||
@ -149,7 +153,8 @@ TEST_CASE("CALLER::adcindex", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
int ind = 2;
|
||||
std::string str_adc_index = "2";
|
||||
|
||||
@ -174,7 +179,8 @@ TEST_CASE("CALLER::signallist", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev = det.getSignalNames();
|
||||
|
||||
REQUIRE_THROWS(caller.call("signallist", {"a", "s", "d"}, -1, PUT));
|
||||
@ -206,7 +212,8 @@ TEST_CASE("CALLER::signalname", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
int ind = 2;
|
||||
std::string str_signal_index = "2";
|
||||
auto prev = det.getSignalName(ind);
|
||||
@ -240,7 +247,8 @@ TEST_CASE("CALLER::signalindex", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
int ind = 2;
|
||||
std::string str_signal_index = "2";
|
||||
|
||||
@ -266,7 +274,8 @@ TEST_CASE("CALLER::powerlist", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev = det.getPowerNames();
|
||||
|
||||
REQUIRE_THROWS(caller.call("powerlist", {"a", "s", "d"}, -1, PUT));
|
||||
@ -298,7 +307,8 @@ TEST_CASE("CALLER::powername", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2 + defs::V_POWER_A);
|
||||
std::string str_power_index = "2";
|
||||
auto prev = det.getPowerName(ind);
|
||||
@ -332,7 +342,8 @@ TEST_CASE("CALLER::powerindex", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2 + defs::V_POWER_A);
|
||||
std::string str_power_index = "2";
|
||||
|
||||
@ -382,7 +393,8 @@ TEST_CASE("CALLER::slowadclist", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev = det.getSlowADCNames();
|
||||
|
||||
REQUIRE_THROWS(caller.call("slowadclist", {"a", "s", "d"}, -1, PUT));
|
||||
@ -414,7 +426,8 @@ TEST_CASE("CALLER::slowadcname", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2 + defs::SLOW_ADC0);
|
||||
std::string str_slowadc_index = "2";
|
||||
auto prev = det.getSlowADCName(ind);
|
||||
@ -449,7 +462,8 @@ TEST_CASE("CALLER::slowadcindex", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
defs::dacIndex ind = static_cast<defs::dacIndex>(2 + defs::SLOW_ADC0);
|
||||
std::string str_slowadc_index = "2";
|
||||
|
||||
@ -478,12 +492,19 @@ TEST_CASE("CALLER::dac", "[.cmdcall][.dacs]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
for (int i = 0; i < 18; ++i) {
|
||||
SECTION("dac " + std::to_string(i)) {
|
||||
test_dac_caller(static_cast<defs::dacIndex>(i), "dac", 0);
|
||||
if (det_type == defs::CHIPTESTBOARD) {
|
||||
test_dac_caller(static_cast<defs::dacIndex>(i), "dac", 0);
|
||||
} else {
|
||||
REQUIRE_THROWS(
|
||||
caller.call("dac", {std::to_string(i)}, -1, GET));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// eiger
|
||||
// REQUIRE_THROWS(caller.call("dac", {"vthreshold"}, -1, GET));
|
||||
// REQUIRE_THROWS(caller.call("dac", {"vsvp"}, -1, GET));
|
||||
|
@ -23,7 +23,8 @@ TEST_CASE("Caller::patfname", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
REQUIRE_THROWS(caller.call("patfname", {}, -1, PUT));
|
||||
REQUIRE_NOTHROW(caller.call("patfname", {}, -1, GET));
|
||||
} else {
|
||||
@ -35,7 +36,8 @@ TEST_CASE("Caller::pattern", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
// no proper test for put
|
||||
REQUIRE_THROWS(caller.call("pattern", {}, -1, GET));
|
||||
} else {
|
||||
@ -47,7 +49,8 @@ TEST_CASE("Caller::savepattern", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
REQUIRE_THROWS(
|
||||
caller.call("savepattern", {"/tmp/pattern.txt"}, -1, GET));
|
||||
if (det.size() == 1) {
|
||||
@ -108,7 +111,8 @@ TEST_CASE("Caller::patword", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
int addr = 0x23;
|
||||
std::string saddr = ToStringHex(addr, 4);
|
||||
auto prev_val = det.getPatternWord(addr);
|
||||
@ -118,6 +122,12 @@ TEST_CASE("Caller::patword", "[.cmdcall]") {
|
||||
REQUIRE(oss.str() ==
|
||||
"patword [" + saddr + ", 0xc15004808d0a21a4]\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
caller.call("patword", {saddr, "0x815004808d0a21a4"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() ==
|
||||
"patword [" + saddr + ", 0x815004808d0a21a4]\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
caller.call("patword", {saddr, "0xaadf0"}, -1, PUT, oss);
|
||||
@ -143,7 +153,8 @@ TEST_CASE("Caller::patlimits", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternLoopAddresses(-1);
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -169,7 +180,8 @@ TEST_CASE("Caller::patloop", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -217,7 +229,8 @@ TEST_CASE("Caller::patnloop", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -262,7 +275,8 @@ TEST_CASE("Caller::patwait", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -307,7 +321,8 @@ TEST_CASE("Caller::patwaittime", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||
// m3 only has 3 levels
|
||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||
@ -352,7 +367,8 @@ TEST_CASE("Caller::patmask", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
@ -377,7 +393,8 @@ TEST_CASE("Caller::patsetbit", "[.cmdcall]") {
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
|
||||
if (det_type == defs::CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
if (det_type == defs::CHIPTESTBOARD ||
|
||||
det_type == defs::XILINX_CHIPTESTBOARD || det_type == defs::MYTHEN3) {
|
||||
auto prev_val = det.getPatternBitMask();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -4,11 +4,11 @@
|
||||
#define RELEASE "developer"
|
||||
#define APILIB "developer 0x230224"
|
||||
#define APIRECEIVER "developer 0x230224"
|
||||
#define APIXILINXCTB "developer 0x240104"
|
||||
#define APICTB "developer 0x240104"
|
||||
#define APIGOTTHARD "developer 0x240104"
|
||||
#define APIGOTTHARD2 "developer 0x240104"
|
||||
#define APIJUNGFRAU "developer 0x240104"
|
||||
#define APIMYTHEN3 "developer 0x240104"
|
||||
#define APIMOENCH "developer 0x240104"
|
||||
#define APIEIGER "developer 0x240104"
|
||||
#define APICTB "developer 0x240110"
|
||||
#define APIGOTTHARD "developer 0x240110"
|
||||
#define APIGOTTHARD2 "developer 0x240110"
|
||||
#define APIJUNGFRAU "developer 0x240110"
|
||||
#define APIMYTHEN3 "developer 0x240110"
|
||||
#define APIMOENCH "developer 0x240110"
|
||||
#define APIEIGER "developer 0x240110"
|
||||
#define APIXILINXCTB "developer 0x240111"
|
||||
|
@ -99,7 +99,9 @@ def loadConfig(name, rx_hostname, settingsdir):
|
||||
Log(Fore.GREEN, 'Loading config')
|
||||
try:
|
||||
d = Detector()
|
||||
if name == 'eiger':
|
||||
if name == 'xilinx_ctb':
|
||||
d.hostname = 'localhost'
|
||||
elif name == 'eiger':
|
||||
d.hostname = 'localhost:' + str(DEFAULT_TCP_CNTRL_PORTNO) + '+localhost:' + str(HALFMOD2_TCP_CNTRL_PORTNO)
|
||||
#d.udp_dstport = {2: 50003}
|
||||
# will set up for every module
|
||||
@ -174,6 +176,7 @@ if args.servers is None:
|
||||
'gotthard',
|
||||
'ctb',
|
||||
'moench',
|
||||
'xilinx_ctb'
|
||||
]
|
||||
else:
|
||||
servers = args.servers
|
||||
|
Reference in New Issue
Block a user