An SD-card and eMMC host controller you drop onto your SoC bus
The Zen SD / eMMC host controller is a digital host front-end a client instantiates to read and write removable SD cards and on-board eMMC devices from firmware. It frames the 48-bit command, computes and checks CRC-7, moves one or many data blocks over a 1- or 4-bit bus with per-line CRC-16, and drives a divided card clock. A streaming/DMA hook carries large transfers without per-block CPU service. It attaches to the common Zen peripheral bus and presents the card over plain single-ended pads — no analog or SerDes PHY. Product / integrator view; every number is sourced from the as-built RTL or marked TBC with an owner.
1. SD / eMMC host in one paragraph
The controller executes one command plus an optional data transfer per software request. Firmware programs the argument and command registers, then sets a self-clearing START bit; the engine assembles the 48-bit frame — index, 32-bit argument, inline CRC-7 — and shifts it out MSB-first on CMD. It captures the card response (R1 / R1b / R3 / R6 / R7 as 48-bit, or R2 as a 136-bit CID/CSD long response), checks the response CRC, and reports a timeout if the card stays silent. A data command then moves one or more 512-byte blocks over the DAT lines — generating CRC-16 on writes, checking it on reads, waiting out the card's DAT0 busy. SD cards and embedded eMMC share the same command/data engine, so one block serves both.
- Zen SD / eMMC host
- host bus / SD·eMMC card
- block buffer
2. What it is, at a glance
| Element | Detail | Default | Status |
|---|---|---|---|
| Command frame | 48-bit; index + 32-bit argument + CRC-7, MSB-first | — | exists |
| Response types | R1 · R1b · R3 · R6 · R7 (48-bit) and R2 (136-bit CID/CSD) | — | exists |
| Data path | per-line CRC-16 (CCITT); single and multi-block | — | exists |
| DAT bus width | 1-bit (DAT0) or 4-bit (DAT0..3, four CRC-16) | 1-bit | exists |
| Block size | programmable, capped at 512 B | 512 B | exists |
| Multi-block | block count N, CMD12 stop modeled after the last | — | exists |
| Streaming / DMA hook | back-pressured valid/ready/data/last ports | off | exists |
| Card clock | divided from the input clock, gated when idle | — | exists |
| Interrupt | one aggregated line, enable-masked, pending RW1C | — | exists |
| UHS-II / DDR · eMMC boot/RPMB · SDIO | documented roadmap, not in v1 | — | TBC |
Sources: Zen SD / eMMC host product datasheet (overview, features & compliance, functional overview, register map); as-built RTL.
3. How a client uses it
- Instantiate the controller on the peripheral bus; wire the CMD, DAT[3:0], and card-clock pins to single-ended pads, and route the interrupt line.
- Initialize the card — software sequences identification and init (reset, voltage, address, select) by issuing commands and reading the captured responses.
- Transfer blocks — set block size and count, point the command at a read or write, launch it; move payload through the data window, or enable the streaming hook and attach a DMA peer for large multi-block transfers.
- Service completion — enable interrupt sources and respond to the aggregated line, or poll status for busy / done / error; classify command-done, data-done, timeout, and CRC errors on a write-1-to-clear pending register.
4. Verification & provenance
- Compliance: 18 / 18 assertion-based tests pass, with byte-exact checks against an SD-card model — CRC-7 against a golden oracle, R2 content captured byte-exact, single- and multi-block read/write, per-block CRC on 4-bit DAT, streaming under back-pressure, and timeout / DAT0-busy handling.
- Gates: clean on the DV simulation gate and on synthesis checks (no inferred latches, no multi-driver nets); independently re-run on a fresh testbench copy.
- Provenance: delivered as a coverage-closed v1 kit in the Data Movement & Storage family. Internal soft-license, license-ready for external engagements.
Sources read
Sources: Zen SD / eMMC host product datasheet (overview, features & compliance, applications, functional overview, register map, performance, verification, licensing); as-built RTL.