Zynq-7000 AP SoC and 7 Series FPGAs MIS v4.1
157
UG586 November 30, 2016
Chapter 1:
DDR3 and DDR2 SDRAM Memory Interface Solution
PRBS Read Leveling
This stage of read calibration follows the Read Leveling calibration stage. The
DQS
PHASER_IN fine tap setting determined during the Read Leveling calibration stage is used
as the starting point for this stage of calibration. The PRBS read leveling stage does not
change the
DQ
IDELAY tap settings determined during the Read Leveling calibration stage.
Complex pattern pre-loaded in a block RAM is written to the DDR3 SDRAM at the start of
this calibration stage. This sequence is then read back non-continuously to determine the
read data valid window. For each phaser in tap, read back happens multiple times
determined by internal sample count setting. The algorithm starts at the
DQS
PHASER_IN
fine tap setting determined during the Read Leveling calibration stage (initial tap value) and
decrements one tap at time until a data mismatch is found when comparing read data with
the expected data. Per-bit deskew scheme using FINEDELAY is also added to increase the
read valid margin. FINEDELAY is a part of IDELAY primitive. The algorithm starts edge
detection at PHASER_IN tap 0. It increments until it detects the valid pattern and records the
tap as left edge. The PHASER_IN taps are further increased until a data pattern mismatch is
found or tap value is 63 and this tap is recorded as right edge. The algorithm then computes
the center of the read data valid window based on the detected edges.
Dynamic Calibration and Periodic Read Behavior
The PHASER_IN performs two dynamic adjustments during reads. The first is within the
PHASER_IN DLL which needs to see
DQS
edges to keep the free-running frequency
reference clock phase align locked to the associated read
DQS
. This dynamic adjustment
only looks at the
DQS
edges and makes adjustments as required. The internal clock is used
at the end of the burst when there are no more
DQS
edges, but clocks are needed to get the
final data through the ISERDES.
The second dynamic adjustment is performed within the PHASER_IN to fine tune the
position of the
DQS
preamble for the subsequent read. This dynamic adjustment only looks
for the
DQS
preamble. It is needed to account for drift in the system which can move the
DQS
with respect to the internal clock.
Both of these PHASER_IN dynamic adjustments require periodic reads to ensure the
PHASER_IN is continually adjusted and ready for reads. Because of this, the MIG 7 series
DDR2/DDR3 controller sends periodic reads every 1 µs when the bus is idle or performing
writes. The PHASER_IN only requires read
DQS
. Therefore, if reads are being performed as
requested from the user interface, the controller does not send the periodic reads.
When the controller is writing and the 1 µs periodic reads are due, the reads are sent to the
address of the next read/write in the queue. When the controller is idle and no reads or
writes are requested, the periodic reads use the last address accessed. If this address has
been closed, an activate is required. Two back-to-back BL8 reads are required for the
dynamic alignment.
All of the dynamic adjustment is hard logic. However, the periodic reads sent to look at
DQS
is soft logic controlled by the MIG 7 series DDR2/DDR3 controller.