dau_driver.transfer

Classes

DmaDirection

Enum where members are also (and must be) strings

DmaTransfer

Functions

validate_transfer(direction, device_address, ...[, ...]) → None

Refuse a transfer the device cannot perform as asked.

Module Contents

class dau_driver.transfer.DmaDirection[source]

Bases: enum.StrEnum

Enum where members are also (and must be) strings

Initialize self. See help(type(self)) for accurate signature.

H2C = 'h2c'
C2H = 'c2h'
class dau_driver.transfer.DmaTransfer[source]
direction: DmaDirection
device_address: int
byte_count: int
channel_path: pathlib.Path
dau_driver.transfer.validate_transfer(direction: DmaDirection, device_address: int, byte_count: int, constraints: dau_core.capabilities.DmaConstraints, *, memory_bytes: int | None = None) → None[source]

Refuse a transfer the device cannot perform as asked.

memory_bytes is the device’s addressable memory when the caller knows it; with it, the whole span [device_address, device_address + byte_count) must lie inside memory, since the DMA engine wraps an address past the end to the bottom of memory instead of failing.