AxiMemMap

Examples of using the AxiMemMap class are included in AxiMemMap.

Python binding

This C++ class is also exported into Python as rogue.hardware.axi.AxiMemMap.

Python API page: - AxiMemMap

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

typedef std::shared_ptr<rogue::hardware::axi::AxiMemMap> rogue::hardware::axi::AxiMemMapPtr
[header]

Shared pointer alias for AxiMemMap.

The class description is shown below:

class AxiMemMap : public rogue::interfaces::memory::Slave
[header]

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)
[header] [impl]

Constructs an AXI memory-map bridge instance.

Creator.

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()
[header] [impl]

Destroys the AXI memory-map bridge instance.

Destructor.

virtual void stop()
[header] [impl]

Stops worker thread and closes device handle.

virtual void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> tran)
[header] [impl]

Queues a memory transaction for asynchronous register execution.

Post a transaction.

Parameters:

tran – Transaction received from upstream memory master.

Public Static Functions

static std::shared_ptr<rogue::hardware::axi::AxiMemMap> create(std::string path)
[header] [impl]

Creates an AXI memory-map bridge instance.

Class creation.

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.

Company : SLAC National Accelerator Laboratory

Description: AXI Memory Mapped Access

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the LICENSE.txt file.

Parameters:

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

Returns:

Shared pointer to the created AxiMemMap.

static void setup_python()
[header] [impl]

Registers Python bindings for this class.