Orion
high-rate readout
feconfig.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
8 
9 extern itk::Logger logdb;
10 
11 namespace itk::db::itkpix {
12 
13  // YARR calibration parameters
14  struct calib_yarr_t : public calib_t {
15  uint8_t IrefTrim; // Iref trim bit
16  double ADCcalPar[3]; // mV = [1]*x + [0], R_IMUX = [2]
17  double InjCap; // fF
18  double KSenseInA; // Multiplicator of IinA
19  double KSenseInD; // Multiplicator of IinD
20  double KSenseShuntA; // Multiplicator of IshuntA
21  double KSenseShuntD; // Multiplicator of IshuntD
22  double KShuntA; // kFactor of the analog shunt circuit
23  double KShuntD; // kFactor of the digital shunt circuit
24  double NfACB; // MOS temperature sensor : center
25  double NfASLDO; // MOS temperature sensor : analog SLDO
26  double NfDSLDO; // MOS temperature sensor : digital SLDO
27  double NtcCalPar[3]; // Steinhart coefficients
28  double VcalPar[2]; // mV = [1]*x + [0]
29  };
30 
31  struct chip_t {
32  std::string name;
33  uint8_t chip_id;
34  regmem_t* regmem;
35  pixmem_t* pixmem;
36  calib_t* calib;
37  };
38 
39  struct frontend_t {
40  uint8_t fe_num;
41  chip_t* chip;
42  netio_tag_t tx_fid;
43  netio_tag_t rx_fid;
44  };
45 
46  // Two types of modules:
47  // • Quad modules: 4 FEs bump bonded to one sensor; Layer 1, 2, 3 and 4
48  // • Triplet modules: 3 single-FE bare modules connected to the same flex; Layer 0
49 
50  struct module_t {
51  std::string name;
52  uint8_t type;
53  std::vector<frontend_t> fe; // 3 or 4
54  };
55 
56 
57  void dump(chip_t& chip) {
58  logdb.info(" name: {}", chip.name);
59 
60  if (!chip.regmem) { logdb.info(" regmem: nullptr"); } else
61  if (dynamic_cast<regmem1_t*>(chip.regmem)) { logdb.info(" regmem: <regmem1>"); } else
62  if (dynamic_cast<regmem2_t*>(chip.regmem)) { logdb.info(" regmem: <regmem2>"); } else {
63  logdb.info(" regmem: <unknown>");
64  }
65 
66  if (!chip.pixmem) { logdb.info(" pixmem: nullptr"); } else
67  if (dynamic_cast<pixmem_t*>(chip.pixmem)) { logdb.info(" pixmem: <pixmem>"); } else {
68  logdb.info(" pixmem: <unknown>");
69  }
70 
71  if (!chip.calib) { logdb.info(" calib: nullptr"); } else
72  if (dynamic_cast<calib_yarr_t*>(chip.calib)) { logdb.info(" calib: <calib_yarr>"); } else {
73  logdb.info(" calib: <unknown>");
74  }
75  }
76 
77  void dump(frontend_t& fe) {
78  logdb.info("Front-End");
79  logdb.info(" fe_num: {}", fe.fe_num);
80  if (!fe.chip) { logdb.info(" chip: nullptr"); } else {
81  logdb.info(" chip:");
82  dump(*fe.chip);
83  }
84  logdb.info(" tx_fid: 0x{:x}", fe.tx_fid);
85  logdb.info(" rx_fid: 0x{:x}", fe.rx_fid);
86  }
87 
88 
89 } // itk::db::pixel
Logger class definition, wrapper around CoreLogger, adds templated methods for different logging leve...
Definition: logger.hpp:108
void info(fmt::format_string< Args... > fmt, Args &&...args)
Logs a message with information level.
Definition: logger.hpp:148
Common constants and structures for ITkPix chip.
Definition: itkpix.hpp:27
Definition: feconfig.hpp:14
Definition: feconfig.hpp:31
Definition: feconfig.hpp:39
Definition: feconfig.hpp:50
Definition: itkpix.hpp:20
Definition: itkpix.hpp:24