GTS Ethernet Intel® FPGA Hard IP User Guide

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

A.4.3.2. Adjust RX UI

  1. Request sapshot of iitial RX TAM:
    cs_wite (ptp_uim_tam_sapshot.x_tam_sapshot, 1’b1)
  2. Read sapshotted iitial TAM ad coute values:
    x_tam_0_31_0 = cs_ead (ptp_x_uim_tam_ifo0.tam_31_0[31:0])
    x_tam_0_47_32 = cs_ead (ptp_x_uim_tam_ifo1.tam_47_32[15:0])
    x_tam_0_ct   = cs_ead (ptp_x_uim_tam_ifo1.tam_ct[30:16])
    x_tam_0_valid = cs_ead (ptp_x_uim_tam_ifo1.tam_valid[31])
    • If x_tam_0_valid = 1, complete TAM by cocateatig the iitial TAM values:
      x_tam_0 = {x_tam_0_47_32, x_tam_0_31_0};
    • If x_tam_0_valid = 0, estat fom step1.
  3. Statig fom time whe step 1 is executed, wait fo time duatio as specified i the Miimum ad Maximum Refeece Time (TAM) Iteval fo UI Measuemet (Hadwae) sectio.
  4. Request sapshot of Nth RX TAM:
    cs_wite (ptp_uim_tam_sapshot.x_tam_sapshot, 1’b1)
  5. Read sapshotted Nth TAM ad coute values:
    x_tam__31_0  = cs_ead (ptp_x_uim_ifo0.tam_31_0[31:0])
    x_tam__47_32 = cs_ead (ptp_x_uim_tam_ifo1.tam_47_32[15:0])
    x_tam__ct   = cs_ead (ptp_x_uim_tam_ifo1.tam_ct[30:16])
    x_tam__valid = cs_ead (ptp_x_uim_tam_ifo1.tam_valid[31])
    Fom the TAM by cocateatig sapshotted Nth TAM values:
    x_tam_ = {x_tam__47_32, x_tam__31_0};
  6. Check if thee was a lage chage to TOD value impactig TAM value:
    x_tam__valid = cs_ead (ptp_x_uim_tam_ifo1.tam_valid[31])

    If x_tam__valid = 0, estat step 1. If you used x_tam_ as a ew x_tam_0 ad x_tam__ct as a ew x_tam_0_ct, you ca skip step 1 ad 2. The, you ca stat the wait time i step 3 whe step 4 executes.

  7. Calculatio:
    1. Get TAM iteval
      x_tam_iteval = <Refe to Refeece Time Iteval>
      x_tam_iteval_pe_pl = x_tam_iteval / PL
    2. Calculate time elapsed:
      x_tam_delta = 
         (x_tam_ <= x_tam_0) ? [(x_tam_ + 10^9s) – x_tam_0] 
                                 : (x_tam_ – x_tam_0)
      Pe step 3, x_tam_0 ad x_tam_ diffeece must be withi the expected time age.
      Note: 10^9s = 48’h 3B9A_CA00_0000
    3. Calculate TAM cout value:
      x_tam_ct = (x_tam__ct < x_tam_0_ct) ? [(x_tam__ct + 2^15) – x_tam_0_ct]
      : (x_tam__ct – x_tam_0_ct)
      Pe step 3, x_tam_0 ad x_tam_ diffeece must be withi the expected time age.
      • If x_tam_ct (i ms) is lesse that the miimum time value specified by Numbe of Cout colum of Table: Miimum ad Maximum Refeece Time (TAM) Iteval Allowed fo UI Measuemet (Hadwae Basic Mode) ad Table: Miimum ad Maximum Refeece Time (TAM) Iteval Allowed fo UI Measuemet (Hadwae Advaced Mode) i the Miimum ad Maximum Refeece Time (TAM) Iteval fo UI Measuemet (Hadwae) sectio, discad the esult ad estat fom step 3.
      • If x_tam_ct (i ms) is geate tha the maximum value specified by Numbe of Cout colum of Table: Miimum ad Maximum Refeece Time (TAM) Iteval Allowed fo UI Measuemet (Hadwae Basic Mode) ad Table: Miimum ad Maximum Refeece Time (TAM) Iteval Allowed fo UI Measuemet (Hadwae Advaced Mode) i the Miimum ad Maximum Refeece Time (TAM) Iteval fo UI Measuemet (Hadwae) sectio, discad the esult ad estat fom step 1 o step 3 by usig x_tam_ as a ew x_tam_0.
    4. Calculate UI value:
      x_ui = (x_tam_delta) / (x_tam_ct * x_tam_iteval_pl)
  8. Wite the calculated UI value to IP:
    cs_wite (x_ptp_ui, x_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 the golde time-of-day i the system wheeve the clock ppm chages.