GTS Ethernet Intel® FPGA Hard IP User Guide

ID 817676
Date 10/12/2024
Public
Document Table of Contents

A.4.3.1. Adjust TX UI

  1. Request sapshot of iitial TX TAM:
    cs_wite (ptp_uim_tam_sapshot.tx_tam_sapshot, 1’b1)
  2. Read sapshotted iitial TAM ad coute values:
    tx_tam_0_31_0 = cs_ead (ptp_tx_uim_tam_ifo0.tam_31_0[31:0])
    tx_tam_0_47_32 = cs_ead (ptp_tx_uim_tam_ifo1.tam_47_32[15:0])
    tx_tam_0_ct   = cs_ead (ptp_tx_uim_tam_ifo1.tam_ct[30:16])
    tx_tam_0_valid = cs_ead (ptp_tx_uim_tam_ifo1.tam_valid[31])
    • If tx_tam_0_valid = 1, complete TAM by cocateatig the iitial TAM values:
      tx_tam_0 = {tx_tam_0_47_32, tx_tam_0_31_0};
    • If tx_tam_0_valid = 0, estat fom Step1.
  3. Statig fom the time whe step 1 is executed, wait fo time duatio as specified i sectio Miimum ad Maximum Refeece Time (TAM) Iteval fo UI Measuemet (Hadwae).
  4. Request sapshot of Nth TX TAM:
    cs_wite (ptp_uim_tam_sapshot.tx_tam_sapshot, 1’b1)
  5. Read sapshotted Nth TAM ad coute values:
    tx_tam__31_0 = cs_ead (ptp_tx_uim_ifo0.tam_31_0[31:0])
    tx_tam__47_32 = cs_ead (ptp_tx_uim_tam_ifo1.tam_47_32[15:0])
    tx_tam__ct   = cs_ead (ptp_tx_uim_tam_ifo1.tam_ct[30:16])
    tx_tam__valid = cs_ead (ptp_tx_uim_tam_ifo1.tam_valid[31])
    Fom the TAM by cocateatig sapshotted Nth TAM values:
    tx_tam_ = {tx_tam__47_32, tx_tam__31_0};
  6. Check if thee was a lage chage to TOD value impactig TAM value:
    tx_tam__valid = cs_ead (ptp_tx_uim_tam_ifo1.tam_valid[31])

    If tx_tam__valid = 0, estat fom Step 1. If you used tx_tam_ as tx_tam_0 ad tx_tam__ct as tx_tam_0_ct, you ca skip Steps 1 ad 2. The, you ca stat the wait time i Step 3 whe the Step 4 executes.

  7. Calculatio:
    1. Get TAM iteval:
      tx_tam_iteval = <Refe to Refeece Time Iteval>
      tx_tam_iteval_pe_pl = tx_tam_iteval / PL
    2. Calculate time elapsed:
      tx_tam_delta = 
         (tx_tam_ <= tx_tam_0) ? [(tx_tam_ + 10^9 s) – tx_tam_0] 
                                : (tx_tam_ – tx_tam_0)
      Pe Step 3, tx_tam_0 ad tx_tam_ diffeece must be withi the expected time age.
      • If tx_tam_delta (i ms) is lesse that the miimum time value specified by Time (ms) colum of Table: Table 63, discad the esult ad estat fom step 3.
      • If tx_tam_delta (i ms) is geate tha the maximum value specified by Time (ms) colum of Table: Table 63, discad the esult ad estat fom step 1.
      Note: 10^9 s = 48’h 3B9A_CA00_0000
    3. Calculate TAM cout value:
      tx_tam_ct = (tx_tam__ct < tx_tam_0_ct) ? [(tx_tam__ct + 2^15) – tx_tam_0_ct] 
       : (tx_tam__ct – tx_tam_0_ct)
      Pe Step 3, tx_tam_0 ad tx_tam_ diffeece must be withi the expected time age.
      • If tx_tam_ct (i ms) is lesse that the miimum time value specified by Numbe of Cout colum of Table: Table 63, discad the esult ad estat fom step 3.
      • If tx_tam_ct (i ms) is geate tha the maximum value specified by Numbe of Cout colum of Table: Table 63, discad the esult ad estat fom step 1.
    4. Calculate UI value:
      tx_ui = (tx_tam_delta) / (tx_tam_ct * tx_tam_iteval_pe_pl)
  8. Wite the calculated UI value to IP:
    cs_wite (tx_ptp_ui, tx_ui)

    Esue the fomat is {4-bit aosecods, 28-bit factioal aosecods}.

  9. Afte fist UI measuemet, fo evey miimum TAM iteval o loge duatio, epeat step 1 to 8. This is to pevet time coute dift fom golde TOD i the system wheeve clock PPM chages.