Hub
Hub objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::interfaces::memory::Hub> rogue::interfaces::memory::HubPtr
Alias for using shared pointer as HubPtr.
The class description is shown below:
-
class Hub : public rogue::interfaces::memory::Master, public rogue::interfaces::memory::Slave
Memory interface Hub device.
The memory bus Hub serves as both a Slave and a Master for memory transactions. It will accept a Transaction from an attached Master and pass it down to the next level Slave or Hub device. It will apply its local offset address to the transaction as it is passed down to the next level.
A Hub can be sub-classed in either Python or C++ is order to further manipulate the transaction data on the way down or convert the initial Transaction into multiple transactions to the next level. This can be useful to hide complex windows memory spaces or transactions that require multiplied steps be performed in hardware.
If a non zero min and max transaction size are passed at creation this Hub will behave as if it is a new root Slave memory device in the tree. This is useful in cases where this Hub will master a paged address or other virtual address space.
A pyrogue.Device instance is the most typical Hub used in Rogue.
Subclassed by rogue::interfaces::memory::HubWrap
Public Functions
-
uint64_t getOffset()
Get offset of this Hub.
Return the offset address of this Hub
Exposed as _getOffset() to Python
- Returns:
64-bit address offset
-
uint64_t getAddress()
Get full address of this Hub.
Return the full address of this Hub, including local offset.
Exposed as _getAddress() to Python
- Returns:
64-bit address
-
virtual uint32_t doSlaveId()
Interface to service the getSlaveId request from an attached master.
By default the Hub will forward this request to the next level. A hub may want to override this when mastering a virtual address space such as a paged address map. Otherwise incorrect overlap errors may be generated by the PyRogue Root.
Not exposed to Python
- Returns:
32-bit slave ID
-
virtual std::string doSlaveName()
Interface to service the getSlaveName request from an attached master.
By default the Hub will forward this request to the next level. A hub may want to override this when mastering a virtual address space such as a paged address map. Otherwise incorrect overlap errors may be generated by the PyRogue Root.
Not exposed to Python
- Returns:
slave name
-
virtual uint32_t doMinAccess()
Interface to service the getMinAccess request from an attached master.
This Hub will forward this request to the next level device. * Not exposed to Python
- Returns:
Min transaction access size
-
virtual uint32_t doMaxAccess()
Interface to service the getMaxAccess request from an attached master.
This Hub will forward this request to the next level device. A Hub sub-class is allowed to override this method.
Not exposed to Python
- Returns:
Max transaction access size
-
virtual uint64_t doAddress()
Interface to service the getAddress request from an attached master.
This Hub will forward this request to the next level device and apply the local address offset. A Hub sub-class is allowed to override this method.
Not exposed to Python
- Returns:
Max transaction access size
Interface to service the transaction request from an attached master.
This Hub will forward this request to the next level device and apply the local address offset.
It is possible for this method to be overridden in either a Python or C++ subclass. Examples of sub-classing a Hub are included elsewhere in this document.
Exposed to Python as _doTransaction()
- Parameters:
transaction – Transaction pointer as TransactionPtr
Public Static Functions
-
static std::shared_ptr<rogue::interfaces::memory::Hub> create(uint64_t offset, uint32_t min, uint32_t max)
Class factory which returns a pointer to a Hub (HubPtr)
Exposed to Python as rogue.interfaces.memory.Hub()
- Parameters:
offset – The offset of this Hub device
min – The min transaction size, 0 if not a virtual memory space root
min – The max transaction size, 0 if not a virtual memory space root
-
uint64_t getOffset()