AxiMemMap
For conceptual usage, see:
Implementation
This Python API is provided by a Rogue C++ class exported into Python.
Native C++ class: - AxiMemMap
Generated API
- class rogue.hardware.axi.AxiMemMap(path)
C++:
rogue::hardware::axi::AxiMemMapBinding source: [AxiMemMap.cpp]
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-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 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(...). MultipleAxiMemMapinstances may be attached to the same underlying driver.
- __init__(path)
C++:
rogue::hardware::axi::AxiMemMapConstructs 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).
- setName(name)
C++:
rogue::interfaces::memory::Slave::setName()Sets slave name.
Exposed to Python as
setName.- Parameters:
name – New slave name string.
- _addTransaction(transaction)
C++:
rogue::interfaces::memory::Slave::addTransaction()Adds a transaction to the internal tracking map.
This method is called by the sub-class to add a transaction into the local tracking map for later retrieval. This is used when the transaction will be completed later as the result of protocol data being returned to the Slave. Exposed to Python as
_addTransaction().- Parameters:
transaction – Pointer to transaction as TransactionPtr.
- _getTransaction(index)
C++:
rogue::interfaces::memory::Slave::getTransaction()Gets a transaction from the internal tracking map.
This method is called by the sub-class to retrieve an existing transaction using the unique transaction ID. If the transaction exists in the list the pointer to that transaction will be returned. If not a NULL pointer will be returned. When getTransaction() is called the map will also be checked for stale transactions which will be removed from the map. Exposed to Python as
_getTransaction().- Parameters:
index – ID of transaction to lookup.
- Returns:
Pointer to transaction as TransactionPtr or NULL if not found.
- _doMinAccess()
C++:
rogue::interfaces::memory::Slave::doMinAccess()Returns minimum transaction access size.
Invokes the Python override when provided.
- Returns:
Minimum transaction access size in bytes.
- _doMaxAccess()
C++:
rogue::interfaces::memory::Slave::doMaxAccess()Returns maximum transaction access size.
Invokes the Python override when provided.
- Returns:
Maximum transaction access size in bytes.
- _doAddress()
C++:
rogue::interfaces::memory::Slave::doAddress()Returns base address contribution for this slave.
Invokes the Python override when provided.
- Returns:
Address offset in bytes.
- _doTransaction(transaction)
C++:
rogue::interfaces::memory::Slave::doTransaction()Services a transaction request from an attached master.
Invokes the Python override when provided.
- Parameters:
transaction – Transaction object to process.
- __lshift__(other)
C++:
rogue::interfaces::memory::Slave::lshiftPy()Supports
<<operator usage from Python.- Parameters:
p – Python object expected to provide a memory
Master.
- _stop()
C++:
rogue::interfaces::memory::Slave::stop()Stops the memory slave interface.
Base implementation is a no-op. Subclasses may override to stop worker threads or transport links.