DDR3 SDRAM in Stratix III Devices Design Flow
Page 25
© November 2008
Altera Corporation
AN 436: Using DDR3 SDRAM in Stratix III and Stratix IV Devices
f
For more information on calibration blocks, refer to the
Stratix III Device I/O Features
chapter in the
Stratix III Device Handbook
, the
ALTOCT Megafunction User Guide
, and
AN 465: Implementing OCT Calibration in Stratix III Devices
Instantiate PHY and Controller in a Quartus II Project
After selecting the appropriate device and memory type, create a project in the
Quartus
®
II software that targets the device and memory type.
When instantiating the datapath for DDR3 SDRAM interfaces in Stratix III devices,
Altera recommends that you use the ALTMEMPHY megafunction for the datapath
and PHY. The ALTMEMPHY megafunction features a license-free PHY that you may
use with the Altera SDRAM high-performance controllers or your own custom
controller.
The Altera high-performance controllers automatically include the ALTMEMPHY
megafunction. Even if you plan to use your own controller, Altera recommends that
you first create a design using a SDRAM high-performance controller and then
replace the Altera controller with your own controller. This method gives you an
example design, which you can simulate and verify on your own PCB.
f
For more information about instantiating the PHY, refer to the
PHY Interface (ALTMEMPHY) Megafunction User Guide.
Perform Board-Level Simulations and Line Simulation
This design flow indicates that you determine board design constraints and perform
board-level simulations at the end of the flow. However, Altera recommends
prelayout SI simulations (line simulations) should take place before board layout and
that you use these parameters and rules during the initial design development cycle.
Advanced I/O timing and board trace models now directly impact device timing
closure.
Add Constraints
The next step in the design flow is to add the timing, location, and physical
constraints related to the external memory interface. These constraints include timing,
pin locations, I/O standards, and pin loading assignments. The ALTMEMPHY
megafunction only supports timing analysis using the TimeQuest Timing Analyzer
with Synopsys Design Constraints (
.sdc
) assignments. These constraints are derived
from the parameters you entered for the ALTMEMPHY megafunction or the SDRAM
high-performance controller, based on the DDR3 SDRAM data sheet and tolerances
from the board layout. The ALTMEMPHY megafunction uses TimeQuest timing
constraints and the timing driven fitter to achieve timing closure.
After instantiating the ALTMEMPHY megafunction, the ALTMEMPHY MegaWizard
®
generates the following files that you need to properly constrain the design:
■
<
variation_name
>_phy_ddr_timing.sdc to set timing constraints
■
<
variation_name
>_pin_assignments.tcl to add I/O standard setting assignments
■
<
variation_name
>_phy_assign_dq_groups.tcl to add the DQ group assignments to
relate the DQ and DQS pin groups together for the Quartus II fitter to place them
correctly