![]() |
Project
|
#include <AlpideCoder.h>
Classes | |
struct | HitsRecord |
struct | PixLink |
Public Types | |
enum | VerifierMismatchResult { UNEXPECTED_MISMATCH , EXPECTED_MISMATCH , RESOLVED } |
Public Member Functions | |
AlpideCoder ()=default | |
~AlpideCoder ()=default | |
int | encodeChip (PayLoadCont &buffer, const o2::itsmft::ChipPixelData &chipData, uint16_t chipInModule, uint16_t bc, uint16_t roflags=0) |
void | addEmptyChip (PayLoadCont &buffer, int chipInMod, int bc) |
void | print () const |
void | reset () |
Static Public Member Functions | |
static bool | isData (uint16_t v) |
static bool | isData (uint8_t v) |
static bool | isEmptyChip (uint8_t b) |
static void | setNoisyPixels (const NoiseMap *noise) |
template<class T , typename CG > | |
static int | decodeChip (ChipPixelData &chipData, T &buffer, std::vector< uint16_t > &seenChips, CG cidGetter) |
decode alpide data for the next non-empty chip from the buffer | |
template<typename LG , typename CG > | |
static bool | verifyDecodedCable (std::map< int, ChipPixelData * > &seenChips, PayLoadCont &buffer, std::vector< uint16_t > &seenChipIDs, LG lidGetter, CG cidGetter) |
static VerifierMismatchResult | handleVerifierMismatch (PayLoadCont &buffer, PayLoadCont &reconstructedData, ChipPixelData *currentChip) |
static bool | isChipEmpty (uint8_t v) |
static bool | isChipHeader (uint8_t v) |
static bool | isChipTrailer (uint8_t v) |
static bool | isChipHeaderOrEmpty (uint8_t v) |
check if the byte corresponds to chip_header or chip_empty flag | |
static uint8_t | bc2TimeStamp (int bc) |
static uint16_t | timeStamp2BC (uint8_t ts) |
Static Public Attributes | |
static constexpr uint32_t | ExpectChipHeader = 0x1 << 0 |
static constexpr uint32_t | ExpectChipTrailer = 0x1 << 1 |
static constexpr uint32_t | ExpectChipEmpty = 0x1 << 2 |
static constexpr uint32_t | ExpectRegion = 0x1 << 3 |
static constexpr uint32_t | ExpectData = 0x1 << 4 |
static constexpr uint32_t | ExpectBUSY = 0x1 << 5 |
static constexpr uint32_t | ExpectNextChip = ExpectChipHeader | ExpectChipEmpty |
static constexpr int | NRows = 512 |
static constexpr int | RowMask = NRows - 1 |
static constexpr int | NCols = 1024 |
static constexpr int | NRegions = 32 |
static constexpr int | NDColInReg = NCols / NRegions / 2 |
static constexpr int | HitMapSize = 7 |
static constexpr uint32_t | MaskEncoder = 0x3c00 |
static constexpr uint32_t | MaskPixID = 0x3ff |
static constexpr uint32_t | MaskDColID = MaskEncoder | MaskPixID |
static constexpr uint32_t | MaskRegion = 0x1f |
static constexpr uint32_t | MaskChipID = 0x0f |
static constexpr uint32_t | MaskROFlags = 0x0f |
static constexpr uint8_t | MaskErrBusyViolation = 0x1 << 3 |
static constexpr uint8_t | MaskErrDataOverrun = 0x3 << 2 |
static constexpr uint8_t | MaskErrFatal = 0x7 << 1 |
static constexpr uint8_t | MaskErrFlushedIncomplete = 0x1 << 2 |
static constexpr uint8_t | MaskErrStrobeExtended = 0x1 << 1 |
static constexpr uint32_t | MaskTimeStamp = 0xff |
static constexpr uint32_t | MaskReserved = 0xff |
static constexpr uint32_t | MaskHitMap = 0x7f |
static constexpr uint32_t | REGION = 0xc0 |
static constexpr uint32_t | REGION_MASK = 0xe0 |
static constexpr uint32_t | CHIPHEADER = 0xa0 |
static constexpr uint32_t | CHIPTRAILER = 0xb0 |
static constexpr uint32_t | CHIPEMPTY = 0xe0 |
static constexpr uint32_t | DATALONG = 0x0000 |
static constexpr uint32_t | DATASHORT = 0x4000 |
static constexpr uint32_t | BUSYOFF = 0xf0 |
static constexpr uint32_t | BUSYON = 0xf1 |
static constexpr uint32_t | ERROR_MASK = 0xf0 |
static constexpr int | Error = -1 |
static constexpr int | EOFFlag = -100 |
Decoder / Encoder of ALPIDE payload stream. All decoding methods are static. Only a few encoding methods are non-static but can be made so if needed (will require to make the encoding buffers external to this class)
Definition at line 45 of file AlpideCoder.h.
Enumerator | |
---|---|
UNEXPECTED_MISMATCH | |
EXPECTED_MISMATCH | |
RESOLVED |
Definition at line 617 of file AlpideCoder.h.
|
default |
|
default |
|
inline |
Definition at line 755 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 748 of file AlpideCoder.h.
|
inlinestatic |
decode alpide data for the next non-empty chip from the buffer
Definition at line 128 of file AlpideCoder.h.
int AlpideCoder::encodeChip | ( | PayLoadCont & | buffer, |
const o2::itsmft::ChipPixelData & | chipData, | ||
uint16_t | chipInModule, | ||
uint16_t | bc, | ||
uint16_t | roflags = 0 |
||
) |
Definition at line 44 of file AlpideCoder.cxx.
|
inlinestatic |
Definition at line 623 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 737 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 738 of file AlpideCoder.h.
|
inlinestatic |
check if the byte corresponds to chip_header or chip_empty flag
Definition at line 742 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 739 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 113 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 114 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 122 of file AlpideCoder.h.
void AlpideCoder::print | ( | ) | const |
Definition at line 22 of file AlpideCoder.cxx.
void AlpideCoder::reset | ( | ) |
Definition at line 36 of file AlpideCoder.cxx.
Definition at line 124 of file AlpideCoder.h.
|
inlinestatic |
Definition at line 749 of file AlpideCoder.h.
|
inlinestatic |
Verifies the decoder by comparing the contents a cable by re-encoding seen chips back into the ALPIDE format.
Definition at line 469 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 108 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 109 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 105 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 103 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 104 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 106 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 107 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 117 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 116 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 110 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 75 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 72 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 70 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 71 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 74 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 76 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 73 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 82 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 89 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 87 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 85 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 91 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 92 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 93 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 94 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 95 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 98 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 86 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 88 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 97 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 90 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 96 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 79 of file AlpideCoder.h.
Definition at line 81 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 80 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 77 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 101 of file AlpideCoder.h.
|
staticconstexpr |
Definition at line 102 of file AlpideCoder.h.
Definition at line 78 of file AlpideCoder.h.