Orion
high-rate readout
|
ITkPix command frame makers and parsers. More...
Go to the source code of this file.
Functions | |
uint8_t | itk::itkpix::cmd::enc_data (uint8_t data5) |
Encode data. More... | |
uint8_t | itk::itkpix::cmd::enc_trig (uint8_t trig) |
Encode 4 BC trigger pattern. More... | |
uint8_t | itk::itkpix::cmd::enc_tag (uint8_t tag) |
Encode trigger tag. More... | |
bool | itk::itkpix::cmd::is_data_tag (uint8_t tag) |
Check if data tag. More... | |
bool | itk::itkpix::cmd::is_trig_tag (uint8_t tag) |
Check if trigger tag. More... | |
bool | itk::itkpix::cmd::is_cmd_tag (uint8_t tag) |
Check if command tag. More... | |
bool | itk::itkpix::cmd::is_data (uint8_t code) |
Check if encoded symbol is data. More... | |
bool | itk::itkpix::cmd::is_trig (uint8_t code) |
Check if encoded symbol is trigger. More... | |
bool | itk::itkpix::cmd::is_cmd (uint8_t code) |
Check if encoded symbol is command. More... | |
uint8_t | itk::itkpix::cmd::encode5b (uint8_t data5) |
Encode 5-bit data to 8-bit. More... | |
uint16_t | itk::itkpix::cmd::encode10b (uint8_t data5a, uint8_t data5b) |
Encode two 5-bit data to 16-bit command frame. More... | |
uint16_t | itk::itkpix::cmd::encode10b (uint32_t data) |
Encodes only lowest 10 bits. More... | |
uint8_t | itk::itkpix::cmd::decode8b (uint8_t code) |
Decoding encoded symbol. More... | |
auto | itk::itkpix::cmd::decode16b (uint16_t frame) |
Decode command frame. More... | |
uint32_t | itk::itkpix::cmd::decode_data (uint16_t frame) |
uint16_t | itk::itkpix::cmd::make_head (uint8_t cmd, uint8_t chip_id) |
auto | itk::itkpix::cmd::parse_head (uint16_t frame) |
std::array< uint16_t, 1 > | itk::itkpix::cmd::make_idle () |
Make idle frame. More... | |
std::array< uint16_t, 1 > | itk::itkpix::cmd::make_sync () |
Make sync frame. More... | |
std::array< uint16_t, 1 > | itk::itkpix::cmd::make_trig (uint8_t bc, uint8_t tag) |
Make trigger command, if bc = 0 returns IDLE frame. More... | |
auto | itk::itkpix::cmd::parse_trig (std::array< uint16_t, 1 > frames) |
Parse trigger command. More... | |
std::array< uint16_t, 1 > | itk::itkpix::cmd::make_clear (uint8_t chip_id) |
Make 'clear' command. More... | |
auto | itk::itkpix::cmd::parse_clear (std::array< uint16_t, 1 > frames) |
Parse 'clear' command. More... | |
std::array< uint16_t, 2 > | itk::itkpix::cmd::make_read_trig (uint8_t chip_id, uint8_t ext_tag) |
Make 'ReadTrigger' command. More... | |
auto | itk::itkpix::cmd::parse_read_trig (std::array< uint16_t, 2 > frames) |
Parse 'ReadTrigger' command. More... | |
std::array< uint16_t, 1 > | itk::itkpix::cmd::make_global (uint8_t chip_id) |
auto | itk::itkpix::cmd::parse_global (std::array< uint16_t, 1 > frames) |
std::array< uint16_t, 3 > | itk::itkpix::cmd::make_calib (uint8_t chip_id, uint8_t edg_mode, uint8_t edg_delay, uint8_t edg_width, uint8_t aux_mode, uint8_t aux_delay) |
'Cal' command format: More... | |
auto | itk::itkpix::cmd::parse_calib (std::array< uint16_t, 3 > frames) |
Parse 'Cal' command. More... | |
std::array< uint16_t, 2 > | itk::itkpix::cmd::make_read_reg (uint8_t chip_id, uint16_t addr) |
'ReadReg' command format More... | |
auto | itk::itkpix::cmd::parse_read_reg (std::array< uint16_t, 2 > frames) |
Parse 'ReadReg' command. More... | |
std::array< uint16_t, 4 > | itk::itkpix::cmd::make_write_reg (uint8_t chip_id, uint16_t addr, uint16_t data) |
Write register command. More... | |
auto | itk::itkpix::cmd::parse_write_reg (std::array< uint16_t, 4 > frames) |
Parse 'WriteReg' command. More... | |
std::array< uint16_t, 2 > | itk::itkpix::cmd::make_write_pix_start (uint8_t chip_id) |
Start of multi-write to pixel portal 'PIX_PORTAL'. More... | |
auto | itk::itkpix::cmd::parse_write_pix_start (std::array< uint16_t, 2 > frames) |
Parse multi-write start command. More... | |
uint16_t | itk::itkpix::cmd::make_write_pix_next (uint16_t data) |
Variables | |
itk::Logger | itk::itkpix::cmd::log |
const uint16_t | itk::itkpix::cmd::SYNC = 0x817E |
sync and idle (pll_lock) words More... | |
const uint16_t | itk::itkpix::cmd::IDLE = 0xAAAA |
idle command | |
constexpr uint8_t | itk::itkpix::cmd::TAG_CALIB = 32 |
Symbols. More... | |
constexpr uint8_t | itk::itkpix::cmd::TAG_CLEAR = 33 |
'Clear' command tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_GLOBAL = 34 |
'GlobalPulse' command tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_PLLLOCK = 35 |
'Pll Lock' tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_REGRD = 36 |
'Read Register' command tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_TRIGRD = 37 |
'Read Trigger' command tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_REGWR = 53 |
'Write Register' command tag | |
constexpr uint8_t | itk::itkpix::cmd::TAG_TRIG0 = 37 |
pseudo-tag for bc = '0000' | |
constexpr uint8_t | itk::itkpix::cmd::TAG_TRIG1 = 38 |
Trigger tag for bc ='000T'. | |
constexpr uint8_t | itk::itkpix::cmd::TAG_TRIGF = TAG_TRIG1 + 15 |
Trigger tag for bc = 'TTTT'. | |
constexpr uint8_t | itk::itkpix::cmd::PLLLOCK = enc_symb[TAG_PLLLOCK] |
Commands. More... | |
constexpr uint8_t | itk::itkpix::cmd::TRIGRD = enc_symb[TAG_TRIGRD] |
0x69 | |
constexpr uint8_t | itk::itkpix::cmd::CLEAR = enc_symb[TAG_CLEAR] |
0x5A | |
constexpr uint8_t | itk::itkpix::cmd::GLOBAL = enc_symb[TAG_GLOBAL] |
0x5C | |
constexpr uint8_t | itk::itkpix::cmd::CALIB = enc_symb[TAG_CALIB] |
0x63 | |
constexpr uint8_t | itk::itkpix::cmd::REGWR = enc_symb[TAG_REGWR] |
0x66 | |
constexpr uint8_t | itk::itkpix::cmd::REGRD = enc_symb[TAG_REGRD] |
0x65 | |
ITkPix command frame makers and parsers.
|
inline |
Decode command frame.
frame | - 16-bit command frame |
|
inline |
Decoding encoded symbol.
code | - encoded symbol |
|
inline |
Encode data.
data5 | - 5-bit data symbol |
|
inline |
Encode trigger tag.
tag | - trigger tag [0..53] |
|
inline |
Encode 4 BC trigger pattern.
trig | - trigger pattern in 4 BC |
|
inline |
Encodes only lowest 10 bits.
data | - data, only last 10 bits are used |
|
inline |
Encode two 5-bit data to 16-bit command frame.
data5a | - 5-bit data (a) |
data5b | - 5-bit data (b) |
|
inline |
Encode 5-bit data to 8-bit.
data5 | - 5-bit data |
|
inline |
Check if encoded symbol is command.
code | - encoded symbol |
|
inline |
Check if command tag.
tag | - symbol tag |
|
inline |
Check if encoded symbol is data.
code | - encoded symbol |
|
inline |
Check if data tag.
tag | - symbol tag |
|
inline |
Check if encoded symbol is trigger.
code | - encoded symbol |
|
inline |
Check if trigger tag.
tag | - symbol tag |
|
inline |
'Cal' command format:
i | - chip_id[5] |
m | - edge_mode |
d | - edge_delay[5] |
w | - edge_width[8] |
a | - aux_mode |
b | - aux_delay[5] |
[cmd].iiiii mdddd.dwwww wwwwa.bbbbb
Make 'Cal' command.
chip_id | |
edg_mode | |
edg_delay | |
edg_width | |
aux_mode | |
aux_delay |
|
inline |
Make 'clear' command.
chip_id | - chip id |
|
inline |
Make idle frame.
|
inline |
'ReadReg' command format
i | - chip_id[5] |
a | - addr[9] |
[cmd].iiiii | 0aaaa.aaaaa |
Make 'ReadReg' command.
chip_id | |
addr |
|
inline |
Make 'ReadTrigger' command.
chip_id | - 5-bit chip id |
ext_tag | - 8-bit extended tag |
|
inline |
Make sync frame.
|
inline |
Make trigger command, if bc = 0 returns IDLE frame.
bc | - 4-bit BC |
tag | - trigger tag [0..53] |
|
inline |
Start of multi-write to pixel portal 'PIX_PORTAL'.
Multi-register write 'WrReg'
i | - chip_id[5] |
chip_id | - 5-bit chip id |
|
inline |
Write register command.
i - id[5], a - addr[9], d - data[16]
[cmd].iiiii 0aaaa.aaaaa ddddd.ddddd ddddd.d0000
|
inline |
Parse 'Cal' command.
frames | - 3 command frames |
|
inline |
Parse 'clear' command.
frame | - 16-bit command frame |
|
inline |
Parse 'ReadReg' command.
frames | - 2 command frames |
|
inline |
Parse 'ReadTrigger' command.
frames | - 2 command frames |
|
inline |
Parse trigger command.
frame | - 16-bit command frame |
|
inline |
Parse multi-write start command.
frames | - input frames[2] |
|
inline |
Parse 'WriteReg' command.
frames[4] | - 10-bit decoded commands |
|
constexpr |
Commands.
0xAA
const uint16_t itk::itkpix::cmd::SYNC = 0x817E |
sync and idle (pll_lock) words
sync command
|
constexpr |
Symbols.
'Calib' command tag