Trigger links error detector/correction
As observed in #50 (comment 6214366), the invalid and duplicated clusters may be explained by unstable communication to/from the OptoHybrid. Such instabilities should be detected and the appropriate action taken (e.g. discard all clusters for the given BX).
The detector note DN-20-016 proposes an error correction based on Hamming codes. It aims at correcting all 1-bit errors and detecting all 2-bits errors. It is worth noting that not all data is protected. On GE1/1, the ECC is not sent if more than 4 clusters are sent on the link, and on GE2/1, the ECC does not cover the whole message. Adding the ECC may also increase the trigger primitive latency by 1 BX.
Considering the unanticipated amount of errors, we may want to revisit the error protection mechanism in the trigger path. For example, an 8-bits CRC would allow the detection of all 4-bits errors and can be computed on the fly while sending data to the MGT, not contributing to any added latency. A combination of an ECC and CRC, or other correction codes, can also be envisioned.