mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-20 02:40:03 +02:00
Moench rw3 (#745)
* moench, removed chip version, filter resistor, filter cells, currentsoures, gain mode, setttings(modes), dbitphase, maxdbitphase, autocompdisable, comparatordisabletime, made acq start and stop a pulse, removed unused registers * added parallel command * remove gain plot for moench * moench: updated adc invert val * moench: update adcoffset to 0xf and adcphase to 140 degrees * removed sync clock in moench * updated min fw version * removing config file in moench server
This commit is contained in:
parent
0a7fd0a51a
commit
65b8c9c5c1
@ -364,7 +364,7 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
[Eiger] Use threshold command to load settings
|
[Eiger] Use threshold command to load settings
|
||||||
[Jungfrau][Moench] GAIN0, HIGHGAIN0 \n
|
[Jungfrau] GAIN0, HIGHGAIN0 \n
|
||||||
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
|
[Gotthard] DYNAMICGAIN, HIGHGAIN, LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n
|
||||||
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
|
[Gotthard2] DYNAMICGAIN, FIXGAIN1, FIXGAIN2 \n
|
||||||
[Eiger] settings loaded from file found in settingspath
|
[Eiger] settings loaded from file found in settingspath
|
||||||
@ -1983,8 +1983,9 @@ class Detector(CppDetectorApi):
|
|||||||
[Jungfrau][Moench] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
|
[Jungfrau][Moench] FULL_SPEED, HALF_SPEED (Default), QUARTER_SPEED
|
||||||
[Eiger] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED
|
[Eiger] FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED
|
||||||
[Gottthard2] G2_108MHZ (Default), G2_144MHZ
|
[Gottthard2] G2_108MHZ (Default), G2_144MHZ
|
||||||
[Jungfrau][Moench] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
|
[Jungfrau] FULL_SPEED option only available from v2.0 boards and is recommended to set number of interfaces to 2. \n
|
||||||
Also overwrites adcphase to recommended default.
|
Also overwrites adcphase to recommended default.
|
||||||
|
[Moench] FULL_SPEED (Default)
|
||||||
"""
|
"""
|
||||||
return element_if_equal(self.getReadoutSpeed())
|
return element_if_equal(self.getReadoutSpeed())
|
||||||
|
|
||||||
@ -2293,12 +2294,12 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def parallel(self):
|
def parallel(self):
|
||||||
"""
|
"""
|
||||||
[Eiger][Mythen3][Gotthard2] Enable or disable the parallel readout mode of detector.
|
[Eiger][Mythen3][Gotthard2][Moench] Enable or disable the parallel readout mode of detector.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
[Mythen3] If exposure time is too short, acquisition will return with an ERROR and take fewer frames than expected.
|
[Mythen3] If exposure time is too short, acquisition will return with an ERROR and take fewer frames than expected.
|
||||||
[Mythen3][Eiger] Default: Non parallel
|
[Mythen3][Eiger][Moench] Default: Non parallel
|
||||||
[Gotthard2] Default: parallel. Non parallel mode works only in continuous mode.
|
[Gotthard2] Default: parallel. Non parallel mode works only in continuous mode.
|
||||||
"""
|
"""
|
||||||
return self.getParallelMode()
|
return self.getParallelMode()
|
||||||
@ -2421,7 +2422,7 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def chipversion(self):
|
def chipversion(self):
|
||||||
"""
|
"""
|
||||||
[Jungfrau][Moench] Chip version of module. Can be 1.0 or 1.1.
|
[Jungfrau] Chip version of module. Can be 1.0 or 1.1.
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
@ -2434,7 +2435,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def autocompdisable(self):
|
def autocompdisable(self):
|
||||||
"""[Jungfrau][Moench] Enable or disable auto comparator disable mode.
|
"""[Jungfrau] Enable or disable auto comparator disable mode.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
@ -2450,7 +2451,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def compdisabletime(self):
|
def compdisabletime(self):
|
||||||
"""[Jungfrau][Moench] Time before end of exposure when comparator is disabled.
|
"""[Jungfrau] Time before end of exposure when comparator is disabled.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
@ -2671,11 +2672,11 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def gainmode(self):
|
def gainmode(self):
|
||||||
"""
|
"""
|
||||||
[Jungfrau][Moench] Detector gain mode. Enum: gainMode
|
[Jungfrau] Detector gain mode. Enum: gainMode
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
[Jungfrau][Moench] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
|
[Jungfrau] DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2, FIX_G1, FIX_G2, FIX_G0 \n
|
||||||
CAUTION: Do not use FIX_G0 without caution, you can damage the detector!!!
|
CAUTION: Do not use FIX_G0 without caution, you can damage the detector!!!
|
||||||
"""
|
"""
|
||||||
return element_if_equal(self.getGainMode())
|
return element_if_equal(self.getGainMode())
|
||||||
@ -2688,7 +2689,7 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def currentsource(self):
|
def currentsource(self):
|
||||||
"""
|
"""
|
||||||
Pass in a currentSrcParameters object
|
[Gotthard2][Jungfrau] Pass in a currentSrcParameters object
|
||||||
see python/examples/use_currentsource.py
|
see python/examples/use_currentsource.py
|
||||||
|
|
||||||
"""
|
"""
|
||||||
@ -2730,14 +2731,14 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def filterresistor(self):
|
def filterresistor(self):
|
||||||
"""
|
"""
|
||||||
[Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing values for increasing "
|
[Gotthard2][Jungfrau] Set filter resistor. Increasing values for increasing "
|
||||||
"resistance.
|
"resistance.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
Advanced user command.
|
Advanced user command.
|
||||||
[Gotthard2] Default is 0. Options: 0-3.
|
[Gotthard2] Default is 0. Options: 0-3.
|
||||||
[Jungfrau][Moench] Default is 1. Options: 0-1.
|
[Jungfrau] Default is 1. Options: 0-1.
|
||||||
"""
|
"""
|
||||||
return self.getFilterResistor()
|
return self.getFilterResistor()
|
||||||
|
|
||||||
@ -2749,11 +2750,11 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def filtercells(self):
|
def filtercells(self):
|
||||||
"""
|
"""
|
||||||
[Jungfrau][Moench] Set filter capacitor.
|
[Jungfrau] Set filter capacitor.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
[Jungfrau][Moench] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
|
[Jungfrau] Options: 0-12. Default: 0. Advanced user command. Only for chipv1.1.
|
||||||
"""
|
"""
|
||||||
return self.getNumberOfFilterCells()
|
return self.getNumberOfFilterCells()
|
||||||
|
|
||||||
@ -3179,7 +3180,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def dbitphase(self):
|
def dbitphase(self):
|
||||||
"""[Ctb][Jungfrau][Moench] Phase shift of clock to latch digital bits. Absolute phase shift.
|
"""[Ctb][Jungfrau] Phase shift of clock to latch digital bits. Absolute phase shift.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
@ -3231,7 +3232,7 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def maxdbitphaseshift(self):
|
def maxdbitphaseshift(self):
|
||||||
"""[CTB][Jungfrau][Moench] Absolute maximum Phase shift of of the clock to latch digital bits.
|
"""[CTB][Jungfrau] Absolute maximum Phase shift of of the clock to latch digital bits.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
|
@ -52,7 +52,6 @@ void qDrawPlot::SetupWidgetWindow() {
|
|||||||
detType = det->getDetectorType().squash();
|
detType = det->getDetectorType().squash();
|
||||||
switch (detType) {
|
switch (detType) {
|
||||||
case slsDetectorDefs::JUNGFRAU:
|
case slsDetectorDefs::JUNGFRAU:
|
||||||
case slsDetectorDefs::MOENCH:
|
|
||||||
pixelMask = ((1 << 14) - 1);
|
pixelMask = ((1 << 14) - 1);
|
||||||
gainMask = (3 << 14);
|
gainMask = (3 << 14);
|
||||||
gainOffset = 14;
|
gainOffset = 14;
|
||||||
@ -1143,8 +1142,7 @@ void qDrawPlot::toDoublePixelData(double *dest, char *source, int size,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 16:
|
case 16:
|
||||||
if (detType == slsDetectorDefs::MOENCH ||
|
if (detType == slsDetectorDefs::JUNGFRAU ||
|
||||||
detType == slsDetectorDefs::JUNGFRAU ||
|
|
||||||
detType == slsDetectorDefs::GOTTHARD2) {
|
detType == slsDetectorDefs::GOTTHARD2) {
|
||||||
|
|
||||||
// show gain plot
|
// show gain plot
|
||||||
|
@ -44,7 +44,6 @@ void qTabDataOutput::SetupWidgetWindow() {
|
|||||||
chkParallel->setEnabled(true);
|
chkParallel->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::JUNGFRAU:
|
case slsDetectorDefs::JUNGFRAU:
|
||||||
case slsDetectorDefs::MOENCH:
|
|
||||||
lblClkDivider->setEnabled(true);
|
lblClkDivider->setEnabled(true);
|
||||||
comboClkDivider->setEnabled(true);
|
comboClkDivider->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
@ -62,11 +62,6 @@ void qTabPlot::SetupWidgetWindow() {
|
|||||||
chkGainPlot->setChecked(true);
|
chkGainPlot->setChecked(true);
|
||||||
plot->EnableGainPlot(true);
|
plot->EnableGainPlot(true);
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::MOENCH:
|
|
||||||
chkGainPlot->setEnabled(true);
|
|
||||||
chkGainPlot->setChecked(true);
|
|
||||||
plot->EnableGainPlot(true);
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -804,9 +799,6 @@ void qTabPlot::Refresh() {
|
|||||||
chkGainPlot->setEnabled(true);
|
chkGainPlot->setEnabled(true);
|
||||||
GetGapPixels();
|
GetGapPixels();
|
||||||
break;
|
break;
|
||||||
case slsDetectorDefs::MOENCH:
|
|
||||||
chkGainPlot->setEnabled(true);
|
|
||||||
break;
|
|
||||||
case slsDetectorDefs::GOTTHARD2:
|
case slsDetectorDefs::GOTTHARD2:
|
||||||
chkGainPlot1D->setEnabled(true);
|
chkGainPlot1D->setEnabled(true);
|
||||||
break;
|
break;
|
||||||
|
@ -92,12 +92,14 @@ void qTabSettings::SetupWidgetWindow() {
|
|||||||
comboDynamicRange->setEnabled(true);
|
comboDynamicRange->setEnabled(true);
|
||||||
lblThreshold->setEnabled(true);
|
lblThreshold->setEnabled(true);
|
||||||
spinThreshold->setEnabled(true);
|
spinThreshold->setEnabled(true);
|
||||||
} else if (detType == slsDetectorDefs::JUNGFRAU ||
|
} else if (detType == slsDetectorDefs::JUNGFRAU) {
|
||||||
detType == slsDetectorDefs::MOENCH) {
|
|
||||||
lblSpinHV->show();
|
lblSpinHV->show();
|
||||||
spinHV->show();
|
spinHV->show();
|
||||||
lblGainMode->setEnabled(true);
|
lblGainMode->setEnabled(true);
|
||||||
comboGainMode->setEnabled(true);
|
comboGainMode->setEnabled(true);
|
||||||
|
} else if (detType == slsDetectorDefs::MOENCH) {
|
||||||
|
lblSpinHV->show();
|
||||||
|
spinHV->show();
|
||||||
} else if (detType == slsDetectorDefs::GOTTHARD) {
|
} else if (detType == slsDetectorDefs::GOTTHARD) {
|
||||||
comboHV->show();
|
comboHV->show();
|
||||||
lblComboHV->show();
|
lblComboHV->show();
|
||||||
|
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
BIN
slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServer_developer
Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -41,5 +41,4 @@ install(TARGETS moenchDetectorServer_virtual
|
|||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file(config_moench.txt ${CMAKE_BINARY_DIR}/bin/config_moench.txt COPYONLY)
|
|
||||||
configure_file(detid_moench.txt ${CMAKE_BINARY_DIR}/bin/detid_moench.txt COPYONLY)
|
configure_file(detid_moench.txt ${CMAKE_BINARY_DIR}/bin/detid_moench.txt COPYONLY)
|
||||||
|
@ -36,7 +36,6 @@ $(PROGS): $(OBJS)
|
|||||||
mkdir -p $(DESTDIR)
|
mkdir -p $(DESTDIR)
|
||||||
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
$(CC) -o $@ $^ $(CFLAGS) $(LDLIBS)
|
||||||
mv $(PROGS) $(DESTDIR)
|
mv $(PROGS) $(DESTDIR)
|
||||||
cp config_moench.txt $(DESTDIR)
|
|
||||||
cp detid_moench.txt $(DESTDIR)
|
cp detid_moench.txt $(DESTDIR)
|
||||||
rm *.gdb
|
rm *.gdb
|
||||||
rm $(main_src)*.o $(md5_dir)*.o
|
rm $(main_src)*.o $(md5_dir)*.o
|
||||||
|
@ -26,33 +26,28 @@
|
|||||||
#define RUN_BUSY_MSK (0x00000001 << RUN_BUSY_OFST)
|
#define RUN_BUSY_MSK (0x00000001 << RUN_BUSY_OFST)
|
||||||
#define WAITING_FOR_TRIGGER_OFST (3)
|
#define WAITING_FOR_TRIGGER_OFST (3)
|
||||||
#define WAITING_FOR_TRIGGER_MSK (0x00000001 << WAITING_FOR_TRIGGER_OFST)
|
#define WAITING_FOR_TRIGGER_MSK (0x00000001 << WAITING_FOR_TRIGGER_OFST)
|
||||||
#define DELAYBEFORE_OFST (4) // Not used in software
|
#define DELAYBEFORE_OFST (4) // delay before acq and after trigger
|
||||||
#define DELAYBEFORE_MSK (0x00000001 << DELAYBEFORE_OFST) // Not used in software
|
#define DELAYBEFORE_MSK (0x00000001 << DELAYBEFORE_OFST)
|
||||||
#define DELAYAFTER_OFST (5) // Not used in software
|
#define DELAYAFTER_OFST (5) // delay after acq until next frame
|
||||||
#define DELAYAFTER_MSK (0x00000001 << DELAYAFTER_OFST) // Not used in software
|
#define DELAYAFTER_MSK (0x00000001 << DELAYAFTER_OFST)
|
||||||
|
#define EXPOSING_OFST (6)
|
||||||
|
#define EXPOSING_MSK (0x00000001 << EXPOSING_OFST)
|
||||||
#define STOPPED_OFST (15)
|
#define STOPPED_OFST (15)
|
||||||
#define STOPPED_MSK (0x00000001 << STOPPED_OFST)
|
#define STOPPED_MSK (0x00000001 << STOPPED_OFST)
|
||||||
|
#define FRAME_BUSY_OFST (18)
|
||||||
|
#define FRAME_BUSY_MSK (0x00000001 << FRAME_BUSY_OFST)
|
||||||
|
#define ADC_DESERON_OFST (19)
|
||||||
|
#define ADC_DESERON_MSK (0x00000001 << ADC_DESERON_OFST)
|
||||||
#define RUNMACHINE_BUSY_OFST (17)
|
#define RUNMACHINE_BUSY_OFST (17)
|
||||||
#define RUNMACHINE_BUSY_MSK (0x00000001 << RUNMACHINE_BUSY_OFST)
|
#define RUNMACHINE_BUSY_MSK (0x00000001 << RUNMACHINE_BUSY_OFST)
|
||||||
|
|
||||||
/* Look at me register */
|
|
||||||
#define LOOK_AT_ME_REG (0x03 << MEM_MAP_SHIFT) // Not used in firmware or software
|
|
||||||
|
|
||||||
/* System Status register */
|
/* System Status register */
|
||||||
#define SYSTEM_STATUS_REG (0x04 << MEM_MAP_SHIFT) // Not used in software
|
#define SYSTEM_STATUS_REG (0x04 << MEM_MAP_SHIFT) // Not used in software
|
||||||
|
|
||||||
#define DDR3_CAL_DONE_OFST (0) // Not used in software
|
#define RECONFIG_PLL_LCK_OFST (3)
|
||||||
#define DDR3_CAL_DONE_MSK (0x00000001 << DDR3_CAL_DONE_OFST) // Not used in software
|
#define RECONFIG_PLL_LCK_MSK (0x00000001 << RECONFIG_PLL_LCK_OFST)
|
||||||
#define DDR3_CAL_FAIL_OFST (1) // Not used in software
|
#define PLL_A_LCK_OFST (4)
|
||||||
#define DDR3_CAL_FAIL_MSK (0x00000001 << DDR3_CAL_FAIL_OFST) // Not used in software
|
#define PLL_A_LCK_MSK (0x00000001 << PLL_A_LCK_OFST)
|
||||||
#define DDR3_INIT_DONE_OFST (2) // Not used in software
|
|
||||||
#define DDR3_INIT_DONE_MSK (0x00000001 << DDR3_INIT_DONE_OFST) // Not used in software
|
|
||||||
#define RECONFIG_PLL_LCK_OFST (3) // Not used in software
|
|
||||||
#define RECONFIG_PLL_LCK_MSK (0x00000001 << RECONFIG_PLL_LCK_OFST) // Not used in software
|
|
||||||
#define PLL_A_LCK_OFST (4) // Not used in software
|
|
||||||
#define PLL_A_LCK_MSK (0x00000001 << PLL_A_LCK_OFST) // Not used in software
|
|
||||||
#define DD3_PLL_LCK_OFST (5) // Not used in software
|
|
||||||
#define DD3_PLL_LCK_MSK (0x00000001 << DD3_PLL_LCK_OFST) // Not used in software
|
|
||||||
|
|
||||||
/* Module Control Board Serial Number Register */
|
/* Module Control Board Serial Number Register */
|
||||||
#define MOD_SERIAL_NUM_REG (0x0A << MEM_MAP_SHIFT)
|
#define MOD_SERIAL_NUM_REG (0x0A << MEM_MAP_SHIFT)
|
||||||
@ -67,8 +62,6 @@
|
|||||||
|
|
||||||
#define API_VERSION_OFST (0)
|
#define API_VERSION_OFST (0)
|
||||||
#define API_VERSION_MSK (0x00FFFFFF << API_VERSION_OFST)
|
#define API_VERSION_MSK (0x00FFFFFF << API_VERSION_OFST)
|
||||||
#define API_VERSION_DETECTOR_TYPE_OFST (24) // Not used in software
|
|
||||||
#define API_VERSION_DETECTOR_TYPE_MSK (0x000000FF << API_VERSION_DETECTOR_TYPE_OFST) // Not used in software
|
|
||||||
|
|
||||||
/* Time from Start 64 bit register */
|
/* Time from Start 64 bit register */
|
||||||
#define TIME_FROM_START_LSB_REG (0x10 << MEM_MAP_SHIFT)
|
#define TIME_FROM_START_LSB_REG (0x10 << MEM_MAP_SHIFT)
|
||||||
@ -90,7 +83,7 @@
|
|||||||
#define GET_PERIOD_LSB_REG (0x18 << MEM_MAP_SHIFT)
|
#define GET_PERIOD_LSB_REG (0x18 << MEM_MAP_SHIFT)
|
||||||
#define GET_PERIOD_MSB_REG (0x19 << MEM_MAP_SHIFT)
|
#define GET_PERIOD_MSB_REG (0x19 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
/** Get Temperature Carlos, incorrectl as get gates */
|
/** Get Temperature */
|
||||||
#define GET_TEMPERATURE_TMP112_REG (0x1c << MEM_MAP_SHIFT) // (after multiplying by 625) in 10ths of
|
#define GET_TEMPERATURE_TMP112_REG (0x1c << MEM_MAP_SHIFT) // (after multiplying by 625) in 10ths of
|
||||||
// millidegrees of TMP112
|
// millidegrees of TMP112
|
||||||
|
|
||||||
@ -99,27 +92,14 @@
|
|||||||
#define TEMPERATURE_POLARITY_BIT (11)
|
#define TEMPERATURE_POLARITY_BIT (11)
|
||||||
#define TEMPERATURE_POLARITY_MSK (0x00000001 << TEMPERATURE_POLARITY_BIT)
|
#define TEMPERATURE_POLARITY_MSK (0x00000001 << TEMPERATURE_POLARITY_BIT)
|
||||||
|
|
||||||
/* Config Status Register for chip 1.1 */
|
|
||||||
#define CONFIG_V11_STATUS_REG (0x1D << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
#define CONFIG_V11_STATUS_FLTR_CLL_OFST (0)
|
|
||||||
#define CONFIG_V11_STATUS_FLTR_CLL_MSK (0x00000FFF << CONFIG_V11_STATUS_FLTR_CLL_OFST)
|
|
||||||
// CSM mode = high current (100%), low current (16%)
|
|
||||||
#define CONFIG_V11_STATUS_CRRNT_SRC_LOW_OFST (19)
|
|
||||||
#define CONFIG_V11_STATUS_CRRNT_SRC_LOW_MSK (0x00000001 << CONFIG_V11_STATUS_CRRNT_SRC_LOW_OFST)
|
|
||||||
#define CONFIG_V11_STATUS_FLTR_RSSTR_SMLR_OFST (21)
|
|
||||||
#define CONFIG_V11_STATUS_FLTR_RSSTR_SMLR_MSK (0x00000001 << CONFIG_V11_STATUS_FLTR_RSSTR_SMLR_OFST)
|
|
||||||
#define CONFIG_V11_STATUS_AUTO_MODE_OVRRD_OFST (23)
|
|
||||||
#define CONFIG_V11_STATUS_AUTO_MODE_OVRRD_MSK (0x00000001 << CONFIG_V11_STATUS_AUTO_MODE_OVRRD_OFST)
|
|
||||||
|
|
||||||
/* Get Frames from Start 64 bit register (frames from last reset using
|
/* Get Frames from Start 64 bit register (frames from last reset using
|
||||||
* CONTROL_CRST) */
|
* CONTROL_CRST) */
|
||||||
#define FRAMES_FROM_START_LSB_REG (0x22 << MEM_MAP_SHIFT)
|
#define FRAMES_FROM_START_LSB_REG (0x22 << MEM_MAP_SHIFT)
|
||||||
#define FRAMES_FROM_START_MSB_REG (0x23 << MEM_MAP_SHIFT)
|
#define FRAMES_FROM_START_MSB_REG (0x23 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
/* Get Starting Frame Number */
|
/* Get Next Frame Number */
|
||||||
#define GET_FRAME_NUMBER_LSB_REG (0x24 << MEM_MAP_SHIFT)
|
#define GET_NEXT_FRAME_NUMBER_LSB_REG (0x24 << MEM_MAP_SHIFT)
|
||||||
#define GET_FRAME_NUMBER_MSB_REG (0x25 << MEM_MAP_SHIFT)
|
#define GET_NEXT_FRAME_NUMBER_MSB_REG (0x25 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
/* Measurement Time 64 bit register (timestamp at a frame start until reset)*/
|
/* Measurement Time 64 bit register (timestamp at a frame start until reset)*/
|
||||||
#define START_FRAME_TIME_LSB_REG (0x26 << MEM_MAP_SHIFT)
|
#define START_FRAME_TIME_LSB_REG (0x26 << MEM_MAP_SHIFT)
|
||||||
@ -154,6 +134,9 @@
|
|||||||
/* ADC offset Register */
|
/* ADC offset Register */
|
||||||
#define ADC_OFST_REG (0x42 << MEM_MAP_SHIFT)
|
#define ADC_OFST_REG (0x42 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
|
#define ADC_OFFSET_OFST (0)
|
||||||
|
#define ADC_OFFSET_MSK (0x0000001F << ADC_OFFSET_OFST)
|
||||||
|
|
||||||
/* ADC Port Invert Register */
|
/* ADC Port Invert Register */
|
||||||
#define ADC_PORT_INVERT_REG (0x43 << MEM_MAP_SHIFT)
|
#define ADC_PORT_INVERT_REG (0x43 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
@ -178,21 +161,12 @@
|
|||||||
/* Configuration Register */
|
/* Configuration Register */
|
||||||
#define CONFIG_REG (0x4D << MEM_MAP_SHIFT)
|
#define CONFIG_REG (0x4D << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
// readout timer (from chip) to stabilize (esp in burst acquisition mode) tRDT =
|
|
||||||
// (RDT + 1) * 25ns
|
|
||||||
#define CONFIG_RDT_TMR_OFST (0)
|
|
||||||
#define CONFIG_RDT_TMR_MSK (0x0000FFFF << CONFIG_RDT_TMR_OFST)
|
|
||||||
// if 0, outer is the primary interface
|
// if 0, outer is the primary interface
|
||||||
// bottom via port 0 (outer)
|
// bottom via port 0 (outer)
|
||||||
#define CONFIG_OPRTN_MDE_2_X_10GbE_OFST (16)
|
#define CONFIG_OPRTN_MDE_2_X_10GbE_OFST (16)
|
||||||
#define CONFIG_OPRTN_MDE_2_X_10GbE_MSK (0x00000001 << CONFIG_OPRTN_MDE_2_X_10GbE_OFST)
|
#define CONFIG_OPRTN_MDE_2_X_10GbE_MSK (0x00000001 << CONFIG_OPRTN_MDE_2_X_10GbE_OFST)
|
||||||
#define CONFIG_INNR_PRIMRY_INTRFCE_OFST (17)
|
#define CONFIG_INNR_PRIMRY_INTRFCE_OFST (17)
|
||||||
#define CONFIG_INNR_PRIMRY_INTRFCE_MSK (0x00000001 << CONFIG_INNR_PRIMRY_INTRFCE_OFST)
|
#define CONFIG_INNR_PRIMRY_INTRFCE_MSK (0x00000001 << CONFIG_INNR_PRIMRY_INTRFCE_OFST)
|
||||||
#define CONFIG_READOUT_SPEED_OFST (20)
|
|
||||||
#define CONFIG_READOUT_SPEED_MSK (0x00000003 << CONFIG_READOUT_SPEED_OFST)
|
|
||||||
#define CONFIG_QUARTER_SPEED_10MHZ_VAL ((0x0 << CONFIG_READOUT_SPEED_OFST) & CONFIG_READOUT_SPEED_MSK)
|
|
||||||
#define CONFIG_HALF_SPEED_20MHZ_VAL ((0x1 << CONFIG_READOUT_SPEED_OFST) & CONFIG_READOUT_SPEED_MSK)
|
|
||||||
#define CONFIG_FULL_SPEED_40MHZ_VAL ((0x2 << CONFIG_READOUT_SPEED_OFST) & CONFIG_READOUT_SPEED_MSK)
|
|
||||||
#define CONFIG_TDMA_ENABLE_OFST (24)
|
#define CONFIG_TDMA_ENABLE_OFST (24)
|
||||||
#define CONFIG_TDMA_ENABLE_MSK (0x00000001 << CONFIG_TDMA_ENABLE_OFST)
|
#define CONFIG_TDMA_ENABLE_MSK (0x00000001 << CONFIG_TDMA_ENABLE_OFST)
|
||||||
#define CONFIG_TDMA_TIMESLOT_OFST (25) // 1ms
|
#define CONFIG_TDMA_TIMESLOT_OFST (25) // 1ms
|
||||||
@ -219,12 +193,10 @@
|
|||||||
#define CONTROL_STOP_ACQ_MSK (0x00000001 << CONTROL_STOP_ACQ_OFST)
|
#define CONTROL_STOP_ACQ_MSK (0x00000001 << CONTROL_STOP_ACQ_OFST)
|
||||||
#define CONTROL_SOFTWARE_TRIGGER_OFST (2)
|
#define CONTROL_SOFTWARE_TRIGGER_OFST (2)
|
||||||
#define CONTROL_SOFTWARE_TRIGGER_MSK (0x00000001 << CONTROL_SOFTWARE_TRIGGER_OFST)
|
#define CONTROL_SOFTWARE_TRIGGER_MSK (0x00000001 << CONTROL_SOFTWARE_TRIGGER_OFST)
|
||||||
#define CONTROL_CORE_RST_OFST (10)
|
#define CONTROL_CORE_RST_OFST (10) // flow, dac driver, 10GbE
|
||||||
#define CONTROL_CORE_RST_MSK (0x00000001 << CONTROL_CORE_RST_OFST)
|
#define CONTROL_CORE_RST_MSK (0x00000001 << CONTROL_CORE_RST_OFST)
|
||||||
#define CONTROL_PERIPHERAL_RST_OFST (11) // DDR3 HMem Ctrlr, GBE, Temp
|
#define CONTROL_PERIPHERAL_RST_OFST (11) // 10GBE
|
||||||
#define CONTROL_PERIPHERAL_RST_MSK (0x00000001 << CONTROL_PERIPHERAL_RST_OFST) // DDR3 HMem Ctrlr, GBE, Temp
|
#define CONTROL_PERIPHERAL_RST_MSK (0x00000001 << CONTROL_PERIPHERAL_RST_OFST)
|
||||||
#define CONTROL_DDR3_MEM_RST_OFST (12) // only PHY, not DDR3 PLL ,Not used in software
|
|
||||||
#define CONTROL_DDR3_MEM_RST_MSK (0x00000001 << CONTROL_DDR3_MEM_RST_OFST) // only PHY, not DDR3 PLL ,Not used in software
|
|
||||||
#define CONTROL_ACQ_FIFO_CLR_OFST (14)
|
#define CONTROL_ACQ_FIFO_CLR_OFST (14)
|
||||||
#define CONTROL_ACQ_FIFO_CLR_MSK (0x00000001 << CONTROL_ACQ_FIFO_CLR_OFST)
|
#define CONTROL_ACQ_FIFO_CLR_MSK (0x00000001 << CONTROL_ACQ_FIFO_CLR_OFST)
|
||||||
#define CONTROL_MASTER_OFST (15)
|
#define CONTROL_MASTER_OFST (15)
|
||||||
@ -246,24 +218,9 @@
|
|||||||
#define PLL_CNTRL_WR_PRMTR_MSK (0x00000001 << PLL_CNTRL_WR_PRMTR_OFST)
|
#define PLL_CNTRL_WR_PRMTR_MSK (0x00000001 << PLL_CNTRL_WR_PRMTR_OFST)
|
||||||
#define PLL_CNTRL_PLL_RST_OFST (3)
|
#define PLL_CNTRL_PLL_RST_OFST (3)
|
||||||
#define PLL_CNTRL_PLL_RST_MSK (0x00000001 << PLL_CNTRL_PLL_RST_OFST)
|
#define PLL_CNTRL_PLL_RST_MSK (0x00000001 << PLL_CNTRL_PLL_RST_OFST)
|
||||||
#define PLL_CNTRL_DBIT_WR_PRMTR_OFST (5)
|
|
||||||
#define PLL_CNTRL_DBIT_WR_PRMTR_MSK (0x00000001 << PLL_CNTRL_DBIT_WR_PRMTR_OFST)
|
|
||||||
#define PLL_CNTRL_ADDR_OFST (16)
|
#define PLL_CNTRL_ADDR_OFST (16)
|
||||||
#define PLL_CNTRL_ADDR_MSK (0x0000003F << PLL_CNTRL_ADDR_OFST)
|
#define PLL_CNTRL_ADDR_MSK (0x0000003F << PLL_CNTRL_ADDR_OFST)
|
||||||
|
|
||||||
/* Config Register for chip 1.1 */
|
|
||||||
#define CONFIG_V11_REG (0x58 << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
#define CONFIG_V11_FLTR_CLL_OFST (0)
|
|
||||||
#define CONFIG_V11_FLTR_CLL_MSK (0x00000FFF << CONFIG_V11_FLTR_CLL_OFST)
|
|
||||||
// CSM mode = high current (100%), low current (16%)
|
|
||||||
#define CONFIG_V11_CRRNT_SRC_LOW_OFST (19)
|
|
||||||
#define CONFIG_V11_CRRNT_SRC_LOW_MSK (0x00000001 << CONFIG_V11_CRRNT_SRC_LOW_OFST)
|
|
||||||
#define CONFIG_V11_FLTR_RSSTR_SMLR_OFST (21)
|
|
||||||
#define CONFIG_V11_FLTR_RSSTR_SMLR_MSK (0x00000001 << CONFIG_V11_FLTR_RSSTR_SMLR_OFST)
|
|
||||||
#define CONFIG_V11_AUTO_MODE_OVRRD_OFST (23)
|
|
||||||
#define CONFIG_V11_AUTO_MODE_OVRRD_MSK (0x00000001 << CONFIG_V11_AUTO_MODE_OVRRD_OFST)
|
|
||||||
|
|
||||||
/* Sample Register */
|
/* Sample Register */
|
||||||
#define SAMPLE_REG (0x59 << MEM_MAP_SHIFT)
|
#define SAMPLE_REG (0x59 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
@ -289,80 +246,6 @@
|
|||||||
#define SAMPLE_ADC_DECMT_FACTOR_6_VAL ((0x6 << SAMPLE_ADC_DECMT_FACTOR_OFST) & SAMPLE_ADC_DECMT_FACTOR_MSK)
|
#define SAMPLE_ADC_DECMT_FACTOR_6_VAL ((0x6 << SAMPLE_ADC_DECMT_FACTOR_OFST) & SAMPLE_ADC_DECMT_FACTOR_MSK)
|
||||||
#define SAMPLE_ADC_DECMT_FACTOR_7_VAL ((0x7 << SAMPLE_ADC_DECMT_FACTOR_OFST) & SAMPLE_ADC_DECMT_FACTOR_MSK)
|
#define SAMPLE_ADC_DECMT_FACTOR_7_VAL ((0x7 << SAMPLE_ADC_DECMT_FACTOR_OFST) & SAMPLE_ADC_DECMT_FACTOR_MSK)
|
||||||
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_SEL_OFST (8)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_SEL_MSK (0x0000000F << SAMPLE_DGTL_SAMPLE_SEL_OFST)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_0_VAL ((0x0 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_1_VAL ((0x1 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_2_VAL ((0x2 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_3_VAL ((0x3 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_4_VAL ((0x4 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_5_VAL ((0x5 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_6_VAL ((0x6 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_7_VAL ((0x7 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_8_VAL ((0x8 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_9_VAL ((0x9 << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_10_VAL ((0xa << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_11_VAL ((0xb << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_12_VAL ((0xc << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_13_VAL ((0xd << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_14_VAL ((0xe << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
#define SAMPLE_DGTL_SAMPLE_15_VAL ((0xf << SAMPLE_DGTL_SAMPLE_SEL_OFST) & SAMPLE_DGTL_SAMPLE_SEL_MSK)
|
|
||||||
|
|
||||||
#define SAMPLE_DGTL_DECMT_FACTOR_OFST (12)
|
|
||||||
#define SAMPLE_DGTL_DECMT_FACTOR_MSK (0x00000003 << SAMPLE_DGTL_DECMT_FACTOR_OFST)
|
|
||||||
#define SAMPLE_DECMT_FACTOR_FULL_VAL ((0x0 << SAMPLE_DGTL_DECMT_FACTOR_OFST) & SAMPLE_DGTL_DECMT_FACTOR_MSK)
|
|
||||||
#define SAMPLE_DECMT_FACTOR_HALF_VAL ((0x1 << SAMPLE_DGTL_DECMT_FACTOR_OFST) & SAMPLE_DGTL_DECMT_FACTOR_MSK)
|
|
||||||
#define SAMPLE_DECMT_FACTOR_QUARTER_VAL ((0x2 << SAMPLE_DGTL_DECMT_FACTOR_OFST) & SAMPLE_DGTL_DECMT_FACTOR_MSK)
|
|
||||||
|
|
||||||
/** Current Source Column 0 (0 - 31)) */
|
|
||||||
#define CRRNT_SRC_COL_LSB_REG (0x5A << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
/** Current Source Column 1 (32 - 63) */
|
|
||||||
#define CRRNT_SRC_COL_MSB_REG (0x5B << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
/** Vref Comp Mod Register */
|
|
||||||
#define EXT_DAQ_CTRL_REG (0x5C << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
#define EXT_DAQ_CTRL_VREF_COMP_OFST (0)
|
|
||||||
#define EXT_DAQ_CTRL_VREF_COMP_MSK (0x00000FFF << EXT_DAQ_CTRL_VREF_COMP_OFST)
|
|
||||||
#define EXT_DAQ_CTRL_CMP_LGC_ENBL_OFST (15)
|
|
||||||
#define EXT_DAQ_CTRL_CMP_LGC_ENBL_MSK (0x00000001 << EXT_DAQ_CTRL_CMP_LGC_ENBL_OFST)
|
|
||||||
#define EXT_DAQ_CTRL_INPT_DETECT_OFST (16)
|
|
||||||
#define EXT_DAQ_CTRL_INPT_DETECT_MSK (0x00000007 << EXT_DAQ_CTRL_INPT_DETECT_OFST)
|
|
||||||
#define EXT_DAQ_CTRL_INPT_DETECT_ENBL_OFST (19)
|
|
||||||
#define EXT_DAQ_CTRL_INPT_DETECT_ENBL_MSK (0x00000001 << EXT_DAQ_CTRL_INPT_DETECT_ENBL_OFST)
|
|
||||||
|
|
||||||
/** DAQ Register */
|
|
||||||
#define DAQ_REG (0x5D << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
// dynamic gain (default)
|
|
||||||
#define DAQ_HIGH_GAIN_OFST (0)
|
|
||||||
#define DAQ_HIGH_GAIN_MSK (0x00000001 << DAQ_HIGH_GAIN_OFST)
|
|
||||||
#define DAQ_FIX_GAIN_OFST (1)
|
|
||||||
#define DAQ_FIX_GAIN_MSK (0x00000003 << DAQ_FIX_GAIN_OFST)
|
|
||||||
#define DAQ_FIX_GAIN_STG_1_VAL ((0x1 << DAQ_FIX_GAIN_OFST) & DAQ_FIX_GAIN_MSK)
|
|
||||||
#define DAQ_FIX_GAIN_STG_2_VAL ((0x3 << DAQ_FIX_GAIN_OFST) & DAQ_FIX_GAIN_MSK)
|
|
||||||
#define DAQ_CMP_RST_OFST (4)
|
|
||||||
#define DAQ_CMP_RST_MSK (0x00000001 << DAQ_CMP_RST_OFST)
|
|
||||||
#define DAQ_CHIP11_VRSN_OFST (7)
|
|
||||||
#define DAQ_CHIP11_VRSN_MSK (0x00000001 << DAQ_CHIP11_VRSN_OFST)
|
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_OFST (12)
|
|
||||||
#define DAQ_FRCE_SWTCH_GAIN_MSK (0x00000003 << DAQ_FRCE_SWTCH_GAIN_OFST)
|
|
||||||
#define DAQ_FRCE_GAIN_STG_0_VAL ((0x0 << DAQ_FRCE_SWTCH_GAIN_OFST) & DAQ_FRCE_SWTCH_GAIN_MSK)
|
|
||||||
#define DAQ_FRCE_GAIN_STG_1_VAL ((0x1 << DAQ_FRCE_SWTCH_GAIN_OFST) & DAQ_FRCE_SWTCH_GAIN_MSK)
|
|
||||||
#define DAQ_FRCE_GAIN_STG_2_VAL ((0x3 << DAQ_FRCE_SWTCH_GAIN_OFST) & DAQ_FRCE_SWTCH_GAIN_MSK)
|
|
||||||
#define DAQ_ELCTRN_CLLCTN_MDE_OFST (14)
|
|
||||||
#define DAQ_ELCTRN_CLLCTN_MDE_MSK (0x00000001 << DAQ_ELCTRN_CLLCTN_MDE_OFST)
|
|
||||||
#define DAQ_G2_CNNT_OFST (15)
|
|
||||||
#define DAQ_G2_CNNT_MSK (0x00000001 << DAQ_G2_CNNT_OFST)
|
|
||||||
#define DAQ_CRRNT_SRC_ENBL_OFST (16)
|
|
||||||
#define DAQ_CRRNT_SRC_ENBL_MSK (0x00000001 << DAQ_CRRNT_SRC_ENBL_OFST)
|
|
||||||
#define DAQ_CRRNT_SRC_CLMN_FIX_OFST (17)
|
|
||||||
#define DAQ_CRRNT_SRC_CLMN_FIX_MSK (0x00000001 << DAQ_CRRNT_SRC_CLMN_FIX_OFST)
|
|
||||||
#define DAQ_CRRNT_SRC_CLMN_SLCT_OFST (20)
|
|
||||||
#define DAQ_CRRNT_SRC_CLMN_SLCT_MSK (0x0000003F << DAQ_CRRNT_SRC_CLMN_SLCT_OFST)
|
|
||||||
#define DAQ_GAIN_MODE_MASK (DAQ_FRCE_SWTCH_GAIN_MSK | DAQ_FIX_GAIN_MSK | DAQ_CMP_RST_MSK)
|
|
||||||
|
|
||||||
/** Chip Power Register */
|
/** Chip Power Register */
|
||||||
#define CHIP_POWER_REG (0x5E << MEM_MAP_SHIFT)
|
#define CHIP_POWER_REG (0x5E << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
@ -402,13 +285,9 @@
|
|||||||
#define SET_EXPTIME_LSB_REG (0x68 << MEM_MAP_SHIFT)
|
#define SET_EXPTIME_LSB_REG (0x68 << MEM_MAP_SHIFT)
|
||||||
#define SET_EXPTIME_MSB_REG (0x69 << MEM_MAP_SHIFT)
|
#define SET_EXPTIME_MSB_REG (0x69 << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
/* Starting Frame number 64 bit register */
|
/* Set next Frame number 64 bit register */
|
||||||
#define FRAME_NUMBER_LSB_REG (0x6A << MEM_MAP_SHIFT)
|
#define SET_NEXT_FRAME_NUMBER_LSB_REG (0x6A << MEM_MAP_SHIFT)
|
||||||
#define FRAME_NUMBER_MSB_REG (0x6B << MEM_MAP_SHIFT)
|
#define SET_NEXT_FRAME_NUMBER_MSB_REG (0x6B << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
/* Comparator disable time (chipv1.1) 32 bit register tT = T x 25 ns
|
|
||||||
Time before end of exposure when comparator is disabled */
|
|
||||||
#define COMP_DSBLE_TIME_REG (0x6C << MEM_MAP_SHIFT)
|
|
||||||
|
|
||||||
|
|
||||||
/* Trigger Delay 32 bit register */
|
/* Trigger Delay 32 bit register */
|
||||||
@ -437,23 +316,39 @@ Time before end of exposure when comparator is disabled */
|
|||||||
#define MOD_ID_OFST (0)
|
#define MOD_ID_OFST (0)
|
||||||
#define MOD_ID_MSK (0x0000FFFF << MOD_ID_OFST)
|
#define MOD_ID_MSK (0x0000FFFF << MOD_ID_OFST)
|
||||||
|
|
||||||
|
/* ASIC Control Register */
|
||||||
|
#define ASIC_CTRL_REG (0x7F << MEM_MAP_SHIFT)
|
||||||
|
|
||||||
|
#define ASIC_CTRL_PARALLEL_RD_OFST (0)
|
||||||
|
#define ASIC_CTRL_PARALLEL_RD_MSK (0x00000001 << ASIC_CTRL_PARALLEL_RD_OFST)
|
||||||
|
#define ASIC_CTRL_INTRFCE_CLK_PLRTY_OFST (1)
|
||||||
|
#define ASIC_CTRL_INTRFCE_CLK_PLRTY_MSK (0x00000001 << ASIC_CTRL_INTRFCE_CLK_PLRTY_OFST)
|
||||||
|
|
||||||
/* ADC 0 Deserializer Control */
|
/* ADC 0 Deserializer Control */
|
||||||
#define ADC_DSRLZR_0_REG (0xF0 << MEM_MAP_SHIFT)
|
#define ADC_DSRLZR_0_REG (0xF0 << MEM_MAP_SHIFT)
|
||||||
|
#define ADC_DSRLZR_0_RESET_ALGNMNT_OFST (30)
|
||||||
|
#define ADC_DSRLZR_0_RESET_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_0_RESET_ALGNMNT_OFST)
|
||||||
#define ADC_DSRLZR_0_RFRSH_ALGNMNT_OFST (31) /* Refresh alignment */
|
#define ADC_DSRLZR_0_RFRSH_ALGNMNT_OFST (31) /* Refresh alignment */
|
||||||
#define ADC_DSRLZR_0_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_0_RFRSH_ALGNMNT_OFST)
|
#define ADC_DSRLZR_0_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_0_RFRSH_ALGNMNT_OFST)
|
||||||
|
|
||||||
/* ADC 0 Deserializer Control */
|
/* ADC 0 Deserializer Control */
|
||||||
#define ADC_DSRLZR_1_REG (0xF1 << MEM_MAP_SHIFT)
|
#define ADC_DSRLZR_1_REG (0xF1 << MEM_MAP_SHIFT)
|
||||||
|
#define ADC_DSRLZR_1_RESET_ALGNMNT_OFST (30)
|
||||||
|
#define ADC_DSRLZR_1_RESET_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_1_RESET_ALGNMNT_OFST)
|
||||||
#define ADC_DSRLZR_1_RFRSH_ALGNMNT_OFST (31)
|
#define ADC_DSRLZR_1_RFRSH_ALGNMNT_OFST (31)
|
||||||
#define ADC_DSRLZR_1_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_1_RFRSH_ALGNMNT_OFST)
|
#define ADC_DSRLZR_1_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_1_RFRSH_ALGNMNT_OFST)
|
||||||
|
|
||||||
/* ADC 0 Deserializer Control */
|
/* ADC 0 Deserializer Control */
|
||||||
#define ADC_DSRLZR_2_REG (0xF2 << MEM_MAP_SHIFT)
|
#define ADC_DSRLZR_2_REG (0xF2 << MEM_MAP_SHIFT)
|
||||||
|
#define ADC_DSRLZR_2_RESET_ALGNMNT_OFST (30)
|
||||||
|
#define ADC_DSRLZR_2_RESET_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_2_RESET_ALGNMNT_OFST)
|
||||||
#define ADC_DSRLZR_2_RFRSH_ALGNMNT_OFST (31)
|
#define ADC_DSRLZR_2_RFRSH_ALGNMNT_OFST (31)
|
||||||
#define ADC_DSRLZR_2_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_2_RFRSH_ALGNMNT_OFST)
|
#define ADC_DSRLZR_2_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_2_RFRSH_ALGNMNT_OFST)
|
||||||
|
|
||||||
/* ADC 0 Deserializer Control */
|
/* ADC 0 Deserializer Control */
|
||||||
#define ADC_DSRLZR_3_REG (0xF3 << MEM_MAP_SHIFT)
|
#define ADC_DSRLZR_3_REG (0xF3 << MEM_MAP_SHIFT)
|
||||||
|
#define ADC_DSRLZR_3_RESET_ALGNMNT_OFST (30)
|
||||||
|
#define ADC_DSRLZR_3_RESET_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_3_RESET_ALGNMNT_OFST)
|
||||||
#define ADC_DSRLZR_3_RFRSH_ALGNMNT_OFST (31)
|
#define ADC_DSRLZR_3_RFRSH_ALGNMNT_OFST (31)
|
||||||
#define ADC_DSRLZR_3_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_3_RFRSH_ALGNMNT_OFST)
|
#define ADC_DSRLZR_3_RFRSH_ALGNMNT_MSK (0x00000001 << ADC_DSRLZR_3_RFRSH_ALGNMNT_OFST)
|
||||||
|
|
||||||
|
Binary file not shown.
@ -1,4 +0,0 @@
|
|||||||
|
|
||||||
|
|
||||||
#chip version version (multiplied by 10)
|
|
||||||
chipversion 11
|
|
File diff suppressed because it is too large
Load Diff
@ -4,8 +4,8 @@
|
|||||||
#include "RegisterDefs.h"
|
#include "RegisterDefs.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
#define REQRD_FRMWRE_VRSN_BOARD2 0x221130 // 1.0 pcb (version = 010)
|
#define REQRD_FRMWRE_VRSN_BOARD2 0x444445 // 1.0 pcb (version = 010)
|
||||||
#define REQRD_FRMWRE_VRSN 0x221130 // 2.0 pcb (version = 011)
|
#define REQRD_FRMWRE_VRSN 0x230522 // 2.0 pcb (version = 011)
|
||||||
|
|
||||||
#define NUM_HARDWARE_VERSIONS (2)
|
#define NUM_HARDWARE_VERSIONS (2)
|
||||||
#define HARDWARE_VERSION_NUMBERS \
|
#define HARDWARE_VERSION_NUMBERS \
|
||||||
@ -14,7 +14,6 @@
|
|||||||
{ "1.0", "2.0" }
|
{ "1.0", "2.0" }
|
||||||
|
|
||||||
#define ID_FILE ("detid_moench.txt")
|
#define ID_FILE ("detid_moench.txt")
|
||||||
#define CONFIG_FILE ("config_moench.txt")
|
|
||||||
#define LINKED_SERVER_NAME "moenchDetectorServer"
|
#define LINKED_SERVER_NAME "moenchDetectorServer"
|
||||||
|
|
||||||
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
#define CTRL_SRVR_INIT_TIME_US (300 * 1000)
|
||||||
@ -27,9 +26,7 @@
|
|||||||
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
|
#define NUM_BYTES_PER_PIXEL (DYNAMIC_RANGE / 8)
|
||||||
#define DATA_BYTES (NCHIP * NCHAN * NUM_BYTES_PER_PIXEL)
|
#define DATA_BYTES (NCHIP * NCHAN * NUM_BYTES_PER_PIXEL)
|
||||||
#define CLK_RUN (40) // MHz
|
#define CLK_RUN (40) // MHz
|
||||||
#define CLK_SYNC (20) // MHz
|
#define ADC_CLK_INDEX (0)
|
||||||
#define ADC_CLK_INDEX (1)
|
|
||||||
#define DBIT_CLK_INDEX (0)
|
|
||||||
|
|
||||||
/** Default Parameters */
|
/** Default Parameters */
|
||||||
#define DEFAULT_NUM_FRAMES (1)
|
#define DEFAULT_NUM_FRAMES (1)
|
||||||
@ -41,12 +38,11 @@
|
|||||||
#define DEFAULT_HIGH_VOLTAGE (0)
|
#define DEFAULT_HIGH_VOLTAGE (0)
|
||||||
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
#define DEFAULT_TIMING_MODE (AUTO_TIMING)
|
||||||
#define DEFAULT_SETTINGS (GAIN0)
|
#define DEFAULT_SETTINGS (GAIN0)
|
||||||
#define DEFAULT_GAINMODE (DYNAMIC)
|
|
||||||
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
#define DEFAULT_TX_UDP_PORT (0x7e9a)
|
||||||
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
#define DEFAULT_TMP_THRSHLD (65 * 1000) // milli degree Celsius
|
||||||
#define DEFAULT_FLIP_ROWS (0)
|
#define DEFAULT_FLIP_ROWS (0)
|
||||||
#define DEFAULT_FILTER_RESISTOR (1) // higher resistor
|
#define DEFAULT_SPEED (FULL_SPEED)
|
||||||
#define DEFAULT_FILTER_CELL (0)
|
#define DEFAULT_PARALLEL_ENABLE (0)
|
||||||
|
|
||||||
#define HIGHVOLTAGE_MIN (60)
|
#define HIGHVOLTAGE_MIN (60)
|
||||||
#define HIGHVOLTAGE_MAX (200)
|
#define HIGHVOLTAGE_MAX (200)
|
||||||
@ -69,75 +65,13 @@
|
|||||||
#define MAX_PHASE_SHIFTS (240)
|
#define MAX_PHASE_SHIFTS (240)
|
||||||
#define BIT16_MASK (0xFFFF)
|
#define BIT16_MASK (0xFFFF)
|
||||||
|
|
||||||
#define GAIN_VAL_OFST (14)
|
|
||||||
#define GAIN_VAL_MSK (0x3 << GAIN_VAL_OFST)
|
|
||||||
|
|
||||||
// pipeline
|
// pipeline
|
||||||
#define ADC_PORT_INVERT_VAL (0x5A5A5A5A)
|
#define ADC_PORT_INVERT_VAL (0x55555555)
|
||||||
#define ADC_PORT_INVERT_BOARD2_VAL (0x453b2a9c)
|
|
||||||
|
|
||||||
// 2.0 pcb (chipv1.1)
|
#define SAMPLE_ADC_FULL_SPEED \
|
||||||
#define SAMPLE_ADC_FULL_SPEED_CHIP11 \
|
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL) // 0x0
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
#define ADC_PHASE_DEG_FULL_SPEED (140)
|
||||||
SAMPLE_DGTL_SAMPLE_0_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0000
|
#define ADC_OFST_FULL_SPEED_VAL (0xf)
|
||||||
#define SAMPLE_ADC_HALF_SPEED_CHIP11 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1110
|
|
||||||
#define SAMPLE_ADC_QUARTER_SPEED_CHIP11 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_2_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2230
|
|
||||||
|
|
||||||
#define ADC_PHASE_FULL_SPEED_CHIP11 (160)
|
|
||||||
#define ADC_PHASE_HALF_SPEED_CHIP11 (160)
|
|
||||||
#define ADC_PHASE_QUARTER_SPEED_CHIP11 (160)
|
|
||||||
|
|
||||||
#define DBIT_PHASE_FULL_SPEED_CHIP11 (80)
|
|
||||||
#define DBIT_PHASE_HALF_SPEED_CHIP11 (135)
|
|
||||||
#define DBIT_PHASE_QUARTER_SPEED_CHIP11 (135)
|
|
||||||
|
|
||||||
#define ADC_OFST_FULL_SPEED_VAL_CHIP11 (0x10)
|
|
||||||
#define ADC_OFST_HALF_SPEED_VAL_CHIP11 (0x08)
|
|
||||||
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP11 (0x04)
|
|
||||||
|
|
||||||
// 2.0 pcb (chipv1.0)
|
|
||||||
#define SAMPLE_ADC_FULL_SPEED_CHIP10 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_1_VAL + SAMPLE_DECMT_FACTOR_FULL_VAL) // 0x0100
|
|
||||||
#define SAMPLE_ADC_HALF_SPEED_CHIP10 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1310
|
|
||||||
#define SAMPLE_ADC_QUARTER_SPEED_CHIP10 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_3_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2630
|
|
||||||
|
|
||||||
#define ADC_PHASE_FULL_SPEED_CHIP10 (160)
|
|
||||||
#define ADC_PHASE_HALF_SPEED_CHIP10 (160)
|
|
||||||
#define ADC_PHASE_QUARTER_SPEED_CHIP10 (160)
|
|
||||||
|
|
||||||
#define DBIT_PHASE_FULL_SPEED_CHIP10 (125)
|
|
||||||
#define DBIT_PHASE_HALF_SPEED_CHIP10 (175)
|
|
||||||
#define DBIT_PHASE_QUARTER_SPEED_CHIP10 (175)
|
|
||||||
|
|
||||||
#define ADC_OFST_FULL_SPEED_VAL_CHIP10 (0x10)
|
|
||||||
#define ADC_OFST_HALF_SPEED_VAL_CHIP10 (0x08)
|
|
||||||
#define ADC_OFST_QUARTER_SPEED_VAL_CHIP10 (0x04)
|
|
||||||
|
|
||||||
// 1.0 pcb (2 resistor network)
|
|
||||||
#define SAMPLE_ADC_HALF_SPEED_BOARD2 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_0_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_3_VAL + SAMPLE_DECMT_FACTOR_HALF_VAL) // 0x1300
|
|
||||||
#define SAMPLE_ADC_QUARTER_SPEED_BOARD2 \
|
|
||||||
(SAMPLE_ADC_SAMPLE_0_VAL + SAMPLE_ADC_DECMT_FACTOR_1_VAL + \
|
|
||||||
SAMPLE_DGTL_SAMPLE_6_VAL + SAMPLE_DECMT_FACTOR_QUARTER_VAL) // 0x2610
|
|
||||||
|
|
||||||
#define ADC_PHASE_HALF_SPEED_BOARD2 (110)
|
|
||||||
#define ADC_PHASE_QUARTER_SPEED_BOARD2 (220)
|
|
||||||
|
|
||||||
#define DBIT_PHASE_HALF_SPEED_BOARD2 (150)
|
|
||||||
#define DBIT_PHASE_QUARTER_SPEED_BOARD2 (150)
|
|
||||||
|
|
||||||
#define ADC_OFST_HALF_SPEED_BOARD2_VAL (0x10)
|
|
||||||
#define ADC_OFST_QUARTER_SPEED_BOARD2_VAL (0x08)
|
|
||||||
|
|
||||||
/* Struct Definitions */
|
/* Struct Definitions */
|
||||||
typedef struct udp_header_struct {
|
typedef struct udp_header_struct {
|
||||||
@ -197,14 +131,8 @@ enum DACINDEX {
|
|||||||
enum MASTERINDEX { MASTER_HARDWARE, OW_MASTER, OW_SLAVE };
|
enum MASTERINDEX { MASTER_HARDWARE, OW_MASTER, OW_SLAVE };
|
||||||
#define MASTER_NAMES "hardware", "master", "slave"
|
#define MASTER_NAMES "hardware", "master", "slave"
|
||||||
|
|
||||||
#define NUMSETTINGS (2)
|
#define NUMSETTINGS (0)
|
||||||
#define NSPECIALDACS (3)
|
|
||||||
#define SPECIALDACINDEX {J_VREF_PRECH, J_VREF_DS, J_VREF_COMP};
|
|
||||||
#define SPECIAL_DEFAULT_DYNAMIC_GAIN_VALS \
|
|
||||||
{ 1450, 480, 420 }
|
|
||||||
#define SPECIAL_DEFAULT_DYNAMICHG0_GAIN_VALS \
|
|
||||||
{ 1550, 450, 620 }
|
|
||||||
|
|
||||||
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
|
enum NETWORKINDEX { TXN_FRAME, FLOWCTRL_10G };
|
||||||
enum CLKINDEX { RUN_CLK, ADC_CLK, DBIT_CLK, NUM_CLOCKS };
|
enum CLKINDEX { RUN_CLK, ADC_CLK, NUM_CLOCKS };
|
||||||
#define CLK_NAMES "run", "adc", "dbit"
|
#define CLK_NAMES "run", "adc", "dbit"
|
||||||
|
Binary file not shown.
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
/**
|
/**
|
||||||
* Set Defines
|
* Set Defines
|
||||||
* @param creg control register
|
* @param creg control register
|
||||||
@ -14,9 +14,8 @@
|
|||||||
* @param prmsk pll reset mask
|
* @param prmsk pll reset mask
|
||||||
* @param amsk address mask
|
* @param amsk address mask
|
||||||
* @param aofst address offset
|
* @param aofst address offset
|
||||||
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau/moench
|
* @param wd2msk write parameter mask for pll for dbit clock (Jungfrau only)
|
||||||
* only)
|
* @param clk2Index clkIndex of second pll (Jungfrau only)
|
||||||
* @param clk2Index clkIndex of second pll (Jungfrau/moench only)
|
|
||||||
*/
|
*/
|
||||||
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
||||||
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
||||||
@ -51,7 +50,7 @@ void ALTERA_PLL_ResetPLLAndReconfiguration();
|
|||||||
* Set PLL Reconfig register
|
* Set PLL Reconfig register
|
||||||
* @param reg register
|
* @param reg register
|
||||||
* @param val value
|
* @param val value
|
||||||
* @param useDefaultWRMask only jungfrau/moench for dbit clk (clkindex1, use
|
* @param useDefaultWRMask only jungfrau for dbit clk (clkindex1, use
|
||||||
* second WR mask)
|
* second WR mask)
|
||||||
*/
|
*/
|
||||||
void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
|
void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
|
||||||
|
@ -95,7 +95,7 @@ u_int16_t getHardwareSerialNumber();
|
|||||||
defined(MYTHEN3D) || defined(GOTTHARDD)
|
defined(MYTHEN3D) || defined(GOTTHARDD)
|
||||||
int isHardwareVersion_1_0();
|
int isHardwareVersion_1_0();
|
||||||
#endif
|
#endif
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
int getChipVersion();
|
int getChipVersion();
|
||||||
void setChipVersion(int version);
|
void setChipVersion(int version);
|
||||||
#endif
|
#endif
|
||||||
@ -147,8 +147,7 @@ void setASICDefaults();
|
|||||||
#ifdef MYTHEN3D
|
#ifdef MYTHEN3D
|
||||||
void setADIFDefaults();
|
void setADIFDefaults();
|
||||||
#endif
|
#endif
|
||||||
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD) || \
|
#if defined(GOTTHARD2D) || defined(EIGERD) || defined(JUNGFRAUD)
|
||||||
defined(MOENCHD)
|
|
||||||
int readConfigFile();
|
int readConfigFile();
|
||||||
#endif
|
#endif
|
||||||
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \
|
#if defined(GOTTHARDD) || defined(GOTTHARD2D) || defined(EIGERD) || \
|
||||||
@ -216,7 +215,8 @@ int setExternalSampling(int val);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// parameters - readout
|
// parameters - readout
|
||||||
#if defined(EIGERD) || defined(MYTHEN3D) || defined(GOTTHARD2D)
|
#if defined(EIGERD) || defined(MYTHEN3D) || defined(GOTTHARD2D) || \
|
||||||
|
defined(MOENCHD)
|
||||||
int setParallelMode(int mode);
|
int setParallelMode(int mode);
|
||||||
int getParallelMode();
|
int getParallelMode();
|
||||||
#endif
|
#endif
|
||||||
@ -337,7 +337,7 @@ int getAllTrimbits();
|
|||||||
enum detectorSettings setSettings(enum detectorSettings sett);
|
enum detectorSettings setSettings(enum detectorSettings sett);
|
||||||
#endif
|
#endif
|
||||||
enum detectorSettings getSettings();
|
enum detectorSettings getSettings();
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
enum gainMode getGainMode();
|
enum gainMode getGainMode();
|
||||||
void setGainMode(enum gainMode mode);
|
void setGainMode(enum gainMode mode);
|
||||||
#endif
|
#endif
|
||||||
@ -520,12 +520,12 @@ int setReadNRows(int value);
|
|||||||
int getReadNRows();
|
int getReadNRows();
|
||||||
void initReadoutConfiguration();
|
void initReadoutConfiguration();
|
||||||
int powerChip(int on);
|
int powerChip(int on);
|
||||||
|
#ifndef MOENCHD
|
||||||
int isChipConfigured();
|
int isChipConfigured();
|
||||||
void configureChip();
|
void configureChip();
|
||||||
int autoCompDisable(int on);
|
int autoCompDisable(int on);
|
||||||
int setComparatorDisableTime(int64_t val);
|
int setComparatorDisableTime(int64_t val);
|
||||||
int64_t getComparatorDisableTime();
|
int64_t getComparatorDisableTime();
|
||||||
#ifndef MOENCHD
|
|
||||||
void configureASICTimer();
|
void configureASICTimer();
|
||||||
#endif
|
#endif
|
||||||
int setReadoutSpeed(int val);
|
int setReadoutSpeed(int val);
|
||||||
@ -540,6 +540,7 @@ int setTemperatureEvent(int val);
|
|||||||
void alignDeserializer();
|
void alignDeserializer();
|
||||||
int getFlipRows();
|
int getFlipRows();
|
||||||
void setFlipRows(int arg);
|
void setFlipRows(int arg);
|
||||||
|
#ifndef MOENCHD
|
||||||
int setFilterResistor(int value);
|
int setFilterResistor(int value);
|
||||||
int getFilterResistor();
|
int getFilterResistor();
|
||||||
int getNumberOfFilterCells();
|
int getNumberOfFilterCells();
|
||||||
@ -550,6 +551,7 @@ int getCurrentSource();
|
|||||||
int getFixCurrentSource();
|
int getFixCurrentSource();
|
||||||
int getNormalCurrentSource();
|
int getNormalCurrentSource();
|
||||||
uint64_t getSelectCurrentSource();
|
uint64_t getSelectCurrentSource();
|
||||||
|
#endif
|
||||||
|
|
||||||
// eiger specific - iodelay, pulse, rate, temp, activate, delay nw parameter
|
// eiger specific - iodelay, pulse, rate, temp, activate, delay nw parameter
|
||||||
#elif EIGERD
|
#elif EIGERD
|
||||||
|
@ -127,7 +127,7 @@ uint32_t ALTERA_PLL_Cntrl_Reg = 0x0;
|
|||||||
uint32_t ALTERA_PLL_Param_Reg = 0x0;
|
uint32_t ALTERA_PLL_Param_Reg = 0x0;
|
||||||
uint32_t ALTERA_PLL_Cntrl_RcnfgPrmtrRstMask = 0x0;
|
uint32_t ALTERA_PLL_Cntrl_RcnfgPrmtrRstMask = 0x0;
|
||||||
uint32_t ALTERA_PLL_Cntrl_WrPrmtrMask = 0x0;
|
uint32_t ALTERA_PLL_Cntrl_WrPrmtrMask = 0x0;
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
uint32_t ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask = 0x0;
|
uint32_t ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask = 0x0;
|
||||||
int ALTERA_PLL_Cntrl_DBIT_ClkIndex = 0;
|
int ALTERA_PLL_Cntrl_DBIT_ClkIndex = 0;
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ uint32_t ALTERA_PLL_Cntrl_PLLRstMask = 0x0;
|
|||||||
uint32_t ALTERA_PLL_Cntrl_AddrMask = 0x0;
|
uint32_t ALTERA_PLL_Cntrl_AddrMask = 0x0;
|
||||||
int ALTERA_PLL_Cntrl_AddrOfst = 0;
|
int ALTERA_PLL_Cntrl_AddrOfst = 0;
|
||||||
|
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
void ALTERA_PLL_SetDefines(uint32_t creg, uint32_t preg, uint32_t rprmsk,
|
||||||
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
uint32_t wpmsk, uint32_t prmsk, uint32_t amsk,
|
||||||
int aofst, uint32_t wd2msk, int clk2Index) {
|
int aofst, uint32_t wd2msk, int clk2Index) {
|
||||||
@ -201,7 +201,7 @@ void ALTERA_PLL_SetPllReconfigReg(uint32_t reg, uint32_t val,
|
|||||||
reg, val, useSecondWRMask));
|
reg, val, useSecondWRMask));
|
||||||
|
|
||||||
uint32_t wrmask = ALTERA_PLL_Cntrl_WrPrmtrMask;
|
uint32_t wrmask = ALTERA_PLL_Cntrl_WrPrmtrMask;
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
if (useSecondWRMask) {
|
if (useSecondWRMask) {
|
||||||
wrmask = ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask;
|
wrmask = ALTERA_PLL_Cntrl_DBIT_PLL_WrPrmtrMask;
|
||||||
}
|
}
|
||||||
@ -252,7 +252,7 @@ void ALTERA_PLL_SetPhaseShift(int32_t phase, int clkIndex, int pos) {
|
|||||||
LOG(logDEBUG1, ("C%d phase word:0x%08x\n", clkIndex, value));
|
LOG(logDEBUG1, ("C%d phase word:0x%08x\n", clkIndex, value));
|
||||||
|
|
||||||
int useSecondWR = 0;
|
int useSecondWR = 0;
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
if (clkIndex == ALTERA_PLL_Cntrl_DBIT_ClkIndex) {
|
if (clkIndex == ALTERA_PLL_Cntrl_DBIT_ClkIndex) {
|
||||||
useSecondWR = 1;
|
useSecondWR = 1;
|
||||||
}
|
}
|
||||||
|
@ -88,7 +88,7 @@ int main(int argc, char *argv[]) {
|
|||||||
"and "
|
"and "
|
||||||
"initial detector setup. \n"
|
"initial detector setup. \n"
|
||||||
"\t-i, --ignore-config : "
|
"\t-i, --ignore-config : "
|
||||||
"[Eiger][Jungfrau][Gotthard][Gotthard2][Moench] \n"
|
"[Eiger][Jungfrau][Gotthard][Gotthard2] \n"
|
||||||
"\t Ignore config file. \n"
|
"\t Ignore config file. \n"
|
||||||
"\t-m, --master <master> : "
|
"\t-m, --master <master> : "
|
||||||
"[Eiger][Mythen3][Gotthard][Gotthard2] \n"
|
"[Eiger][Mythen3][Gotthard][Gotthard2] \n"
|
||||||
@ -205,7 +205,7 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
case 'i':
|
case 'i':
|
||||||
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \
|
#if defined(EIGERD) || defined(GOTTHARDD) || defined(GOTTHARD2D) || \
|
||||||
defined(JUNGFRAUD) || defined(MOENCHD)
|
defined(JUNGFRAUD)
|
||||||
LOG(logINFO, ("Ignoring config file\n"));
|
LOG(logINFO, ("Ignoring config file\n"));
|
||||||
ignoreConfigFileFlag = 1;
|
ignoreConfigFileFlag = 1;
|
||||||
#else
|
#else
|
||||||
|
@ -1732,7 +1732,7 @@ void validate_settings(enum detectorSettings sett) {
|
|||||||
switch (sett) {
|
switch (sett) {
|
||||||
#ifdef EIGERD
|
#ifdef EIGERD
|
||||||
case STANDARD:
|
case STANDARD:
|
||||||
#elif defined(JUNGFRAUD) || defined(MOENCHD)
|
#elif defined(JUNGFRAUD)
|
||||||
case GAIN0:
|
case GAIN0:
|
||||||
case HIGHGAIN0:
|
case HIGHGAIN0:
|
||||||
#elif GOTTHARDD
|
#elif GOTTHARDD
|
||||||
@ -1845,7 +1845,7 @@ int acquire(int blocking, int file_des) {
|
|||||||
}
|
}
|
||||||
// only set
|
// only set
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
// chipv1.1 has to be configured before acquisition
|
// chipv1.1 has to be configured before acquisition
|
||||||
if (getChipVersion() == 11 && !isChipConfigured()) {
|
if (getChipVersion() == 11 && !isChipConfigured()) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
@ -4037,7 +4037,7 @@ int auto_comp_disable(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Setting Auto comp disable to %d\n", arg));
|
LOG(logDEBUG1, ("Setting Auto comp disable to %d\n", arg));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// set & get
|
// set & get
|
||||||
@ -5517,7 +5517,8 @@ int set_parallel_mode(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logINFO, ("Setting parallel mode: %u\n", arg));
|
LOG(logINFO, ("Setting parallel mode: %u\n", arg));
|
||||||
|
|
||||||
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
|
||||||
|
!defined(MOENCHD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -5548,7 +5549,8 @@ int get_parallel_mode(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Getting parallel mode\n"));
|
LOG(logDEBUG1, ("Getting parallel mode\n"));
|
||||||
|
|
||||||
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
#if !defined(EIGERD) && !defined(MYTHEN3D) && !defined(GOTTHARD2D) && \
|
||||||
|
!defined(MOENCHD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -5821,7 +5823,7 @@ int set_clock_phase(int file_des) {
|
|||||||
c = ADC_CLK;
|
c = ADC_CLK;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD)
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
c = DBIT_CLK;
|
c = DBIT_CLK;
|
||||||
break;
|
break;
|
||||||
@ -5927,7 +5929,7 @@ int get_clock_phase(int file_des) {
|
|||||||
c = ADC_CLK;
|
c = ADC_CLK;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD)
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
c = DBIT_CLK;
|
c = DBIT_CLK;
|
||||||
break;
|
break;
|
||||||
@ -5975,7 +5977,7 @@ int get_max_clock_phase_shift(int file_des) {
|
|||||||
c = ADC_CLK;
|
c = ADC_CLK;
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(CHIPTESTBOARDD) || defined(JUNGFRAUD)
|
||||||
case DBIT_CLOCK:
|
case DBIT_CLOCK:
|
||||||
c = DBIT_CLK;
|
c = DBIT_CLK;
|
||||||
break;
|
break;
|
||||||
@ -6697,7 +6699,7 @@ int set_current_source(int file_des) {
|
|||||||
"normal:%d]\n",
|
"normal:%d]\n",
|
||||||
enable, fix, (long long int)select, normal));
|
enable, fix, (long long int)select, normal));
|
||||||
|
|
||||||
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -6770,7 +6772,7 @@ int set_current_source(int file_des) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (ret == OK) {
|
if (ret == OK) {
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
if (enable == 0) {
|
if (enable == 0) {
|
||||||
disableCurrentSource();
|
disableCurrentSource();
|
||||||
} else {
|
} else {
|
||||||
@ -6797,13 +6799,13 @@ int get_current_source(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Getting current source\n"));
|
LOG(logDEBUG1, ("Getting current source\n"));
|
||||||
|
|
||||||
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
retvals[0] = getCurrentSource();
|
retvals[0] = getCurrentSource();
|
||||||
LOG(logDEBUG1, ("current source enable retval: %u\n", retvals[0]));
|
LOG(logDEBUG1, ("current source enable retval: %u\n", retvals[0]));
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
if (retvals[0]) {
|
if (retvals[0]) {
|
||||||
retvals[1] = getFixCurrentSource();
|
retvals[1] = getFixCurrentSource();
|
||||||
retvals[2] = getNormalCurrentSource();
|
retvals[2] = getNormalCurrentSource();
|
||||||
@ -7818,11 +7820,11 @@ int get_filter_resistor(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Getting filter resistor\n"));
|
LOG(logDEBUG1, ("Getting filter resistor\n"));
|
||||||
|
|
||||||
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
if (getChipVersion() == 10) {
|
if (getChipVersion() == 10) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess, "Could not get filter cell. Not available for this chip "
|
strcpy(mess, "Could not get filter cell. Not available for this chip "
|
||||||
@ -7847,7 +7849,7 @@ int set_filter_resistor(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logINFO, ("Setting filter resistor: %u\n", arg));
|
LOG(logINFO, ("Setting filter resistor: %u\n", arg));
|
||||||
|
|
||||||
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(GOTTHARD2D) && !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -7861,7 +7863,7 @@ int set_filter_resistor(int file_des) {
|
|||||||
arg, ASIC_FILTER_MAX_RES_VALUE);
|
arg, ASIC_FILTER_MAX_RES_VALUE);
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
}
|
}
|
||||||
#if defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(JUNGFRAUD)
|
||||||
else if (getChipVersion() == 10) {
|
else if (getChipVersion() == 10) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess, "Could not set filter cell. Not available for this "
|
strcpy(mess, "Could not set filter cell. Not available for this "
|
||||||
@ -7875,9 +7877,8 @@ int set_filter_resistor(int file_des) {
|
|||||||
strcpy(mess, "Could not set filter resistor.\n");
|
strcpy(mess, "Could not set filter resistor.\n");
|
||||||
LOG(logERROR, (mess));
|
LOG(logERROR, (mess));
|
||||||
}
|
}
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if defined(GOTTHARD2D)
|
||||||
// jungfrau/moench might take time to update status register if
|
// jungfrau might take time to update status register if acquiring
|
||||||
// acquiring
|
|
||||||
int retval = getFilterResistor();
|
int retval = getFilterResistor();
|
||||||
LOG(logDEBUG1, ("filter resistor retval: %u\n", retval));
|
LOG(logDEBUG1, ("filter resistor retval: %u\n", retval));
|
||||||
validate(&ret, mess, arg, retval, "set filter resistor", DEC);
|
validate(&ret, mess, arg, retval, "set filter resistor", DEC);
|
||||||
@ -8588,7 +8589,7 @@ int get_chip_version(int file_des) {
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
int retval = -1;
|
int retval = -1;
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
retval = getChipVersion();
|
retval = getChipVersion();
|
||||||
@ -8695,7 +8696,7 @@ int get_gain_mode(int file_des) {
|
|||||||
enum gainMode retval = DYNAMIC;
|
enum gainMode retval = DYNAMIC;
|
||||||
LOG(logDEBUG1, ("Getting gain mode\n"));
|
LOG(logDEBUG1, ("Getting gain mode\n"));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -8719,7 +8720,7 @@ int set_gain_mode(int file_des) {
|
|||||||
enum gainMode gainmode = arg;
|
enum gainMode gainmode = arg;
|
||||||
LOG(logDEBUG1, ("Setting gain mode %d\n", (int)gainmode));
|
LOG(logDEBUG1, ("Setting gain mode %d\n", (int)gainmode));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -8755,7 +8756,7 @@ int get_comp_disable_time(int file_des) {
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
int64_t retval = -1;
|
int64_t retval = -1;
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -8781,7 +8782,7 @@ int set_comp_disable_time(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Setting comp disable time %lld ns\n", (long long int)arg));
|
LOG(logDEBUG1, ("Setting comp disable time %lld ns\n", (long long int)arg));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -8881,7 +8882,7 @@ int get_num_filter_cells(int file_des) {
|
|||||||
|
|
||||||
LOG(logDEBUG1, ("Getting number of filter cellsn"));
|
LOG(logDEBUG1, ("Getting number of filter cellsn"));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// get only
|
// get only
|
||||||
@ -8908,7 +8909,7 @@ int set_num_filter_cells(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
LOG(logDEBUG1, ("Setting number of filter cells: %u\n", (int)arg));
|
LOG(logDEBUG1, ("Setting number of filter cells: %u\n", (int)arg));
|
||||||
|
|
||||||
#if !defined(JUNGFRAUD) && !defined(MOENCHD)
|
#if !defined(JUNGFRAUD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
#else
|
#else
|
||||||
// only set
|
// only set
|
||||||
@ -9387,8 +9388,10 @@ int set_readout_speed(int file_des) {
|
|||||||
switch (arg) {
|
switch (arg) {
|
||||||
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
#if defined(EIGERD) || defined(JUNGFRAUD) || defined(MOENCHD)
|
||||||
case FULL_SPEED:
|
case FULL_SPEED:
|
||||||
|
#ifndef MOENCHD
|
||||||
case HALF_SPEED:
|
case HALF_SPEED:
|
||||||
case QUARTER_SPEED:
|
case QUARTER_SPEED:
|
||||||
|
#endif
|
||||||
#elif GOTTHARD2D
|
#elif GOTTHARD2D
|
||||||
case G2_108MHZ:
|
case G2_108MHZ:
|
||||||
case G2_144MHZ:
|
case G2_144MHZ:
|
||||||
|
@ -129,7 +129,7 @@ class Detector {
|
|||||||
/** [Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
/** [Jungfrau][Moench][Gotthard][Gotthard2][Mythen3] */
|
||||||
Result<defs::detectorSettings> getSettings(Positions pos = {}) const;
|
Result<defs::detectorSettings> getSettings(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN,
|
/** [Jungfrau] GAIN0, HIGHGAIN0 \n [Gotthard] DYNAMICGAIN, HIGHGAIN,
|
||||||
* LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN,
|
* LOWGAIN, MEDIUMGAIN, VERYHIGHGAIN \n [Gotthard2] DYNAMICGAIN,
|
||||||
* FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST,
|
* FIXGAIN1, FIXGAIN2 \n [Mythen3] STANDARD, FAST,
|
||||||
* HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold
|
* HIGHGAIN. Also changes vrshaper and vrpreamp \n [Eiger] Use threshold
|
||||||
@ -352,12 +352,12 @@ class Detector {
|
|||||||
Result<defs::speedLevel> getReadoutSpeed(Positions pos = {}) const;
|
Result<defs::speedLevel> getReadoutSpeed(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Eiger][Jungfrau][Moench][Gotthard2]
|
/** [Eiger][Jungfrau][Moench][Gotthard2]
|
||||||
* [Jungfrau][Moench] Options: FULL_SPEED, HALF_SPEED (Default),
|
* [Jungfrau] Options: FULL_SPEED, HALF_SPEED (Default),
|
||||||
* QUARTER_SPEED \n [Eiger] Options: FULL_SPEED (Default), HALF_SPEED,
|
* QUARTER_SPEED \n [Moench] Options: FULL_SPEED (Default) \n [Eiger]
|
||||||
* QUARTER_SPEED \n [Gotthard2] Options: G2_108MHZ (Default), G2_144MHZ \n
|
* Options: FULL_SPEED (Default), HALF_SPEED, QUARTER_SPEED \n [Gotthard2]
|
||||||
* [Jungfrau][Moench] FULL_SPEED option only available from v2.0 boards and
|
* Options: G2_108MHZ (Default), G2_144MHZ \n [Jungfrau][Moench] FULL_SPEED
|
||||||
* is recommended to set number of interfaces to 2. \n Also overwrites
|
* option only available from v2.0 boards and is recommended to set number
|
||||||
* adcphase to recommended default.
|
* of interfaces to 2. \n Also overwrites adcphase to recommended default.
|
||||||
*/
|
*/
|
||||||
void setReadoutSpeed(defs::speedLevel value, Positions pos = {});
|
void setReadoutSpeed(defs::speedLevel value, Positions pos = {});
|
||||||
|
|
||||||
@ -389,21 +389,21 @@ class Detector {
|
|||||||
*/
|
*/
|
||||||
void setADCPhaseInDegrees(int value, Positions pos = {});
|
void setADCPhaseInDegrees(int value, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Jungfrau][Moench] */
|
/** [CTB][Jungfrau] */
|
||||||
Result<int> getDBITPhase(Positions pos = {}) const;
|
Result<int> getDBITPhase(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [CTB][Jungfrau][Moench] Absolute phase shift \n
|
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||||
*/
|
*/
|
||||||
void setDBITPhase(int value, Positions pos = {});
|
void setDBITPhase(int value, Positions pos = {});
|
||||||
|
|
||||||
/** [CTB][Jungfrau][Moench] */
|
/** [CTB][Jungfrau] */
|
||||||
Result<int> getMaxDBITPhaseShift(Positions pos = {}) const;
|
Result<int> getMaxDBITPhaseShift(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [CTB][Jungfrau][Moench] */
|
/** [CTB][Jungfrau] */
|
||||||
Result<int> getDBITPhaseInDegrees(Positions pos = {}) const;
|
Result<int> getDBITPhaseInDegrees(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [CTB][Jungfrau][Moench] Absolute phase shift \n
|
/** [CTB][Jungfrau] Absolute phase shift \n
|
||||||
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
* [CTB] changing dbitclk also resets dbitphase and sets to previous values.
|
||||||
*/
|
*/
|
||||||
void setDBITPhaseInDegrees(int value, Positions pos = {});
|
void setDBITPhaseInDegrees(int value, Positions pos = {});
|
||||||
@ -529,30 +529,30 @@ class Detector {
|
|||||||
void setExternalSignalFlags(int signalIndex, defs::externalSignalFlag value,
|
void setExternalSignalFlags(int signalIndex, defs::externalSignalFlag value,
|
||||||
Positions pos = {});
|
Positions pos = {});
|
||||||
|
|
||||||
/** [Eiger][Mythen3][Gotthard2] */
|
/** [Eiger][Mythen3][Gotthard2][Moench] */
|
||||||
Result<bool> getParallelMode(Positions pos = {}) const;
|
Result<bool> getParallelMode(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Eiger][Mythen3][Gotthard2]
|
/** [Eiger][Mythen3][Gotthard2][Moench]
|
||||||
* [Mythen3] If exposure time is too short, acquisition will return with an
|
* [Mythen3] If exposure time is too short, acquisition will return with an
|
||||||
* ERROR and take fewer frames than expected \n
|
* ERROR and take fewer frames than expected \n
|
||||||
* [Mythen3][Eiger] Default: Non parallel \n
|
* [Mythen3][Eiger][Moench] Default: Non parallel \n
|
||||||
* [Gotthard2] Default: Parallel. Non parallel mode works only in continuous
|
* [Gotthard2] Default: Parallel. Non parallel mode works only in continuous
|
||||||
* mode.*/
|
* mode.*/
|
||||||
void setParallelMode(bool value, Positions pos = {});
|
void setParallelMode(bool value, Positions pos = {});
|
||||||
|
|
||||||
/** [Gotthard2][Jungfrau][Moench] */
|
/** [Gotthard2][Jungfrau] */
|
||||||
Result<int> getFilterResistor(Positions pos = {}) const;
|
Result<int> getFilterResistor(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing values for
|
/** [Gotthard2][Jungfrau] Set filter resistor. Increasing values for
|
||||||
* increasing resistance.\n[Gotthard2] Options: [0|1|2|3]. Default is
|
* increasing resistance.\n[Gotthard2] Options: [0|1|2|3]. Default is
|
||||||
* 0.\n[Jungfrau][Moench] Options: [0|1]. Default is 1.*/
|
* 0.\n[Jungfrau] Options: [0|1]. Default is 1.*/
|
||||||
void setFilterResistor(int value, Positions pos = {});
|
void setFilterResistor(int value, Positions pos = {});
|
||||||
|
|
||||||
/** [Gotthard2][Jungfrau][Moench] */
|
/** [Gotthard2][Jungfrau] */
|
||||||
Result<defs::currentSrcParameters>
|
Result<defs::currentSrcParameters>
|
||||||
getCurrentSource(Positions pos = {}) const;
|
getCurrentSource(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Gotthard2][Jungfrau][Moench] Please refer documentation on
|
/** [Gotthard2][Jungfrau] Please refer documentation on
|
||||||
* currentSrcParameters (sls_detector_defs.h) on the structure and its
|
* currentSrcParameters (sls_detector_defs.h) on the structure and its
|
||||||
* members */
|
* members */
|
||||||
void setCurrentSource(defs::currentSrcParameters par, Positions pos = {});
|
void setCurrentSource(defs::currentSrcParameters par, Positions pos = {});
|
||||||
@ -1250,7 +1250,7 @@ class Detector {
|
|||||||
* *
|
* *
|
||||||
* ************************************************/
|
* ************************************************/
|
||||||
|
|
||||||
/** [Jungfrau][Moench] */
|
/** [Jungfrau] */
|
||||||
Result<double> getChipVersion(Positions pos = {}) const;
|
Result<double> getChipVersion(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] */
|
/** [Jungfrau][Moench] */
|
||||||
@ -1279,10 +1279,10 @@ class Detector {
|
|||||||
/** [Jungfrau][Moench] refer to setThresdholdTemperature */
|
/** [Jungfrau][Moench] refer to setThresdholdTemperature */
|
||||||
void resetTemperatureEvent(Positions pos = {});
|
void resetTemperatureEvent(Positions pos = {});
|
||||||
|
|
||||||
/** [Jungfrau][Moench] */
|
/** [Jungfrau] */
|
||||||
Result<bool> getAutoComparatorDisable(Positions pos = {}) const;
|
Result<bool> getAutoComparatorDisable(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] Advanced
|
/** [Jungfrau] Advanced
|
||||||
* //TODO naming
|
* //TODO naming
|
||||||
* By default, the on-chip gain switching is active during the
|
* By default, the on-chip gain switching is active during the
|
||||||
* entire exposure. This mode disables the on-chip gain switching comparator
|
* entire exposure. This mode disables the on-chip gain switching comparator
|
||||||
@ -1294,10 +1294,10 @@ class Detector {
|
|||||||
*/
|
*/
|
||||||
void setAutoComparatorDisable(bool value, Positions pos = {});
|
void setAutoComparatorDisable(bool value, Positions pos = {});
|
||||||
|
|
||||||
/** [Jungfrau][Moench] */
|
/** [Jungfrau] */
|
||||||
Result<ns> getComparatorDisableTime(Positions pos = {}) const;
|
Result<ns> getComparatorDisableTime(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] Time before end of exposure when comparator is
|
/** [Jungfrau] Time before end of exposure when comparator is
|
||||||
* disabled. It is only possible for chipv1.1.*/
|
* disabled. It is only possible for chipv1.1.*/
|
||||||
void setComparatorDisableTime(ns t, Positions pos = {});
|
void setComparatorDisableTime(ns t, Positions pos = {});
|
||||||
|
|
||||||
@ -1330,19 +1330,19 @@ class Detector {
|
|||||||
/** list of possible gainmode */
|
/** list of possible gainmode */
|
||||||
std::vector<defs::gainMode> getGainModeList() const;
|
std::vector<defs::gainMode> getGainModeList() const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench]*/
|
/** [Jungfrau]*/
|
||||||
Result<defs::gainMode> getGainMode(Positions pos = {}) const;
|
Result<defs::gainMode> getGainMode(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] Options: DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2,
|
/** [Jungfrau] Options: DYNAMIC, FORCE_SWITCH_G1, FORCE_SWITCH_G2,
|
||||||
* FIX_G1, FIX_G2, FIX_G0 \n\CAUTION: Do not use FIX_G0 without caution, you
|
* FIX_G1, FIX_G2, FIX_G0 \n\CAUTION: Do not use FIX_G0 without caution, you
|
||||||
* can damage the detector!!!\n
|
* can damage the detector!!!\n
|
||||||
*/
|
*/
|
||||||
void setGainMode(const defs::gainMode mode, Positions pos = {});
|
void setGainMode(const defs::gainMode mode, Positions pos = {});
|
||||||
|
|
||||||
/** [Jungfrau][Moench] Advanced */
|
/** [Jungfrau] Advanced */
|
||||||
Result<int> getNumberOfFilterCells(Positions pos = {}) const;
|
Result<int> getNumberOfFilterCells(Positions pos = {}) const;
|
||||||
|
|
||||||
/** [Jungfrau][Moench] Advanced Options[0-12], only for chip v1.1
|
/** [Jungfrau] Advanced Options[0-12], only for chip v1.1
|
||||||
*/
|
*/
|
||||||
void setNumberOfFilterCells(int cell, Positions pos = {});
|
void setNumberOfFilterCells(int cell, Positions pos = {});
|
||||||
|
|
||||||
|
@ -702,15 +702,14 @@ std::string CmdProxy::ReadoutSpeed(int action) {
|
|||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
if (action == defs::HELP_ACTION) {
|
if (action == defs::HELP_ACTION) {
|
||||||
os << "\n\t[0 or full_speed|1 or half_speed|2 or "
|
os << "\n\t[0 or full_speed|1 or half_speed|2 or "
|
||||||
"quarter_speed]\n\t\t[Eiger][Jungfrau][Moench] Readout "
|
"quarter_speed]\n\t\t[Eiger][Jungfrau][Moench] Readout speed of "
|
||||||
"speed of chip.\n\t\t[Eiger] Default speed is full_speed."
|
"chip.\n\t\t[Eiger][Moench] Default speed is "
|
||||||
"\n\t\t[Jungfrau][Moench] Default speed is half_speed. "
|
"full_speed.\n\t\t[Jungfrau] Default speed is half_speed. "
|
||||||
"full_speed "
|
"full_speed option only available from v2.0 boards and is "
|
||||||
"option only available from v2.0 boards and is recommended to "
|
"recommended to set number of interfaces to 2. Also overwrites "
|
||||||
"set "
|
|
||||||
"number of interfaces to 2. Also overwrites "
|
|
||||||
"adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] "
|
"adcphase to recommended default.\n\t [144|108]\n\t\t[Gotthard2] "
|
||||||
"Readout speed of chip in MHz. Default is 108."
|
"Readout speed of chip in MHz. Default is 108.\n\t\t[Moench] "
|
||||||
|
"Only Full speed is implemented."
|
||||||
<< '\n';
|
<< '\n';
|
||||||
} else {
|
} else {
|
||||||
defs::detectorType type = det->getDetectorType().squash();
|
defs::detectorType type = det->getDetectorType().squash();
|
||||||
@ -800,8 +799,7 @@ std::string CmdProxy::Dbitphase(int action) {
|
|||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << cmd << ' ';
|
os << cmd << ' ';
|
||||||
if (action == defs::HELP_ACTION) {
|
if (action == defs::HELP_ACTION) {
|
||||||
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau][Moench] Phase "
|
os << "[n_value] [(optional)deg]\n\t[Ctb][Jungfrau] Phase shift of "
|
||||||
"shift of "
|
|
||||||
"clock to latch digital bits. Absolute phase shift. If deg used, "
|
"clock to latch digital bits. Absolute phase shift. If deg used, "
|
||||||
"then shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
"then shift in degrees. \n\t[Ctb]Changing dbitclk also resets "
|
||||||
"dbitphase and sets to previous values."
|
"dbitphase and sets to previous values."
|
||||||
@ -809,7 +807,7 @@ std::string CmdProxy::Dbitphase(int action) {
|
|||||||
} else {
|
} else {
|
||||||
auto det_type = det->getDetectorType().squash(defs::GENERIC);
|
auto det_type = det->getDetectorType().squash(defs::GENERIC);
|
||||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||||
det_type == defs::GOTTHARD2) {
|
det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) {
|
||||||
throw RuntimeError("dbitphase not implemented for this detector");
|
throw RuntimeError("dbitphase not implemented for this detector");
|
||||||
}
|
}
|
||||||
if (action == defs::GET_ACTION) {
|
if (action == defs::GET_ACTION) {
|
||||||
@ -1038,8 +1036,7 @@ std::string CmdProxy::CurrentSource(int action) {
|
|||||||
os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. "
|
os << "\n\t[0|1]\n\t\t[Gotthard2] Enable or disable current source. "
|
||||||
"Default "
|
"Default "
|
||||||
"is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for "
|
"is disabled.\n\t[0|1] [fix|nofix] [select source] [(only for "
|
||||||
"chipv1.1)normal|low]\n\t\t[Jungfrau][Moench] Disable or enable "
|
"chipv1.1)normal|low]\n\t\t[Jungfrau] Disable or enable current "
|
||||||
"current "
|
|
||||||
"source with some parameters. The select source is 0-63 for "
|
"source with some parameters. The select source is 0-63 for "
|
||||||
"chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs "
|
"chipv1.0 and a 64 bit mask for chipv1.1. To disable, one needs "
|
||||||
"only one argument '0'."
|
"only one argument '0'."
|
||||||
|
@ -1281,7 +1281,7 @@ class CmdProxy {
|
|||||||
"verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, "
|
"verylowgain, g1_hg, g1_lg, g2_hc_hg, g2_hc_lg, "
|
||||||
"g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]"
|
"g2_lc_hg, g2_lc_lg, g4_hg, g4_lg, gain0]"
|
||||||
"\n\t Detector Settings"
|
"\n\t Detector Settings"
|
||||||
"\n\t[Jungfrau][Moench] - [ gain0 | highgain0]"
|
"\n\t[Jungfrau] - [ gain0 | highgain0]"
|
||||||
"\n\t[Gotthard] - [dynamicgain | highgain | lowgain | "
|
"\n\t[Gotthard] - [dynamicgain | highgain | lowgain | "
|
||||||
"mediumgain | veryhighgain]"
|
"mediumgain | veryhighgain]"
|
||||||
"\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]"
|
"\n\t[Gotthard2] - [dynamicgain | fixgain1 | fixgain2]"
|
||||||
@ -1397,10 +1397,9 @@ class CmdProxy {
|
|||||||
"\n\t[Jungfrau][Moench][CTB] Absolute maximum Phase shift of "
|
"\n\t[Jungfrau][Moench][CTB] Absolute maximum Phase shift of "
|
||||||
"ADC clock.");
|
"ADC clock.");
|
||||||
|
|
||||||
GET_COMMAND(
|
GET_COMMAND(maxdbitphaseshift, getMaxDBITPhaseShift,
|
||||||
maxdbitphaseshift, getMaxDBITPhaseShift,
|
"\n\t[CTB][Jungfrau] Absolute maximum Phase shift of of the "
|
||||||
"\n\t[CTB][Jungfrau][Moench] Absolute maximum Phase shift of of the "
|
"clock to latch digital bits.");
|
||||||
"clock to latch digital bits.");
|
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage,
|
INTEGER_COMMAND_VEC_ID(highvoltage, getHighVoltage, setHighVoltage,
|
||||||
StringTo<int>,
|
StringTo<int>,
|
||||||
@ -1429,19 +1428,19 @@ class CmdProxy {
|
|||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(
|
||||||
parallel, getParallelMode, setParallelMode, StringTo<int>,
|
parallel, getParallelMode, setParallelMode, StringTo<int>,
|
||||||
"[0, 1]\n\t[Eiger][Mythen3][Gotthard2] Enable or disable parallel "
|
"[0, 1]\n\t[Eiger][Mythen3][Gotthard2][Moench] Enable or disable "
|
||||||
|
"parallel "
|
||||||
"mode.\n\t[Mythen3] If exptime is too short, the "
|
"mode.\n\t[Mythen3] If exptime is too short, the "
|
||||||
"acquisition will return ERROR status and take fewer "
|
"acquisition will return ERROR status and take fewer "
|
||||||
"frames than expected.\n\t[Mythen3][Eiger] Default: Non "
|
"frames than expected.\n\t[Mythen3][Eiger][Moench] Default: Non "
|
||||||
"parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works "
|
"parallel.\n\t[Gotthard2] Default: Parallel. Non parallel mode works "
|
||||||
"only in continuous mode.");
|
"only in continuous mode.");
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(
|
||||||
filterresistor, getFilterResistor, setFilterResistor, StringTo<int>,
|
filterresistor, getFilterResistor, setFilterResistor, StringTo<int>,
|
||||||
"[value] [Gotthard2][Jungfrau][Moench] Set filter resistor. Increasing "
|
"[value] [Gotthard2][Jungfrau] Set filter resistor. Increasing "
|
||||||
"values "
|
"values for increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. "
|
||||||
"for increasing resistance.\n\t[Gotthard2] Options: [0|1|2|3]. Default "
|
"Default is 0.\n\t[Jungfrau] Options: [0|1]. Default is 1.");
|
||||||
"is 0.\n\t[Jungfrau][Moench] Options: [0|1]. Default is 1.");
|
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(dbitpipeline, getDBITPipeline, setDBITPipeline,
|
INTEGER_COMMAND_VEC_ID(dbitpipeline, getDBITPipeline, setDBITPipeline,
|
||||||
StringTo<int>,
|
StringTo<int>,
|
||||||
@ -1957,9 +1956,8 @@ class CmdProxy {
|
|||||||
|
|
||||||
/* Jungfrau Specific */
|
/* Jungfrau Specific */
|
||||||
|
|
||||||
GET_COMMAND(
|
GET_COMMAND(chipversion, getChipVersion,
|
||||||
chipversion, getChipVersion,
|
"\n\t[Jungfrau] Returns chip version. Can be 1.0 or 1.1");
|
||||||
"\n\t[Jungfrau][Moench] Returns chip version. Can be 1.0 or 1.1");
|
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(
|
||||||
temp_threshold, getThresholdTemperature, setThresholdTemperature,
|
temp_threshold, getThresholdTemperature, setThresholdTemperature,
|
||||||
@ -1984,21 +1982,20 @@ class CmdProxy {
|
|||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(
|
||||||
autocompdisable, getAutoComparatorDisable, setAutoComparatorDisable,
|
autocompdisable, getAutoComparatorDisable, setAutoComparatorDisable,
|
||||||
StringTo<int>,
|
StringTo<int>,
|
||||||
"[0, 1]\n\t[Jungfrau][Moench] Auto comparator disable mode. By "
|
"[0, 1]\n\t[Jungfrau] Auto comparator disable mode. By "
|
||||||
"default, the "
|
"default, the on-chip gain switching is active during the entire "
|
||||||
"on-chip gain switching is active during the entire exposure.This mode "
|
"exposure.This mode disables the on - chip gain switching comparator "
|
||||||
"disables the on - chip gain switching comparator automatically after "
|
"automatically after 93.75% (only for chipv1.0) of exposure time (only "
|
||||||
"93.75% (only for chipv1.0) of exposure time (only for longer than "
|
"for longer than 100us). It is possible to set the duration for "
|
||||||
"100us). It is possible to set the duration for chipv1.1 using "
|
"chipv1.1 using compdisabletime command.\n\tDefault is 0 or this mode "
|
||||||
"compdisabletime command.\n\tDefault is 0 or this mode "
|
|
||||||
"disabled(comparator enabled throughout). 1 enables mode. 0 disables "
|
"disabled(comparator enabled throughout). 1 enables mode. 0 disables "
|
||||||
"mode. ");
|
"mode. ");
|
||||||
|
|
||||||
TIME_COMMAND(
|
TIME_COMMAND(compdisabletime, getComparatorDisableTime,
|
||||||
compdisabletime, getComparatorDisableTime, setComparatorDisableTime,
|
setComparatorDisableTime,
|
||||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Moench] Time "
|
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau] Time "
|
||||||
"before end of exposure when comparator is disabled. It is "
|
"before end of exposure when comparator is disabled. It is "
|
||||||
"only possible for chipv1.1.");
|
"only possible for chipv1.1.");
|
||||||
|
|
||||||
INTEGER_COMMAND_SET_NOID_GET_ID(
|
INTEGER_COMMAND_SET_NOID_GET_ID(
|
||||||
extrastoragecells, getNumberOfAdditionalStorageCells,
|
extrastoragecells, getNumberOfAdditionalStorageCells,
|
||||||
@ -2026,11 +2023,10 @@ class CmdProxy {
|
|||||||
"Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without caution, "
|
"Jungfrau] Gain mode.\n\tCAUTION: Do not use fixg0 without caution, "
|
||||||
"you can damage the detector!!!");
|
"you can damage the detector!!!");
|
||||||
|
|
||||||
INTEGER_COMMAND_VEC_ID(
|
INTEGER_COMMAND_VEC_ID(filtercells, getNumberOfFilterCells,
|
||||||
filtercells, getNumberOfFilterCells, setNumberOfFilterCells,
|
setNumberOfFilterCells, StringTo<int>,
|
||||||
StringTo<int>,
|
"[0-12]\n\t[Jungfrau] Set Filter Cell. Only for "
|
||||||
"[0-12]\n\t[Jungfrau][Moench] Set Filter Cell. Only for "
|
"chipv1.1. Advanced user Command");
|
||||||
"chipv1.1. Advanced user Command");
|
|
||||||
|
|
||||||
/* Gotthard Specific */
|
/* Gotthard Specific */
|
||||||
TIME_GET_COMMAND(exptimel, getExptimeLeft,
|
TIME_GET_COMMAND(exptimel, getExptimeLeft,
|
||||||
|
@ -191,8 +191,7 @@ std::vector<defs::detectorSettings> Detector::getSettingsList() const {
|
|||||||
defs::VERYHIGHGAIN};
|
defs::VERYHIGHGAIN};
|
||||||
case defs::JUNGFRAU:
|
case defs::JUNGFRAU:
|
||||||
case defs::MOENCH:
|
case defs::MOENCH:
|
||||||
return std::vector<defs::detectorSettings>{defs::GAIN0,
|
return std::vector<defs::detectorSettings>{};
|
||||||
defs::HIGHGAIN0};
|
|
||||||
case defs::GOTTHARD2:
|
case defs::GOTTHARD2:
|
||||||
return std::vector<defs::detectorSettings>{
|
return std::vector<defs::detectorSettings>{
|
||||||
defs::DYNAMICGAIN, defs::FIXGAIN1, defs::FIXGAIN2};
|
defs::DYNAMICGAIN, defs::FIXGAIN1, defs::FIXGAIN2};
|
||||||
@ -507,9 +506,10 @@ std::vector<defs::speedLevel> Detector::getReadoutSpeedList() const {
|
|||||||
switch (getDetectorType().squash()) {
|
switch (getDetectorType().squash()) {
|
||||||
case defs::EIGER:
|
case defs::EIGER:
|
||||||
case defs::JUNGFRAU:
|
case defs::JUNGFRAU:
|
||||||
case defs::MOENCH:
|
|
||||||
return std::vector<defs::speedLevel>{defs::FULL_SPEED, defs::HALF_SPEED,
|
return std::vector<defs::speedLevel>{defs::FULL_SPEED, defs::HALF_SPEED,
|
||||||
defs::QUARTER_SPEED};
|
defs::QUARTER_SPEED};
|
||||||
|
case defs::MOENCH:
|
||||||
|
return std::vector<defs::speedLevel>{defs::FULL_SPEED};
|
||||||
case defs::GOTTHARD2:
|
case defs::GOTTHARD2:
|
||||||
return std::vector<defs::speedLevel>{defs::G2_108MHZ, defs::G2_144MHZ};
|
return std::vector<defs::speedLevel>{defs::G2_108MHZ, defs::G2_144MHZ};
|
||||||
default:
|
default:
|
||||||
@ -1704,7 +1704,6 @@ void Detector::setStorageCellDelay(ns value, Positions pos) {
|
|||||||
std::vector<defs::gainMode> Detector::getGainModeList() const {
|
std::vector<defs::gainMode> Detector::getGainModeList() const {
|
||||||
switch (getDetectorType().squash()) {
|
switch (getDetectorType().squash()) {
|
||||||
case defs::JUNGFRAU:
|
case defs::JUNGFRAU:
|
||||||
case defs::MOENCH:
|
|
||||||
return std::vector<defs::gainMode>{
|
return std::vector<defs::gainMode>{
|
||||||
defs::DYNAMIC, defs::FORCE_SWITCH_G1, defs::FORCE_SWITCH_G2,
|
defs::DYNAMIC, defs::FORCE_SWITCH_G1, defs::FORCE_SWITCH_G2,
|
||||||
defs::FIX_G1, defs::FIX_G2, defs::FIX_G0};
|
defs::FIX_G1, defs::FIX_G2, defs::FIX_G0};
|
||||||
|
@ -226,7 +226,7 @@ TEST_CASE("autocompdisable", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
if (det_type == defs::JUNGFRAU) {
|
||||||
auto prev_val = det.getAutoComparatorDisable();
|
auto prev_val = det.getAutoComparatorDisable();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -256,7 +256,7 @@ TEST_CASE("compdisabletime", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
if (det_type == defs::JUNGFRAU &&
|
||||||
det.getChipVersion().squash() * 10 == 11) {
|
det.getChipVersion().squash() * 10 == 11) {
|
||||||
auto prev_val = det.getComparatorDisableTime();
|
auto prev_val = det.getComparatorDisableTime();
|
||||||
{
|
{
|
||||||
@ -416,7 +416,7 @@ TEST_CASE("gainmode", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
if (det_type == defs::JUNGFRAU) {
|
||||||
auto prev_val = det.getGainMode();
|
auto prev_val = det.getGainMode();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -465,7 +465,7 @@ TEST_CASE("filtercells", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH) {
|
if (det_type == defs::JUNGFRAU) {
|
||||||
// chip version 1.1
|
// chip version 1.1
|
||||||
if (det.getChipVersion().squash() * 10 == 11) {
|
if (det.getChipVersion().squash() * 10 == 11) {
|
||||||
auto prev_val = det.getNumberOfFilterCells();
|
auto prev_val = det.getNumberOfFilterCells();
|
||||||
|
@ -212,10 +212,11 @@ TEST_CASE("settings", "[.cmd]") {
|
|||||||
std::vector<std::string> sett;
|
std::vector<std::string> sett;
|
||||||
switch (det_type) {
|
switch (det_type) {
|
||||||
case defs::JUNGFRAU:
|
case defs::JUNGFRAU:
|
||||||
case defs::MOENCH:
|
|
||||||
sett.push_back("gain0");
|
sett.push_back("gain0");
|
||||||
sett.push_back("highgain0");
|
sett.push_back("highgain0");
|
||||||
break;
|
break;
|
||||||
|
case defs::MOENCH:
|
||||||
|
break;
|
||||||
case defs::GOTTHARD:
|
case defs::GOTTHARD:
|
||||||
sett.push_back("highgain");
|
sett.push_back("highgain");
|
||||||
sett.push_back("dynamicgain");
|
sett.push_back("dynamicgain");
|
||||||
@ -1195,8 +1196,7 @@ TEST_CASE("dbitphase", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD) {
|
||||||
det_type == defs::CHIPTESTBOARD) {
|
|
||||||
auto prev_val = det.getDBITPhase();
|
auto prev_val = det.getDBITPhase();
|
||||||
{
|
{
|
||||||
std::ostringstream oss1, oss2;
|
std::ostringstream oss1, oss2;
|
||||||
@ -1225,8 +1225,7 @@ TEST_CASE("maxdbitphaseshift", "[.cmd]") {
|
|||||||
Detector det;
|
Detector det;
|
||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
if (det_type == defs::JUNGFRAU || det_type == defs::MOENCH ||
|
if (det_type == defs::JUNGFRAU || det_type == defs::CHIPTESTBOARD ||
|
||||||
det_type == defs::CHIPTESTBOARD ||
|
|
||||||
det_type == defs::MYTHEN3 || // only because clk index of 0 exists
|
det_type == defs::MYTHEN3 || // only because clk index of 0 exists
|
||||||
det_type == defs::GOTTHARD2) { // only because clk index of 0 exists
|
det_type == defs::GOTTHARD2) { // only because clk index of 0 exists
|
||||||
REQUIRE_NOTHROW(proxy.Call("maxdbitphaseshift", {}, -1, GET));
|
REQUIRE_NOTHROW(proxy.Call("maxdbitphaseshift", {}, -1, GET));
|
||||||
@ -1572,7 +1571,7 @@ TEST_CASE("parallel", "[.cmd]") {
|
|||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
|
|
||||||
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
if (det_type == defs::EIGER || det_type == defs::MYTHEN3 ||
|
||||||
det_type == defs::GOTTHARD2) {
|
det_type == defs::GOTTHARD2 || det_type == defs::MOENCH) {
|
||||||
auto prev_val = det.getParallelMode();
|
auto prev_val = det.getParallelMode();
|
||||||
{
|
{
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
@ -1604,7 +1603,7 @@ TEST_CASE("filterresistor", "[.cmd]") {
|
|||||||
|
|
||||||
// only for chipv1.1
|
// only for chipv1.1
|
||||||
bool chip11 = false;
|
bool chip11 = false;
|
||||||
if ((det_type == defs::JUNGFRAU || det_type == defs::MOENCH) &&
|
if (det_type == defs::JUNGFRAU &&
|
||||||
det.getChipVersion().squash() * 10 == 11) {
|
det.getChipVersion().squash() * 10 == 11) {
|
||||||
chip11 = true;
|
chip11 = true;
|
||||||
}
|
}
|
||||||
@ -1748,8 +1747,7 @@ TEST_CASE("currentsource", "[.cmd]") {
|
|||||||
CmdProxy proxy(&det);
|
CmdProxy proxy(&det);
|
||||||
auto det_type = det.getDetectorType().squash();
|
auto det_type = det.getDetectorType().squash();
|
||||||
|
|
||||||
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU ||
|
if (det_type == defs::GOTTHARD2 || det_type == defs::JUNGFRAU) {
|
||||||
det_type == defs::MOENCH) {
|
|
||||||
auto prev_val = det.getCurrentSource();
|
auto prev_val = det.getCurrentSource();
|
||||||
|
|
||||||
if (det_type == defs::GOTTHARD2) {
|
if (det_type == defs::GOTTHARD2) {
|
||||||
@ -1773,11 +1771,14 @@ TEST_CASE("currentsource", "[.cmd]") {
|
|||||||
REQUIRE_THROWS(proxy.Call("currentsource",
|
REQUIRE_THROWS(proxy.Call("currentsource",
|
||||||
{"1", "fix", "42", "normal"}, -1, PUT));
|
{"1", "fix", "42", "normal"}, -1, PUT));
|
||||||
}
|
}
|
||||||
// jungfrau/moench
|
// jungfrau
|
||||||
else {
|
else {
|
||||||
int chipVersion = det.getChipVersion().tsquash(
|
int chipVersion = 10;
|
||||||
|
if (det_type == defs::JUNGFRAU) {
|
||||||
|
chipVersion = det.getChipVersion().tsquash(
|
||||||
"inconsistent chip versions to test") *
|
"inconsistent chip versions to test") *
|
||||||
10;
|
10;
|
||||||
|
}
|
||||||
if (chipVersion == 10) {
|
if (chipVersion == 10) {
|
||||||
REQUIRE_THROWS(proxy.Call("currentsource", {"1"}, -1, PUT));
|
REQUIRE_THROWS(proxy.Call("currentsource", {"1"}, -1, PUT));
|
||||||
REQUIRE_THROWS(
|
REQUIRE_THROWS(
|
||||||
|
@ -4,10 +4,10 @@
|
|||||||
#define RELEASE "developer"
|
#define RELEASE "developer"
|
||||||
#define APILIB "developer 0x230224"
|
#define APILIB "developer 0x230224"
|
||||||
#define APIRECEIVER "developer 0x230224"
|
#define APIRECEIVER "developer 0x230224"
|
||||||
#define APIJUNGFRAU "developer 0x230515"
|
#define APICTB "developer 0x230525"
|
||||||
#define APIMOENCH "developer 0x230515"
|
#define APIGOTTHARD "developer 0x230525"
|
||||||
#define APIGOTTHARD "developer 0x230224"
|
#define APIGOTTHARD2 "developer 0x230525"
|
||||||
#define APIGOTTHARD2 "developer 0x230224"
|
#define APIJUNGFRAU "developer 0x230525"
|
||||||
#define APIMYTHEN3 "developer 0x230224"
|
#define APIMYTHEN3 "developer 0x230525"
|
||||||
#define APIEIGER "developer 0x230224"
|
#define APIMOENCH "developer 0x230525"
|
||||||
#define APICTB "developer 0x230523"
|
#define APIEIGER "developer 0x230525"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user