Skip to content
  • Pierre-Alain Loizeau's avatar
    In STS unpackers, use only unsigned for time storage and add fatal where neg. could happen · 7292ef48
    Pierre-Alain Loizeau authored and Florian Uhlig's avatar Florian Uhlig committed
    Bug 2: In both Legacy and current unpackers, a signed integer was used at some point to store/return the raw timestamp in clock cycles.
    While the last bit would probably never be reached in standard usage, it could lead to negative values and crazy results during the
    conversion through double (full precision time in ns) and back to unsigned integer (ns precision time) for data coming from badly
    synchronized setups
    
    Bug 3: In the current unpacker, the subtraction of the Timeslice start time from the TS_MSB value was not protected against the case of
    badly synchronized data where the TS_MSb does not match the Timeslice index. It now triggers a Fatal as these data are not recoverable
    with this unpacker.
    7292ef48