How freecores/dma_axi works
Project type and purpose
• This is an open‑source hardware IP core written in Verilog.
• It implements a dual‑core, generic AXI DMA engine in two versions: a 32‑bit data‑width build (dma_axi32) and a 64‑bit build (dma_axi64).
• Its primary role is to move data between memory and peripheral domains over AXI4 interfaces, with an APB register interface for configuration and status.
File structure
• Top‑level directories:
– src/dma_axi32/ (32‑bit version)
– src/dma_axi64/ (64‑bit version)
• Each version contains:
– dma_axiXX.v: top‑level wrapper
– dma_axiXX_apb_mux.v: APB‐to‑register‑core multiplexer
– dma_axiXX_dual_core.v: instantiates two channel cores
– dma_axiXX_core0_*.v: the detailed submodules for channel 0 (arbiter, AXI command, data FIFOs, register files, scatter/gather, address & size calculators, watchdog)
– dma_axiXX_core0_top.v: submodule interconnections for core0
– dma_axiXX_reg*.v: register design files
– prgen_*.v: small reusable “pattern‑generator” primitives (fifos, muxes, stalling logic)
• doc/ contains a PDF spec.
Relationships and data flow
• Control path: CPU → APB bus → APB‑mux → Register Files → Channel Control FSM
• Data path:
– For MM2S (Memory‑to‑Stream): AXI Read Master → FIFO → Stream Out/peripheral
– For S2MM (Stream‑to‑Memory): Stream In/peripheral → FIFO → AXI Write Master
• Within each core:
– Descriptor fetch (via AXI reads) → address/size calculation → scatter gather chaining → data transfer bursts → descriptor update (via AXI writes)
• Dual‑core arbitration if both cores share a single APB or shared AXI ports
Architectural patterns
• Modular sub‑block design: each functional unit (arbiter, FIFO, reg, scatter/gather) is its own Verilog file.
• Parameterized data path width (32 vs 64 bits).
• Common “prgen” library for small reusable primitives.
• Decoupled control vs data path through FIFOs.