rogue
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
rogue::interfaces::memory::Block Class Reference

Memory interface block device. More...

#include <Block.h>

Inheritance diagram for rogue::interfaces::memory::Block:
rogue::interfaces::memory::Master

Public Member Functions

 Block (uint64_t offset, uint32_t size)
 Constructs a block device with a given offset and size.
 
virtual ~Block ()
 
std::string path ()
 Returns the path of the block in the device tree.
 
std::string mode ()
 Returns the block access mode.
 
bool bulkOpEn ()
 Returns whether this block participates in bulk operations.
 
void setEnable (bool enable)
 Sets the block enable state.
 
void setLogLevel (uint32_t level)
 Sets logging verbosity level for this block.
 
uint64_t offset ()
 Returns the local offset of this block.
 
uint64_t address ()
 Returns the full address of this block.
 
uint32_t size ()
 Returns block size in bytes.
 
bool blockPyTrans ()
 Returns whether Python transaction callbacks are blocked.
 
void startTransaction (uint32_t type, bool forceWr, bool check, rogue::interfaces::memory::Variable *var, int32_t index=-1)
 Starts a C++ transaction for this block.
 
void startTransactionPy (uint32_t type, bool forceWr, bool check, std::shared_ptr< rogue::interfaces::memory::Variable > var, int32_t index)
 Starts a block transaction from Python.
 
bool checkTransaction ()
 Checks transaction result in C++ mode.
 
void checkTransactionPy ()
 Checks transaction result.
 
void write (rogue::interfaces::memory::Variable *var, int32_t index=-1)
 Issues write/verify/check sequence from C++.
 
void read (rogue::interfaces::memory::Variable *var, int32_t index=-1)
 Issues read/check sequence from C++.
 
void addVariables (std::vector< std::shared_ptr< rogue::interfaces::memory::Variable > > variables)
 Adds variables to this block (C++ API).
 
void addVariablesPy (boost::python::object variables)
 Adds variables to this block (Python API).
 
std::vector< std::shared_ptr< rogue::interfaces::memory::Variable > > variables ()
 Returns the variable list associated with this block (C++ API).
 
boost::python::object variablesPy ()
 Returns the variable list associated with this block (Python API).
 
void rateTest ()
 Runs block rate-test helper for performance testing.
 
