Visible to Intel only — GUID: fhd1673376187041
Ixiasoft
Visible to Intel only — GUID: fhd1673376187041
Ixiasoft
5.5.6.4.1. DLL Locking
The DLL locking process consists of determining the number of delay elements in one clk_phy clock cycle or half cycle, depending on the DLL lock mode (full clock or half clock mode). Once this is determined, the dll_lock bit in the phy_dll_obs_reg_0 register is set. Also, the number of delay elements is reported in the dll_lock_value filed in the same register. The DLL uses this value to generate the DLL delayed output signals using the programmable deskew values in the configuration registers (that is, the delay applied to the output signal is proportional to the dll_lock_value).
DLL locking is controlled through the register interface. When the DLL is reset by asserting the PHY reset signal, the primary DLL performs a locking procedure starting with the programmed value in the param_dll_start_point field in the phy_dll_master_ctrl_reg register and the current frequency of operation. The param_dll_start_point field should be programmed with a value that does not exceed 7/8ths of a clock period given the worst-case element delay. For example, if the frequency is 200 MHz (5ns cycle time) with a worst-case element 80ps delay, this field should be set to = 5* (7/8) / .080 = 54 elements. With this setting, the primary DLL is guaranteed to correctly lock for all frequencies below 200 MHz and in any corner condition. Adjust this parameter to reduce the DLL lock time.
If the delay provided by the delay line is enough to cover a full clock cycle, the primary DLL is in full clock mode. In this case, the dll_lock_value in the phy_dll_obs_reg_0 register reports the number of delay elements in one full clock cycle. This number is used by the secondary delay line fractional settings to determine the number of elements of delay to add to the secondary delay lines. For example, if the dll_lock_value = 50 and the secondary delay line percentage = 25% (64/256), then the secondary delay line delay value = 50 * .25 = 12.5 elements (rounded to integer).
If the frequency of operation is such that the delay line is not long enough to accommodate a full cycle of delay, the primary DLL automatically detects this situation and switches to half clock mode. In this mode, the primary DLL attempts to lock when the delay in the delay line reaches a half-clock cycle. If lock is achieved in half clock mode, the secondary delay lines are automatically adjusted multiplying the dll_lock_value by 2 to represent the full cycle. There is no need to change the secondary delay settings based on the lock mode of the primary DLL. For example, if the dll_lock_value = 50 and the secondary delay line percentage = 25% (64/256), then the secondary delay line delay value = (50x2) * .25 = 25 elements.
Ideally, the phase detect delay should be just wide enough so that when in full clock mode, the first synchronizer in the phase detect captures a 1 and the second phase detect synchronizer captures a 0. The phase detect should not be so wide as to create a situation where there are multiple delay values of the secondary delay line that have the first synchronizer read a 0 and the second synchronizer read a 1. This would create more errors in the secondary delay lines. Conversely, if the phase detect is too narrow, the first and second phase detect synchronizer always return the same value. This would create an oscillation between adding or subtracting multiple increments or decrements. This would also increase the error in the secondary delay line settings since there would not be an accurate value of the number of delay elements in one cycle.
The delay configuration in the secondary delay lines for the signals generated by the DLL is done using the phy_dll_slave_ctrl_reg register. Each of the 8-bit fields corresponds to one of the DLL output signals shown in the DLL block diagram.
As an alternative to go through the DLL locking process to achieve the initial lock, we can also set the param_dll_bypass_mode bit in the phy_dll_master_ctrl_reg. When doing this, the dll_lock bit in the phy_dll_obs_reg_0 is forced to 1. In this case, only 1 delay element is applied in the primary delay line and the values set in the secondary delay lines become absolute instead of fractional delays.
Once DLL gets locked in any of the mechanisms described above, the dfi_init_complete signal is asserted. The primary DLL remains locked until this signal is reset (by clearing PHY reset or DLL reset).