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
Address A2H
===========
+------+--------+-----------------+-------------------------------------------------------------+
| A2H | #Bytes | Name | Description |
+------+--------+-----------------+-------------------------------------------------------------+
| Page 00h |
+------+--------+-----------------+-------------------------------------------------------------+
| 128 | 1 | Version | The version number of the calibration. Current version = 1 |
| 129 | 1 | Calib.Year | Year of calibration, offset from 2000 |
| 130 | 1 | Calib.Month | Month of calibration 1 - 12 |
| 131 | 1 | Calib.Day | Day of calibration 1-31 |
| 132 | 4 | OUI resp. | Organizationally Unique Identifier (Calibration responsible)|
| 136 | 4 | Elec Opt Dly | TX: Electric => Optical delay (q16.16, ps) |
| 140 | 4 | Opt Elec Dly | RX: Optical => Electric delay (q16.16, ps) |
| 144 | 4 | Rx_Pwr_Dly(0) | RX Optical power dependent delay, single precision float |
| 148 | 4 | Rx_Pwr_Dly(1) | RX Optical power dependent delay, single precision float |
| 152 | 4 | Rx_Pwr_Dly(2) | RX Optical power dependent delay, single precision float |
| 156 | 4 | Rx_Pwr_Dly(3) | RX Optical power dependent delay, single precision float |
| 160 | 4 | Rx_Pwr_Dly(4) | RX Optical power dependent delay, single precision float |
| 164 | 2 | T_Detun(Offset) | Temperature de-tuning, q7.8 |
| 166 | 2 | T_Detun(Slope) | Temperature de-tuning, q7.8 |
+------+--------+-----------------+-------------------------------------------------------------+
All 16 and 32 bit values are stored in network byte order (big-endian).
- Delay is expected to be < 10 picoseconds
Version
The version is the version of the calibration EEPROM format. For this specification it is 1
Calibration date
This is the date the calibration was executed.
OUI resp.
The ID organization responsible for the calibration.
Elec Opt Dly
Fixed electric to optical (TX) delay, in picoseconds, using fixed point 16.16 format. This gives 1/2^16 picoseconds granularity and a range from 0..65ns.
Opt Elc Dly
Optical to electrical delay (RX), in picoseconds, using fixed point 16.16 format. This gives 1/2^16 picoseconds granularity and a range from 0..65ns.
Rx_Pwr_Dly
Rx power delay curve. Input is Rx_PWR (see SFF-8472, 9.3), which is the received power in uW, output is the delay in ps. For internally calibrated SFPs the fixed point ADC value must be converted to float first.
Rx_Pwr_Dly (ps) = Rx_Pwr_Dly(4) * Rx_PWR^4 (float) +
Rx_Pwr_Dly(3) * Rx_PWR^3 (float) +
Rx_Pwr_Dly(2) * Rx_PWR^2 (float) +
Rx_Pwr_Dly(1) * Rx_PWR^1 (float) +
Rx_Pwr_Dly(0)
T_Detun
Temperature dependent wavelength de-tuning, with respect to the specified wavelength.
Input is the calibrated temperature in fixed point 7.8 format. For internally calibrated this is the ADC value, for externally calibrated this is the output of the equation 1 from sFF-8472, 9.3. Output is fixed point 7.8 value in steps of 0.1nm. This means the detuning can range from -12.8nm up to 12.7nm, from the specified wavelength.
T_Detun (0.1nm) = T_Detun(Slope) * T(C) + T_Detun(Offset)
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