litedram README

The project's README from github.com/enjoy-digital/litedram. As one markdown file: README.md.

                                 __   _ __      ___  ___  ___   __  ___
                                / /  (_) /____ / _ \/ _ \/ _ | /  |/  /
                               / /__/ / __/ -_) // / , _/ __ |/ /|_/ /
                              /____/_/\__/\__/____/_/|_/_/ |_/_/  /_/

                                   Copyright 2015-2026 / EnjoyDigital
                               A small footprint and configurable DRAM core
                                        powered by Migen & LiteX

License Ask DeepWiki

[> Intro

LiteDRAM provides a small footprint and configurable DRAM core.

LiteDRAM is part of LiteX libraries whose aims are to lower entry level of complex FPGA cores by providing simple, elegant and efficient implementations of components used in today's SoC such as Ethernet, SATA, PCIe, SDRAM Controller...

Using Migen to describe the HDL allows the core to be highly and easily configurable.

LiteDRAM can be used as LiteX library or can be integrated with your standard design flow by generating the verilog rtl that you will use as a standard core.

[> Features

PHY:

Core:

Frontend:

[> FPGA Proven

LiteDRAM is already used in commercial and open-source designs:

[> Possible improvements

If you want to support these features, please contact us at florent [AT] enjoy-digital.fr.

[> Documentation

The DRAM Controller & PHYs manual is the reference of the project, from the primers to the integration, the examples, the debugging and the registers:

[> Getting started

  1. Install Python 3.6+ and FPGA vendor's development tools.
  2. Install LiteX and the cores by following the LiteX's wiki installation guide.
  3. You can find examples of integration of the core with LiteX in LiteX-Boards and in the examples directory.

[> Standalone core generation

A standalone Verilog core (controller + PHY + init firmware, with native/Wishbone/Avalon/AXI/FIFO user ports) can be generated from a YAML description:

$ litedram_gen examples/arty.yml

See doc/gen.md for the command line, the YAML keys, the native/Wishbone port protocols and the examples, and the Integration chapter of the manual.

[> Tests

Unit tests are available in ./test/. To run all the unit tests:

$ python3 -m pytest test

test_examples.py builds the LiteX BIOS (RISC-V GCC toolchain) and test_lpddr4.py/test_lpddr5.py are long simulations: the CI runs them only in its full job (with LITEDRAM_TEST_FULL=1 to enable the slow configurations); skip them with:

$ python3 -m pytest test --ignore=test/test_examples.py --ignore=test/test_lpddr4.py --ignore=test/test_lpddr5.py

Tests can also be run individually:

$ python3 -m pytest test/test_name.py

[> License

LiteDRAM is released under the very permissive two-clause BSD license. Under the terms of this license, you are authorized to use LiteDRAM for closed-source proprietary designs. Even though we do not require you to do so, those things are awesome, so please do them if possible:

[> Support and consulting

We love open-source hardware and like sharing our designs with others.

LiteDRAM is developed and maintained by EnjoyDigital.

If you would like to know more about LiteDRAM or if you are already a happy user and would like to extend it for your needs, EnjoyDigital can provide standard commercial support as well as consulting services.

So feel free to contact us, we'd love to work with you! (and eventually shorten the list of the possible improvements :)

[> Contact

E-mail: florent [AT] enjoy-digital.fr

litedram (enjoy-digital/litedram)

Searching Database…

What is this?LiteDRAM is a small, configurable DRAM controller core for FPGA designs. It is written in Python with Migen and is part of the LiteX libraries.
Is it a library or a standalone IP block?Both. You can use it as a LiteX library, or generate standalone Verilog RTL and drop it into your normal design flow.
How do I get it running?Install Python 3.6+ and your FPGA vendor's development tools, then install LiteX and the cores using the LiteX wiki installation guide. Integration examples are in LiteX-Boards and the examples directory.
Do I need Migen or LiteX to use it?Usually yes. The core is described in Migen, and the primary workflow is as a LiteX library. Standalone Verilog can also be generated from a YAML description.
Which DRAM types and FPGAs are supported?There are PHYs for SDR, DDR2/DDR3, DDR4 on Ultrascale, LPDDR4 and LPDDR5 on Xilinx, plus DDR3 on Lattice ECP5, Nexus and Gowin GW2A/GW5A. The RPC PHY is still in development.
Is it used in real designs or just a hobby project?It is used in commercial and open-source designs such as HDMI2USB, NeTV2 and USBSniffer. The maintainer, EnjoyDigital, offers paid support and consulting.
Can I try it without an FPGA board?Yes. DFI-level SDRAM simulation models exist for Verilator, and the LPDDR4 and LPDDR5 PHYs include Verilator simulation PHYs with DRAM models.
Can I use it in closed-source products?Yes. It is released under the two-clause BSD license, which allows closed-source proprietary designs. The authors ask for attribution and contributions but do not require them.
Which user interfaces does the frontend offer?Native, AXI-MM and Wishbone user ports, plus a configurable crossbar that arbitrates between ports so you do not have to. A DMA reader/writer and BIST are included too.
What features come built into the core?Auto-precharge, periodic refresh with ZQ short calibration (up to 8 postponed refreshes), fully pipelined operation, and ECC error correction.
Can I generate the core without writing Python?Yes. A standalone Verilog core, including controller, PHY and init firmware, can be generated from a YAML description with native, Wishbone, Avalon, AXI or FIFO user ports.
Size
5.1 MB
Stars
590
Updated
CommitNov 17
Age
11y
Commits · 90 Days