Giter VIP home page Giter VIP logo

sdram_controller's Introduction

sdram_controller

SystemVerilog SDRAM Controller specifically for IS42S16400 (on the DE0 Dev Board)

Made for efficiency, done by keeping rows open during reads & writes, and only precharging when neccesary. The controller intelligently keeps track of what rows are currently open in each bank. Adjustable burst length of 1, 2, 4, or 8 words. Adjustable CAS latency of 2 or 3 cycles. Common SDRAM timing requirements, e.g. tRCD, are parameters, and easily modifiable for different SDRAMs.

I've found that, with 50 random read and write requests (to differing banks, rows, and columns), that the controller can reach around ~70 MT/s or ~140 MB/s (f = 166 MHz, BL = 8, CAS = 2). This is also with a burst length of 8 words. Obviously, if all of these operations were done on the same row in the same bank, this could much higher. E.g., with 40 writes to consequtive columns in the same row in the same bank, and 40 reads to these same consecutive columns, the controller achieves ~115 MT/s or ~230 MB/s speed (f = 166 MHz, BL = 8, CAS = 2).

Currently, the DRAM FIFOs are not used, but they will be implemented soon, for handling request queueing.

More Technical

All banks are closed during refresh, as an all-bank precharge is executed after the refresh.

What each file is

  • /test contains functional verificationt testbenches (and maybe formal too if I figure that out!)
  • /rtl obviously contains the rtl
    • sdram_ctrl.sv is the SDRAM controller, the heart of this repo
    • sdram_refresh.sv is the SDRAM refresh timer
    • dram_fifo_*.sv are the files for the SDRAM controller's uni-directional async FIFO, which is yet to be implemented
    • fifo_*.sv are the files for the UART's transceivers FIFO
    • fpga_top_level.sv is the testbench that's ran on the FPGA, allowing for read and write commands to be issued to test the SDRAM
    • uart.sv, uart_tx.sv, uart_rx.sv is the UART transciever needed for the fpga_top_level.sv (also made by me!)

So the only files needed for an implementation of this controller into your project is just sdram_ctrl.sv, and sdram_refresh.sv. The controller expects the clock frequency it's given to be the clock frequency given to the SDRAM, but phase shifted by 180 degrees. This is to meet setup and hold timing requirements.

sdram_controller's People

Contributors

oskarwires avatar

Stargazers

 avatar

Watchers

 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.