Emulate
For conceptual usage, see:
Implementation
This Python API is provided by a Rogue C++ class exported into Python.
Native C++ class: - Emulate
Generated API
- class rogue.interfaces.memory.Emulate(min, max)
C++:
rogue::interfaces::memory::EmulateBinding source: [Emulate.cpp]
Memory interface emulator device.
Responds to memory read and write transactions and allocates backing memory on demand. This is primarily used for testing Rogue memory trees without hardware.
- __init__(min, max)
C++:
rogue::interfaces::memory::EmulateConstructs an emulator device.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
min – Minimum transaction size in bytes, or
0if not a virtual root.max – Maximum transaction size in bytes, or
0if not a virtual root.
- 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.