
Board Timing Guidelines
Lattice Semiconductor
for the DDR SDRAM Controller IP Core
18-7
Hold Calculation
Min Delay of command signals Data to DDR = tCCTRL (min) + tBDCTRL + tCK * 1/2
Min Delay of Clock to DDR = tDDR_CLK (min) + tBDC + tSKEW + tDH
To meet hold time at DDR memory, Data Delay - Clock Delay > 0
Therefore:
tCCTRL (min) + tBDCTRL + tCK * 1/2 - tDDR_CLK (min) - tBDC - tSKEW - tDH > 0
Isolating the board delays, we get:
tBDCTRL - tBDC > - tCCTRL (min) - tCK * 1/2 + tDDR_CLK (min) + tSKEW + tDH
tBDCTRL - tBDC > -2.147 - 3.75 + (1.138) + 0.3 + 0.75
tBDCTRL - tBDC > -3.709
tBDCTRL - tBDC > -3.709 ns
Conclusion: To meet set-up and hold timings of command signals, board delay of command signals ddr_clk and
ddr_clk_n should be:
-3.709 ns < (tBDCTRL - tBDC) < 0.336 ns
Board Design Guidelines
The ddr_clk and ddr_clk_n pads should be placed adjacent to each other in the FPGA to get similar
internal FPGA delays.
The ddr_clk and ddr_clk_n trace delays on the board should be matched.
The DQ trace delays can be calculated using the following formula, for memory reads:
tSKEW + tFDH - tAC (min) - tPD - tDDR_CLK + tFPGA_CLK < (tBDD + tBDC) < (tCK * 1/2) - tSKEW - tFDS - tAC (max) - tPD -
tDDR_CLK + tFPGA_CLK
The DQ and DQS trace lengths should be balanced and matching to get maximum set-up/hold time during
memory writes.
The address and control signals for the DDR SDRAM are generated on the negative edge of the FPGA
clock. The trace lengths for address and control lines are calculated using following equation:
-tCCTRL - tCK * 1/2 + tDDR_CLK + tSKEW + tDH < (tBDCTRL - tBDC) < tDDR_CLK + tCK * 1/2 - tSKEW - tDS - tCCTRL + tBDC
As shown in
Figure 18-1, both FPGA internal clock and ddr_clk are generated by a single PLL. It may be
difficult to meet read data Set-up and hold timing with a single PLL. As shown in
Figure 18-5, a two-PLL
clocking scheme is proposed to meet read data set-up and hold timing. Adjusting feedback delay of PLL2
can control delay of pll_mclk. Increasing delay on pll_mclk can increase the read set-up margin but it
also decreases the hold margin. To get better timing, skew between ddr_clk and pll_mclk has to be
minimized.