Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Design Example - Stratix III QDRII SRAM UniPHY 400MHz

Design Example - Stratix III QDRII SRAM UniPHY 400MHz



Contents

 [hide

Last Major Update

Initial Release - May 23th 2011 – Stratix III QDRII+ SRAM x18 400MHz, Quartus II v11.0 QDR II and QDR II+ SRAM Controller with UniPHY, Stratix III development board. 


Design Overview

 This design is meant as a demo style lab. It very briefly covers the steps required to successfully get a QDRII+ SRAM interface working with a Stratix III FPGA using a single component on the Stratix III development board. The purpose of the lab is for the reader to get a basic feel for what steps are involved in getting an external memory working with an Altera FPGA and the UniPHY IP. The lab will not cover any of the steps in detail but simply show an overview of the design process. Volume 6 of the External Memory Interface Handbook should be used for a more thorough walkthrough. 


The lab creates a 18bit 400MHz QDRII+ SRAM external memory PHY and controller using Altera’s QDR II and QDR II+ SRAM Controller with UniPHY IP. The IP also generates an example top level file, an example driver, and a test bench including an external memory model. All these will be used to demonstrate the QDRII+ SRAM functionality 

  

Design Specifications

The table below lists the specifications for this design:


AttributeSpecification
Quartus versionQuartusII v11.0
FPGAEP3SL150F1152C2
KitStratix III Development board
Memory deviceQDRII+ SRAM (CY7C1263V18)
Memory speed400MHz
Memory topologysingle component, x18
IP usedQDR II and QDR II+ SRAM Controller with UniPHY and generated example top Quartus project

 


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. 

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

  • A pin location assignments tcl script
  • A signal tap file for debug of the interface design that has been created
  • A board trace model assignments script
  • A virtual pins assignments script for this design

A Quartus archive for the final project is also included for reference. 

Files for this lab are located in this zip file – StratixIII_UniPHY_QDRII+.zip

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

 

Design Generation

1. Use the Megawizard Plug-in Manager to generate a RLDRAM II Controller with UniPHY 

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

  •  In the Megawizard GUI, set device family to be Stratix III
  •  The IP is located under the folders Interfaces/External Memory/QDRII and QDRII+, choose QDR II and QDR II+ SRAM Controller with UniPHY
  •  If your license for ModelSim can not support multiple HDL languages then chose verilog as output file type
  •  For the name of the output file, browse to the folder you created above, give the instance the name “qdrii_uniphy”, click Open, click Next to open the IP GUI


2. Set parameters for Memory Controller with UniPHY 

On the right of the GUI are some Memory Presets, click CY7C1263V18-400 and apply

  • General Settings Tab

       - Set Speed Grade to 2

      - Set Memory Clock Frequency to 400MHz 

      - Set PLL Reference Clock Frequency to 125MHz 

      - 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 bus data width between the controller and the PHY.

      - For Additional Address/Command clock phase, select 0.

  • Advanced Settings

   - Select 64 for maximum Avalon-MM burst length

   - Select 1.8V HSTL for I/O standard

   - Turn on Master for PLL/DLL sharing to instantiate its own PLL. If the Master for PLL/DLL sharing option is disabled, the PLL clock shares with other identical UniPHY core.

   -Under Example Testbench Simulation Options, turn on Skip memory initialization to reduce simulation time.

  • Controller Settings Tab – Select 1 for Controller Latency
  • Board Settings Tab - Users should do board simulation for proper values in this page

      - Set INI parameters to 0ps for single chip select.

       - Set the Board Skews parameters to the specified values below:

           Maximum delay difference between devices: 0ps 

           Maximum skew within K group: 20ps 

           Maximum skew between K groups: 0ps 

           Average delay difference between Address/Command and K: 1ps

           Average delay difference between Data and K: 3ps 

          Average delay difference between Data and CQ: 9ps 

          Maximum skew within Address/Command bus: 81ps

  • Click “Finish” to start IP generation. Check important messages during generation. After IP is successfully generated, click Exit to close GUI


3. Open the example project generated by the Megawizard 

The Megawizard generates a Quartus example top project. This project connects an example driver to the controller interface so users can quickly compile and test their UniPHY IP configuration on hardware.

  • Open the example project located in <variation_name>_example_design/example_project. If the device you are using does not match the device in the example project, change the device in the project.

 

4. Perform Analysis and Synthesis 

This step is required so Quartus can determine the names of the external ports connected to the UniPHY for when the I/O assignments are created in the next step


5. Assign the pin and DQ group settings 

Run the tcl script qdrii_uniphy_pin_assignments.tcl to assign the pin and DQ group assignments. This tcl script is generated for you by the IP megawizard

  • Verify in the Assignment Editor that pin assignments have been created successfully


6. Assign the pin locations Pin locations for external memory systems are not automatically created.

  • Run the SIII_qdrii_pin_location.tcl script to assign pin locations for the targeted kit
  • Run the SIII_qdrii_exdriver_vpin.tcl script to assign virtual pins
  • Verify in Pin Planner or Assignment Editor that pin locations have been created successfully


7. Do a Full Compile

This should take about 10 minutes depending on the compiling PC.


Design Analysis

 1. Timing Analysis results

  • In the Compilation Report, Time Quest Timing Analyzer folder expand the three VT model folders, and the Report DDR folder

     - Check the summary at the bottom of that report

     - Check that all set up and hold timings pass 

Note: there will be some unconstrained paths in the design. These are associated with the example driver that will not be part of a fully integrated HP controller design. 


2. On board debug with Signal Tap 

Open the Signal Tap file and reset the .sof file to the one just created with the full compilation

  • Program the kit FPGA with the .sof
  • Run Signal Tap Analysis

   - Restart the driver

   - Ensure that test complete goes high (signal tap is trigger on this), this is the end of the driver testing, check the driver's pass signal is high. 

- Also check that calibration was successful and that the PLL is locked 



 Design 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 with NativeLink, perform the following steps:

  • Open the generated example project for the design example simulation, <variation_name>_example_design/simulation/<variation_name>_ example_sim.qpf.
  • Change the device in the design example to the actual device you are targeting for your design.
  • To elaborate your design, on the Processing menu, point to Start and click Start Analysis & Elaboration.
  • To compile all the neccessary files and run the simulation, on the Tools menu, point to Run EDA Simulation Tool and click EDA RTL Simulation.
  • 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 

  


Notes/Comments


Update History

1. Initial Release - May 23th 2010 - SIII QDRII+ SRAM x18 400MHz, QuartusII v11.0, UniPHY , SIII FPGA development kit.


See Also

1. List 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, QDRII SRAM, QDRII+ SRAM, Design Example, External Memory

 

research paper writing services


Version history
Revision #:
1 of 1
Last update:
‎06-25-2019 05:58 PM
Updated by:
 
Contributors