Giter VIP home page Giter VIP logo

general-slow-ddr3-interface's Introduction

General-Slow-DDR3-Interface

A general slow DDR3 interface.
Very little resource consumption.
Suits for all FPGAs with 1.5V IO voltage.

Specifications

  • Designed to run at DDR-100. (The system freqency is 100MHz and DDR clock frequency is 50MHz)
    DDR-50? That's OK.
    DDR-10? OK, but refresh takes too much clocks.
    DDR-200? Depends on the hardware and the FPGA.
    DDR-400? It may not work. Whatever, take a shot.
    When changing the clock frequency, please modify the clkFreq in the slowDDR3Cfg and recompile it.
  • Designed to work with LVCMOS IO
    Only has LVCMOSs? It can work.
  • Very low resource consumption
    Wish to attach a DDR3 module to a CPLD? Try it.
  • Write in SpinalHDL
    Future is coming.

Files

  • slowDDR3.scala
    The SpinalHDL design file.
    Compile it to get the output verilog file.
  • slowDDR3.v
    Pre-compiled verilog file.
    Designed to run at 100MHz with a 128Mx16b DDR3 chip.
  • tb.v
    Testbench file.
    A DDR3 model is required to do the simulation.
    You may find it at Micron's website.
    DDR3 Model

Timing

The burst feature is not implemented yet, so multi read/write will not be faster than single.
The burst may increase the r/w speed to 3x or 4x.

  • Single Write
    single_write
  • Multi Write
    multi_write
  • Single Read
    single_read
  • Multi Read
    multi_read

If Write and Read are issued at the same time, only write will be executed.
You don't need to care about the refresh.

Simulation

To simulate the design, you need to do some modifications to the model file.

  1. change the type of the ddr3.v to ddr3.sv (system verilog)

  2. define the size in ddr3.sv
    I use the den2048Mb

    `define den2048Mb
    
  3. define MAX_MEM in ddr3.sv

    `define MAX_MEM  
    
  4. comment this line in ddr3.sv

    // if (dll_en) init_step = init_step + 1;  
    
  5. add a line under it

    init_step = init_step + 1;  
    
  6. comment these 2 lines in ddr3.sv

    // if (tck_avg - TCK_MAX >= 1.0)   
    // $display ("%m: at time %t ERROR: tCK(avg) maximum violation by %f ps.", $time, tck_avg - TCK_MAX);  
    
  7. you are good to go.

Resource Comsunption and Speed

FPGA REGs LUTs/ALMs Stable Speed Max Speed Write Speed at Stable Speed Read Speed at Stable Speed
Xilinx Kintex 7 148 164 DDR-100 \ 300Mbits/s 500Mbits/s
Intel Cyclone V 175 115 DDR-100 \ 300Mbits/s 500Mbits/s
Gowin GW2A-C 147 216 DDR-80 DDR-90 240Mbits/s 400Mbits/s

general-slow-ddr3-interface's People

Contributors

thermitreaction avatar ziyangye avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.