SFP+ support for PTP-core
Main goals:
- Monitor health of transcier
- Enhanced calibration for improved time accuracy
Means:
- Read out of additional Digital Diagnostic ADC values
- Storing of additional delays in the EEPROM of the SFP transceiver
Monitoring of health of transceiver
- Reading of voltage / current of transceiver
- Reading of temperature
- Reading of the RX power
- Reading of the TX power
Monitoring information must be send and stored in an external server
Enhanced calibration for improved time accuracy
Additional EEPROM calibration parameter storage:
- Transceiver nominal RX and TX delays
- Optical power dependent RX delay curve
- Temperature dependent delay
- Also: Version, Date and UID
By storing part of the delay in the SFP EEPROM, these transceivers can
be delay-calibrated.
Since all information is 'self contained'. When inserting a calibrated
SFP transceiver, no
additional calibration will be required.
The transceiver nominal delays can be set to 0 in systems with a
traditional, relative,
calibration scheme, or the difference in delay with regard to the
standard transceiver can
be set.
Each second the RX power can be measured, and the optical power
dependent delay can
be found using the power dependent delay curve, and included in the
round-trip delay
calculation.
The globally unique UIDs can be linked to calibration entity and
additional information
about the calibration, such as an official certificate, measurement
procedures, metrological
standards used and traceability information can be received from this
entity and linked to
the transceiver installed in the system.
Calibration EEPROM format
Will be stored in the user eeprom, located at A2h, bytes 128..247
Byte
+0 +1 +2 +3
+---------------------+---------------------+---------------------+---------------------+
0 | VERSION | CALIB. YEAR | CALIB. MONTH | CALIB. DAY |
+---------------------+---------------------+---------------------+---------------------+
4 | Organizationally Unique Identifier (Calib. resp.) | RX ref. dBm (signed)|
+-----------------------------------------------------------------+---------------------+
8 | TX: Electric => Optical delay (q16.16, ps) * |
+---------------------------------------------------------------------------------------+
12 | RX: Optical => Electric delay (q16.16, ps) * |
+---------------------------------------------------------------------------------------+
16 | Optical power dependent delay curve |
.. format under discussion ..
+---------------------------------------------------------------------------------------+
?? | Temperature dependent delay offset + scale |
.. format under discussion ..
+---------------------------------------------------------------------------------------+
All 16 and 32 bit values are stored in network byte order (big-endian).
* Delay is expected to be < 10 picoseconds
Caveats
LM32 Resources
In order to accurately calculate the RX delay, first the received power
must be known.
If a transceiver is internally calibrated, the RX value can simply be
read from the I2C
Digital Diagnostics register. However, otherwise a 5th order polynomial
must be evaluated,
using single precision floating point. The LM32 has no native float
support, as such
calculations will be slow, and additional libraries will need to be
loaded, which can amount
to an additional 5-10KB of code.
The second curve converts received power to a delay.
Solutions*
- Store the second curve as association to raw ADC values. Would limit needed resources, but may not be feasible.
- Offload most calculations to the Linux kernel. (just pass on the raw I2C values)
- Start the process of developing a new version with a more powerful MCU / memory space