rogue
Loading...
Searching...
No Matches
Public Member Functions | List of all members
rogue::interfaces::memory::HubWrap Class Reference

Internal Boost.Python wrapper for rogue::interfaces::memory::Hub. Enables Python subclasses to override virtual transaction handling. More...

#include <Hub.h>

Inheritance diagram for rogue::interfaces::memory::HubWrap:
rogue::interfaces::memory::Hub rogue::interfaces::memory::Master rogue::interfaces::memory::Slave rogue::EnableSharedFromThis< rogue::interfaces::memory::Slave > rogue::EnableSharedFromThisBase

Public Member Functions

 HubWrap (uint64_t offset, uint32_t min, uint32_t max)
 Constructs a hub wrapper instance.
 
void doTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > transaction)
 Services a transaction request from an attached master.
 
void defDoTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > transaction)
 Calls the base-class doTransaction() implementation.
 
- Public Member Functions inherited from rogue::interfaces::memory::Hub
 Hub (uint64_t offset, uint32_t min, uint32_t max)
 Constructs a Hub with optional virtual-root access constraints.
 
 ~Hub ()
 Destroy a block.
 
uint64_t getOffset ()
 Returns the local offset of this hub.
 
uint64_t getAddress ()
 Returns the full address of this hub, including local offset.
 
uint32_t doSlaveId ()
 Services getSlaveId request from an attached master.
 
std::string doSlaveName ()
 Services getSlaveName request from an attached master.
 
uint32_t doMinAccess ()
 Services getMinAccess request from an attached master.
 
uint32_t doMaxAccess ()
 Services getMaxAccess request from an attached master.
 
uint64_t doAddress ()
 Services getAddress request from an attached master.
 
- Public Member Functions inherited from rogue::interfaces::memory::Master
 Master ()
 Constructs a memory master instance.
 
virtual ~Master ()
 Destroys the memory master instance.
 
virtual void stop ()
 Stops the interface and releases runtime resources.
 
void setSlave (std::shared_ptr< rogue::interfaces::memory::Slave > slave)
 Sets the downstream slave or hub.
 
std::shared_ptr< rogue::interfaces::memory::SlavegetSlave ()
 Returns the configured downstream slave or hub.
 
uint32_t reqSlaveId ()
 Queries the downstream slave ID.
 
std::string reqSlaveName ()
 Queries the downstream slave name.
 
uint32_t reqMinAccess ()
 Queries minimum access size in bytes for this interface path.
 
uint32_t reqMaxAccess ()
 Queries maximum access size in bytes for this interface path.
 
uint64_t reqAddress ()
 Queries the address offset of the next downstream layer.
 
std::string getError ()
 Returns the last transaction error string.
 
void clearError ()
 Clears the stored transaction error string.
 
void setTimeout (uint64_t timeout)
 Sets the timeout value for future transactions.
 
uint32_t reqTransaction (uint64_t address, uint32_t size, void *data, uint32_t type)
 Starts a new transaction.
 
uint32_t reqTransactionPy (uint64_t address, boost::python::object p, uint32_t size, uint32_t offset, uint32_t type)
 Python variant of reqTransaction.
 
void rshiftPy (boost::python::object p)
 Supports >> operator usage from Python.
 
std::shared_ptr< rogue::interfaces::memory::Slave > & operator>> (std::shared_ptr< rogue::interfaces::memory::Slave > &other)
 Connects this master to a slave via stream chaining operator.
 
void waitTransaction (uint32_t id)
 Waits for transaction completion or timeout.
 
- 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.
 
virtual void stop ()
 Stops the memory slave interface.
 
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.
 
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.
 

Additional Inherited Members

- Static Public Member Functions inherited from rogue::interfaces::memory::Hub
static std::shared_ptr< rogue::interfaces::memory::Hubcreate (uint64_t offset, uint32_t min, uint32_t max)
 Creates a memory Hub.
 
static void setup_python ()
 
- Static Public Member Functions inherited from rogue::interfaces::memory::Master
static std::shared_ptr< rogue::interfaces::memory::Mastercreate ()
 Creates a memory master instance.
 
static void setup_python ()
 Registers this type with Python bindings.
 
static void copyBits (uint8_t *dstData, uint32_t dstLsb, uint8_t *srcData, uint32_t srcLsb, uint32_t size)
 Copies bits between two byte arrays.
 
static void copyBitsPy (boost::python::object dst, uint32_t dstLsb, boost::python::object src, uint32_t srcLsb, uint32_t size)
 Python wrapper for copyBits.
 
static void setBits (uint8_t *dstData, uint32_t lsb, uint32_t size)
 Sets a contiguous bit range in a byte array.
 
static void setBitsPy (boost::python::object dst, uint32_t lsb, uint32_t size)
 Python wrapper for setBits.
 
static bool anyBits (uint8_t *srcData, uint32_t lsb, uint32_t size)
 Tests whether any bit in a range is set.
 
static bool anyBitsPy (boost::python::object src, uint32_t lsb, uint32_t size)
 Python wrapper for anyBits.
 
- 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.
 
- Protected Member Functions inherited from rogue::interfaces::memory::Master
uint32_t intTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > tran)
 Starts an internal transaction from an existing transaction object.
 

Detailed Description

Internal Boost.Python wrapper for rogue::interfaces::memory::Hub. Enables Python subclasses to override virtual transaction handling.

This wrapper is an internal binding adapter and not a primary C++ API surface. It is registered by setup_python() under the base class name.

Definition at line 242 of file Hub.h.

Constructor & Destructor Documentation

◆ HubWrap()

rogue::interfaces::memory::HubWrap::HubWrap ( uint64_t  offset,
uint32_t  min,
uint32_t  max 
)

Constructs a hub wrapper instance.

Constructor.

Parameters
offsetLocal address offset applied by this hub.
minMinimum transaction size for virtual-root mode.
maxMaximum transaction size for virtual-root mode.

Definition at line 173 of file Hub.cpp.

Member Function Documentation

◆ defDoTransaction()

void rogue::interfaces::memory::HubWrap::defDoTransaction ( std::shared_ptr< rogue::interfaces::memory::Transaction transaction)

Calls the base-class doTransaction() implementation.

Post a transaction. Master will call this method with the access attributes.

Used as the fallback when no Python override is present.

Parameters
transactionTransaction object to process.

Definition at line 193 of file Hub.cpp.

◆ doTransaction()

void rogue::interfaces::memory::HubWrap::doTransaction ( std::shared_ptr< rogue::interfaces::memory::Transaction transaction)
virtual

Services a transaction request from an attached master.

Post a transaction. Master will call this method with the access attributes.

Invokes the Python override when provided.

Parameters
transactionTransaction object to process.

Reimplemented from rogue::interfaces::memory::Hub.

Definition at line 176 of file Hub.cpp.


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