Programming Model
Model Overview
iDMA’s programming model centers on a request/response contract. Frontends emit idma_req_t (or idma_nd_req_t), the backend executes the transfer, and the response idma_rsp_t signals completion or error.
1D Transfers
A 1D transfer copies a contiguous byte range from src_addr to dst_addr. It is the native backend format. If you submit 1D requests, you can bypass the midend entirely.
ND Transfers
ND transfers (2D/3D) are decomposed into a series of 1D transfers by the midend. Each dimension defines a repetition count and stride. The midend emits a stream of 1D bursts while preserving ordering and optional error semantics.
Request Lifecycle
- Frontend validates inputs and forms a request.
- Midend (optional) expands ND into 1D.
- Backend legalizer splits into protocol-legal bursts.
- Transport layer executes bus reads/writes and realigns data.
- Response is emitted when all bursts complete.
Error Handling Choices
Error handling is a policy decision. The backend can be configured to continue on error, abort a transfer, or replay. Frontends interpret responses and decide how to recover. See Error Handling for policies and software handling patterns.