Emulate

For conceptual usage, see:

Python binding

This C++ class is also exported into Python as rogue.interfaces.memory.Emulate.

Python API page: - Emulate

Emulate objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::interfaces::memory::Emulate> rogue::interfaces::memory::EmulatePtr
[header]

Shared pointer alias for Emulate.

The class description is shown below:

class Emulate : public rogue::interfaces::memory::Slave
[header]

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.

Public Functions

Emulate(uint32_t min, uint32_t max)
[header] [impl]

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.

Parameters:
  • 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.

~Emulate()
[header] [impl]

Destroys the emulator device.

Destroy a block.

virtual void doTransaction(std::shared_ptr<rogue::interfaces::memory::Transaction> transaction)
[header] [impl]

Handles an incoming memory transaction.

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

Parameters:

transactionTransaction to execute against emulated memory.

Public Static Functions

static std::shared_ptr<rogue::interfaces::memory::Emulate> create(uint32_t min, uint32_t max)
[header] [impl]

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.

Company : SLAC National Accelerator Laboratory

Description: A memory space emulator. Allows user to test a Rogue tree without real hardware. This block will auto allocate memory as needed.

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.

Parameters:
  • 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.

Returns:

Shared pointer to the created emulator.

static void setup_python()
[header] [impl]

Registers this type with Python bindings.