A multi-channel scatter-gather DMA engine that moves data so your CPU doesn't
The Zen DMA is a descriptor-driven, multi-channel DMA engine a client instantiates to move blocks of data between memory regions — and memory and peripherals — with no CPU in the loop. Each channel runs either a direct register-programmed copy or a scatter-gather descriptor chain walked straight from memory; all channels share a single AXI4 master and arbitrate round-robin for it. Decoupled read and write engines overlap through a per-channel FIFO, and completion or error folds into one interrupt line. Product / integrator view; every number is sourced from the product datasheet or marked TBC.
1. DMA in one paragraph
The Zen DMA is the data-mover you drop in so the CPU stops copying bytes. Software programs a channel — a source address, a destination, and a length — and writes one start bit; the channel then moves the whole block over a shared AXI4 master port while the cores do other work. In direct mode the transfer is programmed entirely from registers. In scatter-gather mode you instead hand the channel a pointer to a 16-byte descriptor in memory; the channel fetches it, runs that segment, and walks the next link until a descriptor flags last — so a single start can gather many fragmented buffers, or scatter one buffer across many. Inside, a read engine issues AXI read bursts into a per-channel FIFO and a write engine drains that FIFO to the destination; the two run concurrently, so reads and writes overlap. Multiple channels share the one AXI master and take turns round-robin, one burst per grant, so no channel starves. When a transfer finishes — or an AXI slave returns an error — the channel sets status and raises a single aggregated interrupt.
- DMA engine (channels + read/write engines)
- host SoC / AXI fabric + memory
- per-channel FIFO / descriptor chain
[31:4] of the last word is the next-descriptor address, [1] ends the chain, [0] raises an interrupt on that segment. Gather from or scatter to many buffers from a single programmed start, with no CPU between segments.2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| Channels | independent, each own register block + control FSM | 2 | exists |
| Transfer modes | direct (register-programmed) + scatter-gather (descriptor chain) | — | exists |
| Descriptor | 16 bytes: src · dst · length · next-and-flags | — | exists |
| Bus master | single shared AXI4 master, INCR bursts, 4 KB-boundary split | — | exists |
| Datapath width | AXI4 data width (bytes/beat) | 64-bit | exists |
| Address width | AXI4 address width | 32-bit | exists |
| Read / write engines | decoupled, concurrent, overlap through a per-channel FIFO | — | exists |
| Per-channel FIFO | buffering depth between read and write engines | 16 beats | exists |
| Max burst | burst length cap, clamped at the AXI 4 KB boundary | 16 beats | exists |
| Arbitration | round-robin, one burst per grant; AR and AW arbitrate independently | — | exists |
| Error handling | AXI SLVERR / DECERR on read or write → channel error + interrupt | — | exists |
| Interrupt | one aggregated level line, per-channel enabled, write-1-to-clear | — | exists |
| Control plane | struct-typed peripheral bus; APB4 / AXI4-Lite frontends | — | exists |
| Sustained throughput / latency | slave- and fabric-bound; cycle-accurate numbers not yet characterized | TBC | TBC |
Sources: Zen DMA product datasheet; as-built RTL.
3. How a client uses it
- Instantiate the engine on the peripheral bus for control, and attach its single AXI4 master port to your interconnect so it can reach memory and memory-mapped peripherals; route the interrupt line into your controller.
- Direct copy — program a channel's source, destination, and length, then write the start bit; the channel streams the block and raises the done interrupt. No CPU cycles are spent on the move.
- Scatter-gather — build a descriptor chain in memory (one 16-byte descriptor per fragment, each pointing at the next), write the first-descriptor pointer, select SG mode, and start; the channel walks the chain to the
lastflag on its own. - Run channels concurrently — start more than one channel for independent streams; they fair-interleave round-robin on the shared AXI master. Drain completions on the interrupt and clear status write-1-to-clear.
4. Verification & provenance
- Byte-exact tested: an 8-of-8 passing assertion-based suite (cocotb, 27 assertions) checks destination memory byte-for-byte against the source — including a sub-beat tail (43 bytes = 5 beats + 3 bytes) and a 3-descriptor scatter-gather chain walked by
nextto thelastflag. - Discriminating coverage: two channels running concurrently on disjoint regions both complete correctly (arbitration); a forced AXI
SLVERRon the write response and aDECERRon the read path each set the channel error status; the done interrupt asserts and clears through both write-1-to-clear paths. - Provenance: owned by the Zen peripheral group; delivered as parameterized RTL plus the AXI4 and peripheral-bus packages, verification IP, a compliance testbench, and a kit manifest. Kit-eligible only after passing both mandatory gates — lint-clean elaboration and synthesis with zero inferred latches.
Sources read
Sources: Zen DMA product datasheet; as-built RTL.