Success! Subscription added.
Success! Subscription removed.
Sorry, you must verify to complete this action. Please click the verification link in your email. You may re-send via your profile.
This page describe how to implement an 8-bit wide, 150-MHz, 300-Mbps DDR2 SDRAM full-rate interface using the ALTDQ_DQS megafunction integrated with a few other megafunctions. The design targets the EP3SL150F1152C2 device, and an 8-bit wide 256-MB Micron MT47H32M8BP-3:B 333 MHz DDR2 SDRAM component.
The design specifications are listed in the table below.
Attribute | Specification |
---|---|
Quartus II version | 11.0 |
FPGA device | EP3SL150F1152C2 |
External memory device | DDR2 SDRAM (Micron MT47H32M8BP-3:B) |
External memory speed | 333 MHz |
IP used | ALTDQ_DQS, ALTPLL, ALTDLL, ALTIOBUF |
Figure 1 shows the example interface between the Stratix III EP3SL150F1152C2 device and an 8-bit wide 256-MB Micron MT47H32M8BP-3:B 333-MHz DDR2 SDRAM component. The CK, CK_N, CK_E, CS_N, RAS_N, CAS_N, WE_N, ODT, DM, BA[2:0], and ADDR[14:0] signals are output-only signals. DQ[7:0], DQS and DQS_N are bidirectional signals.
This section describes the steps required to instantiate a custom physical layer (PHY) implemented using Altera's megafunctions, as well as a custom designed controller. This design example is in Verilog HDL and consists of one top-level module or instance that connects 19 sub-modules or instances for a complete customized DDR2 interface with an SDRAM.
Create a project in the Quartus II software that targets the EP3SL150F1152C2 device by performing the following steps.
This design example uses the ALTPLL megafunction to implement two PLLs that clock the entire full-rate interface. Use the MegaWizard Plug-In Manager to instantiate two ALTPLL megafunctions with the following parameters:
pll_1:
pll_2:
This design example uses the ALTDLL megafunction to instantiate a DLL of the correct operational frequency (DQS signal frequency) of the custom external memory. This frequency setting depends on the bandwidth you want. Use the MegaWizard Plug-In Manager to instantiate a variations of the ALTDLL megafunction with the following parameters:
dll_1:
Next, you configure the settings for the dedicated circuitry for external memory interfaces using the ALTDQ_DQS megafunction. This custom DDR2 external memory interface consists of the following:
The following section describes how to instantiate a variation of the ALTDQ_DQS megafunction with the correct parameter settings on each individual pages of the ALTDQ_DQS MegaWizard Plug-In Manager.
Page 3: Parameter Settings page
Page 3 of the ALTDQ_DQS MegaWizard Plug-In Manager is the Parameter Settings page. To configure the general settings for the ALTDQ_DQS instance, specify the options shown in the table below.
Option | Value |
---|---|
Number of bidirectional DQ | 8. There are 8 bidirectional DQ pins. |
Number of input DQ | 0. Not used. |
Number of output DQ | 1. There is 1 output only DM pin. |
Number of stages in dqs_delay_chain | 3. This enables the DQS strobe signal to be centered with the DQ data (DQS signal must be +90° phase shifted) |
DQS input frequency | Enter 150 MHz |
Use half-rate components | Turn off this option. |
Use dynamic OCT path | Turn off this option. |
Page 4: DQS IN Advanced Options page
Page 4 of the ALTDQ_DQS MegaWizard Plug-In Manager is the DQS IN Advanced Options page. To configure the DQS input path of the ALTDQ_DQS instance, set the options shown in Table 2–2.
Option | Value |
---|---|
Enable DQS Input Path | Turn on this option. |
Delay chain usage: | Select the Enable dqs_delay_chain option. |
Advanced Delay Chain Options (DQS Delay Chain Phase Setting Options) | Turn off the Select dynamically using configuration registers option. |
Advanced Delay Chain Options (DQS Delay Chain Phase Setting Options) | Select the DLL option. |
Advanced Delay Chain Options (DQS Delay Buffer Mode) | Select the Low option. |
Advanced Delay Chain Options (DQS Phase Shift) | Enter 9,000. |
Advanced Delay Chain Options (Enable DQS offset control) | Turn off this option. |
Advanced Delay Chain Options (Enable DQS delay chain latches) | Turn on this option. |
Enable DQS busout delay chain | Turn on this option. |
Enable DQS enable block | Turn on this option. |
Enable DQS enable control block | Turn on this option. |
Advanced Enable Control Options (DQS Enable Control Phase Setting) | Select the Set statically to ‘0’ option. |
Advanced enable control options (DQS Enable Control Invert Phase) | Select the Never option. |
Enable DQS enable block delay chain | Turn on this option. |
Page 5: DQS OUT/OE Advanced Options page
Page 5 of the ALTDQ_DQS MegaWizard Plug-In Manager is the DQS OUT/OE Advanced Options page. To configure the DQS OUTPUT and DQS OE path of the ALTDQ_DQS instance, select the options shown in Table 2–3.
Option | Value |
---|---|
Enable DQS output path | Turn on this option |
DQS Output Path Options (Enable DQS output delay chain1) | Turn on this option |
DQS Output Path Options (Enable DQS output delay chain2) | Select the DDIO option |
DQS Output Path Options (DQS output register mode) | Select the DDIO option |
DQS Output Enable Options (Enable DQS output enable) | Turn on this option |
DQS Output Enable Options (Enable DQS output enable delay chain1) | Turn on this option |
DQS Output Enable Options (Enable DQS output enable delay chain2) | Turn on this option |
DQS Output Enable Options (DQS output enable register mode) | Select the FF option |
Page 6: DQ IN Advanced Options page
Page 6 of the ALTDQ_DQS MegaWizard Plug-In Manager is the DQ IN Advanced Options page. To configure the DQ input path of the ALTDQ_DQS instance, select the options shown in Table 2–4.
Option | Value |
---|---|
DQ Input Register Options (DQ input register mode) | Select DDIO option. |
DQ Input Register Options (DQ input register clock source) | Select the ‘dqs_bus_out’ port option and disable the ‘Connect DDIO clkn to DQS_BUS from complementary DQSn’ option. |
DQ Input Register Options (Use DQ input phase alignment) | Turn on this option |
Advanced DQ IPA options:(DQ Input Phase Alignment Phase Setting) | Select the Set statically to ‘0’ option. |
Advanced DQ IPA options: (Add DQ Input Phase Alignment Input Cycle Delay) | Select the Never option. |
Advanced DQ IPA options: (Invert DQ Input Phase Alignment Phase) | Select the Never option. |
Advanced DQ IPA options: (Register DQ input phase alignment bypass output) | Turn on this option |
Advanced DQ IPA options: (Register DQ input phase alignment add phase transfer) | Turn on this option |
DQ Input Register Options (Use DQ half rate ‘dataoutbypass’ port) | Turn on this option |
Use DQ input delay chain | Turn on this option |
Page 7: DQ OUT/OE Advanced Options page
Page 7 of the ALTDQ_DQS MegaWizard Plug-In Manager is the DQ OUT/OE Advanced Options page. To configure the DQ OUTPUT and DQ OE path of the ALTDQ_DQS instance, select the options shown in Table 2–5.
Option | Value |
---|---|
DQ Output Path Options (Enable DQ output delay chain1) | Turn on this option |
DQ Output Path Options (Enable DQ output delay chain2) | Turn on this option |
DQ Output Path Options (DQ output register mode) | Select the DDIO option |
DQ Output Enable Options (Enable DQ output enable) | Turn on this option |
DQ Output Enable Options (Enable DQ output enable delay chain1) | Turn on this option |
DQ Output Enable Options (Enable DQ output enable delay chain2) | Turn on this option |
DQ Output Enable Options (DQ output enable register mode) | Select the FF option |
Page 8: Half-rate Advanced Options page
Page 8 of the ALTDQ_DQS MegaWizard Plug-In Manager is the Half-rate Advanced Options page. To configure the half-rate settings of the ALTDQ_DQS instance, select the options shown in Table 2–6.
Option | Value |
---|---|
IO Clock Divider Source | Turn off this option. This option is not applicable for full-rate interface. |
Create ‘io_clock_divider_masterin’ input port | Turn off this option. This option is not applicable for full-rate interface. |
Create ‘io_clock_divider_clkout’ output port | Turn off this option. This option is not applicable for full-rate interface. |
Create ‘io_clock_divider_slaveout’ output port | Turn off this option. This option is not applicable for full-rate interface. |
IO Clock Divider Invert Phase | Select the Never option. Not applicable for fullrate interface |
Page 9: OCT Path Advanced Options page
Page 9 of the ALTDQ_DQS MegaWizard Plug-In Manager is the OCT Path Advanced Options page. To configure the OCT registers and delay chain settings of the ALTDQ_DQS instance, select the options shown in Table 2–7.
Option | Value |
---|---|
Dynamic OCT Options (Enable OCT delay chain 1) | Turn off this option. This option is not applicable for full-rate interface. |
Dynamic OCT Options (Enable OCT delay chain 2) | Turn off this option. This option is not applicable for full-rate interface. |
DQ Output Path Options (OCT register mode) | Turn off this option. This option is not applicable for full-rate interface. |
Page 10: DQS/DQSn IO Advanced Options page
Page 10 of the ALTDQ_DQS MegaWizard Plug-In Manager is the DQS/DQSn IO Advanced Options page. Select options shown in Table 2–8.
Option | Value |
---|---|
Use DQSn I/O | Turn on this option. |
DQS and DQSn IO Configuration mode | Select the Differential Pair option. This is required for this particular scenario. |
Page 11: Reset Ports Advanced Options page
Page 11 of the ALTDQ_DQS MegaWizard Plug-In Manager is the Reset Ports Advanced Options page. Select options shown in Table 2–9.
Option | Value |
---|---|
Create ‘dqs_areset’ input port | Turn on this option |
Create ‘dqs_sreset’ input port | Turn off this option |
Create ‘input_dq_areset’ input port | Turn off this option |
Create ‘input_dq_sreset’ input port | Turn off this option |
Create ‘output_dq_areset’ input port | Turn on this option |
Create ‘output_dq_sreset’ input port | Turn off this option |
Create ‘bidir_dq_areset’ input port | Turn on this option |
Create ‘bidir_dq_sreset’ input port | Turn off this option |
Community support is provided Monday to Friday. Other contact methods are available here.
Intel does not verify all solutions, including but not limited to any file transfers that may appear in this community. Accordingly, Intel disclaims all express and implied warranties, including without limitation, the implied warranties of merchantability, fitness for a particular purpose, and non-infringement, as well as any warranty arising from course of performance, course of dealing, or usage in trade.
For more complete information about compiler optimizations, see our Optimization Notice.