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.
AxiMemMapis Rogue’s wrapper around the AES stream drivers kernel/user API: https://github.com/slaclab/aes-stream-driversIt adapts Rogue memory transactions to the driver register access calls (
dmaReadRegister/dmaWriteRegister). This enables read/write transactions to PCIe register space (for example via thedatadevdriver) or Zynq AXI4 register space (for example viaaxi_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()orerror(...).
Multiple
AxiMemMapinstances 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.
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 asrogue.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 returnsstd::shared_ptrownership 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.