AN 888: PHY Lite for Parallel Interfaces Reference Design with Dynamic Reconfiguration for Intel® Stratix® 10 Devices

ID 683220
Date 9/11/2020
Document Table of Contents

1.5.2. Read Deskew Algorithm

The PHY Lite for Parallel Interfaces IP core does not come with any calibration engine or calibration algorithm.

The read deskew algorithm gives an idea how you can write any calibration algorithm to get an optimal margin of capturing data by center aligning DQS to all DQ. This algorithm calibrates the following knobs on input PHY Lite for Parallel Interfaces side.

Table 2.  Knob Step Size
Knob Unit Per Step
DQSen delay 1 external interface clock cycle.
DQSen phase 1/128th VCO clock cycle.
Input DQS 1/256th VCO clock cycle.
Input per-bit DQ 1/256th VCO clock cycle.
This algorithm consists of three steps:
  1. DQSen Calibration
    • Sweep through DQSen (delay + phase) settings from min to max
      for (cur_delay = PIN_DQS_EN_DLY_DLY_VAL_MIN; cur_dly <=
      PIN_DQS_EN_DLY_DLY_VAL_MAX; cur_dly++) {
          for (cur_phase = PIN_DQS_EN_PHASE_DLY_VAL_MIN; cur_phase <= PIN_DQS_EN_PHASE_DLY_VAL_MAX; cur_phase++) {
          //More code goes here
    • For each iteration, send 5 separate patterns on each pin to compare.
    • Find passing window width.
    • Set DQSen delay and DQSen phase of passing window to center.
  2. Per-bit DQ Deskew
    • Sweep individual dq_input_delay to find both right and left edge.
    • Set per-bit DQ to its center ((left edge + right edge)/2).
  3. DQS Deskew
    • Sweep dqs_input_delay from high to low.
    • Find passing window width and set DQS to center.