Showing results for 
Search instead for 
Did you mean: 
836 Discussions

Multiple memory interface using uniphy quartus II v11.1

Multiple memory interface using uniphy quartus II v11.1

Initial Release – Jan 2012 – Stratix V DDR3 SDRAM 450MHz, Quartus II v11.0, Multiple Memory interface Using Uniphy.

Last Major Update

Design Overview

This design is created for evaluation purpose only.In future quartus release, the design will be updated targetting on same memory protocols for resources sharing implementation. This design has passed timing requirement and does not target any hardware design board. This tutorial describes how to use the design flow to implement a design with multiple memory interfaces, using two 16-bit wide, 1-GB Micron MT41J64M16LA-15E 667-MHz DDR3 SDRAM controllers with UniPHY interface. This tutorial also provides some recommended settings to simplify the design. In this tutorial, you implement two DDR3 SDRAM controllers, operating at the same frequency of 450 MHz and using the UniPHY IP, in a single Stratix V device. This implementation requires device resource sharing, such as delay-locked loops (DLLs), phase-locked loops (PLLs), and on-chip termination (OCT) control blocks, and may require extra steps to create the interfaces in a Quartus II project.The design example in this tutorial uses a Stratix V device with two DDR3 SDRAM memory components with timing closure and RTL simulation verification on the master memory.


Design Specifications

The table below lists the specifications for this design: 

Quartus versionQuartusII v11.1 / v13.1
Memory deviceDDR3 SRAM ( Micron MT41J64M16LA-15E)
Memory speed667MHz
Memory topologyX16-bit, DDR3 SRAM component
IP used DDR3 SRAM Controller with UniPHY IP

Lab Steps

The lab uses Quartus II v11.0 and has Modelsim set up via NativeLink for simulation. The lab assumes the reader is a competent user of these tools and many of their features. 

Three files have been pre-designed for this lab to save time.

• A top level design for multiple memory interface (sv_multiple_ddr3.v)

• A QuartusII IP file (core2_example.qip)

• A text file with file name and location required for simulation (testbench.txt)

Two Quartus archive available with one for the final project and the other for simulation design are also included for reference.

Files for this lab are located in theses zip files - 


for v13.1‎ 

Create a new folder for the project and place the files in it.

Design Generation

1. Generating a Multiple Memory Interface with UniPHY

Start Quartus, open MegaWizard Plug-In Manager and create a new variation

• In the Megawizard GUI, set device family to be Stratix V

• The IP is located under the folders Interfaces/External Memory/DDR3, choose DDR3 SDRAM Controller with UniPHY v11.1

• If your license for ModelSim can not support multiple HDL languages then choose verilog as output file type

• For the name of the output file, browse to the folder you created above, give the instance the name Type core1 for the master and core2 for the slave.


2. Parameterizing the Controllers   

To parameterize the master or slave controller to interface with a 16-bit wide DDR3 SDRAM interface, perform the following steps:

1. In the Presets list, select MT41J64M16LA-15E and click Apply

2. In the PHY Settings tab, under Clocks, for Memory clock frequency, type 450 MHz as the system frequency.

3. For PLL reference clock frequency, type 100 MHz to match the on-board oscillator.

4. For Full or half rate on Avalon-MM interface, select Half. This option allows you to choose between the full-rate and half-rate controller, and define the

busdata width between the controller and the PHY.

5. For Supply Voltage, select 1.5-V DDR3.

6. For PLL sharing mode, DLL sharing mode, and OCT sharing mode, select Master mode.

7. In the Memory Parameters tab, for Total interface width, type 16.

8. Under Memory Topology, turn on Fly-by topology.

9. Under Memory Initialization Options, for Memory CAS latency setting, select 8.

10. For Output drive strength setting, select RZQ/7.

11. For ODT Rtt nominal value, select RZQ/4.

12. For Memory write CAS latency setting, select 6.

13. For Dynamic ODT (Rtt_WR) value, select RZQ/4.

14. In the Board Settings tab, for setup and hold derating, and board skews, use Altera’s default settings.

15. In the Controller Settings tab, under Avalon Interface, for Maximum Avalon-MM burst length, specify the burst length based on the burst count sent from

the core fabric. For example, if your system generates up to 64 beats, then select 64.

16. In the Diagnostics tab, under Simulation Options, for Auto-calibration mode, select Quick initialization and skip calibration. This option allows you

