Skip to content

OpenDMA

TRL 3

OpenDMA is an open direct memory access (DMA) core between AXI4 memory and AXI4-Stream peripherals that is based on the Open Logic VHDL Library. Its register map, descriptor format and programming sequences are those of the AMD AXI DMA (product guide PG021, version 7.1), so that software written for that core, including its bare-metal and Linux drivers, runs on OpenDMA unchanged. The core is vendor-independent VHDL-2008, and all buffers use the fault-tolerant entities of Open Logic (SECDED ECC).

AMD and AXI DMA are named only to state the compatibility of the register interface. OpenDMA is an independent implementation written from the published product guide; it contains no code, text or figures of AMD.

Status

Technology readiness level: TRL 3 (fully verified by simulation) for Direct Register Mode (phase a) and Scatter/Gather Mode (phase b, with packets of several buffers and keyhole transfers). The 1048 tests of the six testbenches pass in GHDL and in QuestaSim, with and without code coverage. They run the programming sequences of both modes against an AXI memory model and stream models with random back pressure, error responses of the memory and the descriptor port, single and double bit errors injected into every buffer, halts, soft resets and resets at any time. Code coverage is closed or every remaining miss is justified (coverage). The core has not been tested on hardware and has no flight heritage; see what the levels mean and the steps to the next level in the roadmap. The control and status streams follow in phase c.

Documentation

Document Content
docs/user_guide.md User guide: sources, generics, interfaces, programming sequence, protection scope, performance, conformance
docs/architecture.md Architecture: building blocks, items of the published interface they own, Open Logic usage, verification
docs/compliance.md Compliance matrix: requirements and test cases of every item of the published interface (generated)
docs/coverage.md Code coverage: method, result, closed gaps and the justification of every remaining miss
CHANGELOG.md Changes of every release
hdl/odma_registers/docs/register_map.md Register map (generated; C header sw/odma_regs.h)
docs/roadmap.md Development phases and module status
docs/conventions.md Coding, verification and repository conventions

Repository structure

opendma/
|-- docs/             Top-level documentation
|-- hdl/<module>/     One folder per module: src/, tb/, docs/
|-- tb/               Verification components shared by the testbenches
|-- lint/             VSG configuration (Open Logic rules), synthesizability check
|-- tools/            Compliance matrix and register map generators
|   `-- docs/         Documentation website (MkDocs)
|-- sw/               C header of the register map (generated)
|-- open-logic/       Git submodule: Open Logic (fault-tolerant entities branch)
|-- uvvm/             Git submodule: UVVM verification framework
|-- component_list.txt  Modules in dependency order
|-- compile_order.txt   Synthesis sources in compile order (generated by run.py)
`-- run.py            VUnit regression runner

Running the tests

Prerequisites: Python 3, GHDL on the PATH and the Python packages of requirements.txt.

git submodule update --init
python -m pip install -r requirements.txt
python run.py -p 8              # full regression with GHDL, 8 parallel simulations
python run.py "*odma_<module>*" # one module
python run.py --questa <test>   # QuestaSim

run.py compiles Open Logic into the VHDL library olo, the required UVVM components into their own libraries and all OpenDMA sources into the library opendma. ODMA_GHDL_SIM_FLAGS passes extra flags to the GHDL simulation, for example --vcd=wave.vcd for a waveform.

Checks besides the regression:

python lint/lint.py                 # VSG, no errors and no warnings
python tools/compliance.py --check  # every item of the published interface traced to a test case
python tools/regmap.py --check      # generated register map files match hdl/odma_registers/regs/odma_regs.yml
python run.py --compile-order       # compile_order.txt; the CI fails when the file changes
python -m mkdocs build -f tools/docs/mkdocs.yml  # documentation website, fails on broken links

Licence

OpenDMA is licensed under the PSI HDL Library License, Version 1.0, the licence of Open Logic (LGPL 2.1 with an exception for binaries, see LGPL2_1.txt).