void setPyFunc (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets variable data using a Python callback/value.
 
boost::python::object getPyFunc (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets variable data using a Python callback/value conversion.
 
void setByteArrayPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets variable data from Python byte-array-like input.
 
boost::python::object getByteArrayPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets variable data as a Python byte-array-like object.
 
void setByteArray (const uint8_t *value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets variable data from C++ byte array input.
 
void getByteArray (uint8_t *value, rogue::interfaces::memory::Variable *var, int32_t index)
 Gets variable data into a C++ byte array buffer.
 
void setUIntPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets unsigned-integer variable data from Python input.
 
boost::python::object getUIntPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets unsigned-integer variable data as Python output.
 
void setUInt (const uint64_t &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets unsigned-integer variable data from C++ input.
 
uint64_t getUInt (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets unsigned-integer variable data as C++ output.
 
void setIntPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets signed-integer variable data from Python input.
 
boost::python::object getIntPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets signed-integer variable data as Python output.
 
void setInt (const int64_t &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets signed-integer variable data from C++ input.
 
int64_t getInt (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets signed-integer variable data as C++ output.
 
void setBoolPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets boolean variable data from Python input.
 
boost::python::object getBoolPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets boolean variable data as Python output.
 
void setBool (const bool &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets boolean variable data from C++ input.
 
bool getBool (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets boolean variable data as C++ output.
 
void setStringPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets string variable data from Python input.
 
boost::python::object getStringPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets string variable data as Python output.
 
void setString (const std::string &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets string variable data from C++ input.
 
std::string getString (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets string variable data as C++ output.
 
void getString (rogue::interfaces::memory::Variable *var, std::string &valueRet, int32_t index)
 Gets string variable data into an output string reference.
 
void getValue (rogue::interfaces::memory::Variable *var, std::string &valueRet, int32_t index)
 Alias to getString(var, valueRet, index).
 
void setFloatPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets float variable data from Python input.
 
boost::python::object getFloatPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets float variable data as Python output.
 
void setFloat (const float &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets float variable data from C++ input.
 
float getFloat (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets float variable data as C++ output.
 
void setDoublePy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets double variable data from Python input.
 
boost::python::object getDoublePy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets double variable data as Python output.
 
void setDouble (const double &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets double variable data from C++ input.
 
double getDouble (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets double variable data as C++ output.
 
void setFixedPy (boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets fixed-point variable data from Python input.
 
boost::python::object getFixedPy (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets fixed-point variable data as Python output.
 
void setFixed (const double &value, rogue::interfaces::memory::Variable *var, int32_t index)
 Sets fixed-point variable data from C++ input.
 
double getFixed (rogue::interfaces::memory::Variable *var, int32_t index)
 Gets fixed-point variable data as C++ output.
 
- 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.
 

Static Public Member Functions

static std::shared_ptr< rogue::interfaces::memory::Blockcreate (uint64_t offset, uint32_t size)
 Creates a memory block.
 
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.
 

Protected Member Functions

void varUpdate ()
 
void setBytes (const uint8_t *data, rogue::interfaces::memory::Variable *var, uint32_t index)
 
void getBytes (uint8_t *data, rogue::interfaces::memory::Variable *var, uint32_t index)
 
virtual void customInit ()
 
virtual void customClean ()
 
- 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.
 

Static Protected Member Functions

static void reverseBytes (uint8_t *data, uint32_t byteSize)
 

Protected Attributes

std::mutex mtx_
 
std::string path_
 
std::string mode_
 
bool bulkOpEn_
 
bool updateEn_
 
bool verifyEn_
 
bool verifyReq_
 
bool verifyInp_
 
uint32_t verifyBase_
 
uint32_t verifySize_
 
uint8_t * blockData_
 
uint8_t * verifyData_
 
uint8_t * verifyMask_
 
uint8_t * verifyBlock_
 
uint32_t size_
 
uint64_t offset_
 
bool doUpdate_
 
bool blockPyTrans_
 
std::shared_ptr< rogue::LoggingbLog_
 
std::vector< std::shared_ptr< rogue::interfaces::memory::Variable > > variables_
 
bool enable_
 
bool stale_
 
uint32_t retryCount_
 

Detailed Description

Memory interface block device.

Bridges higher-level variable access to lower-level memory transactions.

A Block owns staged byte storage for a register region and one or more Variable objects that map bit fields into that storage. Typed access methods (setUInt, getString, setFloat, etc.) are not selected directly by users of Block; instead, each Variable binds to the appropriate Block method pair according to its model (UInt, Int, Bool, String, Float, Double, Fixed, Bytes, PyFunc) and width constraints.

Conversion and transport are separated:

Typical usage is through Variable APIs, which call the matching Block conversion method and then issue read/write transactions.

Definition at line 96 of file Block.h.

Constructor & Destructor Documentation

◆ Block()

rogue::interfaces::memory::Block::Block ( uint64_t  offset,
uint32_t  size 
)

Constructs a block device with a given offset and size.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

Parameters
offsetMemory offset of the block.
sizeMemory size (footprint) of the block.

Definition at line 85 of file Block.cpp.

◆ ~Block()

rogue::interfaces::memory::Block::~Block ( )
virtual

Definition at line 118 of file Block.cpp.

Member Function Documentation

◆ address()

uint64_t rogue::interfaces::memory::Block::address ( )

Returns the full address of this block.

Includes parent address plus local offset. Exposed as address property in Python.

Returns
64-bit address.

Definition at line 156 of file Block.cpp.

◆ addVariables()

void rogue::interfaces::memory::Block::addVariables ( std::vector< std::shared_ptr< rogue::interfaces::memory::Variable > >  variables)

Adds variables to this block (C++ API).

Exposed as addVariables() in Python.

Parameters
variablesVariable list.

Definition at line 450 of file Block.cpp.

◆ addVariablesPy()

void rogue::interfaces::memory::Block::addVariablesPy ( boost::python::object  variables)

Adds variables to this block (Python API).

Parameters
variablesPython list/iterable of variables.

Definition at line 610 of file Block.cpp.

◆ blockPyTrans()

bool rogue::interfaces::memory::Block::blockPyTrans ( )

Returns whether Python transaction callbacks are blocked.

Definition at line 166 of file Block.cpp.

◆ bulkOpEn()

bool rogue::interfaces::memory::Block::bulkOpEn ( )

Returns whether this block participates in bulk operations.

Exposed as bulkOpEn property in Python.

Returns
Bulk-operation enable flag.

Definition at line 139 of file Block.cpp.

◆ checkTransaction()

bool rogue::interfaces::memory::Block::checkTransaction ( )

Checks transaction result in C++ mode.

Throws an exception if an error occurred.

Definition at line 357 of file Block.cpp.

◆ checkTransactionPy()

void rogue::interfaces::memory::Block::checkTransactionPy ( )

Checks transaction result.

Python version of checkTransaction(), with variable update calls. Throws an exception if an error occurred. Exposed as checkTransaction() in Python.

Definition at line 413 of file Block.cpp.

◆ create()

rogue::interfaces::memory::BlockPtr rogue::interfaces::memory::Block::create ( uint64_t  offset,
uint32_t  size 
)
static

Creates a memory block.

Exposed to Python as rogue.interfaces.memory.Block(). 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.

Parameters
offsetMemory offset of the block.
sizeMemory size (footprint) of the block.
Returns
Shared pointer to the created block.

Definition at line 57 of file Block.cpp.

◆ customClean()

void rogue::interfaces::memory::Block::customClean ( )
protectedvirtual

Definition at line 2047 of file Block.cpp.

◆ customInit()

void rogue::interfaces::memory::Block::customInit ( )
protectedvirtual

Definition at line 2044 of file Block.cpp.

◆ getBool()

bool rogue::interfaces::memory::Block::getBool ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets boolean variable data as C++ output.

C++ path for Bool variables.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Boolean value.

Definition at line 1492 of file Block.cpp.

◆ getBoolPy()

boost::python::object rogue::interfaces::memory::Block::getBoolPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets boolean variable data as Python output.

Python path for Bool variables.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing boolean value.

Definition at line 1459 of file Block.cpp.

◆ getByteArray()

void rogue::interfaces::memory::Block::getByteArray ( uint8_t *  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets variable data into a C++ byte array buffer.

Primary C++ path for Bytes variables and width-overflow fallback path for numeric models that cannot be represented in native scalar types.

Parameters
valueDestination byte buffer.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 909 of file Block.cpp.

◆ getByteArrayPy()

boost::python::object rogue::interfaces::memory::Block::getByteArrayPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets variable data as a Python byte-array-like object.

Primary Python path for Bytes variables. Also used by some large-width numeric model paths when values are represented as raw bytes.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing the variable bytes.

Definition at line 881 of file Block.cpp.

◆ getBytes()

void rogue::interfaces::memory::Block::getBytes ( uint8_t *  data,
rogue::interfaces::memory::Variable var,
uint32_t  index 
)
protected

Definition at line 719 of file Block.cpp.

◆ getDouble()

double rogue::interfaces::memory::Block::getDouble ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets double variable data as C++ output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Double value.

Definition at line 1867 of file Block.cpp.

◆ getDoublePy()

boost::python::object rogue::interfaces::memory::Block::getDoublePy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets double variable data as Python output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing double value.

Definition at line 1822 of file Block.cpp.

◆ getFixed()

double rogue::interfaces::memory::Block::getFixed ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets fixed-point variable data as C++ output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Fixed-point value.

Definition at line 2023 of file Block.cpp.

◆ getFixedPy()

boost::python::object rogue::interfaces::memory::Block::getFixedPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets fixed-point variable data as Python output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing fixed-point value.

Definition at line 1971 of file Block.cpp.

◆ getFloat()

float rogue::interfaces::memory::Block::getFloat ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets float variable data as C++ output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Float value.

Definition at line 1718 of file Block.cpp.

◆ getFloatPy()

boost::python::object rogue::interfaces::memory::Block::getFloatPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets float variable data as Python output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing float value.

Definition at line 1673 of file Block.cpp.

◆ getInt()

int64_t rogue::interfaces::memory::Block::getInt ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets signed-integer variable data as C++ output.

C++ path for Int variables when width is 64 bits or less. Wider Int values are handled through byte-array conversion paths.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Signed-integer value.

Definition at line 1352 of file Block.cpp.

◆ getIntPy()

boost::python::object rogue::interfaces::memory::Block::getIntPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets signed-integer variable data as Python output.

Python path for Int variables when width is 64 bits or less. Returns either a scalar or an array/list-like object for list variables.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing signed-integer value.

Definition at line 1272 of file Block.cpp.

◆ getPyFunc()

boost::python::object rogue::interfaces::memory::Block::getPyFunc ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets variable data using a Python callback/value conversion.

Used for PyFunc variables and Python fallback paths for large-width integer variables where direct scalar conversion is not used. Reads staged bytes and calls model-specific fromBytes() conversion.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object representing the variable value.

Definition at line 828 of file Block.cpp.

◆ getString() [1/2]

std::string rogue::interfaces::memory::Block::getString ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets string variable data as C++ output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
String value.

Definition at line 1560 of file Block.cpp.

◆ getString() [2/2]

void rogue::interfaces::memory::Block::getString ( rogue::interfaces::memory::Variable var,
std::string &  valueRet,
int32_t  index 
)

Gets string variable data into an output string reference.

Parameters
varVariable associated with the transaction.
valueRetDestination string reference.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1567 of file Block.cpp.

◆ getStringPy()

boost::python::object rogue::interfaces::memory::Block::getStringPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets string variable data as Python output.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing string value.

Definition at line 1527 of file Block.cpp.

◆ getUInt()

uint64_t rogue::interfaces::memory::Block::getUInt ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets unsigned-integer variable data as C++ output.

C++ path for UInt variables when width is 64 bits or less. Wider UInt values are handled through byte-array conversion paths.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Unsigned-integer value.

Definition at line 1128 of file Block.cpp.

◆ getUIntPy()

boost::python::object rogue::interfaces::memory::Block::getUIntPy ( rogue::interfaces::memory::Variable var,
int32_t  index 
)

Gets unsigned-integer variable data as Python output.

Python path for UInt variables when width is 64 bits or less. Returns either a scalar or an array/list-like object for list variables.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.
Returns
Python object containing unsigned-integer value.

Definition at line 1047 of file Block.cpp.

◆ getValue()

void rogue::interfaces::memory::Block::getValue ( rogue::interfaces::memory::Variable var,
std::string &  valueRet,
int32_t  index 
)
inline

Alias to getString(var, valueRet, index).

Parameters
varVariable associated with the transaction.
valueRetDestination string reference.
indexVariable index for list variables, or -1 for full variable.

Definition at line 764 of file Block.h.

◆ mode()

std::string rogue::interfaces::memory::Block::mode ( )

Returns the block access mode.

Supported modes include "RW", "RO", and "WO". Exposed as mode property in Python.

Returns
Mode string.

Definition at line 134 of file Block.cpp.

◆ offset()

uint64_t rogue::interfaces::memory::Block::offset ( )

Returns the local offset of this block.

Exposed as offset property in Python.

Returns
64-bit address offset.

Definition at line 151 of file Block.cpp.

◆ path()

std::string rogue::interfaces::memory::Block::path ( )

Returns the path of the block in the device tree.

Exposed as path property in Python.

Returns
Full path of the block.

Definition at line 129 of file Block.cpp.

◆ rateTest()

void rogue::interfaces::memory::Block::rateTest ( )

Runs block rate-test helper for performance testing.

Python: Exposed as rateTest to python users.

Definition at line 2049 of file Block.cpp.

◆ read()

void rogue::interfaces::memory::Block::read ( rogue::interfaces::memory::Variable var,
int32_t  index = -1 
)

Issues read/check sequence from C++.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 429 of file Block.cpp.

◆ reverseBytes()

void rogue::interfaces::memory::Block::reverseBytes ( uint8_t *  data,
uint32_t  byteSize 
)
inlinestaticprotected

Definition at line 632 of file Block.cpp.

◆ setBool()

void rogue::interfaces::memory::Block::setBool ( const bool &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets boolean variable data from C++ input.

C++ path for Bool variables.

Parameters
valueSource boolean value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1486 of file Block.cpp.

◆ setBoolPy()

void rogue::interfaces::memory::Block::setBoolPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets boolean variable data from Python input.

Python path for Bool variables.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1372 of file Block.cpp.

◆ setByteArray()

void rogue::interfaces::memory::Block::setByteArray ( const uint8_t *  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets variable data from C++ byte array input.

Primary C++ path for Bytes variables and width-overflow fallback path for numeric models that cannot be represented in native scalar types.

Parameters
valueSource byte buffer.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 904 of file Block.cpp.

◆ setByteArrayPy()

void rogue::interfaces::memory::Block::setByteArrayPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets variable data from Python byte-array-like input.

Primary Python path for Bytes variables. Also used by some large-width numeric model paths when values are represented as raw bytes.

Parameters
valuePython source buffer.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 862 of file Block.cpp.

◆ setBytes()

void rogue::interfaces::memory::Block::setBytes ( const uint8_t *  data,
rogue::interfaces::memory::Variable var,
uint32_t  index 
)
protected

Definition at line 644 of file Block.cpp.

◆ setDouble()

void rogue::interfaces::memory::Block::setDouble ( const double &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets double variable data from C++ input.

Parameters
valueSource double value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1853 of file Block.cpp.

◆ setDoublePy()

void rogue::interfaces::memory::Block::setDoublePy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets double variable data from Python input.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1733 of file Block.cpp.

◆ setEnable()

void rogue::interfaces::memory::Block::setEnable ( bool  enable)

Sets the block enable state.

Exposed as setEnable() in Python.

Parameters
enableSet to true to enable block operations.

Definition at line 144 of file Block.cpp.

◆ setFixed()

void rogue::interfaces::memory::Block::setFixed ( const double &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets fixed-point variable data from C++ input.

Parameters
valueSource fixed-point value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 2002 of file Block.cpp.

◆ setFixedPy()

void rogue::interfaces::memory::Block::setFixedPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets fixed-point variable data from Python input.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1882 of file Block.cpp.

◆ setFloat()

void rogue::interfaces::memory::Block::setFloat ( const float &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets float variable data from C++ input.

Parameters
valueSource float value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1704 of file Block.cpp.

◆ setFloatPy()

void rogue::interfaces::memory::Block::setFloatPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets float variable data from Python input.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1584 of file Block.cpp.

◆ setInt()

void rogue::interfaces::memory::Block::setInt ( const int64_t &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets signed-integer variable data from C++ input.

C++ path for Int variables when width is 64 bits or less. Wider Int values are handled through byte-array conversion paths.

Parameters
valueSource signed-integer value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1337 of file Block.cpp.

◆ setIntPy()

void rogue::interfaces::memory::Block::setIntPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets signed-integer variable data from Python input.

Python path for Int variables when width is 64 bits or less. Supports scalar values and array/list updates for list variables.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1143 of file Block.cpp.

◆ setLogLevel()

void rogue::interfaces::memory::Block::setLogLevel ( uint32_t  level)
inline

Sets logging verbosity level for this block.

Parameters
levelLogging level value.

Definition at line 269 of file Block.h.

◆ setPyFunc()

void rogue::interfaces::memory::Block::setPyFunc ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets variable data using a Python callback/value.

Used for PyFunc variables and Python fallback paths for large-width integer variables where direct scalar conversion is not used. Calls model-specific toBytes() conversion before writing staged bytes.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 772 of file Block.cpp.

◆ setString()

void rogue::interfaces::memory::Block::setString ( const std::string &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets string variable data from C++ input.

Parameters
valueSource string value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1549 of file Block.cpp.

◆ setStringPy()

void rogue::interfaces::memory::Block::setStringPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets string variable data from Python input.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1507 of file Block.cpp.

◆ setUInt()

void rogue::interfaces::memory::Block::setUInt ( const uint64_t &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets unsigned-integer variable data from C++ input.

C++ path for UInt variables when width is 64 bits or less. Wider UInt values are handled through byte-array conversion paths.

Parameters
valueSource unsigned-integer value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 1114 of file Block.cpp.

◆ setUIntPy()

void rogue::interfaces::memory::Block::setUIntPy ( boost::python::object &  value,
rogue::interfaces::memory::Variable var,
int32_t  index 
)

Sets unsigned-integer variable data from Python input.

Python path for UInt variables when width is 64 bits or less. Supports scalar values and array/list updates for list variables.

Parameters
valuePython source value.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 920 of file Block.cpp.

◆ setup_python()

void rogue::interfaces::memory::Block::setup_python ( )
static

Definition at line 64 of file Block.cpp.

◆ size()

uint32_t rogue::interfaces::memory::Block::size ( )

Returns block size in bytes.

Exposed as size property in Python.

Returns
32-bit block size.

Definition at line 161 of file Block.cpp.

◆ startTransaction()

void rogue::interfaces::memory::Block::startTransaction ( uint32_t  type,
bool  forceWr,
bool  check,
rogue::interfaces::memory::Variable var,
int32_t  index = -1 
)

Starts a C++ transaction for this block.

Parameters
typeTransaction type.
forceWrForces write even when block is not stale.
checkRequests immediate result checking, meaning wait for the transaction to complete before returning.
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 279 of file Block.cpp.

◆ startTransactionPy()

void rogue::interfaces::memory::Block::startTransactionPy ( uint32_t  type,
bool  forceWr,
bool  check,
std::shared_ptr< rogue::interfaces::memory::Variable var,
int32_t  index 
)

Starts a block transaction from Python.

Exposed as startTransaction() in Python.

Parameters
typeTransaction type.
forceWrForces write even when block is not stale.
checkRequests immediate result checking, meaning wait for the transaction to complete before returning.
varVariable associated with transaction, or None for block scope.
indexVariable index for list variables, or -1 for full variable.

Definition at line 315 of file Block.cpp.

◆ variables()

std::vector< rogue::interfaces::memory::VariablePtr > rogue::interfaces::memory::Block::variables ( )

Returns the variable list associated with this block (C++ API).

Return a list of variables in the block.

Definition at line 618 of file Block.cpp.

◆ variablesPy()

boost::python::object rogue::interfaces::memory::Block::variablesPy ( )

Returns the variable list associated with this block (Python API).

Return a list of variables in the block.

Exposed as variables property in Python.

Definition at line 625 of file Block.cpp.

◆ varUpdate()

void rogue::interfaces::memory::Block::varUpdate ( )
protected

Definition at line 437 of file Block.cpp.

◆ write()

void rogue::interfaces::memory::Block::write ( rogue::interfaces::memory::Variable var,
int32_t  index = -1 
)

Issues write/verify/check sequence from C++.

Parameters
varVariable associated with the transaction.
indexVariable index for list variables, or -1 for full variable.

Definition at line 422 of file Block.cpp.

Member Data Documentation

◆ blockData_

uint8_t* rogue::interfaces::memory::Block::blockData_
protected

Definition at line 129 of file Block.h.

◆ blockPyTrans_

bool rogue::interfaces::memory::Block::blockPyTrans_
protected

Definition at line 150 of file Block.h.

◆ bLog_

std::shared_ptr<rogue::Logging> rogue::interfaces::memory::Block::bLog_
protected

Definition at line 153 of file Block.h.

◆ bulkOpEn_

bool rogue::interfaces::memory::Block::bulkOpEn_
protected

Definition at line 108 of file Block.h.

◆ doUpdate_

bool rogue::interfaces::memory::Block::doUpdate_
protected

Definition at line 147 of file Block.h.

◆ enable_

bool rogue::interfaces::memory::Block::enable_
protected

Definition at line 159 of file Block.h.

◆ mode_

std::string rogue::interfaces::memory::Block::mode_
protected

Definition at line 105 of file Block.h.

◆ mtx_

std::mutex rogue::interfaces::memory::Block::mtx_
protected

Definition at line 99 of file Block.h.

◆ offset_

uint64_t rogue::interfaces::memory::Block::offset_
protected

Definition at line 144 of file Block.h.

◆ path_

std::string rogue::interfaces::memory::Block::path_
protected

Definition at line 102 of file Block.h.

◆ retryCount_

uint32_t rogue::interfaces::memory::Block::retryCount_
protected

Definition at line 165 of file Block.h.

◆ size_

uint32_t rogue::interfaces::memory::Block::size_
protected

Definition at line 141 of file Block.h.

◆ stale_

bool rogue::interfaces::memory::Block::stale_
protected

Definition at line 162 of file Block.h.

◆ updateEn_

bool rogue::interfaces::memory::Block::updateEn_
protected

Definition at line 111 of file Block.h.

◆ variables_

std::vector<std::shared_ptr<rogue::interfaces::memory::Variable> > rogue::interfaces::memory::Block::variables_
protected

Definition at line 156 of file Block.h.

◆ verifyBase_

uint32_t rogue::interfaces::memory::Block::verifyBase_
protected

Definition at line 123 of file Block.h.

◆ verifyBlock_

uint8_t* rogue::interfaces::memory::Block::verifyBlock_
protected

Definition at line 138 of file Block.h.

◆ verifyData_

uint8_t* rogue::interfaces::memory::Block::verifyData_
protected

Definition at line 132 of file Block.h.

◆ verifyEn_

bool rogue::interfaces::memory::Block::verifyEn_
protected

Definition at line 114 of file Block.h.

◆ verifyInp_

bool rogue::interfaces::memory::Block::verifyInp_
protected

Definition at line 120 of file Block.h.

◆ verifyMask_

uint8_t* rogue::interfaces::memory::Block::verifyMask_
protected

Definition at line 135 of file Block.h.

◆ verifyReq_

bool rogue::interfaces::memory::Block::verifyReq_
protected

Definition at line 117 of file Block.h.

◆ verifySize_

uint32_t rogue::interfaces::memory::Block::verifySize_
protected

Definition at line 126 of file Block.h.


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