|
rogue
|
Memory interface emulator device. More...
#include <Emulate.h>
Public Member Functions | |
| Emulate (uint32_t min, uint32_t max) | |
| Constructs an emulator device. | |
| ~Emulate () | |
| Destroys the emulator device. | |
| void | doTransaction (std::shared_ptr< rogue::interfaces::memory::Transaction > transaction) |
| Handles an incoming memory transaction. | |
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::Transaction > | getTransaction (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::Slave > | shared_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::interfaces::memory::Emulate > | create (uint32_t min, uint32_t max) |
| Creates an emulator device. | |
| static void | setup_python () |
| Registers this type with Python bindings. | |
Static Public Member Functions inherited from rogue::interfaces::memory::Slave | |
| static std::shared_ptr< rogue::interfaces::memory::Slave > | create (uint32_t min, uint32_t max) |
| Creates a memory slave. | |
| static void | setup_python () |
| Registers this type with Python bindings. | |
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.
| rogue::interfaces::memory::Emulate::Emulate | ( | uint32_t | min, |
| uint32_t | max | ||
| ) |
Constructs an emulator device.
Create an block.
This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.
| min | Minimum transaction size in bytes, or 0 if not a virtual root. |
| max | Maximum transaction size in bytes, or 0 if not a virtual root. |
Definition at line 49 of file Emulate.cpp.
| rogue::interfaces::memory::Emulate::~Emulate | ( | ) |
|
static |
Creates an emulator device.
Create a block, class creator.
Exposed to Python as rogue.interfaces.memory.Emulate(). 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.
| min | Minimum transaction size in bytes, or 0 if not a virtual root. |
| max | Maximum transaction size in bytes, or 0 if not a virtual root. |
Description: A memory space emulator. Allows user to test a Rogue tree without real hardware.
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
Definition at line 43 of file Emulate.cpp.
|
virtual |
Handles an incoming memory transaction.
Post a transaction. Master will call this method with the access attributes.
| transaction | Transaction to execute against emulated memory. |
Reimplemented from rogue::interfaces::memory::Slave.
Definition at line 65 of file Emulate.cpp.
|
static |
Registers this type with Python bindings.
Definition at line 115 of file Emulate.cpp.