mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-19 18:40:01 +02:00
Dev/xilinx defaults and pattern (#888)
* implemented testbus, testfpga, set/get #frames, triggers, allowed that and for connection to client, also allowed, getnumchannels, configuremac, getrunstatus, setdetectorposition with dummy values * connected kernelversion, hardwareversion, versions, framesl, triggersl, dr, timingmode, pattern (except patioctrl) thats there for altera ctb * replaced set/get64Bit to set/getU64bit in all loadpattern.c for (ctb and m3 also)
This commit is contained in:
parent
9a08ecc5a5
commit
c8bb70f876
@ -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.
Binary file not shown.
@ -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);
|
||||
|
@ -86,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
|
||||
@ -197,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();
|
||||
@ -309,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
|
||||
@ -445,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);
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
|
||||
/* global variables */
|
||||
#define CSP0 (0xB0010000)/// 0xB008_0000
|
||||
#define CSP0 (0xB0010000)
|
||||
#define MEM_SIZE 0x100000
|
||||
|
||||
u_int32_t *csp0base = 0;
|
||||
|
@ -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);
|
||||
//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,23 +313,23 @@ 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,
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||
case 1:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_1_LSB_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,
|
||||
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,
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||
case 4:
|
||||
return get64BitReg(PATTERN_WAIT_TIMER_4_LSB_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,
|
||||
return getU64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
#endif
|
||||
default:
|
||||
@ -369,28 +371,28 @@ void setPatternWaitTime(int level, uint64_t t) {
|
||||
(long long int)t));
|
||||
switch (level) {
|
||||
case 0:
|
||||
set64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
setU64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||
break;
|
||||
#endif
|
||||
@ -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,7 @@
|
||||
#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 +719,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 +755,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));
|
||||
}
|
||||
|
||||
@ -2880,7 +2877,7 @@ 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
|
||||
@ -2896,7 +2893,7 @@ 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
|
||||
@ -3046,9 +3043,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
|
||||
@ -3069,7 +3063,7 @@ 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) {
|
||||
@ -3097,7 +3091,6 @@ int set_dynamic_range(int file_des) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||
}
|
||||
|
||||
@ -3343,7 +3336,7 @@ 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];
|
||||
@ -3371,7 +3364,7 @@ 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];
|
||||
@ -3417,7 +3410,7 @@ 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];
|
||||
@ -3446,7 +3439,7 @@ 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];
|
||||
@ -3475,7 +3468,7 @@ 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];
|
||||
@ -3505,7 +3498,7 @@ 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
|
||||
@ -3533,7 +3526,7 @@ 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
|
||||
@ -3554,7 +3547,7 @@ 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
|
||||
@ -3583,7 +3576,7 @@ 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
|
||||
@ -7801,7 +7794,7 @@ 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
|
||||
|
||||
@ -7838,7 +7831,7 @@ 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
|
||||
@ -7852,7 +7845,7 @@ 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
|
||||
@ -9727,9 +9720,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) {
|
||||
@ -9742,7 +9733,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));
|
||||
}
|
||||
|
||||
@ -10504,12 +10494,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,6 +7,9 @@
|
||||
#include "sharedMemory.h"
|
||||
#include "sls/versionAPI.h"
|
||||
|
||||
#include "loadPattern.h"
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h> // usleep
|
||||
#include <arpa/inet.h> // INET_ADDRSTRLEN
|
||||
@ -227,6 +230,10 @@ 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;
|
||||
@ -310,12 +317,29 @@ void setupDetector() {
|
||||
LOG(logINFO, ("Setting up Server for 1 Xilinx Chip Test Board\n"));
|
||||
#ifdef VIRTUAL
|
||||
sharedMemory_setStatus(IDLE);
|
||||
initializePatternWord();
|
||||
#endif
|
||||
|
||||
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 */
|
||||
@ -338,6 +362,37 @@ void setNumTriggers(int64_t val) {
|
||||
|
||||
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
|
||||
|
@ -21,3 +21,8 @@ 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) // TODO?
|
@ -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
|
||||
|
@ -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,7 +353,7 @@ class Detector {
|
||||
Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
|
||||
|
||||
/**
|
||||
* [Gotthard][Jungfrau][Moench][Gotthard][CTB][Gotthard2] Options:
|
||||
* [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
|
||||
@ -1846,20 +1846,20 @@ class Detector {
|
||||
* Pattern *
|
||||
* *
|
||||
* ************************************************/
|
||||
/** [CTB][Mythen3] Gets the pattern file name including path of the last
|
||||
/** [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
|
||||
/** [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
|
||||
/** [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 = {});
|
||||
|
||||
|
@ -23,7 +23,7 @@ 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 +35,7 @@ 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 +47,7 @@ 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 +108,7 @@ 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 +118,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 +149,7 @@ 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 +175,7 @@ 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 +223,7 @@ 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 +268,7 @@ 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 +313,7 @@ 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 +358,7 @@ 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 +383,7 @@ 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;
|
||||
|
@ -87,13 +87,8 @@ TEST_CASE("CALLER::virtual", "[.cmdcall]") {
|
||||
TEST_CASE("CALLER::versions", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
REQUIRE_NOTHROW(caller.call("versions", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("versions", {"0"}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("versions", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CALLER::packageversion", "[.cmdcall]") {
|
||||
@ -127,25 +122,15 @@ TEST_CASE("CALLER::detectorserverversion", "[.cmdcall]") {
|
||||
TEST_CASE("CALLER::hardwareversion", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
REQUIRE_NOTHROW(caller.call("hardwareversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("hardwareversion", {"0"}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("hardwareversion", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CALLER::kernelversion", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
REQUIRE_NOTHROW(caller.call("kernelversion", {}, -1, GET));
|
||||
REQUIRE_THROWS(caller.call("kernelversion", {"0"}, -1, PUT));
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("kernelversion", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CALLER::serialnumber", "[.cmdcall]") {
|
||||
@ -959,7 +944,7 @@ TEST_CASE("CALLER::framesl", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
if (det_type == defs::EIGER) {
|
||||
REQUIRE_THROWS(caller.call("framesl", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_NOTHROW(caller.call("framesl", {}, -1, GET));
|
||||
@ -970,7 +955,7 @@ TEST_CASE("CALLER::triggersl", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::XILINX_CHIPTESTBOARD) {
|
||||
if (det_type == defs::EIGER) {
|
||||
REQUIRE_THROWS(caller.call("triggersl", {}, -1, GET));
|
||||
} else {
|
||||
REQUIRE_NOTHROW(caller.call("triggersl", {}, -1, GET));
|
||||
@ -1017,7 +1002,6 @@ TEST_CASE("CALLER::dr", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
if (det_type == defs::EIGER) {
|
||||
auto dr = det.getDynamicRange().squash();
|
||||
std::array<int, 4> vals{4, 8, 16, 32};
|
||||
@ -1054,9 +1038,6 @@ TEST_CASE("CALLER::dr", "[.cmdcall]") {
|
||||
caller.call("dr", {"16"}, -1, PUT, oss2);
|
||||
REQUIRE(oss2.str() == "dr 16\n");
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("dr", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CALLER::drlist", "[.cmdcall]") {
|
||||
@ -1070,7 +1051,6 @@ TEST_CASE("CALLER::timing", "[.cmdcall]") {
|
||||
Detector det;
|
||||
Caller caller(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
||||
auto prev_val = det.getTimingMode();
|
||||
det.setTimingMode(defs::AUTO_TIMING);
|
||||
{
|
||||
@ -1127,10 +1107,6 @@ TEST_CASE("CALLER::timing", "[.cmdcall]") {
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setTimingMode(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(caller.call("timing", {}, -1, GET));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("CALLER::timinglist", "[.cmdcall]") {
|
||||
|
@ -4,11 +4,11 @@
|
||||
#define RELEASE "developer"
|
||||
#define APILIB "developer 0x230224"
|
||||
#define APIRECEIVER "developer 0x230224"
|
||||
#define APIXILINXCTB "developer 0x240109"
|
||||
#define APICTB "developer 0x240109"
|
||||
#define APIGOTTHARD "developer 0x240109"
|
||||
#define APIGOTTHARD2 "developer 0x240109"
|
||||
#define APIJUNGFRAU "developer 0x240109"
|
||||
#define APIMYTHEN3 "developer 0x240109"
|
||||
#define APIMOENCH "developer 0x240109"
|
||||
#define APIEIGER "developer 0x240109"
|
||||
#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 0x240110"
|
||||
|
Loading…
x
Reference in New Issue
Block a user