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
|
@element
|
||||||
def hardwareversion(self):
|
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.
|
[Eiger] Hardware version of front FPGA on detector.
|
||||||
"""
|
"""
|
||||||
return self.getHardwareVersion()
|
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
|
[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
|
[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()
|
return self.getDynamicRange()
|
||||||
|
|
||||||
@ -400,7 +400,7 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def framesl(self):
|
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
|
Note
|
||||||
----
|
----
|
||||||
@ -1951,7 +1951,7 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def triggersl(self):
|
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
|
Note
|
||||||
----
|
----
|
||||||
@ -2180,7 +2180,7 @@ class Detector(CppDetectorApi):
|
|||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
Default: AUTO_TIMING \n
|
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
|
[Mythen3] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||||
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
[Eiger] AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||||
"""
|
"""
|
||||||
@ -3477,7 +3477,7 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def pattern(self):
|
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
|
:getter: Not Implemented
|
||||||
|
|
||||||
@ -3495,7 +3495,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def patfname(self):
|
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
|
file
|
||||||
"""
|
"""
|
||||||
return self.getPatterFileName()
|
return self.getPatterFileName()
|
||||||
@ -3520,7 +3520,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patlimits(self):
|
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
|
Example
|
||||||
---------
|
---------
|
||||||
@ -3540,7 +3540,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patsetbit(self):
|
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
|
Example
|
||||||
--------
|
--------
|
||||||
@ -3557,7 +3557,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patmask(self):
|
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
|
Example
|
||||||
--------
|
--------
|
||||||
@ -3575,7 +3575,7 @@ class Detector(CppDetectorApi):
|
|||||||
# @element
|
# @element
|
||||||
def patwait(self):
|
def patwait(self):
|
||||||
"""
|
"""
|
||||||
[Ctb][Mythen3] Wait address of loop level provided.
|
[Ctb][Mythen3][Xilinx Ctb] Wait address of loop level provided.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
@ -3592,7 +3592,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwait0(self):
|
def patwait0(self):
|
||||||
"""[Ctb][Mythen3] Wait 0 address.
|
"""[Ctb][Mythen3][Xilinx Ctb] Wait 0 address.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
--------
|
--------
|
||||||
@ -3612,7 +3612,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwait1(self):
|
def patwait1(self):
|
||||||
"""[Ctb][Mythen3] Wait 1 address.
|
"""[Ctb][Mythen3][Xilinx Ctb] Wait 1 address.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
--------
|
--------
|
||||||
@ -3632,7 +3632,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwait2(self):
|
def patwait2(self):
|
||||||
"""[Ctb][Mythen3] Wait 2 address.
|
"""[Ctb][Mythen3][Xilinx Ctb] Wait 2 address.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
--------
|
--------
|
||||||
@ -3652,7 +3652,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def patwaittime(self):
|
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
|
Example
|
||||||
-------
|
-------
|
||||||
@ -3669,7 +3669,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwaittime0(self):
|
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)
|
return self.getPatternWaitTime(0)
|
||||||
|
|
||||||
@patwaittime0.setter
|
@patwaittime0.setter
|
||||||
@ -3680,7 +3680,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwaittime1(self):
|
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)
|
return self.getPatternWaitTime(1)
|
||||||
|
|
||||||
@patwaittime1.setter
|
@patwaittime1.setter
|
||||||
@ -3691,7 +3691,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patwaittime2(self):
|
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)
|
return self.getPatternWaitTime(2)
|
||||||
|
|
||||||
@patwaittime2.setter
|
@patwaittime2.setter
|
||||||
@ -3703,7 +3703,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def patloop(self):
|
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
|
Example
|
||||||
-------
|
-------
|
||||||
@ -3720,7 +3720,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patloop0(self):
|
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
|
Example
|
||||||
---------
|
---------
|
||||||
@ -3740,7 +3740,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patloop1(self):
|
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
|
Example
|
||||||
---------
|
---------
|
||||||
@ -3761,7 +3761,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patloop2(self):
|
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
|
Example
|
||||||
---------
|
---------
|
||||||
@ -3783,7 +3783,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def patnloop(self):
|
def patnloop(self):
|
||||||
"""
|
"""
|
||||||
[Ctb][Mythen3] Number of cycles of the loop provided.
|
[Ctb][Mythen3][Xilinx Ctb] Number of cycles of the loop provided.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
@ -3800,7 +3800,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patnloop0(self):
|
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)
|
return self.getPatternLoopCycles(0)
|
||||||
|
|
||||||
@patnloop0.setter
|
@patnloop0.setter
|
||||||
@ -3811,7 +3811,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patnloop1(self):
|
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)
|
return self.getPatternLoopCycles(1)
|
||||||
|
|
||||||
@patnloop1.setter
|
@patnloop1.setter
|
||||||
@ -3822,7 +3822,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def patnloop2(self):
|
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)
|
return self.getPatternLoopCycles(2)
|
||||||
|
|
||||||
@patnloop2.setter
|
@patnloop2.setter
|
||||||
|
@ -8,7 +8,8 @@ det_list=("ctbDetectorServer
|
|||||||
gotthard2DetectorServer
|
gotthard2DetectorServer
|
||||||
jungfrauDetectorServer
|
jungfrauDetectorServer
|
||||||
mythen3DetectorServer
|
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'"
|
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"
|
"jungfrauDetectorServer"
|
||||||
"mythen3DetectorServer"
|
"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'"
|
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"
|
#include "clogger.h"
|
||||||
|
|
||||||
void initializePatternAddresses();
|
void initializePatternAddresses();
|
||||||
#ifdef CHIPTESTBOARDD
|
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
void initializePatternWord();
|
void initializePatternWord();
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined(CHIPTESTBOARDD) // TODO || defined(XILINX_CHIPTESTBOARDD)
|
||||||
uint64_t validate_readPatternIOControl();
|
uint64_t validate_readPatternIOControl();
|
||||||
int validate_writePatternIOControl(char *message, uint64_t arg);
|
int validate_writePatternIOControl(char *message, uint64_t arg);
|
||||||
void writePatternIOControl(uint64_t word);
|
void writePatternIOControl(uint64_t word);
|
||||||
|
@ -86,8 +86,8 @@ uint64_t getFrontEndFirmwareVersion(enum fpgaPosition fpgaPosition);
|
|||||||
#endif
|
#endif
|
||||||
#ifndef XILINX_CHIPTESTBOARDD
|
#ifndef XILINX_CHIPTESTBOARDD
|
||||||
u_int64_t getFirmwareAPIVersion();
|
u_int64_t getFirmwareAPIVersion();
|
||||||
void getHardwareVersion(char *version);
|
|
||||||
#endif
|
#endif
|
||||||
|
void getHardwareVersion(char *version);
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
int getHardwareVersionNumber();
|
int getHardwareVersionNumber();
|
||||||
#else
|
#else
|
||||||
@ -197,10 +197,8 @@ void setMasterSlaveConfiguration();
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// parameters - dr, roi
|
// parameters - dr, roi
|
||||||
#ifndef XILINX_CHIPTESTBOARDD
|
|
||||||
int setDynamicRange(int dr);
|
int setDynamicRange(int dr);
|
||||||
int getDynamicRange(int *retval);
|
int getDynamicRange(int *retval);
|
||||||
#endif
|
|
||||||
#ifdef GOTTHARDD
|
#ifdef GOTTHARDD
|
||||||
int setROI(ROI arg);
|
int setROI(ROI arg);
|
||||||
ROI getROI();
|
ROI getROI();
|
||||||
@ -309,12 +307,15 @@ uint32_t getCounterMask();
|
|||||||
void updatePacketizing();
|
void updatePacketizing();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef EIGERD
|
||||||
|
int64_t getNumFramesLeft();
|
||||||
|
int64_t getNumTriggersLeft();
|
||||||
|
#endif
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \
|
#if defined(JUNGFRAUD) || defined(MOENCHD) || defined(GOTTHARDD) || \
|
||||||
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
defined(CHIPTESTBOARDD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||||
int setDelayAfterTrigger(int64_t val);
|
int setDelayAfterTrigger(int64_t val);
|
||||||
int64_t getDelayAfterTrigger();
|
int64_t getDelayAfterTrigger();
|
||||||
int64_t getNumFramesLeft();
|
|
||||||
int64_t getNumTriggersLeft();
|
|
||||||
int64_t getDelayAfterTriggerLeft();
|
int64_t getDelayAfterTriggerLeft();
|
||||||
int64_t getPeriodLeft();
|
int64_t getPeriodLeft();
|
||||||
#endif
|
#endif
|
||||||
@ -445,10 +446,8 @@ void setSynchronization(int enable);
|
|||||||
void updatingRegisters();
|
void updatingRegisters();
|
||||||
int updateClockDivs();
|
int updateClockDivs();
|
||||||
#endif
|
#endif
|
||||||
#ifndef XILINX_CHIPTESTBOARDD
|
|
||||||
void setTiming(enum timingMode arg);
|
void setTiming(enum timingMode arg);
|
||||||
enum timingMode getTiming();
|
enum timingMode getTiming();
|
||||||
#endif
|
|
||||||
#ifdef MYTHEN3D
|
#ifdef MYTHEN3D
|
||||||
void setInitialExtSignals();
|
void setInitialExtSignals();
|
||||||
int setChipStatusRegister(int csr);
|
int setChipStatusRegister(int csr);
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/* global variables */
|
/* global variables */
|
||||||
#define CSP0 (0xB0010000)/// 0xB008_0000
|
#define CSP0 (0xB0010000)
|
||||||
#define MEM_SIZE 0x100000
|
#define MEM_SIZE 0x100000
|
||||||
|
|
||||||
u_int32_t *csp0base = 0;
|
u_int32_t *csp0base = 0;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
extern enum TLogLevel trimmingPrint;
|
extern enum TLogLevel trimmingPrint;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CHIPTESTBOARDD
|
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD)
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
|
uint64_t virtual_pattern[MAX_PATTERN_LENGTH];
|
||||||
#endif
|
#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 void bus_w(u_int32_t offset, u_int32_t data);
|
||||||
extern u_int32_t bus_r(u_int32_t offset);
|
extern u_int32_t bus_r(u_int32_t offset);
|
||||||
extern int64_t get64BitReg(int aLSB, int aMSB);
|
//extern int64_t get64BitReg(int aLSB, int aMSB);
|
||||||
extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB);
|
//extern int64_t set64BitReg(int64_t value, int aLSB, int aMSB);
|
||||||
extern uint64_t getU64BitReg(int aLSB, int aMSB);
|
extern uint64_t getU64BitReg(int aLSB, int aMSB);
|
||||||
extern void setU64BitReg(uint64_t value, 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
|
#ifdef VIRTUAL
|
||||||
void initializePatternWord() {
|
void initializePatternWord() {
|
||||||
memset(virtual_pattern, 0, sizeof(virtual_pattern));
|
memset(virtual_pattern, 0, sizeof(virtual_pattern));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(CHIPTESTBOARDD) // TODO || defined(XILINX_CHIPTESTBOARDD)
|
||||||
uint64_t validate_readPatternIOControl() {
|
uint64_t validate_readPatternIOControl() {
|
||||||
return getU64BitReg(PATTERN_IO_CNTRL_LSB_REG, PATTERN_IO_CNTRL_MSB_REG);
|
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)
|
// 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_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2;
|
||||||
uint32_t reg_msb = PATTERN_STEP0_MSB_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
|
#else
|
||||||
LOG(logDEBUG1, (" Reading (Executing) Pattern Word (addr:0x%x)\n", addr));
|
LOG(logDEBUG1, (" Reading (Executing) Pattern Word (addr:0x%x)\n", addr));
|
||||||
uint32_t reg = PATTERN_CNTRL_REG;
|
uint32_t reg = PATTERN_CNTRL_REG;
|
||||||
@ -118,7 +120,7 @@ uint64_t readPatternWord(int addr) {
|
|||||||
|
|
||||||
// read value
|
// read value
|
||||||
#ifndef VIRTUAL
|
#ifndef VIRTUAL
|
||||||
return get64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG);
|
return getU64BitReg(PATTERN_OUT_LSB_REG, PATTERN_OUT_MSB_REG);
|
||||||
#else
|
#else
|
||||||
return virtual_pattern[addr];
|
return virtual_pattern[addr];
|
||||||
#endif
|
#endif
|
||||||
@ -160,7 +162,7 @@ void writePatternWord(int addr, uint64_t word) {
|
|||||||
uint32_t reg = PATTERN_CNTRL_REG;
|
uint32_t reg = PATTERN_CNTRL_REG;
|
||||||
|
|
||||||
// write word
|
// 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
|
// overwrite with only addr
|
||||||
bus_w(reg, ((addr << PATTERN_CNTRL_ADDR_OFST) & PATTERN_CNTRL_ADDR_MSK));
|
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)
|
// 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_lsb = PATTERN_STEP0_LSB_REG + addr * REG_OFFSET * 2;
|
||||||
uint32_t reg_msb = PATTERN_STEP0_MSB_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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,23 +313,23 @@ int validate_getPatternWaitTime(char *message, int level, uint64_t *waittime) {
|
|||||||
uint64_t getPatternWaitTime(int level) {
|
uint64_t getPatternWaitTime(int level) {
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 0:
|
case 0:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||||
case 1:
|
case 1:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||||
case 2:
|
case 2:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||||
#ifndef MYTHEN3D
|
#ifndef MYTHEN3D
|
||||||
case 3:
|
case 3:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||||
case 4:
|
case 4:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||||
case 5:
|
case 5:
|
||||||
return get64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG,
|
return getU64BitReg(PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
@ -369,28 +371,28 @@ void setPatternWaitTime(int level, uint64_t t) {
|
|||||||
(long long int)t));
|
(long long int)t));
|
||||||
switch (level) {
|
switch (level) {
|
||||||
case 0:
|
case 0:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_0_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_0_MSB_REG);
|
PATTERN_WAIT_TIMER_0_MSB_REG);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_1_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_1_MSB_REG);
|
PATTERN_WAIT_TIMER_1_MSB_REG);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_2_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_2_MSB_REG);
|
PATTERN_WAIT_TIMER_2_MSB_REG);
|
||||||
break;
|
break;
|
||||||
#ifndef MYTHEN3D
|
#ifndef MYTHEN3D
|
||||||
case 3:
|
case 3:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_3_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_3_MSB_REG);
|
PATTERN_WAIT_TIMER_3_MSB_REG);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_4_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_4_MSB_REG);
|
PATTERN_WAIT_TIMER_4_MSB_REG);
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
set64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG,
|
setU64BitReg(t, PATTERN_WAIT_TIMER_5_LSB_REG,
|
||||||
PATTERN_WAIT_TIMER_5_MSB_REG);
|
PATTERN_WAIT_TIMER_5_MSB_REG);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
@ -775,7 +777,7 @@ int loadPattern(char *message, enum TLogLevel printLevel,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// iocontrol
|
// iocontrol
|
||||||
#ifndef MYTHEN3D
|
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) //TODO
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
ret = validate_writePatternIOControl(message, pat->ioctrl);
|
ret = validate_writePatternIOControl(message, pat->ioctrl);
|
||||||
}
|
}
|
||||||
@ -835,7 +837,7 @@ int getPattern(char *message, patternParameters *pat) {
|
|||||||
pat->word[i] = retval64;
|
pat->word[i] = retval64;
|
||||||
}
|
}
|
||||||
// iocontrol
|
// iocontrol
|
||||||
#ifndef MYTHEN3D
|
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) //TODO
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
validate_readPatternIOControl();
|
validate_readPatternIOControl();
|
||||||
}
|
}
|
||||||
@ -956,7 +958,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
|||||||
uint64_t word = 0;
|
uint64_t word = 0;
|
||||||
|
|
||||||
// cannot scan values
|
// cannot scan values
|
||||||
#ifdef VIRTUAL
|
#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD)
|
||||||
if (sscanf(line, "%s 0x%x 0x%lx", command, &addr, &word) != 3) {
|
if (sscanf(line, "%s 0x%x 0x%lx", command, &addr, &word) != 3) {
|
||||||
#else
|
#else
|
||||||
if (sscanf(line, "%s 0x%x 0x%llx", command, &addr, &word) != 3) {
|
if (sscanf(line, "%s 0x%x 0x%llx", command, &addr, &word) != 3) {
|
||||||
@ -971,7 +973,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// patioctrl
|
// patioctrl
|
||||||
#ifndef MYTHEN3D
|
#if !defined(MYTHEN3D) && !defined(XILINX_CHIPTESTBOARDD) //TODO
|
||||||
if (!strncmp(line, "patioctrl", strlen("patioctrl"))) {
|
if (!strncmp(line, "patioctrl", strlen("patioctrl"))) {
|
||||||
uint64_t arg = 0;
|
uint64_t arg = 0;
|
||||||
|
|
||||||
@ -1063,7 +1065,7 @@ int loadPatternFile(char *patFname, char *errMessage) {
|
|||||||
uint64_t waittime = 0;
|
uint64_t waittime = 0;
|
||||||
|
|
||||||
// cannot scan values
|
// cannot scan values
|
||||||
#ifdef VIRTUAL
|
#if defined(VIRTUAL) || defined(XILINX_CHIPTESTBOARDD)
|
||||||
if (sscanf(line, "%s %d %ld", command, &level, &waittime) != 3) {
|
if (sscanf(line, "%s %d %ld", command, &level, &waittime) != 3) {
|
||||||
#else
|
#else
|
||||||
if (sscanf(line, "%s %d %lld", command, &level, &waittime) != 3) {
|
if (sscanf(line, "%s %d %lld", command, &level, &waittime) != 3) {
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "sls/sls_detector_funcs.h"
|
#include "sls/sls_detector_funcs.h"
|
||||||
#include "slsDetectorFunctionList.h"
|
#include "slsDetectorFunctionList.h"
|
||||||
|
|
||||||
#if defined(CHIPTESTBOARDD) || defined(MYTHEN3D)
|
#if defined(CHIPTESTBOARDD) || defined(XILINX_CHIPTESTBOARDD) || defined(MYTHEN3D)
|
||||||
#include "Pattern.h"
|
#include "Pattern.h"
|
||||||
#include "loadPattern.h"
|
#include "loadPattern.h"
|
||||||
#endif
|
#endif
|
||||||
@ -719,9 +719,6 @@ int set_timing_mode(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Setting external communication mode to %d\n", arg));
|
LOG(logDEBUG1, ("Setting external communication mode to %d\n", arg));
|
||||||
|
|
||||||
#ifdef XILINX_CHIPTESTBOARDD
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
// set
|
// set
|
||||||
if (((int)arg != GET_FLAG) && (Server_VerifyLock() == OK)) {
|
if (((int)arg != GET_FLAG) && (Server_VerifyLock() == OK)) {
|
||||||
switch (arg) {
|
switch (arg) {
|
||||||
@ -758,7 +755,7 @@ int set_timing_mode(int file_des) {
|
|||||||
validate(&ret, mess, (int)arg, (int)retval, "set timing mode", DEC);
|
validate(&ret, mess, (int)arg, (int)retval, "set timing mode", DEC);
|
||||||
#endif
|
#endif
|
||||||
LOG(logDEBUG1, ("Timing Mode: %d\n", retval));
|
LOG(logDEBUG1, ("Timing Mode: %d\n", retval));
|
||||||
#endif
|
|
||||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2880,7 +2877,7 @@ int get_frames_left(int file_des) {
|
|||||||
int64_t retval = -1;
|
int64_t retval = -1;
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
||||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && !defined(XILINX_CHIPTESTBOARDD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -2896,7 +2893,7 @@ int get_triggers_left(int file_des) {
|
|||||||
int64_t retval = -1;
|
int64_t retval = -1;
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
#if !defined(JUNGFRAUD) && !defined(MOENCHD) && !defined(GOTTHARDD) && \
|
||||||
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
!defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && !defined(XILINX_CHIPTESTBOARDD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -3046,9 +3043,6 @@ int set_dynamic_range(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Setting dr to %d\n", dr));
|
LOG(logDEBUG1, ("Setting dr to %d\n", dr));
|
||||||
|
|
||||||
#ifdef XILINX_CHIPTESTBOARDD
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
// set & get
|
// set & get
|
||||||
if ((dr == GET_FLAG) || (Server_VerifyLock() == OK)) {
|
if ((dr == GET_FLAG) || (Server_VerifyLock() == OK)) {
|
||||||
// check dr
|
// check dr
|
||||||
@ -3069,7 +3063,7 @@ int set_dynamic_range(int file_des) {
|
|||||||
case 32:
|
case 32:
|
||||||
#endif
|
#endif
|
||||||
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
#if defined(GOTTHARDD) || defined(JUNGFRAUD) || defined(MOENCHD) || \
|
||||||
defined(CHIPTESTBOARDD) || defined(GOTTHARD2D)
|
defined(CHIPTESTBOARDD) || defined(GOTTHARD2D) || defined(XILINX_CHIPTESTBOARDD)
|
||||||
case 16:
|
case 16:
|
||||||
#endif
|
#endif
|
||||||
if (dr >= 0) {
|
if (dr >= 0) {
|
||||||
@ -3097,7 +3091,6 @@ int set_dynamic_range(int file_des) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return Server_SendResult(file_des, INT32, &retval, sizeof(retval));
|
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)
|
if (receiveData(file_des, args, sizeof(args), INT64) < 0)
|
||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
int addr = (int)args[0];
|
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)
|
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
int loopLevel = args[0];
|
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)
|
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
int loopLevel = args[0];
|
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)
|
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
int loopLevel = args[0];
|
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)
|
if (receiveData(file_des, args, sizeof(args), INT32) < 0)
|
||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
int loopLevel = (int)args[0];
|
int loopLevel = (int)args[0];
|
||||||
@ -3505,7 +3498,7 @@ int set_pattern_mask(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Set Pattern Mask to %d\n", arg));
|
LOG(logDEBUG1, ("Set Pattern Mask to %d\n", arg));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -3533,7 +3526,7 @@ int get_pattern_mask(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Get Pattern Mask\n"));
|
LOG(logDEBUG1, ("Get Pattern Mask\n"));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only get
|
// only get
|
||||||
@ -3554,7 +3547,7 @@ int set_pattern_bit_mask(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Set Pattern Bit Mask to %d\n", arg));
|
LOG(logDEBUG1, ("Set Pattern Bit Mask to %d\n", arg));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -3583,7 +3576,7 @@ int get_pattern_bit_mask(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Get Pattern Bit Mask\n"));
|
LOG(logDEBUG1, ("Get Pattern Bit Mask\n"));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only get
|
// only get
|
||||||
@ -7801,7 +7794,7 @@ int set_pattern(int file_des) {
|
|||||||
char args[MAX_STR_LENGTH];
|
char args[MAX_STR_LENGTH];
|
||||||
memset(args, 0, MAX_STR_LENGTH);
|
memset(args, 0, MAX_STR_LENGTH);
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
|
|
||||||
@ -7838,7 +7831,7 @@ int get_pattern_file(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Getting pattern file name\n"));
|
LOG(logDEBUG1, ("Getting pattern file name\n"));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -7852,7 +7845,7 @@ int get_pattern(int file_des) {
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
#if !defined(CHIPTESTBOARDD) && !defined(XILINX_CHIPTESTBOARDD) && !defined(MYTHEN3D)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||||
#else
|
#else
|
||||||
@ -9727,9 +9720,7 @@ int get_kernel_version(int file_des) {
|
|||||||
memset(retvals, 0, MAX_STR_LENGTH);
|
memset(retvals, 0, MAX_STR_LENGTH);
|
||||||
|
|
||||||
LOG(logDEBUG1, ("Getting kernel version\n"));
|
LOG(logDEBUG1, ("Getting kernel version\n"));
|
||||||
#ifdef XILINX_CHIPTESTBOARDD
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
// get only
|
// get only
|
||||||
ret = getKernelVersion(retvals);
|
ret = getKernelVersion(retvals);
|
||||||
if (ret == FAIL) {
|
if (ret == FAIL) {
|
||||||
@ -9742,7 +9733,6 @@ int get_kernel_version(int file_des) {
|
|||||||
} else {
|
} else {
|
||||||
LOG(logDEBUG1, ("kernel version: [%s]\n", retvals));
|
LOG(logDEBUG1, ("kernel version: [%s]\n", retvals));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
|
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));
|
memset(mess, 0, sizeof(mess));
|
||||||
char retvals[MAX_STR_LENGTH];
|
char retvals[MAX_STR_LENGTH];
|
||||||
memset(retvals, 0, MAX_STR_LENGTH);
|
memset(retvals, 0, MAX_STR_LENGTH);
|
||||||
#ifdef XILINX_CHIPTESTBOARDD
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
getHardwareVersion(retvals);
|
getHardwareVersion(retvals);
|
||||||
LOG(logDEBUG1, ("hardware version retval: %s\n", retvals));
|
LOG(logDEBUG1, ("hardware version retval: %s\n", retvals));
|
||||||
#endif
|
|
||||||
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
|
return Server_SendResult(file_des, OTHER, retvals, sizeof(retvals));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@ add_executable(xilinx_ctbDetectorServer_virtual
|
|||||||
../slsDetectorServer/src/arm64.c
|
../slsDetectorServer/src/arm64.c
|
||||||
../slsDetectorServer/src/common.c
|
../slsDetectorServer/src/common.c
|
||||||
../slsDetectorServer/src/sharedMemory.c
|
../slsDetectorServer/src/sharedMemory.c
|
||||||
|
../slsDetectorServer/src/loadPattern.c
|
||||||
../../slsSupportLib/src/md5.c
|
../../slsSupportLib/src/md5.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ DESTDIR ?= bin
|
|||||||
INSTMODE = 0777
|
INSTMODE = 0777
|
||||||
|
|
||||||
SRCS = slsDetectorFunctionList.c
|
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)
|
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 "sharedMemory.h"
|
||||||
#include "sls/versionAPI.h"
|
#include "sls/versionAPI.h"
|
||||||
|
|
||||||
|
#include "loadPattern.h"
|
||||||
|
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h> // usleep
|
#include <unistd.h> // usleep
|
||||||
#include <arpa/inet.h> // INET_ADDRSTRLEN
|
#include <arpa/inet.h> // INET_ADDRSTRLEN
|
||||||
@ -227,6 +230,10 @@ uint64_t getFirmwareVersion() {
|
|||||||
return ((bus_r(FPGAVERSIONREG) & COMPDATE_MSK) >> COMPDATE_OFST);
|
return ((bus_r(FPGAVERSIONREG) & COMPDATE_MSK) >> COMPDATE_OFST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void getHardwareVersion(char *version) {
|
||||||
|
strcpy(version, "Not applicable");
|
||||||
|
}
|
||||||
|
|
||||||
u_int64_t getDetectorMAC() {
|
u_int64_t getDetectorMAC() {
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
return 0;
|
return 0;
|
||||||
@ -310,12 +317,29 @@ void setupDetector() {
|
|||||||
LOG(logINFO, ("Setting up Server for 1 Xilinx Chip Test Board\n"));
|
LOG(logINFO, ("Setting up Server for 1 Xilinx Chip Test Board\n"));
|
||||||
#ifdef VIRTUAL
|
#ifdef VIRTUAL
|
||||||
sharedMemory_setStatus(IDLE);
|
sharedMemory_setStatus(IDLE);
|
||||||
|
initializePatternWord();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG(logINFOBLUE, ("Setting Default parameters\n"));
|
LOG(logINFOBLUE, ("Setting Default parameters\n"));
|
||||||
|
initializePatternAddresses();
|
||||||
|
|
||||||
|
|
||||||
setNumFrames(DEFAULT_NUM_FRAMES);
|
setNumFrames(DEFAULT_NUM_FRAMES);
|
||||||
setNumTriggers(DEFAULT_NUM_CYCLES);
|
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 */
|
/* parameters - timer */
|
||||||
@ -338,6 +362,37 @@ void setNumTriggers(int64_t val) {
|
|||||||
|
|
||||||
int64_t getNumTriggers() { return getU64BitReg(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[]) {
|
int setDetectorPosition(int pos[]) {
|
||||||
memcpy(detPos, pos, sizeof(detPos));
|
memcpy(detPos, pos, sizeof(detPos));
|
||||||
// TODO
|
// TODO
|
||||||
|
@ -21,3 +21,8 @@ enum DACINDEX { D0 };
|
|||||||
/** Default Parameters */
|
/** Default Parameters */
|
||||||
#define DEFAULT_NUM_FRAMES (1)
|
#define DEFAULT_NUM_FRAMES (1)
|
||||||
#define DEFAULT_NUM_CYCLES (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
|
function: setPatternIOControl
|
||||||
|
|
||||||
patmask:
|
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
|
inherit_actions: INTEGER_COMMAND_HEX_WIDTH16
|
||||||
actions:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
@ -594,7 +594,7 @@ patmask:
|
|||||||
function: setPatternMask
|
function: setPatternMask
|
||||||
|
|
||||||
patsetbit:
|
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
|
inherit_actions: INTEGER_COMMAND_HEX_WIDTH16
|
||||||
actions:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
@ -688,7 +688,7 @@ column:
|
|||||||
function: setColumn
|
function: setColumn
|
||||||
|
|
||||||
timing:
|
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
|
inherit_actions: INTEGER_COMMAND_VEC_ID
|
||||||
actions:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
@ -1506,7 +1506,7 @@ triggers:
|
|||||||
|
|
||||||
dr:
|
dr:
|
||||||
inherit_actions: INTEGER_COMMAND_SET_NOID_GET_ID
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
function: getDynamicRange
|
function: getDynamicRange
|
||||||
@ -1835,7 +1835,7 @@ parameters:
|
|||||||
|
|
||||||
savepattern:
|
savepattern:
|
||||||
inherit_actions: EXECUTE_SET_COMMAND_NOID_1ARG
|
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:
|
actions:
|
||||||
PUT:
|
PUT:
|
||||||
function: savePattern
|
function: savePattern
|
||||||
@ -1850,7 +1850,7 @@ detectorserverversion:
|
|||||||
|
|
||||||
hardwareversion:
|
hardwareversion:
|
||||||
inherit_actions: GET_COMMAND
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
function: getHardwareVersion
|
function: getHardwareVersion
|
||||||
@ -1885,14 +1885,14 @@ type:
|
|||||||
|
|
||||||
framesl:
|
framesl:
|
||||||
inherit_actions: GET_COMMAND
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
function: getNumberOfFramesLeft
|
function: getNumberOfFramesLeft
|
||||||
|
|
||||||
triggersl:
|
triggersl:
|
||||||
inherit_actions: GET_COMMAND
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
function: getNumberOfTriggersLeft
|
function: getNumberOfTriggersLeft
|
||||||
@ -1997,7 +1997,7 @@ syncclk:
|
|||||||
|
|
||||||
patfname:
|
patfname:
|
||||||
inherit_actions: GET_COMMAND
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
function: getPatterFileName
|
function: getPatterFileName
|
||||||
@ -3842,7 +3842,7 @@ diodelay:
|
|||||||
|
|
||||||
# pattern is a keyword in yaml, so patternX is used to avoid it
|
# pattern is a keyword in yaml, so patternX is used to avoid it
|
||||||
patternX:
|
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"
|
command_name: "pattern"
|
||||||
actions:
|
actions:
|
||||||
PUT:
|
PUT:
|
||||||
@ -3855,7 +3855,7 @@ patternX:
|
|||||||
output: [ 'args.front()' ]
|
output: [ 'args.front()' ]
|
||||||
|
|
||||||
patword:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: 1
|
argc: 1
|
||||||
@ -3875,7 +3875,7 @@ patword:
|
|||||||
output: [ "'['", "ToStringHex(arg0, 4)", '", "', "ToStringHex(arg1, 16)", '"]"' ]
|
output: [ "'['", "ToStringHex(arg0, 4)", '", "', "ToStringHex(arg1, 16)", '"]"' ]
|
||||||
|
|
||||||
patlimits:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: -1
|
argc: -1
|
||||||
@ -3895,7 +3895,7 @@ patlimits:
|
|||||||
output: [ "'['" , "ToStringHex(arg1, 4)" , '", "' , "ToStringHex(arg2, 4)", "']'" ]
|
output: [ "'['" , "ToStringHex(arg1, 4)" , '", "' , "ToStringHex(arg2, 4)", "']'" ]
|
||||||
|
|
||||||
patloop:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: -1
|
argc: -1
|
||||||
@ -3944,7 +3944,7 @@ patloop2:
|
|||||||
inherit_actions: patloop0
|
inherit_actions: patloop0
|
||||||
|
|
||||||
patnloop:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: -1
|
argc: -1
|
||||||
@ -3991,7 +3991,7 @@ patnloop2:
|
|||||||
inherit_actions: patnloop0
|
inherit_actions: patnloop0
|
||||||
|
|
||||||
patwait:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: -1
|
argc: -1
|
||||||
@ -4037,7 +4037,7 @@ patwait2:
|
|||||||
inherit_actions: patwait0
|
inherit_actions: patwait0
|
||||||
|
|
||||||
patwaittime:
|
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:
|
actions:
|
||||||
GET:
|
GET:
|
||||||
argc: -1
|
argc: -1
|
||||||
|
@ -322,11 +322,11 @@ class Detector {
|
|||||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */
|
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Gotthard2] */
|
||||||
void setDelayAfterTrigger(ns value, Positions pos = {});
|
void setDelayAfterTrigger(ns value, Positions pos = {});
|
||||||
|
|
||||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||||
* [Gotthard2] only in continuous auto mode */
|
* [Gotthard2] only in continuous auto mode */
|
||||||
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
Result<int64_t> getNumberOfFramesLeft(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3]
|
/** [Gotthard][Jungfrau][Moench][CTB][Mythen3][Xilinx CTB]
|
||||||
* Only when external trigger used */
|
* Only when external trigger used */
|
||||||
Result<int64_t> getNumberOfTriggersLeft(Positions pos = {}) const;
|
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,
|
* [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
|
* 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);
|
void setDynamicRange(int value);
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ class Detector {
|
|||||||
Result<defs::timingMode> getTimingMode(Positions pos = {}) const;
|
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
|
* AUTO_TIMING, TRIGGER_EXPOSURE \n
|
||||||
* [Mythen3] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
* [Mythen3] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, TRIGGER_GATED \n
|
||||||
* [Eiger] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
* [Eiger] Options: AUTO_TIMING, TRIGGER_EXPOSURE, GATED, BURST_TRIGGER
|
||||||
@ -1846,20 +1846,20 @@ class Detector {
|
|||||||
* Pattern *
|
* 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
|
* pattern uploaded. \n Returns an empty if nothing was uploaded or via a
|
||||||
* server default file*/
|
* server default file*/
|
||||||
Result<std::string> getPatterFileName(Positions pos = {}) const;
|
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)*/
|
* (instead of executing line by line)*/
|
||||||
void setPattern(const std::string &fname, Positions pos = {});
|
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 */
|
* server */
|
||||||
void setPattern(const Pattern &pat, Positions pos = {});
|
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.*/
|
* (ascii). \n [Ctb] Also executes pattern.*/
|
||||||
void savePattern(const std::string &fname);
|
void savePattern(const std::string &fname);
|
||||||
|
|
||||||
@ -1872,57 +1872,57 @@ class Detector {
|
|||||||
/** [CTB] */
|
/** [CTB] */
|
||||||
void setPatternIOControl(uint64_t word, Positions pos = {});
|
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 = {});
|
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)
|
* executing the pattern)
|
||||||
* [Mythen3] */
|
* [Mythen3] */
|
||||||
void setPatternWord(int addr, uint64_t word, Positions pos = {});
|
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
|
* levels
|
||||||
* @returns array of start address and stop address
|
* @returns array of start address and stop address
|
||||||
*/
|
*/
|
||||||
Result<std::array<int, 2>>
|
Result<std::array<int, 2>>
|
||||||
getPatternLoopAddresses(int level, Positions pos = {}) const;
|
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 */
|
* levels */
|
||||||
void setPatternLoopAddresses(int level, int start, int stop,
|
void setPatternLoopAddresses(int level, int start, int stop,
|
||||||
Positions pos = {});
|
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 */
|
* levels */
|
||||||
Result<int> getPatternLoopCycles(int level, Positions pos = {}) const;
|
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 */
|
* levels */
|
||||||
void setPatternLoopCycles(int level, int n, Positions pos = {});
|
void setPatternLoopCycles(int level, int n, Positions pos = {});
|
||||||
|
|
||||||
/**[CTB][Mythen3] */
|
/**[CTB][Mythen3][Xilinx CTB] */
|
||||||
Result<int> getPatternWaitAddr(int level, Positions pos = {}) const;
|
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 = {});
|
void setPatternWaitAddr(int level, int addr, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Mythen3] */
|
/** [CTB][Mythen3][Xilinx CTB] */
|
||||||
Result<uint64_t> getPatternWaitTime(int level, Positions pos = {}) const;
|
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 = {});
|
void setPatternWaitTime(int level, uint64_t t, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Mythen3] */
|
/** [CTB][Mythen3][Xilinx CTB] */
|
||||||
Result<uint64_t> getPatternMask(Positions pos = {});
|
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. */
|
* applied to the selected patmask for every pattern. */
|
||||||
void setPatternMask(uint64_t mask, Positions pos = {});
|
void setPatternMask(uint64_t mask, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Mythen3] */
|
/** [CTB][Mythen3][Xilinx CTB] */
|
||||||
Result<uint64_t> getPatternBitMask(Positions pos = {}) const;
|
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 */
|
* selected bits */
|
||||||
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
void setPatternBitMask(uint64_t mask, Positions pos = {});
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ TEST_CASE("Caller::patfname", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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_THROWS(caller.call("patfname", {}, -1, PUT));
|
||||||
REQUIRE_NOTHROW(caller.call("patfname", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("patfname", {}, -1, GET));
|
||||||
} else {
|
} else {
|
||||||
@ -35,7 +35,7 @@ TEST_CASE("Caller::pattern", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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
|
// no proper test for put
|
||||||
REQUIRE_THROWS(caller.call("pattern", {}, -1, GET));
|
REQUIRE_THROWS(caller.call("pattern", {}, -1, GET));
|
||||||
} else {
|
} else {
|
||||||
@ -47,7 +47,7 @@ TEST_CASE("Caller::savepattern", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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(
|
REQUIRE_THROWS(
|
||||||
caller.call("savepattern", {"/tmp/pattern.txt"}, -1, GET));
|
caller.call("savepattern", {"/tmp/pattern.txt"}, -1, GET));
|
||||||
if (det.size() == 1) {
|
if (det.size() == 1) {
|
||||||
@ -108,7 +108,7 @@ TEST_CASE("Caller::patword", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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;
|
int addr = 0x23;
|
||||||
std::string saddr = ToStringHex(addr, 4);
|
std::string saddr = ToStringHex(addr, 4);
|
||||||
auto prev_val = det.getPatternWord(addr);
|
auto prev_val = det.getPatternWord(addr);
|
||||||
@ -118,6 +118,12 @@ TEST_CASE("Caller::patword", "[.cmdcall]") {
|
|||||||
REQUIRE(oss.str() ==
|
REQUIRE(oss.str() ==
|
||||||
"patword [" + saddr + ", 0xc15004808d0a21a4]\n");
|
"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;
|
std::ostringstream oss;
|
||||||
caller.call("patword", {saddr, "0xaadf0"}, -1, PUT, oss);
|
caller.call("patword", {saddr, "0xaadf0"}, -1, PUT, oss);
|
||||||
@ -143,7 +149,7 @@ TEST_CASE("Caller::patlimits", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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);
|
auto prev_val = det.getPatternLoopAddresses(-1);
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -169,7 +175,7 @@ TEST_CASE("Caller::patloop", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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) {
|
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||||
// m3 only has 3 levels
|
// m3 only has 3 levels
|
||||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||||
@ -217,7 +223,7 @@ TEST_CASE("Caller::patnloop", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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) {
|
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||||
// m3 only has 3 levels
|
// m3 only has 3 levels
|
||||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||||
@ -262,7 +268,7 @@ TEST_CASE("Caller::patwait", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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) {
|
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||||
// m3 only has 3 levels
|
// m3 only has 3 levels
|
||||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||||
@ -307,7 +313,7 @@ TEST_CASE("Caller::patwaittime", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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) {
|
for (int iLoop = 0; iLoop != MAX_PATTERN_LEVELS; ++iLoop) {
|
||||||
// m3 only has 3 levels
|
// m3 only has 3 levels
|
||||||
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
if (det_type == defs::MYTHEN3 && iLoop >= 3) {
|
||||||
@ -352,7 +358,7 @@ TEST_CASE("Caller::patmask", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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();
|
auto prev_val = det.getPatternMask();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -377,7 +383,7 @@ TEST_CASE("Caller::patsetbit", "[.cmdcall]") {
|
|||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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();
|
auto prev_val = det.getPatternBitMask();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
|
@ -87,13 +87,8 @@ TEST_CASE("CALLER::virtual", "[.cmdcall]") {
|
|||||||
TEST_CASE("CALLER::versions", "[.cmdcall]") {
|
TEST_CASE("CALLER::versions", "[.cmdcall]") {
|
||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
|
||||||
REQUIRE_NOTHROW(caller.call("versions", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("versions", {}, -1, GET));
|
||||||
REQUIRE_THROWS(caller.call("versions", {"0"}, -1, PUT));
|
REQUIRE_THROWS(caller.call("versions", {"0"}, -1, PUT));
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(caller.call("versions", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("CALLER::packageversion", "[.cmdcall]") {
|
TEST_CASE("CALLER::packageversion", "[.cmdcall]") {
|
||||||
@ -127,25 +122,15 @@ TEST_CASE("CALLER::detectorserverversion", "[.cmdcall]") {
|
|||||||
TEST_CASE("CALLER::hardwareversion", "[.cmdcall]") {
|
TEST_CASE("CALLER::hardwareversion", "[.cmdcall]") {
|
||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
|
||||||
REQUIRE_NOTHROW(caller.call("hardwareversion", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("hardwareversion", {}, -1, GET));
|
||||||
REQUIRE_THROWS(caller.call("hardwareversion", {"0"}, -1, PUT));
|
REQUIRE_THROWS(caller.call("hardwareversion", {"0"}, -1, PUT));
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(caller.call("hardwareversion", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("CALLER::kernelversion", "[.cmdcall]") {
|
TEST_CASE("CALLER::kernelversion", "[.cmdcall]") {
|
||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
|
||||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
|
||||||
REQUIRE_NOTHROW(caller.call("kernelversion", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("kernelversion", {}, -1, GET));
|
||||||
REQUIRE_THROWS(caller.call("kernelversion", {"0"}, -1, PUT));
|
REQUIRE_THROWS(caller.call("kernelversion", {"0"}, -1, PUT));
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(caller.call("kernelversion", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("CALLER::serialnumber", "[.cmdcall]") {
|
TEST_CASE("CALLER::serialnumber", "[.cmdcall]") {
|
||||||
@ -959,7 +944,7 @@ TEST_CASE("CALLER::framesl", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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));
|
REQUIRE_THROWS(caller.call("framesl", {}, -1, GET));
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_NOTHROW(caller.call("framesl", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("framesl", {}, -1, GET));
|
||||||
@ -970,7 +955,7 @@ TEST_CASE("CALLER::triggersl", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
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));
|
REQUIRE_THROWS(caller.call("triggersl", {}, -1, GET));
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_NOTHROW(caller.call("triggersl", {}, -1, GET));
|
REQUIRE_NOTHROW(caller.call("triggersl", {}, -1, GET));
|
||||||
@ -1017,7 +1002,6 @@ TEST_CASE("CALLER::dr", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
|
||||||
if (det_type == defs::EIGER) {
|
if (det_type == defs::EIGER) {
|
||||||
auto dr = det.getDynamicRange().squash();
|
auto dr = det.getDynamicRange().squash();
|
||||||
std::array<int, 4> vals{4, 8, 16, 32};
|
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);
|
caller.call("dr", {"16"}, -1, PUT, oss2);
|
||||||
REQUIRE(oss2.str() == "dr 16\n");
|
REQUIRE(oss2.str() == "dr 16\n");
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(caller.call("dr", {}, -1, GET));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("CALLER::drlist", "[.cmdcall]") {
|
TEST_CASE("CALLER::drlist", "[.cmdcall]") {
|
||||||
@ -1070,7 +1051,6 @@ TEST_CASE("CALLER::timing", "[.cmdcall]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
Caller caller(&det);
|
Caller caller(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type != defs::XILINX_CHIPTESTBOARD) {
|
|
||||||
auto prev_val = det.getTimingMode();
|
auto prev_val = det.getTimingMode();
|
||||||
det.setTimingMode(defs::AUTO_TIMING);
|
det.setTimingMode(defs::AUTO_TIMING);
|
||||||
{
|
{
|
||||||
@ -1127,10 +1107,6 @@ TEST_CASE("CALLER::timing", "[.cmdcall]") {
|
|||||||
for (int i = 0; i != det.size(); ++i) {
|
for (int i = 0; i != det.size(); ++i) {
|
||||||
det.setTimingMode(prev_val[i], {i});
|
det.setTimingMode(prev_val[i], {i});
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
REQUIRE_THROWS(caller.call("timing", {}, -1, GET));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_CASE("CALLER::timinglist", "[.cmdcall]") {
|
TEST_CASE("CALLER::timinglist", "[.cmdcall]") {
|
||||||
|
@ -4,11 +4,11 @@
|
|||||||
#define RELEASE "developer"
|
#define RELEASE "developer"
|
||||||
#define APILIB "developer 0x230224"
|
#define APILIB "developer 0x230224"
|
||||||
#define APIRECEIVER "developer 0x230224"
|
#define APIRECEIVER "developer 0x230224"
|
||||||
#define APIXILINXCTB "developer 0x240109"
|
#define APICTB "developer 0x240110"
|
||||||
#define APICTB "developer 0x240109"
|
#define APIGOTTHARD "developer 0x240110"
|
||||||
#define APIGOTTHARD "developer 0x240109"
|
#define APIGOTTHARD2 "developer 0x240110"
|
||||||
#define APIGOTTHARD2 "developer 0x240109"
|
#define APIJUNGFRAU "developer 0x240110"
|
||||||
#define APIJUNGFRAU "developer 0x240109"
|
#define APIMYTHEN3 "developer 0x240110"
|
||||||
#define APIMYTHEN3 "developer 0x240109"
|
#define APIMOENCH "developer 0x240110"
|
||||||
#define APIMOENCH "developer 0x240109"
|
#define APIEIGER "developer 0x240110"
|
||||||
#define APIEIGER "developer 0x240109"
|
#define APIXILINXCTB "developer 0x240110"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user