diff --git a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h index c2c87312f..0a149f7a2 100644 --- a/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h +++ b/slsDetectorServers/mythen3DetectorServer/RegisterDefs.h @@ -13,20 +13,30 @@ /* Base addresses 0x1806 0000 ---------------------------------------------*/ /* General purpose control and status registers */ -#define BASE_CONTROL (0x0000) // 0x1806_0000 - 0x1806_00FF https://git.psi.ch/sls_detectors_firmware/mythen_III_mcb/blob/master/code/hdl/ctrl/ctrl.vhd +#define BASE_CONTROL (0x0000) // 0x1806_0000 - 0x1806_00FF +// https://git.psi.ch/sls_detectors_firmware/mythen_III_mcb/blob/master/code/hdl/ctrl/ctrl.vhd /* ASIC Control */ #define BASE_ASIC (0x0100) // 0x1806_0100 - 0x1806_010F + /* ASIC Digital Interface. Data recovery core */ -#define BASE_ADIF (0x0110) // 0x1806_0110 - 0x1806_011F https://git.psi.ch/sls_detectors_firmware/vhdl_library/blob/2e81ccbdbc5cb81813ba190fbdba43e8d6884eb9/adif/adif_ctrl.vhd +#define BASE_ADIF (0x0110) // 0x1806_0110 - 0x1806_011F +// https://git.psi.ch/sls_detectors_firmware/vhdl_library/blob/2e81ccbdbc5cb81813ba190fbdba43e8d6884eb9/adif/adif_ctrl.vhd /* Formatting of data core */ #define BASE_FMT (0x0120) // 0x1806_0120 - 0x1806_012F + +/* Packetizer */ +#define BASE_PKT (0x0140) // 0x1806_0140 - 0x1806_014F +// https://git.psi.ch/sls_detectors_firmware/mythen_III_mcb/blob/master/code/hdl/pkt/pkt_ctrl.vhd + /* Pattern control and status registers */ -#define BASE_PATTERN_CONTROL (0x00200) // 0x1806_0200 - 0x1806_02FF https://git.psi.ch/sls_detectors_firmware/vhdl_library/blob/2e81ccbdbc5cb81813ba190fbdba43e8d6884eb9/pattern_flow/pattern_flow_ctrl.vhd +#define BASE_PATTERN_CONTROL (0x00200) // 0x1806_0200 - 0x1806_02FF +// https://git.psi.ch/sls_detectors_firmware/vhdl_library/blob/2e81ccbdbc5cb81813ba190fbdba43e8d6884eb9/pattern_flow/pattern_flow_ctrl.vhd /* UDP datagram generator */ #define BASE_UDP_RAM (0x01000) // 0x1806_1000 - 0x1806_1FFF + /* Pattern RAM. Pattern table */ #define BASE_PATTERN_RAM (0x10000) // 0x1807_0000 - 0x1807_FFFF @@ -119,6 +129,30 @@ +/* Packetizer -------------------------------------------------------------*/ + +/* Packetizer Config Register */ +#define PKT_CONFIG_REG (0x00 * REG_OFFSET + BASE_PKT) + +#define PKT_CONFIG_NRXR_MAX_OFST (0) +#define PKT_CONFIG_NRXR_MAX_MSK (0x0000003F << PKT_CONFIG_NRXR_MAX_OFST) +#define PKT_CONFIG_RXR_START_ID_OFST (8) +#define PKT_CONFIG_RXR_START_ID_MSK (0x0000003F << PKT_CONFIG_RXR_START_ID_OFST) + +/* Module Coordinates Register */ +#define COORD_0_REG (0x02 * REG_OFFSET + BASE_PKT) +#define COORD_ROW_OFST (0) +#define COORD_ROW_MSK (0x0000FFFF << COORD_ROW_OFST) +#define COORD_COL_OFST (16) +#define COORD_COL_MSK (0x0000FFFF << COORD_COL_OFST) + +/* Module ID Register */ +#define COORD_1_REG (0x03 * REG_OFFSET + BASE_PKT) +#define COORD_RESERVED_OFST (0) +#define COORD_RESERVED_MSK (0x0000FFFF << COORD_RESERVED_OFST) +#define COORD_ID_OFST (16) // Not connected in firmware TODO +#define COORD_ID_MSK (0x0000FFFF << COORD_ID_OFST) // Not connected in firmware TODO + /* Pattern Control registers --------------------------------------------------*/ @@ -184,6 +218,9 @@ /* External Signal register */ #define EXT_SIGNAL_REG (0x30 * REG_OFFSET + BASE_PATTERN_CONTROL) +#define EXT_SIGNAL_OFST (0) +#define EXT_SIGNAL_MSK (0x00000001 << EXT_SIGNAL_OFST) + /* Trigger Delay 64 bit register */ #define SET_TRIGGER_DELAY_LSB_REG (0x32 * REG_OFFSET + BASE_PATTERN_CONTROL) #define SET_TRIGGER_DELAY_MSB_REG (0x33 * REG_OFFSET + BASE_PATTERN_CONTROL) diff --git a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer index b389ffb25..5332cc928 100755 Binary files a/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer and b/slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServer_developer differ diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c index 024418968..9104144d0 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorFunctionList.c @@ -21,6 +21,7 @@ // Global variable from slsDetectorServer_funcs extern int debugflag; extern udpStruct udpDetails; +extern const enum detectorType myDetectorType; int initError = OK; int initCheckDone = 0; @@ -706,11 +707,27 @@ int setHighVoltage(int val){ /* parameters - timing */ void setTiming( enum timingMode arg){ - // to be implemented + if(arg != GET_TIMING_MODE){ + switch((int)arg){ + case AUTO_TIMING: + FILE_LOG(logINFO, ("Set Timing: Auto\n")); + bus_w(EXT_SIGNAL_REG, bus_r(EXT_SIGNAL_REG) & ~EXT_SIGNAL_MSK); + break; + case TRIGGER_EXPOSURE: + FILE_LOG(logINFO, ("Set Timing: Trigger\n")); + bus_w(EXT_SIGNAL_REG, bus_r(EXT_SIGNAL_REG) | EXT_SIGNAL_MSK); + break; + default: + FILE_LOG(logERROR, ("Unknown timing mode %d\n", arg)); + return; + } + } } enum timingMode getTiming() { - return AUTO_TIMING; + if (bus_r(EXT_SIGNAL_REG) == EXT_SIGNAL_MSK) + return TRIGGER_EXPOSURE; +return AUTO_TIMING; } @@ -835,6 +852,43 @@ void calcChecksum(udp_header* udp) { udp->ip_checksum = checksum; } +int setDetectorPosition(int pos[]) { + memcpy(detPos, pos, sizeof(detPos)); + + uint32_t addr = COORD_0_REG; + int value = 0; + int valueRead = 0; + int ret = OK; + + // row + value = detPos[X]; + bus_w(addr, (bus_r(addr) &~COORD_ROW_MSK) | ((value << COORD_ROW_OFST) & COORD_ROW_MSK)); + valueRead = ((bus_r(addr) & COORD_ROW_MSK) >> COORD_ROW_OFST); + if (valueRead != value) { + FILE_LOG(logERROR, ("Could not set row. Set %d, read %d\n", value, valueRead)); + ret = FAIL; + } + + // col + value = detPos[Y]; + bus_w(addr, (bus_r(addr) &~COORD_COL_MSK) | ((value << COORD_COL_OFST) & COORD_COL_MSK)); + valueRead = ((bus_r(addr) & COORD_COL_MSK) >> COORD_COL_OFST); + if (valueRead != value) { + FILE_LOG(logERROR, ("Could not set column. Set %d, read %d\n", value, valueRead)); + ret = FAIL; + } + + if (ret == OK) { + FILE_LOG(logINFO, ("\tPosition set to [%d, %d]\n", detPos[X], detPos[Y])); + } + + return ret; +} + +int* getDetectorPosition() { + return detPos; +} + /* pattern */ uint64_t readPatternWord(int addr) { @@ -1052,6 +1106,22 @@ void setPatternLoop(int level, int *startAddr, int *stopAddr, int *nLoop) { } } +void setPatternMask(uint64_t mask) { + set64BitReg(mask, PATTERN_MASK_LSB_REG, PATTERN_MASK_MSB_REG); +} + +uint64_t getPatternMask() { + return get64BitReg(PATTERN_MASK_LSB_REG, PATTERN_MASK_MSB_REG); +} + +void setPatternBitMask(uint64_t mask) { + set64BitReg(mask, PATTERN_SET_LSB_REG, PATTERN_SET_MSB_REG); +} + +uint64_t getPatternBitMask() { + return get64BitReg(PATTERN_SET_LSB_REG, PATTERN_SET_MSB_REG); +} + int checkDetectorType() { FILE_LOG(logINFO, ("Checking type of module\n")); FILE* fd = fopen(TYPE_FILE_NAME, "r"); @@ -1280,15 +1350,6 @@ int getClockDivider(enum CLKINDEX ind) { /* aquisition */ -int setDetectorPosition(int pos[]) { - memcpy(detPos, pos, sizeof(detPos)); - return OK; -} - -int* getDetectorPosition() { - return detPos; -} - int startStateMachine(){ #ifdef VIRTUAL // create udp socket @@ -1327,22 +1388,70 @@ void* start_timer(void* arg) { getNumTriggers() ); int64_t exp_ns = getExpTime(); + int numCounters = __builtin_popcount(getCounterMask()); + int dr = setDynamicRange(-1); + int imagesize = NCHAN_1_COUNTER * NCHIP * numCounters * + ((dr > 16) ? 4 : // 32 bit + ((dr > 8) ? 2 : // 16 bit + ((dr > 4) ? 0.5 : // 4 bit + 0.125))); // 1 bit + int datasize = imagesize / PACKETS_PER_FRAME; + int packetsize = datasize + sizeof(sls_detector_header); - int frameNr = 0; + // Generate data + char imageData[imagesize]; + memset(imageData, 0, imagesize); + { + int i = 0; + for (i = 0; i < imagesize; i += sizeof(uint8_t)) { + *((uint8_t*)(imageData + i)) = i; + } + } + + int frameNr = 1; // loop over number of frames - for(frameNr=0; frameNr!= numFrames; ++frameNr ) { + for (frameNr = 0; frameNr != numFrames; ++frameNr) { //check if virtual_stop is high if(virtual_stop == 1){ break; } + + int srcOffset = 0; + // sleep for exposure time struct timespec begin, end; clock_gettime(CLOCK_REALTIME, &begin); usleep(exp_ns / 1000); - clock_gettime(CLOCK_REALTIME, &end); + + // loop packet + { + int i = 0; + for(i = 0; i!=PACKETS_PER_FRAME; ++i) { + char packetData[packetsize]; + memset(packetData, 0, packetsize); + + // set header + sls_detector_header* header = (sls_detector_header*)(packetData); + header->frameNumber = frameNr + 1; + header->packetNumber = i; + header->modId = 0; + header->row = detPos[X]; + header->column = detPos[Y]; + header->detType = (uint16_t)myDetectorType; + header->version = SLS_DETECTOR_HEADER_VERSION - 1; + + // fill data + memcpy(packetData + sizeof(sls_detector_header), imageData + srcOffset, datasize); + srcOffset += datasize; + + sendUDPPacket(0, packetData, packetsize); + } + } + FILE_LOG(logINFO, ("Sent frame: %d\n", frameNr)); // calculate time left in period + clock_gettime(CLOCK_REALTIME, &end); int64_t time_ns = ((end.tv_sec - begin.tv_sec) * 1E9 + (end.tv_nsec - begin.tv_nsec)); @@ -1458,7 +1567,7 @@ u_int32_t runBusy() { return virtual_status; #endif u_int32_t s = (bus_r(PAT_STATUS_REG) & PAT_STATUS_RUN_BUSY_MSK); - FILE_LOG(logDEBUG1, ("Status Register: %08x\n", s)); + //FILE_LOG(logDEBUG1, ("Status Register: %08x\n", s)); return s; } diff --git a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h index 4ec09e64f..01fdc5d99 100644 --- a/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h +++ b/slsDetectorServers/mythen3DetectorServer/slsDetectorServer_defs.h @@ -8,7 +8,8 @@ /* Hardware Definitions */ #define NCOUNTERS (3) -#define MAX_COUNTER_MSK (0x7) +#define MAX_COUNTER_MSK (0x7) +#define NCHAN_1_COUNTER (128) #define NCHAN (128 * NCOUNTERS) #define NCHIP (10) #define NDAC (16) @@ -97,4 +98,5 @@ typedef struct udp_header_struct { uint16_t udp_checksum; uint16_t udp_destport; } udp_header; -#define UDP_IP_HEADER_LENGTH_BYTES (28) \ No newline at end of file +#define UDP_IP_HEADER_LENGTH_BYTES (28) +#define PACKETS_PER_FRAME (2) \ No newline at end of file diff --git a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h index 1932dbe03..2429ca973 100755 --- a/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h +++ b/slsDetectorServers/slsDetectorServer/include/slsDetectorFunctionList.h @@ -429,6 +429,10 @@ uint64_t writePatternWord(int addr, uint64_t word); int setPatternWaitAddress(int level, int addr); uint64_t setPatternWaitTime(int level, uint64_t t); void setPatternLoop(int level, int *startAddr, int *stopAddr, int *nLoop); +void setPatternMask(uint64_t mask); +uint64_t getPatternMask(); +void setPatternBitMask(uint64_t mask); +uint64_t getPatternBitMask(); int checkDetectorType(); int powerChip (int on); int setPhase(enum CLKINDEX ind, int val, int degrees); diff --git a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c index d494ffbb9..984daa0f1 100755 --- a/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c +++ b/slsDetectorServers/slsDetectorServer/src/slsDetectorServer_funcs.c @@ -3190,7 +3190,7 @@ int set_pattern_mask(int file_des) { return printSocketReadError(); FILE_LOG(logDEBUG1, ("Set Pattern Mask to %d\n", arg)); -#if (!defined(MOENCHD)) && (!defined(CHIPTESTBOARDD)) +#if !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) functionNotImplemented(); #else // only set @@ -3211,7 +3211,7 @@ int get_pattern_mask(int file_des) { FILE_LOG(logDEBUG1, ("Get Pattern Mask\n")); -#if (!defined(MOENCHD)) && (!defined(CHIPTESTBOARDD)) +#if !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) functionNotImplemented(); #else // only get @@ -3231,7 +3231,7 @@ int set_pattern_bit_mask(int file_des) { return printSocketReadError(); FILE_LOG(logDEBUG1, ("Set Pattern Bit Mask to %d\n", arg)); -#if (!defined(MOENCHD)) && (!defined(CHIPTESTBOARDD)) +#if !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) functionNotImplemented(); #else // only set @@ -3252,7 +3252,7 @@ int get_pattern_bit_mask(int file_des){ FILE_LOG(logDEBUG1, ("Get Pattern Bit Mask\n")); -#if (!defined(MOENCHD)) && (!defined(CHIPTESTBOARDD)) +#if !defined(MOENCHD) && !defined(CHIPTESTBOARDD) && !defined(MYTHEN3D) functionNotImplemented(); #else // only get diff --git a/slsDetectorSoftware/include/Detector.h b/slsDetectorSoftware/include/Detector.h index 4ee1e2dc2..3348c7dc8 100644 --- a/slsDetectorSoftware/include/Detector.h +++ b/slsDetectorSoftware/include/Detector.h @@ -1100,52 +1100,54 @@ class Detector { /** [CTB] */ void setPatternClockControl(uint64_t word, Positions pos = {}); - /** [CTB] same as executing */ + /** [CTB] same as executing + * [Mythen3] */ Result getPatternWord(int addr, Positions pos = {}); /** [CTB] Caution: If word is -1 reads the addr (same as - * executing the pattern) */ + * executing the pattern) + * [Mythen3] */ void setPatternWord(int addr, uint64_t word, Positions pos = {}); - /**[CTB] Options: level: -1 (complete pattern) and 0-2 levels + /**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 levels * @returns array of start address and stop address */ Result> getPatternLoopAddresses(int level, Positions pos = {}) const; - /** [CTB] Options: level: -1 (complete pattern) and 0-2 levels */ + /** [CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 levels */ void setPatternLoopAddresses(int level, int start, int stop, Positions pos = {}); - /**[CTB] Options: level: -1 (complete pattern) and 0-2 levels + /**[CTB][Mythen3] Options: level: -1 (complete pattern) and 0-2 levels * @returns number of loops */ Result getPatternLoopCycles(int level, Positions pos = {}) const; - /** [CTB] n: 0-2, level: -1 (complete pattern) and 0-2 levels */ + /** [CTB][Mythen3] n: 0-2, level: -1 (complete pattern) and 0-2 levels */ void setPatternLoopCycles(int level, int n, Positions pos = {}); - /* [CTB] */ + /* [CTB][Mythen3] */ Result getPatternWaitAddr(int level, Positions pos = {}) const; - /** [CTB] Options: level 0-2 */ + /** [CTB][Mythen3] Options: level 0-2 */ void setPatternWaitAddr(int level, int addr, Positions pos = {}); - /** [CTB] */ + /** [CTB][Mythen3] */ Result getPatternWaitTime(int level, Positions pos = {}) const; - /** [CTB] Options: level 0-2 */ + /** [CTB][Mythen3] Options: level 0-2 */ void setPatternWaitTime(int level, uint64_t t, Positions pos = {}); - /** [CTB] */ + /** [CTB][Mythen3] */ Result getPatternMask(Positions pos = {}); - /** [CTB] Sets the mask applied to every pattern to the selected bit mask */ + /** [CTB][Mythen3] Sets the mask applied to every pattern to the selected bit mask */ void setPatternMask(uint64_t mask, Positions pos = {}); - /** [CTB] */ + /** [CTB][Mythen3] */ Result getPatternBitMask(Positions pos = {}) const; - /** [CTB] Sets the bitmask that the mask will be applied to for every + /** [CTB][Mythen3] Sets the bitmask that the mask will be applied to for every * pattern */ void setPatternBitMask(uint64_t mask, Positions pos = {}); diff --git a/slsDetectorSoftware/src/CmdProxy.cpp b/slsDetectorSoftware/src/CmdProxy.cpp index 452b66609..588a31375 100644 --- a/slsDetectorSoftware/src/CmdProxy.cpp +++ b/slsDetectorSoftware/src/CmdProxy.cpp @@ -1475,7 +1475,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] 64 bit pattern at " + os << "[step or address] [64 bit mask]\n\t[Ctb][Mythen3] 64 bit pattern at " "address of pattern memory." << '\n'; } else if (action == defs::GET_ACTION) { @@ -1501,17 +1501,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] Limits of complete " + os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of complete " "pattern." << '\n'; } else if (cmd == "patloop0") { - os << "[start addr] [stop addr] \n\t[Ctb] Limits of loop 0." + os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 0." << '\n'; } else if (cmd == "patloop1") { - os << "[start addr] [stop addr] \n\t[Ctb] Limits of loop 1." + os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 1." << '\n'; } else if (cmd == "patloop2") { - os << "[start addr] [stop addr] \n\t[Ctb] Limits of loop 2." + os << "[start addr] [stop addr] \n\t[Ctb][Mythen3] Limits of loop 2." << '\n'; } else { throw sls::RuntimeError( @@ -1556,11 +1556,11 @@ std::string CmdProxy::PatternLoopCycles(int action) { os << cmd << ' '; if (action == defs::HELP_ACTION) { if (cmd == "patnloop0") { - os << "[n_cycles] \n\t[Ctb] Number of cycles of loop 0." << '\n'; + os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 0." << '\n'; } else if (cmd == "patnloop1") { - os << "[n_cycles] \n\t[Ctb] Number of cycles of loop 1." << '\n'; + os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 1." << '\n'; } else if (cmd == "patnloop2") { - os << "[n_cycles] \n\t[Ctb] Number of cycles of loop 2." << '\n'; + os << "[n_cycles] \n\t[Ctb][Mythen3] Number of cycles of loop 2." << '\n'; } else { throw sls::RuntimeError( "Unknown command, use list to list all commands"); @@ -1601,11 +1601,11 @@ std::string CmdProxy::PatternWaitAddress(int action) { os << cmd << ' '; if (action == defs::HELP_ACTION) { if (cmd == "patwait0") { - os << "[addr] \n\t[Ctb] Wait 0 address." << '\n'; + os << "[addr] \n\t[Ctb][Mythen3] Wait 0 address." << '\n'; } else if (cmd == "patwait1") { - os << "[addr] \n\t[Ctb] Wait 1 address." << '\n'; + os << "[addr] \n\t[Ctb][Mythen3] Wait 1 address." << '\n'; } else if (cmd == "patwait2") { - os << "[addr] \n\t[Ctb] Wait 2 address." << '\n'; + os << "[addr] \n\t[Ctb][Mythen3] Wait 2 address." << '\n'; } else { throw sls::RuntimeError( "Unknown command, use list to list all commands"); @@ -1646,11 +1646,11 @@ std::string CmdProxy::PatternWaitTime(int action) { os << cmd << ' '; if (action == defs::HELP_ACTION) { if (cmd == "patwaittime0") { - os << "[n_clk] \n\t[Ctb] Wait 0 time in clock cycles." << '\n'; + os << "[n_clk] \n\t[Ctb][Mythen3] Wait 0 time in clock cycles." << '\n'; } else if (cmd == "patwaittime1") { - os << "[n_clk] \n\t[Ctb] Wait 1 time in clock cycles." << '\n'; + os << "[n_clk] \n\t[Ctb][Mythen3] Wait 1 time in clock cycles." << '\n'; } else if (cmd == "patwaittime2") { - os << "[n_clk] \n\t[Ctb] Wait 2 time in clock cycles." << '\n'; + os << "[n_clk] \n\t[Ctb][Mythen3] Wait 2 time in clock cycles." << '\n'; } else { throw sls::RuntimeError( "Unknown command, use list to list all commands"); diff --git a/slsDetectorSoftware/src/CmdProxy.h b/slsDetectorSoftware/src/CmdProxy.h index 199020ad2..239cfca64 100644 --- a/slsDetectorSoftware/src/CmdProxy.h +++ b/slsDetectorSoftware/src/CmdProxy.h @@ -1651,10 +1651,10 @@ class CmdProxy { "[64 bit mask]\n\t[Ctb] 64 bit mask defining output clock enable."); INTEGER_COMMAND_HEX(patmask, getPatternMask, setPatternMask, stoulHex, - "[64 bit mask]\n\t[Ctb] 64 bit mask applied to every pattern. Only these bits for each pattern will be masked against."); + "[64 bit mask]\n\t[Ctb][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] 64 bit values applied to the selected patmask for every pattern."); + "[64 bit mask]\n\t[Ctb][Mythen3] 64 bit values applied to the selected patmask for every pattern."); /* Moench */ diff --git a/slsDetectorSoftware/src/slsDetector.h b/slsDetectorSoftware/src/slsDetector.h index df2edad33..02b765524 100755 --- a/slsDetectorSoftware/src/slsDetector.h +++ b/slsDetectorSoftware/src/slsDetector.h @@ -1753,16 +1753,16 @@ class slsDetector : public virtual slsDetectorDefs { uint64_t setPatternClockControl(uint64_t word = -1); /** - * Writes a pattern word (CTB/ Moench) + * Writes a pattern word (CTB/ Moench/ Mythen3) * @param addr address of the word * @param word 64bit word to be written, -1 reads the addr (same as - * executing the pattern) + * executing the pattern for ctb) * @returns actual value */ uint64_t setPatternWord(int addr, uint64_t word); /** - * Sets the pattern or loop limits (CTB/ Moench) + * Sets the pattern or loop limits (CTB/ Moench/ Mythen3) * @param level -1 complete pattern, 0,1,2, loop level * @param start start address for level 0-2, -1 gets * @param stop stop address for level 0-2, -1 gets @@ -1772,7 +1772,7 @@ class slsDetector : public virtual slsDetectorDefs { int stop = -1); /** - * Sets the pattern or loop limits (CTB/ Moench) + * Sets the pattern or loop limits (CTB/ Moench/ Mythen3) * @param level -1 complete pattern, 0,1,2, loop level * @param n number of loops for level 0-2, -1 gets * @returns number of loops @@ -1781,7 +1781,7 @@ class slsDetector : public virtual slsDetectorDefs { /** - * Sets the wait address (CTB/ Moench) + * Sets the wait address (CTB/ Moench/ Mythen3) * @param level 0,1,2, wait level * @param addr wait address, -1 gets * @returns actual value @@ -1789,7 +1789,7 @@ class slsDetector : public virtual slsDetectorDefs { int setPatternWaitAddr(int level, int addr = -1); /** - * Sets the wait time (CTB/ Moench) + * Sets the wait time (CTB/ Moench/ Mythen3) * @param level 0,1,2, wait level * @param t wait time, -1 gets * @returns actual value @@ -1797,27 +1797,27 @@ class slsDetector : public virtual slsDetectorDefs { uint64_t setPatternWaitTime(int level, uint64_t t = -1); /** - * Sets the mask applied to every pattern (CTB/ Moench) + * Sets the mask applied to every pattern (CTB/ Moench/ Mythen3) * @param mask mask to be applied */ void setPatternMask(uint64_t mask); /** - * Gets the mask applied to every pattern (CTB/ Moench) + * Gets the mask applied to every pattern (CTB/ Moench/ Mythen3) * @returns mask set */ uint64_t getPatternMask(); /** * Selects the bits that the mask will be applied to for every pattern (CTB/ - * Moench) + * Moench/ Mythen3) * @param mask mask to select bits */ void setPatternBitMask(uint64_t mask); /** * Gets the bits that the mask will be applied to for every pattern (CTB/ - * Moench) + * Moench/ Mythen3) * @returns mask of bits selected */ uint64_t getPatternBitMask(); diff --git a/slsSupportLib/include/versionAPI.h b/slsSupportLib/include/versionAPI.h index 43809b2f1..f19d17165 100644 --- a/slsSupportLib/include/versionAPI.h +++ b/slsSupportLib/include/versionAPI.h @@ -8,5 +8,5 @@ #define APIGOTTHARD 0x191127 #define APIJUNGFRAU 0x191127 #define APICTB 0x191210 -#define APIMYTHEN3 0x200120 #define APIEIGER 0x200121 +#define APIMYTHEN3 0x200121