AxiMemMap

Examples of using the AxiMemMap class are included in Using The AxiMemMap Class.

AxiMemMap objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::hardware::axi::AxiMemMap> rogue::hardware::axi::AxiMemMapPtr

Shared pointer alias for AxiMemMap.

The class description is shown below:

class AxiMemMap : public rogue::interfaces::memory::Slave

Memory-slave bridge for AXI register access via aes-stream-driver.

AxiMemMap is Rogue’s wrapper around the AES stream drivers kernel/user API: https://github.com/slaclab/aes-stream-drivers

It adapts Rogue memory transactions to the driver register access calls (dmaReadRegister/dmaWriteRegister). This enables read/write transactions to PCIe register space (for example via the datadev driver) or Zynq AXI4 register space (for example via axi_memory_map), depending on what the loaded driver exposes.

Transaction flow:

  • doTransaction() enqueues requests from upstream memory masters.

  • A worker thread dequeues transactions and executes 32-bit register accesses.

  • Read data is copied back into the transaction buffer.

  • Each transaction completes with done() or error(...).

Multiple AxiMemMap instances may be attached to the same underlying driver.

Public Functions

explicit AxiMemMap(std::string path)

Constructs an AXI memory-map bridge instance.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

Opens driver device, validates driver API compatibility, and starts worker thread for queued transaction processing.

Parameters:

path – Device path (for example /dev/datadev_0).

~AxiMemMap()

Destroys the AXI memory-map bridge instance.

virtual void stop()

Stops worker thread and closes device handle.

virtual void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> tran)

Queues a memory transaction for asynchronous register execution.

Parameters:

tran – Transaction received from upstream memory master.

Public Static Functions

static std::shared_ptr<rogue::hardware::axi::AxiMemMap> create(std::string path)

Creates an AXI memory-map bridge instance.

Parameter semantics are identical to the constructor; see AxiMemMap() for device-open and worker-thread setup details. Exposed to Python as rogue.hardware.axi.AxiMemMap(). This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters:

path – Device path (for example /dev/datadev_0).

Returns:

Shared pointer to the created AxiMemMap.

static void setup_python()

Registers Python bindings for this class.