rogue
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
rogue::hardware::axi::AxiMemMap Class Reference

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

#include <AxiMemMap.h>

Inheritance diagram for rogue::hardware::axi::AxiMemMap:
rogue::interfaces::memory::Slave rogue::EnableSharedFromThis< rogue::interfaces::memory::Slave > rogue::EnableSharedFromThisBase

Public Member Functions

 AxiMemMap (std::string path)
 Constructs an AXI memory-map bridge instance.
 
 ~AxiMemMap ()
 Destroys the AXI memory-map bridge instance.
 
void stop ()
 Stops worker thread and closes device handle.
 
void doTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > tran)
 Queues a memory transaction for asynchronous register execution.
 
- Public Member Functions inherited from rogue::interfaces::memory::Slave
 Slave (uint32_t min, uint32_t max)
 Constructs a memory slave.
 
virtual ~Slave ()
 Destroys the memory slave instance.
 
void addTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > transaction)
 Adds a transaction to the internal tracking map.
 
std::shared_ptr< rogue::interfaces::memory::TransactiongetTransaction (uint32_t index)
 Gets a transaction from the internal tracking map.
 
uint32_t min ()
 Returns configured minimum transaction size.
 
uint32_t max ()
 Returns configured maximum transaction size.
 
uint32_t id ()
 Returns unique slave ID.
 
void setName (std::string name)
 Sets slave name.
 
std::string name ()
 Returns slave name.
 
virtual uint32_t doSlaveId ()
 Services SlaveId request from a master.
 
virtual std::string doSlaveName ()
 Services SlaveName request from a master.
 
virtual uint32_t doMinAccess ()
 Services getMinAccess request from an attached master.
 
virtual uint32_t doMaxAccess ()
 Services getMaxAccess request from an attached master.
 
virtual uint64_t doAddress ()
 Services getAddress request from an attached master.
 
void lshiftPy (boost::python::object p)
 Supports << operator usage from Python.
 
std::shared_ptr< rogue::interfaces::memory::Master > & operator<< (std::shared_ptr< rogue::interfaces::memory::Master > &other)
 Connects this slave to a master via chaining operator.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::interfaces::memory::Slave >
std::shared_ptr< rogue::interfaces::memory::Slaveshared_from_this ()
 Returns a shared_ptr<T> for this instance.
 
- Public Member Functions inherited from rogue::EnableSharedFromThisBase
virtual ~EnableSharedFromThisBase ()
 Virtual destructor for polymorphic base usage.
 

Static Public Member Functions

static std::shared_ptr< rogue::hardware::axi::AxiMemMapcreate (std::string path)
 Creates an AXI memory-map bridge instance.
 
static void setup_python ()
 Registers Python bindings for this class.
 
- Static Public Member Functions inherited from rogue::interfaces::memory::Slave
static std::shared_ptr< rogue::interfaces::memory::Slavecreate (uint32_t min, uint32_t max)
 Creates a memory slave.
 
static void setup_python ()
 Registers this type with Python bindings.
 

Detailed Description

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:

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

Definition at line 58 of file AxiMemMap.h.

Constructor & Destructor Documentation

◆ AxiMemMap()

rogue::hardware::axi::AxiMemMap::AxiMemMap ( std::string  path)
explicit

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
pathDevice path (for example /dev/datadev_0).

Definition at line 56 of file AxiMemMap.cpp.

◆ ~AxiMemMap()

rogue::hardware::axi::AxiMemMap::~AxiMemMap ( )

Destroys the AXI memory-map bridge instance.

Destructor.

Definition at line 82 of file AxiMemMap.cpp.

Member Function Documentation

◆ create()

rogue::hardware::axi::AxiMemMapPtr rogue::hardware::axi::AxiMemMap::create ( std::string  path)
static

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.

Parameters
pathDevice path (for example /dev/datadev_0).
Returns
Shared pointer to the created AxiMemMap.

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.

Definition at line 50 of file AxiMemMap.cpp.

◆ doTransaction()

void rogue::hardware::axi::AxiMemMap::doTransaction ( std::shared_ptr< rogue::interfaces::memory::Transaction tran)
virtual

Queues a memory transaction for asynchronous register execution.

Post a transaction.

Parameters
tranTransaction received from upstream memory master.

Reimplemented from rogue::interfaces::memory::Slave.

Definition at line 98 of file AxiMemMap.cpp.

◆ setup_python()

void rogue::hardware::axi::AxiMemMap::setup_python ( )
static

Registers Python bindings for this class.

Definition at line 170 of file AxiMemMap.cpp.

◆ stop()

void rogue::hardware::axi::AxiMemMap::stop ( )
virtual

Stops worker thread and closes device handle.

Reimplemented from rogue::interfaces::memory::Slave.

Definition at line 87 of file AxiMemMap.cpp.


The documentation for this class was generated from the following files: