Skip to main content

The MMIO Interfacing Model

The C0-microSD uses a Memory-Mapped Input/Output (MMIO) interfacing model: a host communicates with the module by reading and writing a set of memory-mapped regions. This page describes the model; the module's concrete memory map and register offsets are reference tables in Host Interface and Protocol.

Region types

The C0-microSD exposes three kinds of memory-mapped region:

  • Control / configuration registers: the host configures the module and issues requests. The canonical example is the command register the host writes to request an operation.
  • Status registers: the device application reports progress and results status. The canonical example is the status register the host polls. -- Data buffers: bulk operands and results move through the MOSI (host to device) and MISO (device to host) buffers.

Request/response handshake

The host and the device application interact through a polled request/response handshake:

  1. The host writes operands into the data buffers.
  2. The host writes an operation code to the command register.
  3. The device application, running on the Signaloid SoC, observes the command, sets status to busy/calculating, and performs the operation.
  4. On completion the device writes results into the data buffer and sets status to done.
  5. The host polls status, reads the results, then clears command to acknowledge; the device returns to waiting for command.

A common set of status values is waiting for command, calculating, done, and invalid command, though applications are free to define their own.

Two addressing views

A key property of the model is that the host and the device application address the same registers through different addresses:

  • The device application (running on the SoC) accesses registers and buffers at their native SoC memory addresses.
  • The host accesses the same registers and buffers through block offsets over the SD interface.

For example, the host writes the command register at SD block offset 0x10000, while the SoC application reads it at memory address 0x40000008. Host Interface and Protocol documents both views.

How the SD interface carries MMIO

The physical link is the SD interface: MMIO transactions are carried by ordinary block read and write operations to specific offsets, so any host that can access an SD block device can drive the module.

Next steps