to skip memory calibration during simulation and decrease simulation time.

17. Click Finish to generate your MegaCore function variation. The MegaWizard Plug-In Manager generates all the files necessary for your DDR3 SDRAM

controller with UniPHY, and an example top-level design, which you may use to test or verify the board operation.

18. Click Exit to close the MegaWizard Plug-In Manager after you have reviewed the generation report.

3. Adding Constraints

A. Adding PLL Sharing Constraint

1. The example design from Quartus II v11.1 does not need to add additional contraint to the PLL sharing.


B:Setting Pins

Set the unused pin and device voltage correctly before adding the constraint and pin assignment. Perform the following steps to set the device voltage and

unused pins:

1. In the Assignments list, select Device and click Device and Pin Options.

2. Click the Unused Pins tab, and for Reserve all unused pins select As input tri-stated with weak pull-up.

3. Click the Voltage tab, and for Default I/O standard select 1.5 V.

4. Click OK.

C: Adding Example Project

Add the example project files to your project, by performing the following steps:

1. On the Project menu, click Add/Remove Files in Project.

2. Browse to the <variation_name>_example_design\example_design directory.

3. Select <variation_name>_example.qip for the design, and click Open.

4. Click OK.

5. Click Save.

D: Adding Pin and DQ Group Assignments

Run the <variation_name>_example_if0_p0_pin_assignment.tcl and <variation_name>_example_if1_p0_pin_assignment.tcl scripts to add the pins, I/O standards, and DQ group assignments to the design example. To run the pin assignment scripts, perform the following steps:

1. On the Processing menu, point to Start and then click Start Analysis & Synthesis.

2. In the Tools menu, click Tcl Scripts.

3. Locate the <variation_name>_example_if0_p0_pin_assignment.tcl file.

4. Click Run.

5. Repeat steps 1 to 4 to locate and run the <variation_name>_example_if1_p0_pin_assignment.tcl script.

E: Assigning Pins

The pin assignments for this example design does not matters as it does not target a specified board.


4. Compiling Design and Verifying Timing 

To compile the design, on the Processing menu, click Start Compilation. After successfully compiling the design, the Quartus II software automatically runs the verified timing script of the master DDR3 SDRAM memory, <variation_name>_p0_report_timing.tcl, which produces a timing margin report for the design together with the compilation report. The report timing script performs the following tasks:

1. Creates a timing netlist.

2. Reads the <variation_name>.sdc file.

3. Updates the timing netlist. You can also obtain the timing report by running the report timing script in the TimeQuest timing analyzer. To obtain the timing report in the TimeQuest Timing Analyzer window, perform the following steps:

1. In the Quartus II software, on the Tools menu, click TimeQuest Timing Analyzer.

2. On the Tasks pane, double-click Report DDR which automatically runs Update Timing Netlist, Create Timing Netlist, and Read SDC. This command subsequently executes the report timing script to generate the timing margin report. The results are the same as the Quartus II software results.

5. Performing RTL Simulation

The Quartus II software creates a complete design example for functional simulation in the <variation_name>_example_design/simulation/ directory. To run the RTL simulation, perform the following steps:

• Open the generated example project for the design example simulation, <variation_name>_example_design/simulation/<variation_name>_ example_sim.qpf. 

• Select Tools -> Tcl Scripts... -> generate_sim_verilog_example_design.tcl and click "Run". 

• Open Modelsim. 

• Move into the directory ./verilog/mentor or ./vhdl/mentor.

• Start Modelsim and run the "" script: in Modelsim, enter "do".

• The simulation will stop once the test complete signal goes high in the test bench 

• CLICK “NO” WHEN ASKED IF YOU WANT TO FINISH, otherwise simulation will be reset 

• Observe the results in the ModelSim Wave window


For more information about Altera’s current IP offering, refer to Altera’s Intellectual Property website.

Update History

Initial Release – Jan 2012 – Stratix V DDR3 SDRAM 450MHz, Quartus II v11.1, Multiple Memory interface Using Uniphy 

See Also

1. LList of designs using Altera External Memory IP

External Links

1. Altera's External Memory Interface Solutions Center 

2. Altera's External Memory Interface Handbook 

Key Words

UniPHY,DDR3 SRAM, Design Example, External Memory , Stratix V

Version history
Last update:
‎06-25-2019 08:40 PM
Updated by: