mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-20 16:48:01 +02:00
moench: first version
This commit is contained in:
@ -395,10 +395,10 @@ std::string CmdProxy::Adcphase(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_value] [(optional)deg]\n\t[Jungfrau][Ctb][Gotthard] Phase "
|
||||
os << "[n_value] [(optional)deg]\n\t[Jungfrau][Ctb][Moench][Moench][Gotthard] Phase "
|
||||
"shift of ADC clock. \n\t[Jungfrau] Absolute phase shift. If deg "
|
||||
"used, then shift in degrees. Changing Speed also resets "
|
||||
"adcphase to recommended defaults.\n\t[Ctb] Absolute phase "
|
||||
"adcphase to recommended defaults.\n\t[Ctb][Moench] Absolute phase "
|
||||
"shift. If deg used, then shift in degrees. Changing adcclk also "
|
||||
"resets adcphase and sets it to previous values.\n\t[Gotthard] "
|
||||
"Relative phase shift"
|
||||
@ -588,8 +588,10 @@ std::string CmdProxy::Dac(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[dac index] [dac or mv value] [(optional unit) mv] "
|
||||
"\n\t[Ctb][Jungfrau] Dac."
|
||||
"\n\t[Ctb] Dac."
|
||||
<< '\n';
|
||||
} else if (det->getDetectorType().squash(defs::GENERIC) != defs::CHIPTESTBOARD) {
|
||||
throw sls::RuntimeError("Dac command can only be used for chip test board. Use daclist to get list of dac commands for current detector.");
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
bool mv = false;
|
||||
if (args.size() == 2) {
|
||||
@ -707,6 +709,11 @@ std::vector<std::string> CmdProxy::DacCommands() {
|
||||
"vth1", "vicin", "vcas", "vpreamp", "vpl", "vipre",
|
||||
"viinsh", "vph", "vtrim", "vdcsh"};
|
||||
break;
|
||||
case defs::MOENCH:
|
||||
return std::vector<std::string>{"vbp_colbuf", "vipre", "vin_cm",
|
||||
"vb_sda", "vcasc_sfp", "vout_cm",
|
||||
"vipre_cds", "ibias_sfp"};
|
||||
break;
|
||||
case defs::CHIPTESTBOARD:
|
||||
return std::vector<std::string>{
|
||||
"dac 0", "dac 1", "dac 2", "dac 3", "dac 4", "dac 5",
|
||||
@ -1316,26 +1323,29 @@ std::string CmdProxy::Counters(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* CTB Specific */
|
||||
/* CTB / Moench Specific */
|
||||
|
||||
std::string CmdProxy::Samples(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[n_samples]\n\t[CTB] Number of samples (both analog and "
|
||||
"digitial) expected."
|
||||
"digitial) expected.\n\t[Moench] Number of samples (analog only)"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
if (!args.empty()) {
|
||||
WrongNumberOfParameters(0);
|
||||
}
|
||||
auto a = det->getNumberOfAnalogSamples({det_id});
|
||||
auto d = det->getNumberOfDigitalSamples({det_id});
|
||||
int as = a.squash(-1);
|
||||
int ds = d.squash(-1);
|
||||
if (as == -1 || ds == -1 || as != ds) { // check if a == d?
|
||||
throw sls::RuntimeError(
|
||||
// get also digital samples for ctb and compare with analog
|
||||
if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) {
|
||||
auto d = det->getNumberOfDigitalSamples({det_id});
|
||||
int as = a.squash(-1);
|
||||
int ds = d.squash(-1);
|
||||
if (as == -1 || ds == -1 || as != ds) { // check if a == d?
|
||||
throw sls::RuntimeError(
|
||||
"Different samples. Use asamples or dsamples.");
|
||||
}
|
||||
}
|
||||
os << OutString(a) << '\n';
|
||||
} else if (action == defs::PUT_ACTION) {
|
||||
@ -1343,7 +1353,10 @@ std::string CmdProxy::Samples(int action) {
|
||||
WrongNumberOfParameters(1);
|
||||
}
|
||||
det->setNumberOfAnalogSamples(std::stoi(args[0]), {det_id});
|
||||
det->setNumberOfDigitalSamples(std::stoi(args[0]), {det_id});
|
||||
// set also digital samples for ctb
|
||||
if (det->getDetectorType().squash() == defs::CHIPTESTBOARD) {
|
||||
det->setNumberOfDigitalSamples(std::stoi(args[0]), {det_id});
|
||||
}
|
||||
os << args.front() << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
@ -1351,6 +1364,8 @@ std::string CmdProxy::Samples(int action) {
|
||||
return os.str();
|
||||
}
|
||||
|
||||
/* CTB Specific */
|
||||
|
||||
std::string CmdProxy::Dbitphase(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
@ -1499,7 +1514,7 @@ std::string CmdProxy::Pattern(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname]\n\t[Mythen3][Ctb] Loads binary pattern file with only pattern "
|
||||
os << "[fname]\n\t[Mythen3][Moench][Ctb][Moench] Loads binary pattern file with only pattern "
|
||||
"words"
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1520,7 +1535,7 @@ std::string CmdProxy::PatternWord(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 bit pattern at "
|
||||
os << "[step or address] [64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit pattern at "
|
||||
"address of pattern memory."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1546,17 +1561,17 @@ std::string CmdProxy::PatternLoopAddresses(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patlimits") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of complete "
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits of complete "
|
||||
"pattern."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop0") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 0."
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits of loop 0."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop1") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 1."
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits of loop 1."
|
||||
<< '\n';
|
||||
} else if (cmd == "patloop2") {
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 2."
|
||||
os << "[start addr] [stop addr] \n\t[Ctb][Moench][Mythen3] Limits of loop 2."
|
||||
<< '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError(
|
||||
@ -1601,11 +1616,11 @@ std::string CmdProxy::PatternLoopCycles(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patnloop0") {
|
||||
os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 0." << '\n';
|
||||
os << "[n_cycles] \n\t[Ctb][Moench][Mythen3] Number of cycles of loop 0." << '\n';
|
||||
} else if (cmd == "patnloop1") {
|
||||
os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 1." << '\n';
|
||||
os << "[n_cycles] \n\t[Ctb][Moench][Mythen3] Number of cycles of loop 1." << '\n';
|
||||
} else if (cmd == "patnloop2") {
|
||||
os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 2." << '\n';
|
||||
os << "[n_cycles] \n\t[Ctb][Moench][Mythen3] Number of cycles of loop 2." << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError(
|
||||
"Unknown command, use list to list all commands");
|
||||
@ -1646,11 +1661,11 @@ std::string CmdProxy::PatternWaitAddress(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwait0") {
|
||||
os << "[addr] \n\t[Ctb][Mythen3] Wait 0 address." << '\n';
|
||||
os << "[addr] \n\t[Ctb][Moench][Mythen3] Wait 0 address." << '\n';
|
||||
} else if (cmd == "patwait1") {
|
||||
os << "[addr] \n\t[Ctb][Mythen3] Wait 1 address." << '\n';
|
||||
os << "[addr] \n\t[Ctb][Moench][Mythen3] Wait 1 address." << '\n';
|
||||
} else if (cmd == "patwait2") {
|
||||
os << "[addr] \n\t[Ctb][Mythen3] Wait 2 address." << '\n';
|
||||
os << "[addr] \n\t[Ctb][Moench][Mythen3] Wait 2 address." << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError(
|
||||
"Unknown command, use list to list all commands");
|
||||
@ -1691,11 +1706,11 @@ std::string CmdProxy::PatternWaitTime(int action) {
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
if (cmd == "patwaittime0") {
|
||||
os << "[n_clk] \n\t[Ctb][Mythen3] Wait 0 time in clock cycles." << '\n';
|
||||
os << "[n_clk] \n\t[Ctb][Moench][Mythen3] Wait 0 time in clock cycles." << '\n';
|
||||
} else if (cmd == "patwaittime1") {
|
||||
os << "[n_clk] \n\t[Ctb][Mythen3] Wait 1 time in clock cycles." << '\n';
|
||||
os << "[n_clk] \n\t[Ctb][Moench][Mythen3] Wait 1 time in clock cycles." << '\n';
|
||||
} else if (cmd == "patwaittime2") {
|
||||
os << "[n_clk] \n\t[Ctb][Mythen3] Wait 2 time in clock cycles." << '\n';
|
||||
os << "[n_clk] \n\t[Ctb][Moench][Mythen3] Wait 2 time in clock cycles." << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError(
|
||||
"Unknown command, use list to list all commands");
|
||||
@ -1811,7 +1826,7 @@ std::string CmdProxy::ProgramFpga(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[fname.pof | fname.rbf]\n\t[Jungfrau][Ctb] Programs FPGA from pof file."
|
||||
os << "[fname.pof | fname.rbf]\n\t[Jungfrau][Ctb][Moench] Programs FPGA from pof file."
|
||||
<< "\n\t[Mythen3][Gotthard2] Programs FPGA from rbf file."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
@ -1832,7 +1847,7 @@ std::string CmdProxy::CopyDetectorServer(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[server_name] [pc_host_name]\n\t[Jungfrau][Ctb] Copies detector "
|
||||
os << "[server_name] [pc_host_name]\n\t[Jungfrau][Ctb][Moench] Copies detector "
|
||||
"server via tftp from pc and changes respawn server name in "
|
||||
"/etc/inittab of detector."
|
||||
<< '\n';
|
||||
@ -1854,7 +1869,7 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[server_name] [pc_host_name] [fname.pof]\n\t[Jungfrau][Ctb] "
|
||||
os << "[server_name] [pc_host_name] [fname.pof]\n\t[Jungfrau][Ctb][Moench] "
|
||||
"Updates detector server via tftp from pc, updates firmware to "
|
||||
"pof file and then reboots controller (blackfin)."
|
||||
<< '\n';
|
||||
@ -1904,7 +1919,7 @@ std::string CmdProxy::AdcRegister(int action) {
|
||||
std::ostringstream os;
|
||||
os << cmd << ' ';
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[address] [value]\n\t[Jungfrau][Ctb][Gotthard] Writes to an adc "
|
||||
os << "[address] [value]\n\t[Jungfrau][Ctb][Moench][Gotthard] Writes to an adc "
|
||||
"register in hex."
|
||||
<< '\n';
|
||||
} else if (action == defs::GET_ACTION) {
|
||||
|
@ -666,6 +666,12 @@ class CmdProxy {
|
||||
{"vb_pixbuf", &CmdProxy::vb_pixbuf},
|
||||
{"vin_com", &CmdProxy::vin_com},
|
||||
{"vdd_prot", &CmdProxy::vdd_prot},
|
||||
{"vbp_colbuf", &CmdProxy::vbp_colbuf},
|
||||
{"vb_sda", &CmdProxy::vb_sda},
|
||||
{"vcasc_sfp", &CmdProxy::vcasc_sfp},
|
||||
{"vipre_cds", &CmdProxy::vipre_cds},
|
||||
{"ibias_sfp", &CmdProxy::ibias_sfp},
|
||||
|
||||
|
||||
{"dac", &CmdProxy::Dac},
|
||||
{"daclist", &CmdProxy::DacList},
|
||||
@ -796,20 +802,24 @@ class CmdProxy {
|
||||
/* Mythen3 Specific */
|
||||
{"counters", &CmdProxy::Counters},
|
||||
|
||||
/* CTB Specific */
|
||||
/* CTB/ Moench Specific */
|
||||
{"samples", &CmdProxy::Samples},
|
||||
{"asamples", &CmdProxy::asamples},
|
||||
{"dsamples", &CmdProxy::dsamples},
|
||||
{"romode", &CmdProxy::romode},
|
||||
{"dbitphase", &CmdProxy::Dbitphase},
|
||||
{"maxdbitphaseshift", &CmdProxy::maxdbitphaseshift},
|
||||
{"adcclk", &CmdProxy::adcclk},
|
||||
{"dbitclk", &CmdProxy::dbitclk},
|
||||
{"runclk", &CmdProxy::runclk},
|
||||
{"syncclk", &CmdProxy::syncclk},
|
||||
{"adcpipeline", &CmdProxy::adcpipeline},
|
||||
{"dbitpipeline", &CmdProxy::dbitpipeline},
|
||||
{"v_limit", &CmdProxy::v_limit},
|
||||
{"adcenable", &CmdProxy::adcenable},
|
||||
{"adcenable10g", &CmdProxy::adcenable10g},
|
||||
|
||||
/* CTB Specific */
|
||||
{"dsamples", &CmdProxy::dsamples},
|
||||
{"romode", &CmdProxy::romode},
|
||||
{"dbitclk", &CmdProxy::dbitclk},
|
||||
{"dbitphase", &CmdProxy::Dbitphase},
|
||||
{"maxdbitphaseshift", &CmdProxy::maxdbitphaseshift},
|
||||
{"dbitpipeline", &CmdProxy::dbitpipeline},
|
||||
{"v_a", &CmdProxy::v_a},
|
||||
{"v_b", &CmdProxy::v_b},
|
||||
{"v_c", &CmdProxy::v_c},
|
||||
@ -827,9 +837,6 @@ class CmdProxy {
|
||||
{"im_d", &CmdProxy::im_d},
|
||||
{"im_io", &CmdProxy::im_io},
|
||||
{"adc", &CmdProxy::SlowAdc},
|
||||
{"adcenable", &CmdProxy::adcenable},
|
||||
{"adcenable10g", &CmdProxy::adcenable10g},
|
||||
{"adcinvert", &CmdProxy::adcinvert},
|
||||
{"extsampling", &CmdProxy::extsampling},
|
||||
{"extsamplingsrc", &CmdProxy::extsamplingsrc},
|
||||
{"rx_dbitlist", &CmdProxy::ReceiverDbitList},
|
||||
@ -881,6 +888,7 @@ class CmdProxy {
|
||||
{"firmwaretest", &CmdProxy::firmwaretest},
|
||||
{"bustest", &CmdProxy::bustest},
|
||||
{"initialchecks", &CmdProxy::InitialChecks},
|
||||
{"adcinvert", &CmdProxy::adcinvert},
|
||||
|
||||
/* Insignificant */
|
||||
{"port", &CmdProxy::port},
|
||||
@ -955,8 +963,9 @@ class CmdProxy {
|
||||
std::string BurstMode(int action);
|
||||
/* Mythen3 Specific */
|
||||
std::string Counters(int action);
|
||||
/* CTB Specific */
|
||||
/* CTB/ Moench Specific */
|
||||
std::string Samples(int action);
|
||||
/* CTB Specific */
|
||||
std::string Dbitphase(int action);
|
||||
std::string SlowAdc(int action);
|
||||
std::string ReceiverDbitList(int action);
|
||||
@ -1034,38 +1043,38 @@ class CmdProxy {
|
||||
"\n\t[Gotthard2] Uploaded to detector just before acquisition starts");
|
||||
|
||||
TIME_COMMAND(delay, getDelayAfterTrigger, setDelayAfterTrigger,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] Delay after trigger");
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] Delay after trigger");
|
||||
|
||||
TIME_COMMAND(burstperiod, getBurstPeriod, setBurstPeriod,
|
||||
"[duration] [(optional unit) ns|us|ms|s]\n\t[Gotthard2] Burst period. Only in burst mode and auto timing mode.");
|
||||
|
||||
GET_COMMAND(framesl, getNumberOfFramesLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB] Number of frames left in acquisition."
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of frames left in acquisition."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
GET_COMMAND(triggersl, getNumberOfTriggersLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB] Number of triggers left in acquisition."
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Number of triggers left in acquisition."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(delayl, getDelayAfterTriggerLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB] DelayLeft Delay Left in Acquisition."
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] DelayLeft Delay Left in Acquisition."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(periodl, getPeriodLeft,
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB] Period left for current frame."
|
||||
"\n\t[Gotthard][Jungfrau][Mythen3][Gotthard2][CTB][Moench] Period left for current frame."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
INTEGER_COMMAND(timing, getTimingMode, setTimingMode, sls::StringTo<slsDetectorDefs::timingMode>,
|
||||
"[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] [auto|trigger]\n\t[Eiger] [auto|trigger|gating|burst_trigger]");
|
||||
"[auto|trigger|gating|burst_trigger]\n\tTiming Mode of detector.\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] [auto|trigger]\n\t[Eiger] [auto|trigger|gating|burst_trigger]");
|
||||
|
||||
GET_COMMAND(maxadcphaseshift, getMaxADCPhaseShift,
|
||||
"\n\t[Jungfrau][CTB] Absolute maximum Phase shift of ADC clock.");
|
||||
"\n\t[Jungfrau][CTB][Moench] Absolute maximum Phase shift of ADC clock.");
|
||||
|
||||
INTEGER_COMMAND(vhighvoltage, getHighVoltage, setHighVoltage, std::stoi,
|
||||
"[n_value]\n\tHigh voltage to the sensor in Voltage."
|
||||
"\n\t[Gotthard] [0|90|110|120|150|180|200]"
|
||||
"\n\t[Eiger][Mythen3][Gotthard2] 0-200"
|
||||
"\n\t[Jungfrau][Ctb] [0|60-200]");
|
||||
"\n\t[Jungfrau][Ctb][Moench] [0|60-200]");
|
||||
|
||||
INTEGER_COMMAND(powerchip, getPowerChip, setPowerChip, std::stoi,
|
||||
"[0, 1]\n\t[Jungfrau][Mythen3][Gotthard2] Power the chip. Default 0."
|
||||
@ -1169,13 +1178,13 @@ class CmdProxy {
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? "); //TODO
|
||||
|
||||
DAC_COMMAND(vout_cm, getDAC, setDAC, defs::VOUT_CM,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? "); //TODO
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? \n\t[Moench] Dac for 5"); //TODO
|
||||
|
||||
DAC_COMMAND(vcasc_out, getDAC, setDAC, defs::VCASC_OUT,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? "); //TODO
|
||||
|
||||
DAC_COMMAND(vin_cm, getDAC, setDAC, defs::VIN_CM,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? "); //TODO
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard] Dac for ?? \n\t[Moench] Dac for 2"); //TODO
|
||||
|
||||
DAC_COMMAND(vref_comp, getDAC, setDAC, defs::VREF_COMP,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard][Jungfrau] Dac for ?? "); //TODO
|
||||
@ -1193,7 +1202,7 @@ class CmdProxy {
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Mythen3] voltage to define feedback resistance of the second shaper.");
|
||||
|
||||
DAC_COMMAND(vipre, getDAC, setDAC, defs::VIPRE,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the preamplifier's input transistor current.");
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the preamplifier's input transistor current.\n\t[Moench] Dac for 1");
|
||||
|
||||
DAC_COMMAND(viinsh, getDAC, setDAC, defs::VIINSH,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Mythen3] Dac for the bias current for the shaper.");
|
||||
@ -1274,7 +1283,7 @@ class CmdProxy {
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Gotthard2] Dac for common mode voltage of ADC DAC bank 2.");
|
||||
|
||||
DAC_COMMAND(adcvpp, getDAC, setDAC, defs::ADC_VPP,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Ctb] Vpp of ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V.");
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Ctb][Moench] Vpp of ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> 2V.");
|
||||
|
||||
DAC_COMMAND(vb_ds, getDAC, setDAC, defs::VB_DS,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Jungfrau] Dac for ??"); //TODO
|
||||
@ -1291,6 +1300,21 @@ class CmdProxy {
|
||||
DAC_COMMAND(vdd_prot, getDAC, setDAC, defs::VDD_PROT,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Jungfrau] Dac for ??"); //TODO
|
||||
|
||||
DAC_COMMAND(vbp_colbuf, getDAC, setDAC, defs::VBP_COLBUF,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Moench] Dac for 0");
|
||||
|
||||
DAC_COMMAND(vb_sda, getDAC, setDAC, defs::VB_SDA,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Moench] Dac for 3");
|
||||
|
||||
DAC_COMMAND(vcasc_sfp, getDAC, setDAC, defs::VCASC_SFP,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Moench] Dac for 4");
|
||||
|
||||
DAC_COMMAND(vipre_cds, getDAC, setDAC, defs::VIPRE_CDS,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Moench] Dac for 6");
|
||||
|
||||
DAC_COMMAND(ibias_sfp, getDAC, setDAC, defs::IBIAS_SFP,
|
||||
"[dac or mv value][(optional unit) mv] \n\t[Moench] Dac for 7");
|
||||
|
||||
|
||||
/* on chip dacs */
|
||||
INTEGER_USER_IND_COMMAND(vchip_comp_fe, getOnChipDAC, setOnChipDAC, stoiHex, defs::VB_COMP_FE,
|
||||
@ -1391,7 +1415,7 @@ class CmdProxy {
|
||||
"\n\tPrints the receiver configuration.");
|
||||
|
||||
INTEGER_COMMAND(tengiga, getTenGiga, setTenGiga, std::stoi,
|
||||
"[0, 1]\n\t[Eiger][Ctb] 10GbE Enable.");
|
||||
"[0, 1]\n\t[Eiger][Ctb][Moench] 10GbE Enable.");
|
||||
|
||||
INTEGER_COMMAND(flowcontrol10g, getTenGigaFlowControl, setTenGigaFlowControl, std::stoi,
|
||||
"[0, 1]\n\t[Eiger][Jungfrau] 10GbE Flow Control.");
|
||||
@ -1574,10 +1598,34 @@ class CmdProxy {
|
||||
|
||||
/* Mythen3 Specific */
|
||||
|
||||
/* CTB Specific */
|
||||
/* CTB/ Moench Specific */
|
||||
|
||||
INTEGER_COMMAND(asamples, getNumberOfAnalogSamples, setNumberOfAnalogSamples, std::stoi,
|
||||
"[0, 1]\n\t[CTB] Number of analog samples expected.");
|
||||
"[0, 1]\n\t[CTB][Moench] Number of analog samples expected.");
|
||||
|
||||
INTEGER_COMMAND(adcclk, getADCClock, setADCClock, std::stoi,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] ADC clock frequency in MHz.");
|
||||
|
||||
INTEGER_COMMAND(runclk, getRUNClock, setRUNClock, std::stoi,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] Run clock in MHz.");
|
||||
|
||||
GET_COMMAND(syncclk, getSYNCClock,
|
||||
"[n_clk in MHz]\n\t[Ctb][Moench] Sync clock in MHz.");
|
||||
|
||||
INTEGER_COMMAND(adcpipeline, getADCPipeline, setADCPipeline, std::stoi,
|
||||
"[n_value]\n\t[Ctb][Moench] Pipeline for ADC clock.");
|
||||
|
||||
INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, std::stoi, defs::V_LIMIT,
|
||||
"[n_value]\n\t[Ctb][Moench] Soft limit for power supplies(ctb only) and DACS in mV.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcenable, getADCEnableMask, setADCEnableMask, stoiHex,
|
||||
"[bitmask]\n\t[Ctb][Moench] ADC Enable Mask for 1Gb Mode for each 32 ADC channel.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcenable10g, getTenGigaADCEnableMask, setTenGigaADCEnableMask, stoiHex,
|
||||
"[bitmask]\n\t[Ctb][Moench] ADC Enable Mask for 10Gb mode for each 32 ADC channel. However, if any of consecutive 4 bits are enabled, the complete 4 bits are enabled.");
|
||||
|
||||
/* CTB Specific */
|
||||
|
||||
|
||||
INTEGER_COMMAND(dsamples, getNumberOfDigitalSamples, setNumberOfDigitalSamples, std::stoi,
|
||||
"[0, 1]\n\t[CTB] Number of digital samples expected.");
|
||||
@ -1585,30 +1633,15 @@ class CmdProxy {
|
||||
INTEGER_COMMAND(romode, getReadoutMode, setReadoutMode, sls::StringTo<slsDetectorDefs::readoutMode>,
|
||||
"[analog|digital|analog_digital]\n\t[CTB] Readout mode. Default is analog.");
|
||||
|
||||
GET_COMMAND(maxdbitphaseshift, getMaxDBITPhaseShift,
|
||||
"\n\t[CTB] Absolute maximum Phase shift of of the clock to latch digital bits.");
|
||||
|
||||
INTEGER_COMMAND(adcclk, getADCClock, setADCClock, std::stoi,
|
||||
"[n_clk in MHz]\n\t[Ctb] ADC clock frequency in MHz.");
|
||||
|
||||
INTEGER_COMMAND(dbitclk, getDBITClock, setDBITClock, std::stoi,
|
||||
"[n_clk in MHz]\n\t[Ctb] Clock for latching the digital bits in MHz.");
|
||||
|
||||
INTEGER_COMMAND(runclk, getRUNClock, setRUNClock, std::stoi,
|
||||
"[n_clk in MHz]\n\t[Ctb] Run clock in MHz.");
|
||||
|
||||
GET_COMMAND(syncclk, getSYNCClock,
|
||||
"[n_clk in MHz]\n\t[Ctb] Synch clock in MHz.");
|
||||
|
||||
INTEGER_COMMAND(adcpipeline, getADCPipeline, setADCPipeline, std::stoi,
|
||||
"[n_value]\n\t[Ctb] Pipeline for ADC clock.");
|
||||
GET_COMMAND(maxdbitphaseshift, getMaxDBITPhaseShift,
|
||||
"\n\t[CTB] Absolute maximum Phase shift of of the clock to latch digital bits.");
|
||||
|
||||
INTEGER_COMMAND(dbitpipeline, getDBITPipeline, setDBITPipeline, std::stoi,
|
||||
"[n_value]\n\t[Ctb] Pipeline of the clock for latching digital bits.");
|
||||
|
||||
INTEGER_IND_COMMAND(v_limit, getVoltage, setVoltage, std::stoi, defs::V_LIMIT,
|
||||
"[n_value]\n\t[Ctb] Soft limit for power supplies and DACS in mV.");
|
||||
|
||||
INTEGER_IND_COMMAND(v_a, getVoltage, setVoltage, std::stoi, defs::V_POWER_A,
|
||||
"[n_value]\n\t[Ctb] Voltage supply a in mV.");
|
||||
|
||||
@ -1655,16 +1688,7 @@ class CmdProxy {
|
||||
"\n\t[Ctb] Measured current of power supply d in mA.");
|
||||
|
||||
GET_IND_COMMAND(im_io, getMeasuredCurrent, defs::I_POWER_IO, "",
|
||||
"\n\t[Ctb] Measured current of power supply io in mA.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcenable, getADCEnableMask, setADCEnableMask, stoiHex,
|
||||
"[bitmask]\n\t[Ctb] ADC Enable Mask for 1Gb Mode for each 32 ADC channel.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcenable10g, getTenGigaADCEnableMask, setTenGigaADCEnableMask, stoiHex,
|
||||
"[bitmask]\n\t[Ctb] ADC Enable Mask for 10Gb mode for each 32 ADC channel. However, if any of consecutive 4 bits are enabled, the complete 4 bits are enabled.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcinvert, getADCInvert, setADCInvert, stoiHex,
|
||||
"[bitmask]\n\t[Ctb][Jungfrau] ADC Inversion Mask.\n\t[Jungfrau] Inversions on top of the default mask.");
|
||||
"\n\t[Ctb] Measured current of power supply io in mA.");
|
||||
|
||||
INTEGER_COMMAND(extsampling, getExternalSampling, setExternalSampling, std::stoi,
|
||||
"[0, 1]\n\t[Ctb] Enable for external sampling signal to extsamplingsrc signal for digital data. For advanced users only.");
|
||||
@ -1682,19 +1706,19 @@ class CmdProxy {
|
||||
/* Pattern */
|
||||
|
||||
EXECUTE_SET_COMMAND_NOID_1ARG(savepattern, savePattern,
|
||||
"[fname]\n\t[Ctb] Saves pattern to file (ascii). Also executes pattern.");
|
||||
"[fname]\n\t[Ctb][Moench][Mythen3] Saves pattern to file (ascii). Also executes pattern.");
|
||||
|
||||
INTEGER_COMMAND_HEX(patioctrl, getPatternIOControl, setPatternIOControl, stoulHex,
|
||||
"[64 bit mask]\n\t[Ctb] 64 bit mask defining input (0) and output (1) signals.");
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit mask defining input (0) and output (1) signals.");
|
||||
|
||||
INTEGER_COMMAND_HEX(patclkctrl, getPatternClockControl, setPatternClockControl, stoulHex,
|
||||
"[64 bit mask]\n\t[Ctb] 64 bit mask defining output clock enable.");
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit mask defining output clock enable.");
|
||||
|
||||
INTEGER_COMMAND_HEX(patmask, getPatternMask, setPatternMask, stoulHex,
|
||||
"[64 bit mask]\n\t[Ctb][Mythen3] 64 bit mask applied to every pattern. Only these bits for each pattern will be masked against.");
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit mask applied to every pattern. Only these bits for each pattern will be masked against.");
|
||||
|
||||
INTEGER_COMMAND_HEX(patsetbit, getPatternBitMask, setPatternBitMask, stoulHex,
|
||||
"[64 bit mask]\n\t[Ctb][Mythen3] 64 bit values applied to the selected patmask for every pattern.");
|
||||
"[64 bit mask]\n\t[Ctb][Moench][Mythen3] 64 bit values applied to the selected patmask for every pattern.");
|
||||
|
||||
/* Moench */
|
||||
|
||||
@ -1711,17 +1735,19 @@ class CmdProxy {
|
||||
/* Advanced */
|
||||
|
||||
EXECUTE_SET_COMMAND(resetfpga, resetFPGA,
|
||||
"\n\t[Jungfrau][Ctb] Reset FPGA.");
|
||||
"\n\t[Jungfrau][Ctb][Moench] Reset FPGA.");
|
||||
|
||||
EXECUTE_SET_COMMAND(rebootcontroller, rebootController,
|
||||
"\n\t[Jungfrau][Ctb][Gotthard][Mythen3][Gotthard2] Reboot controler (blackfin) of detector.");
|
||||
"\n\t[Jungfrau][Ctb][Moench][Gotthard][Mythen3][Gotthard2] Reboot controler (blackfin) of detector.");
|
||||
|
||||
EXECUTE_SET_COMMAND(firmwaretest, executeFirmwareTest,
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] Firmware test, ie. reads a read fixed pattern from a register.");
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] Firmware test, ie. reads a read fixed pattern from a register.");
|
||||
|
||||
EXECUTE_SET_COMMAND(bustest, executeBusTest,
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb] Bus test, ie. keeps writing and reading back different values in R/W register.");
|
||||
"\n\t[Jungfrau][Gotthard][Mythen3][Gotthard2][Ctb][Moench] Bus test, ie. keeps writing and reading back different values in R/W register.");
|
||||
|
||||
INTEGER_COMMAND_HEX(adcinvert, getADCInvert, setADCInvert, stoiHex,
|
||||
"[bitmask]\n\t[Ctb][Moench][Jungfrau][Moench] ADC Inversion Mask.\n\t[Jungfrau][Moench] Inversions on top of the default mask.");
|
||||
|
||||
/* Insignificant */
|
||||
|
||||
@ -1738,7 +1764,7 @@ class CmdProxy {
|
||||
"\n\tClient IP Address that last communicated with the detector.");
|
||||
|
||||
GET_COMMAND(nframes, getNumberOfFramesFromStart,
|
||||
"\n\t[Jungfrau][Mythen3][Gotthard2][Moench][CTB] Number of frames from start run control."
|
||||
"\n\t[Jungfrau][Mythen3][Gotthard2][Moench][CTB][Moench] Number of frames from start run control."
|
||||
"\n\t[Gotthard2] only in continuous mode.");
|
||||
|
||||
TIME_GET_COMMAND(now, getActualTime,
|
||||
|
@ -1230,7 +1230,7 @@ void Detector::setCounterMask(uint32_t countermask, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setCounterMask, pos, countermask);
|
||||
}
|
||||
|
||||
// CTB Specific
|
||||
// CTB/ Moench Specific
|
||||
|
||||
Result<int> Detector::getNumberOfAnalogSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getNumberOfAnalogSamples, pos);
|
||||
@ -1240,46 +1240,6 @@ void Detector::setNumberOfAnalogSamples(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setNumberOfAnalogSamples, pos, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getNumberOfDigitalSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getNumberOfDigitalSamples, pos);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfDigitalSamples(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setNumberOfDigitalSamples, pos, value);
|
||||
}
|
||||
|
||||
Result<defs::readoutMode> Detector::getReadoutMode(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReadoutMode, pos);
|
||||
}
|
||||
|
||||
void Detector::setReadoutMode(defs::readoutMode value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReadoutMode, pos, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITPhase(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockPhase, pos, defs::DBIT_CLOCK,
|
||||
false);
|
||||
}
|
||||
|
||||
void Detector::setDBITPhase(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockPhase, pos, defs::DBIT_CLOCK, value,
|
||||
false);
|
||||
}
|
||||
|
||||
Result<int> Detector::getMaxDBITPhaseShift(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getMaxClockPhaseShift, pos,
|
||||
defs::DBIT_CLOCK);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITPhaseInDegrees(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockPhase, pos, defs::DBIT_CLOCK,
|
||||
true);
|
||||
}
|
||||
|
||||
void Detector::setDBITPhaseInDegrees(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockPhase, pos, defs::DBIT_CLOCK, value,
|
||||
true);
|
||||
}
|
||||
|
||||
Result<int> Detector::getADCClock(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockFrequency, pos,
|
||||
@ -1291,16 +1251,6 @@ void Detector::setADCClock(int value_in_MHz, Positions pos) {
|
||||
value_in_MHz);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITClock(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockFrequency, pos,
|
||||
defs::DBIT_CLOCK);
|
||||
}
|
||||
|
||||
void Detector::setDBITClock(int value_in_MHz, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockFrequency, pos, defs::DBIT_CLOCK,
|
||||
value_in_MHz);
|
||||
}
|
||||
|
||||
Result<int> Detector::getRUNClock(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockFrequency, pos,
|
||||
defs::RUN_CLOCK);
|
||||
@ -1328,10 +1278,6 @@ Result<int> Detector::getDBITPipeline(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getPipeline, pos, defs::DBIT_CLOCK);
|
||||
}
|
||||
|
||||
void Detector::setDBITPipeline(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setPipeline, pos, defs::DBIT_CLOCK, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getVoltage(defs::dacIndex index, Positions pos) const {
|
||||
switch (index) {
|
||||
case defs::V_LIMIT:
|
||||
@ -1364,6 +1310,81 @@ void Detector::setVoltage(defs::dacIndex index, int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setDAC, pos, value, index, 1);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getADCEnableMask(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getADCEnableMask, pos);
|
||||
}
|
||||
|
||||
void Detector::setADCEnableMask(uint32_t mask, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setADCEnableMask, pos, mask);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getTenGigaADCEnableMask(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTenGigaADCEnableMask, pos);
|
||||
}
|
||||
|
||||
void Detector::setTenGigaADCEnableMask(uint32_t mask, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTenGigaADCEnableMask, pos, mask);
|
||||
}
|
||||
|
||||
// CTB Specific
|
||||
|
||||
|
||||
Result<int> Detector::getNumberOfDigitalSamples(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getNumberOfDigitalSamples, pos);
|
||||
}
|
||||
|
||||
void Detector::setNumberOfDigitalSamples(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setNumberOfDigitalSamples, pos, value);
|
||||
}
|
||||
|
||||
Result<defs::readoutMode> Detector::getReadoutMode(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getReadoutMode, pos);
|
||||
}
|
||||
|
||||
void Detector::setReadoutMode(defs::readoutMode value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setReadoutMode, pos, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITClock(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockFrequency, pos,
|
||||
defs::DBIT_CLOCK);
|
||||
}
|
||||
|
||||
void Detector::setDBITClock(int value_in_MHz, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockFrequency, pos, defs::DBIT_CLOCK,
|
||||
value_in_MHz);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITPhase(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockPhase, pos, defs::DBIT_CLOCK,
|
||||
false);
|
||||
}
|
||||
|
||||
void Detector::setDBITPhase(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockPhase, pos, defs::DBIT_CLOCK, value,
|
||||
false);
|
||||
}
|
||||
|
||||
Result<int> Detector::getMaxDBITPhaseShift(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getMaxClockPhaseShift, pos,
|
||||
defs::DBIT_CLOCK);
|
||||
}
|
||||
|
||||
Result<int> Detector::getDBITPhaseInDegrees(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getClockPhase, pos, defs::DBIT_CLOCK,
|
||||
true);
|
||||
}
|
||||
|
||||
void Detector::setDBITPhaseInDegrees(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setClockPhase, pos, defs::DBIT_CLOCK, value,
|
||||
true);
|
||||
}
|
||||
|
||||
|
||||
void Detector::setDBITPipeline(int value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setPipeline, pos, defs::DBIT_CLOCK, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getMeasuredVoltage(defs::dacIndex index,
|
||||
Positions pos) const {
|
||||
switch (index) {
|
||||
@ -1402,30 +1423,6 @@ Result<int> Detector::getSlowADC(defs::dacIndex index, Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getADC, pos, index);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getADCEnableMask(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getADCEnableMask, pos);
|
||||
}
|
||||
|
||||
void Detector::setADCEnableMask(uint32_t mask, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setADCEnableMask, pos, mask);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getTenGigaADCEnableMask(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getTenGigaADCEnableMask, pos);
|
||||
}
|
||||
|
||||
void Detector::setTenGigaADCEnableMask(uint32_t mask, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setTenGigaADCEnableMask, pos, mask);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getADCInvert(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getADCInvert, pos);
|
||||
}
|
||||
|
||||
void Detector::setADCInvert(uint32_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setADCInvert, pos, value);
|
||||
}
|
||||
|
||||
Result<int> Detector::getExternalSamplingSource(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getExternalSamplingSource, pos);
|
||||
}
|
||||
@ -1747,6 +1744,14 @@ void Detector::setInitialChecks(const bool value) {
|
||||
pimpl->setInitialChecks(value);
|
||||
}
|
||||
|
||||
Result<uint32_t> Detector::getADCInvert(Positions pos) const {
|
||||
return pimpl->Parallel(&slsDetector::getADCInvert, pos);
|
||||
}
|
||||
|
||||
void Detector::setADCInvert(uint32_t value, Positions pos) {
|
||||
pimpl->Parallel(&slsDetector::setADCInvert, pos, value);
|
||||
}
|
||||
|
||||
// Insignificant
|
||||
|
||||
Result<int> Detector::getControlPort(Positions pos) const {
|
||||
|
@ -557,7 +557,7 @@ void DetectorImpl::readFrameFromReceiver() {
|
||||
uint32_t yoffset = coordY * nPixelsY;
|
||||
uint32_t singledetrowoffset = nPixelsX * bytesPerPixel;
|
||||
uint32_t rowoffset = nX * singledetrowoffset;
|
||||
if (multi_shm()->multiDetectorType == CHIPTESTBOARD) {
|
||||
if (multi_shm()->multiDetectorType == MOENCH) {
|
||||
singledetrowoffset = size;
|
||||
nPixelsY = 1; // TODO: nDetPixelsY is not updated.
|
||||
}
|
||||
@ -1070,6 +1070,7 @@ std::vector<char> DetectorImpl::readProgrammingFile(const std::string &fname) {
|
||||
switch (multi_shm()->multiDetectorType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
if (fname.find(".pof") == std::string::npos) {
|
||||
throw RuntimeError("Programming file must be a pof file.");
|
||||
}
|
||||
|
@ -336,6 +336,7 @@ void slsDetector::initializeDetectorStructure(detectorType type) {
|
||||
shm()->roMode = ANALOG_ONLY;
|
||||
shm()->currentSettings = UNINITIALIZED;
|
||||
shm()->currentThresholdEV = -1;
|
||||
shm()->nASamples = 1;
|
||||
shm()->nFrames = 1;
|
||||
shm()->nTriggers = 1;
|
||||
shm()->nBursts = 1;
|
||||
@ -557,8 +558,8 @@ slsDetectorDefs::detectorType slsDetector::getDetectorType() const {
|
||||
}
|
||||
|
||||
void slsDetector::updateNumberOfChannels() {
|
||||
if (shm()->myDetectorType == CHIPTESTBOARD ||
|
||||
shm()->myDetectorType == MOENCH) {
|
||||
|
||||
if (shm()->myDetectorType == CHIPTESTBOARD) {
|
||||
|
||||
int nachans = 0, ndchans = 0;
|
||||
// analog channels (normal, analog/digital readout)
|
||||
@ -577,15 +578,29 @@ void slsDetector::updateNumberOfChannels() {
|
||||
}
|
||||
|
||||
// digital channels (ctb only, digital, analog/digital readout)
|
||||
if (shm()->myDetectorType == CHIPTESTBOARD &&
|
||||
(shm()->roMode == DIGITAL_ONLY ||
|
||||
shm()->roMode == ANALOG_AND_DIGITAL)) {
|
||||
if (shm()->roMode == DIGITAL_ONLY ||
|
||||
shm()->roMode == ANALOG_AND_DIGITAL) {
|
||||
ndchans = 64;
|
||||
FILE_LOG(logDEBUG1) << "#Digital Channels:" << ndchans;
|
||||
}
|
||||
shm()->nChan.x = nachans + ndchans;
|
||||
FILE_LOG(logDEBUG1) << "# Total #Channels:" << shm()->nChan.x;
|
||||
}
|
||||
|
||||
|
||||
else if (shm()->myDetectorType == MOENCH) {
|
||||
uint32_t mask = shm()->tenGigaEnable ? shm()->adcEnableMaskTenGiga : shm()->adcEnableMaskOneGiga;
|
||||
// count number of channels in x, each adc has 25 channels each
|
||||
int nchanTop = __builtin_popcount(mask & 0xF0F0F0F0) * 25;
|
||||
int nchanBot = __builtin_popcount(mask & 0x0F0F0F0F) * 25;
|
||||
shm()->nChan.x = nchanTop > 0 ? nchanTop : nchanBot;
|
||||
// if both top and bottom adcs enabled, rows = 2
|
||||
int nrows = 1;
|
||||
if (nchanTop > 0 && nchanBot > 0) {
|
||||
nrows = 2;
|
||||
}
|
||||
shm()->nChan.y = shm()->nASamples / 25 * nrows;
|
||||
}
|
||||
}
|
||||
|
||||
slsDetectorDefs::xy slsDetector::getNumberOfChannels() const {
|
||||
@ -807,11 +822,18 @@ void slsDetector::updateCachedDetectorVariables() {
|
||||
shm()->tenGigaEnable = static_cast<bool>(i32);
|
||||
}
|
||||
|
||||
// analog samples and adc enable masks
|
||||
if (shm()->myDetectorType == CHIPTESTBOARD ||
|
||||
shm()->myDetectorType == MOENCH) {
|
||||
// 1gb adcmask
|
||||
|
||||
// analog samples
|
||||
uint32_t u32 = 0;
|
||||
n += client.Receive(&u32, sizeof(u32));
|
||||
shm()->nASamples = u32;
|
||||
|
||||
// 1gb adcmask
|
||||
u32 = 0;
|
||||
n += client.Receive(&u32, sizeof(u32));
|
||||
shm()->adcEnableMaskOneGiga = u32;
|
||||
|
||||
// 10gb adcmask
|
||||
@ -1321,6 +1343,7 @@ int slsDetector::getNumberOfAnalogSamples() {
|
||||
void slsDetector::setNumberOfAnalogSamples(int value) {
|
||||
FILE_LOG(logDEBUG1) << "Setting number of analog samples to " << value;
|
||||
sendToDetector(F_SET_NUM_ANALOG_SAMPLES, value, nullptr);
|
||||
shm()->nASamples = value;
|
||||
// update #nchan, as it depends on #samples, adcmask
|
||||
updateNumberOfChannels();
|
||||
if (shm()->useReceiverFlag) {
|
||||
@ -1836,7 +1859,6 @@ std::string slsDetector::setReceiverHostname(const std::string &receiverIP) {
|
||||
|
||||
case MOENCH:
|
||||
setNumberOfAnalogSamples(getNumberOfAnalogSamples());
|
||||
setNumberOfDigitalSamples(getNumberOfDigitalSamples());
|
||||
enableTenGigabitEthernet(static_cast<int>(shm()->tenGigaEnable));
|
||||
setADCEnableMask(shm()->adcEnableMaskOneGiga);
|
||||
setTenGigaADCEnableMask(shm()->adcEnableMaskTenGiga);
|
||||
@ -2974,6 +2996,7 @@ void slsDetector::programFPGA(std::vector<char> buffer) {
|
||||
switch (shm()->myDetectorType) {
|
||||
case JUNGFRAU:
|
||||
case CHIPTESTBOARD:
|
||||
case MOENCH:
|
||||
programFPGAviaBlackfin(buffer);
|
||||
break;
|
||||
case MYTHEN3:
|
||||
|
@ -13,7 +13,7 @@
|
||||
class ServerInterface;
|
||||
|
||||
#define SLS_SHMAPIVERSION 0x190726
|
||||
#define SLS_SHMVERSION 0x200225
|
||||
#define SLS_SHMVERSION 0x200302
|
||||
|
||||
/**
|
||||
* @short structure allocated in shared memory to store detector settings for
|
||||
@ -80,6 +80,9 @@ struct sharedSlsDetector {
|
||||
/** detector threshold (eV) */
|
||||
int currentThresholdEV;
|
||||
|
||||
/** number of analog samples */
|
||||
int nASamples;
|
||||
|
||||
/** number of frames */
|
||||
int64_t nFrames;
|
||||
|
||||
@ -295,7 +298,7 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
|
||||
/**
|
||||
* Update total number of channels (chiptestboard or moench)
|
||||
* depending on the number of samples, adenablemask, readout flags(ctb)
|
||||
* depending on the number of samples, adcenablemask, readout flags(ctb)
|
||||
*/
|
||||
void updateNumberOfChannels();
|
||||
|
||||
@ -554,10 +557,10 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
/** [Jungfrau] Advanced */
|
||||
void setNumberOfAdditionalStorageCells(int value);
|
||||
|
||||
/** [CTB] */
|
||||
/** [CTB][Moench] */
|
||||
int getNumberOfAnalogSamples();
|
||||
|
||||
/** [CTB] */
|
||||
/** [CTB][Moench] */
|
||||
void setNumberOfAnalogSamples(int value);
|
||||
|
||||
/** [CTB] */
|
||||
@ -574,10 +577,10 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
|
||||
void setPeriod(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] */
|
||||
int64_t getDelayAfterTrigger();
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] */
|
||||
void setDelayAfterTrigger(int64_t value);
|
||||
|
||||
/** [Gotthard2] only in burst mode and in auto timing mode */
|
||||
@ -605,22 +608,22 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
* Options: (0-1638375 ns (resolution of 25ns) */
|
||||
void setStorageCellDelay(int64_t value);
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getNumberOfFramesLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3]
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getNumberOfTriggersLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB]
|
||||
/** [Gotthard][Jungfrau][CTB][Moench]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getDelayAfterTriggerLeft() const;
|
||||
|
||||
/** [Gotthard] */
|
||||
int64_t getExptimeLeft() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB][Mythen3][Gotthard2] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] */
|
||||
int64_t getPeriodLeft() const;
|
||||
|
||||
/** [Eiger] minimum two frames */
|
||||
@ -629,15 +632,15 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
/** [Eiger] */
|
||||
int64_t getMeasuredSubFramePeriod() const;
|
||||
|
||||
/** [Jungfrau][CTB][Mythen3]
|
||||
/** [Jungfrau][CTB][Moench][Mythen3]
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getNumberOfFramesFromStart() const;
|
||||
|
||||
/** [Jungfrau][CTB][Mythen3] Get time from detector start
|
||||
/** [Jungfrau][CTB][Moench][Mythen3] Get time from detector start
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getActualTime() const;
|
||||
|
||||
/** [Jungfrau][CTB][Mythen3] Get timestamp at a frame start
|
||||
/** [Jungfrau][CTB][Moench][Mythen3] Get timestamp at a frame start
|
||||
* [Gotthard2] only in continuous mode */
|
||||
int64_t getMeasurementTime() const;
|
||||
|
||||
@ -727,13 +730,13 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
bool getStoreInRamMode();
|
||||
|
||||
/**
|
||||
* Set readout mode (Only for CTB and Moench)
|
||||
* [Ctb]
|
||||
* @param mode readout mode Options: ANALOG_ONLY, DIGITAL_ONLY, ANALOG_AND_DIGITAL
|
||||
*/
|
||||
void setReadoutMode(const readoutMode mode);
|
||||
|
||||
/**
|
||||
* Get readout mode(Only for CTB and Moench)
|
||||
* [Ctb]
|
||||
* @returns readout mode
|
||||
*/
|
||||
readoutMode getReadoutMode();
|
||||
@ -1117,10 +1120,10 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
*/
|
||||
int64_t getReceiverRealUDPSocketBufferSize() const;
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] */
|
||||
void executeFirmwareTest();
|
||||
|
||||
/** [Gotthard][Jungfrau][CTB] */
|
||||
/** [Gotthard][Jungfrau][CTB][Moench] */
|
||||
void executeBusTest();
|
||||
|
||||
/** [Gotthard] */
|
||||
@ -1222,14 +1225,14 @@ class slsDetector : public virtual slsDetectorDefs {
|
||||
uint32_t getTenGigaADCEnableMask();
|
||||
|
||||
/**
|
||||
* Set ADC invert register (CTB, Moench)
|
||||
* Set ADC invert register (CTB, Moench, Jungfrau)
|
||||
* @param value ADC invert value
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
*/
|
||||
void setADCInvert(uint32_t value);
|
||||
|
||||
/**
|
||||
* Get ADC invert register (CTB, Moench)
|
||||
* Get ADC invert register (CTB, Moench, Jungfrau)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns ADC invert value
|
||||
*/
|
||||
|
Reference in New Issue
Block a user