Zynq-7000 AP SoC and 7 Series FPGAs MIS v4.1
604
UG586 November 30, 2016
Chapter 4:
LPDDR2 SDRAM Memory Interface Solution
The OUT_FIFO outputs the 4-bit data to the OSERDES in the OCLKDIV domain that is half
the frequency of the LPDDR2 SDRAM clock. The OSERDES further serializes the 4-bit data to
a serial DDR data stream in the OCLK domain. The PHASER_OUT clock output OCLK is used
to clock DQ bits whereas the OCLK_DELAYED output is used to clock DQS to achieve the 90°
phase offset between DQS and its associated DQ bits during writes.
The IN_FIFO shown in
receives 4-bit data from each DQ bit ISERDES in a given
byte group and writes them into the storage array. This 4-bit parallel data is output in the
PHY_Clk clock domain which is 1/2 the frequency of the LPDDR2 SDRAM clock. Each read
cycle from the IN_FIFO contains half the byte data read during a burst length eight memory
read transaction. Therefore, two cycles are required to get burst length eight worth of data.
The data bus width input to the dedicated PHY is 4x that of the LPDDR2 SDRAM when
running the FPGA logic at 1/2 the frequency of the LPDDR2 SDRAM clock.
Calibration and Initialization Stages
Memory Initialization
The PHY executes a JEDEC
®
-compliant LPDDR2 initialization sequence for memory
following deassertion of system reset. Each LPDDR2 SDRAM has a series of mode registers,
accessed through mode register write (MRW) commands. These mode registers determine
various SDRAM behaviors, such as burst length, read and write CAS latency, and others. The
particular bit values programmed into these registers are configurable in the PHY and
determined by the values of top-level HDL parameters like BURST_MODE (BL), BURST_TYPE,
CAS latency (CL), CAS write latency (CWL), write recovery for auto precharge (tWR).
Read Leveling
Read leveling stage 1 is required to center align the read strobe in the read valid data
window for the first stage of capture. In strobe-based memory interfaces like LPDDR2
SDRAM, the second stage transfer requires an additional pulse which in 7 series FPGAs is
provided by the PHASER_IN block. This stage of calibration uses the PHASER_IN stage 2 fine
delay line to center the capture clock in the valid DQ window. The capture clock is the
free-running FREQ_REF clock. A PHASER_IN provides two clock outputs namely ICLK and
ICLKDIV. ICLK is the stage 2 delay output and ICLKDIV is the rising edge aligned divided by
2 version of ICLK.
The ICLK and ICLKDIV outputs of one PHASER_IN block are used to clock all the DQ ISERDES
associated with one byte. The ICLKDIV is also the write clock for the read DQ IN_FIFOs. One
PHASER_IN block is associated with a group of 12 I/Os. Each I/O bank in the 7 series FPGA
has four PHASER_IN blocks, and hence four bytes for LPDDR2 SDRAM can be placed in a
bank.