|
rogue
|
Memory variable descriptor and typed accessor facade. More...
#include <Variable.h>
Public Member Functions | |
| Variable (std::string name, std::string mode, double minimum, double maximum, uint64_t offset, std::vector< uint32_t > bitOffset, std::vector< uint32_t > bitSize, bool overlapEn, bool verify, bool bulkOpEn, bool updateNotify, uint32_t modelId, bool byteReverse, bool bitReverse, uint32_t binPoint, uint32_t numValues, uint32_t valueBits, uint32_t valueStride, uint32_t retryCount) | |
| Constructs a variable descriptor. | |
| virtual | ~Variable () |
| Destroys the variable instance. | |
| void | shiftOffsetDown (uint32_t shift, uint32_t minSize) |
| Shifts variable offset and packed bit fields downward. | |
| void | updatePath (std::string path) |
| Updates the hierarchical path string for this variable. | |
| uint32_t | modelId () const |
| Returns model ID of the variable. | |
| uint32_t | bitTotal () const |
| Returns total number of bits for this value. | |
| uint32_t | byteSize () const |
| Returns total bytes (rounded up) for this value. | |
| const std::string & | name () const |
| Returns variable name. | |
| const std::string & | mode () const |
| Returns variable mode string. | |
| const std::string & | path () const |
| Returns variable path. | |
| double | minimum () |
| Returns minimum value. | |
| double | maximum () |
| Returns maximum value. | |
| uint32_t | varBytes () |
| Returns variable range in bytes. | |
| uint64_t | offset () |
| Returns variable byte offset. | |
| bool | verifyEn () |
| Returns verify-enable flag. | |
| bool | overlapEn () |
| Returns overlap-enable flag. | |
| bool | bulkOpEn () |
| Returns bulk-operation enable flag. | |
| uint32_t | numValues () |
| Returns number of values. | |
| uint32_t | valueBits () |
| Returns number of bits per value. | |
| uint32_t | valueBytes () |
| Returns number of bytes per value. | |
| uint32_t | valueStride () |
| Returns byte stride per value. | |
| uint32_t | retryCount () |
| Returns retry count. | |
| virtual void | queueUpdate () |
| Executes queue update callback (unused in C++). | |
| void | rateTest () |
| Runs a local throughput benchmark for variable get/set operations. | |
| void | setLogLevel (uint32_t level) |
| Sets logging level for variable's block. | |
| std::string | getDumpValue (bool read) |
| Returns string representation of value using default converters. | |
| void | read () |
| Performs a read operation for this variable. | |
| void | setByteArray (uint8_t *value, int32_t index=-1) |
| Sets value from a raw byte array. | |
| void | getByteArray (uint8_t *value, int32_t index=-1) |
| Gets value into a raw byte array. | |
| void | setUInt (uint64_t &value, int32_t index=-1) |
| Sets an unsigned integer value. | |
| void | setValue (uint64_t value, int32_t index=-1) |
Convenience alias for setUInt. | |
| uint64_t | getUInt (int32_t index=-1) |
| Gets unsigned integer value. | |
| void | getValue (uint64_t &valueRet, int32_t index=-1) |
| Gets unsigned integer value into output reference. | |
| void | setInt (int64_t &value, int32_t index=-1) |
| Sets signed integer value. | |
| void | setValue (int64_t value, int32_t index=-1) |
Convenience alias for setInt. | |
| int64_t | getInt (int32_t index=-1) |
| Gets signed integer value. | |
| void | getValue (int64_t &valueRet, int32_t index=-1) |
| Gets signed integer value into output reference. | |
| void | setBool (bool &value, int32_t index=-1) |
| Sets boolean value. | |
| void | setValue (bool value, int32_t index=-1) |
Convenience alias for setBool. | |
| bool | getBool (int32_t index=-1) |
| Gets boolean value. | |
| void | getValue (bool &valueRet, int32_t index=-1) |
| Gets boolean value into output reference. | |
| void | setString (const std::string &value, int32_t index=-1) |
| Sets string value. | |
| void | setValue (const std::string &value, int32_t index=-1) |
Convenience alias for setString. | |
| std::string | getString (int32_t index=-1) |
| Gets string value. | |
| void | getString (std::string &retString, int32_t index=-1) |
| Gets string value into output reference. | |
| void | getValue (std::string &valueRet, int32_t index=-1) |
| Gets string value into output reference. | |
| void | setFloat (float &value, int32_t index=-1) |
| Sets float value. | |
| void | setValue (float value, int32_t index=-1) |
Convenience alias for setFloat. | |
| float | getFloat (int32_t index=-1) |
| Gets float value. | |
| void | getValue (float &valueRet, int32_t index=-1) |
| Gets float value into output reference. | |
| void | setFloat16 (float &value, int32_t index=-1) |
| Sets half-precision float value. | |
| float | getFloat16 (int32_t index=-1) |
| Gets half-precision float value. | |
| void | setFloat8 (float &value, int32_t index=-1) |
| Sets 8-bit E4M3 float value. | |
| float | getFloat8 (int32_t index=-1) |
| Gets 8-bit E4M3 float value. | |
| void | setBFloat16 (float &value, int32_t index=-1) |
| Sets BFloat16 value. | |
| float | getBFloat16 (int32_t index=-1) |
| Gets BFloat16 value. | |
| void | setTensorFloat32 (float &value, int32_t index=-1) |
| Sets TensorFloat32 value. | |
| float | getTensorFloat32 (int32_t index=-1) |
| Gets TensorFloat32 value. | |
| void | setFloat6 (float &value, int32_t index=-1) |
| Sets 6-bit E3M2 float value. | |
| float | getFloat6 (int32_t index=-1) |
| Gets 6-bit E3M2 float value. | |
| void | setFloat4 (float &value, int32_t index=-1) |
| Set a C++ float value into the variable using Float4 (E2M1) conversion. | |
| float | getFloat4 (int32_t index=-1) |
| Get the variable's value as a C++ float using Float4 (E2M1) conversion. | |
| void | setDouble (double &value, int32_t index=-1) |
| Sets double value. | |
| void | setValue (double value, int32_t index=-1) |
Convenience alias for setDouble. | |
| double | getDouble (int32_t index=-1) |
| Gets double value. | |
| void | getValue (double &valueRet, int32_t index=-1) |
| Gets double value into output reference. | |
| void | setFixed (double &value, int32_t index=-1) |
| Sets fixed-point value. | |
| double | getFixed (int32_t index=-1) |
| Gets fixed-point value. | |
Static Public Member Functions | |
| static rogue::interfaces::memory::VariablePtr | create (std::string name, std::string mode, double minimum, double maximum, uint64_t offset, std::vector< uint32_t > bitOffset, std::vector< uint32_t > bitSize, bool overlapEn, bool verify, bool bulkOpEn, bool updateNotify, uint32_t modelId, bool byteReverse, bool bitReverse, uint32_t binPoint, uint32_t numValues, uint32_t valueBits, uint32_t valueStride, uint32_t retryCount) |
| Creates a memory variable descriptor. | |
| static void | setup_python () |
| Registers Python bindings for this class. | |
Protected Attributes | |
| rogue::interfaces::memory::Block * | block_ |
| std::string | name_ |
| std::string | path_ |
| uint32_t | modelId_ |
| bool | byteReverse_ |
| bool | bitReverse_ |
| uint32_t | bitTotal_ |
| uint32_t * | fastByte_ |
| uint32_t | byteSize_ |
| uint32_t | varBytes_ |
| uint64_t | offset_ |
| std::vector< uint32_t > | bitOffset_ |
| std::vector< uint32_t > | bitSize_ |
| double | minValue_ |
| double | maxValue_ |
| bool | bulkOpEn_ |
| bool | updateNotify_ |
| std::string | mode_ |
| bool | overlapEn_ |
| bool | verifyEn_ |
| uint32_t * | lowTranByte_ |
| uint32_t * | highTranByte_ |
| void * | customData_ |
| uint32_t | binPoint_ |
| bool | stale_ |
| uint32_t | staleLowByte_ |
| uint32_t | staleHighByte_ |
| uint32_t | numValues_ |
| uint32_t | valueBits_ |
| uint32_t | valueBytes_ |
| uint32_t | valueStride_ |
| uint32_t | retryCount_ |
| void(rogue::interfaces::memory::Block::* | setFuncPy_ )(boost::python::object &, rogue::interfaces::memory::Variable *, int32_t index) |
| boost::python::object(rogue::interfaces::memory::Block::* | getFuncPy_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setByteArray_ )(const uint8_t *, rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | getByteArray_ )(uint8_t *, rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setUInt_ )(const uint64_t &, rogue::interfaces::memory::Variable *, int32_t index) |
| uint64_t(rogue::interfaces::memory::Block::* | getUInt_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setInt_ )(const int64_t &, rogue::interfaces::memory::Variable *, int32_t index) |
| int64_t(rogue::interfaces::memory::Block::* | getInt_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setBool_ )(const bool &, rogue::interfaces::memory::Variable *, int32_t index) |
| bool(rogue::interfaces::memory::Block::* | getBool_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setString_ )(const std::string &, rogue::interfaces::memory::Variable *, int32_t index) |
| std::string(rogue::interfaces::memory::Block::* | getString_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFloat_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getFloat_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setDouble_ )(const double &, rogue::interfaces::memory::Variable *, int32_t index) |
| double(rogue::interfaces::memory::Block::* | getDouble_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFloat16_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getFloat16_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFloat8_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getFloat8_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setBFloat16_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getBFloat16_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setTensorFloat32_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getTensorFloat32_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFloat6_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getFloat6_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFloat4_ )(const float &, rogue::interfaces::memory::Variable *, int32_t index) |
| float(rogue::interfaces::memory::Block::* | getFloat4_ )(rogue::interfaces::memory::Variable *, int32_t index) |
| void(rogue::interfaces::memory::Block::* | setFixed_ )(const double &, rogue::interfaces::memory::Variable *, int32_t index) |
| double(rogue::interfaces::memory::Block::* | getFixed_ )(rogue::interfaces::memory::Variable *, int32_t index) |
Friends | |
| class | Block |
Memory variable descriptor and typed accessor facade.
A Variable defines how one logical value (or value array) maps into a parent memory Block. It stores layout and conversion metadata such as bit offsets, bit widths, endianness/bit-order behavior, and model ID.
The Variable API is type-oriented (setUInt, getFloat, setString, etc.), while the owning Block performs the low-level marshaling and transport:
set* methods stage converted bytes and trigger a block write/verify sequence.get* methods trigger a block read and convert staged bytes back to native types.Dispatch to the underlying Block conversion path is selected from modelId_ during construction. Using a mismatched typed API for the configured model raises a runtime error.
Definition at line 62 of file Variable.h.
| rogue::interfaces::memory::Variable::Variable | ( | std::string | name, |
| std::string | mode, | ||
| double | minimum, | ||
| double | maximum, | ||
| uint64_t | offset, | ||
| std::vector< uint32_t > | bitOffset, | ||
| std::vector< uint32_t > | bitSize, | ||
| bool | overlapEn, | ||
| bool | verify, | ||
| bool | bulkOpEn, | ||
| bool | updateNotify, | ||
| uint32_t | modelId, | ||
| bool | byteReverse, | ||
| bool | bitReverse, | ||
| uint32_t | binPoint, | ||
| uint32_t | numValues, | ||
| uint32_t | valueBits, | ||
| uint32_t | valueStride, | ||
| uint32_t | retryCount | ||
| ) |
Constructs a variable descriptor.
This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.
| name | Variable name. |
| mode | Variable mode string. |
| minimum | Minimum allowed value (range checking), 0 to disable. |
| maximum | Maximum allowed value (range checking), 0 to disable. |
| offset | Variable byte offset within the parent block. |
| bitOffset | Bit offsets for one or more packed values. |
| bitSize | Bit widths for one or more packed values. |
| overlapEn | Allow overlap checks to be bypassed. |
| verify | Enable readback verification on writes. |
| bulkOpEn | Enable bulk operations when supported by the parent block. |
| updateNotify | Enable update callbacks into the variable tree. |
| modelId | Model identifier associated with this variable. |
| byteReverse | Enable byte-order reversal. |
| bitReverse | Enable bit-order reversal. |
| binPoint | Binary point used for fixed-point conversion. |
| numValues | Number of values represented by this variable. |
| valueBits | Bit width per value. |
| valueStride | Byte stride between values. |
| retryCount | Number of retries for transport operations. |
Definition at line 128 of file Variable.cpp.
|
virtual |
Destroys the variable instance.
Definition at line 562 of file Variable.cpp.
|
inline |
Returns total number of bits for this value.
Definition at line 464 of file Variable.h.
| bool rogue::interfaces::memory::Variable::bulkOpEn | ( | ) |
Returns bulk-operation enable flag.
Return bulk enable flag.
Definition at line 664 of file Variable.cpp.
|
inline |
Returns total bytes (rounded up) for this value.
Definition at line 469 of file Variable.h.
|
static |
Creates a memory variable descriptor.
Class factory which returns a pointer to a Variable (VariablePtr)
Exposed to Python as rogue.interfaces.memory.Variable(). 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.
| name | Variable name |
| mode | Variable mode |
| minimum | Variable min value, 0 for none |
| maximum | Variable max value, 0 for none |
| offset | Variable byte offset within the parent block. |
| bitOffset | Bit offset vector |
| bitSize | Bit size vector |
| overlapEn | Overlap enable flag |
| verify | Verify enable flag |
| bulkOpEn | Bulk read/write flag |
| updateNotify | Enable variable tree updates |
| modelId | Variable model ID |
| byteReverse | Byte reverse flag |
| bitReverse | Bit reverse flag |
| binPoint | Binary point for fixed-point values. |
| numValues | Number of values represented by this variable. |
| valueBits | Bit width per value. |
| valueStride | Byte stride between values. |
| retryCount | Number of retries for transport operations. |
Description:
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 47 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getBFloat16 | ( | int32_t | index = -1 | ) |
Gets BFloat16 value.
Issues a read transaction through the parent block, then converts staged 16-bit BFloat16 bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1075 of file Variable.cpp.
| bool rogue::interfaces::memory::Variable::getBool | ( | int32_t | index = -1 | ) |
Gets boolean value.
Issues a read transaction through the parent block, then converts staged bytes to bool.
| index | Value index, or -1 for the full variable. |
Definition at line 966 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::getByteArray | ( | uint8_t * | value, |
| int32_t | index = -1 |
||
| ) |
Gets value into a raw byte array.
Issues a read transaction through the parent block and then copies the staged value bytes into value.
| value | Pointer to output byte buffer. |
| index | Value index, or -1 for the full variable. |
Definition at line 906 of file Variable.cpp.
| double rogue::interfaces::memory::Variable::getDouble | ( | int32_t | index = -1 | ) |
Gets double value.
Issues a read transaction through the parent block, then converts staged bytes to double.
| index | Value index, or -1 for the full variable. |
Definition at line 1155 of file Variable.cpp.
| std::string rogue::interfaces::memory::Variable::getDumpValue | ( | bool | read | ) |
Returns string representation of value using default converters.
Return string representation of value using default converters.
Definition at line 808 of file Variable.cpp.
| double rogue::interfaces::memory::Variable::getFixed | ( | int32_t | index = -1 | ) |
Gets fixed-point value.
Issues a read transaction through the parent block, then converts staged bytes using configured fixed-point metadata.
| index | Value index, or -1 for the full variable. |
double. Definition at line 1175 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getFloat | ( | int32_t | index = -1 | ) |
Gets float value.
Issues a read transaction through the parent block, then converts staged bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1015 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getFloat16 | ( | int32_t | index = -1 | ) |
Gets half-precision float value.
Issues a read transaction through the parent block, then converts staged 16-bit half-precision bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1035 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getFloat4 | ( | int32_t | index = -1 | ) |
Get the variable's value as a C++ float using Float4 (E2M1) conversion.
| index | Variable index for list variables, or -1 for full variable. |
Definition at line 1135 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getFloat6 | ( | int32_t | index = -1 | ) |
Gets 6-bit E3M2 float value.
Issues a read transaction through the parent block, then converts staged 6-bit E3M2 bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1115 of file Variable.cpp.
| float rogue::interfaces::memory::Variable::getFloat8 | ( | int32_t | index = -1 | ) |
Gets 8-bit E4M3 float value.
Issues a read transaction through the parent block, then converts staged 8-bit E4M3 bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1055 of file Variable.cpp.
| int64_t rogue::interfaces::memory::Variable::getInt | ( | int32_t | index = -1 | ) |
Gets signed integer value.
Issues a read transaction through the parent block, then converts staged bytes to an int64_t.
| index | Value index, or -1 for the full variable. |
Definition at line 946 of file Variable.cpp.
| std::string rogue::interfaces::memory::Variable::getString | ( | int32_t | index = -1 | ) |
Gets string value.
Issues a read transaction through the parent block, then converts staged bytes to std::string.
| index | Value index, or -1 for the full variable. |
Definition at line 986 of file Variable.cpp.
|
inline |
Gets string value into output reference.
| retString | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 785 of file Variable.h.
| float rogue::interfaces::memory::Variable::getTensorFloat32 | ( | int32_t | index = -1 | ) |
Gets TensorFloat32 value.
Issues a read transaction through the parent block, then converts staged 32-bit TensorFloat32 bytes to float.
| index | Value index, or -1 for the full variable. |
Definition at line 1095 of file Variable.cpp.
| uint64_t rogue::interfaces::memory::Variable::getUInt | ( | int32_t | index = -1 | ) |
Gets unsigned integer value.
Issues a read transaction through the parent block, then converts staged bytes to a uint64_t.
| index | Value index, or -1 for the full variable. |
Definition at line 926 of file Variable.cpp.
|
inline |
Gets boolean value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 737 of file Variable.h.
|
inline |
Gets double value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 1054 of file Variable.h.
|
inline |
Gets float value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 841 of file Variable.h.
|
inline |
Gets signed integer value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 689 of file Variable.h.
| void rogue::interfaces::memory::Variable::getValue | ( | std::string & | valueRet, |
| int32_t | index = -1 |
||
| ) |
Gets string value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 994 of file Variable.cpp.
|
inline |
Gets unsigned integer value into output reference.
| valueRet | Output reference receiving the value. |
| index | Value index, or -1 for the full variable. |
Definition at line 641 of file Variable.h.
| double rogue::interfaces::memory::Variable::maximum | ( | ) |
| double rogue::interfaces::memory::Variable::minimum | ( | ) |
|
inline |
Returns variable mode string.
Common modes are "RW" (read/write), "RO" (read-only), and "WO" (write-only). Mode affects block-level transaction behavior.
Definition at line 487 of file Variable.h.
|
inline |
Returns model ID of the variable.
See model ID constants in rogue/interfaces/memory/Constants.h, including: PyFunc, Bytes, UInt, Int, Bool, String, Float, Double, Fixed, and Custom.
Definition at line 459 of file Variable.h.
|
inline |
Returns variable name.
Definition at line 474 of file Variable.h.
|
inline |
Returns number of values.
Definition at line 518 of file Variable.h.
| uint64_t rogue::interfaces::memory::Variable::offset | ( | ) |
| bool rogue::interfaces::memory::Variable::overlapEn | ( | ) |
Returns overlap-enable flag.
Return overlap enable flag.
Definition at line 659 of file Variable.cpp.
|
inline |
Returns variable path.
Definition at line 492 of file Variable.h.
|
virtual |
Executes queue update callback (unused in C++).
Reimplemented in rogue::interfaces::memory::VariableWrap.
Definition at line 760 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::rateTest | ( | ) |
Runs a local throughput benchmark for variable get/set operations.
Executes repeated typed accesses and prints timing/rate results. Intended for diagnostics/performance testing and not for normal control flow.
Definition at line 762 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::read | ( | ) |
Performs a read operation for this variable.
Requests that the parent block refresh this variable's bytes from downstream memory, then updates local staged state for subsequent typed get* calls.
Definition at line 803 of file Variable.cpp.
|
inline |
Returns retry count.
Definition at line 538 of file Variable.h.
| void rogue::interfaces::memory::Variable::setBFloat16 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets BFloat16 value.
Valid when this variable is configured for BFloat16 conversion. Converts float to 16-bit BFloat16 (upper 16 bits of float32), stages bytes and issues a write/verify transaction through the parent block.
| value | Input value (converted to BFloat16). |
| index | Value index, or -1 for the full variable. |
Definition at line 1067 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setBool | ( | bool & | value, |
| int32_t | index = -1 |
||
| ) |
Sets boolean value.
Valid when this variable is configured for boolean conversion. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 958 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setByteArray | ( | uint8_t * | value, |
| int32_t | index = -1 |
||
| ) |
Sets value from a raw byte array.
Uses the byte-array conversion path selected for this variable and then issues a write/verify transaction through the parent block.
| value | Pointer to input byte buffer. |
| index | Value index, or -1 for the full variable. |
Definition at line 898 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setDouble | ( | double & | value, |
| int32_t | index = -1 |
||
| ) |
Sets double value.
Valid when this variable is configured for double-precision conversion. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 1147 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFixed | ( | double & | value, |
| int32_t | index = -1 |
||
| ) |
Sets fixed-point value.
Valid when this variable is configured for fixed-point conversion. Uses configured binary-point metadata and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 1167 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFloat | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets float value.
Valid when this variable is configured for floating-point conversion. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 1007 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFloat16 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets half-precision float value.
Valid when this variable is configured for half-precision conversion. Converts float to 16-bit half-precision, stages bytes and issues a write/verify transaction through the parent block.
| value | Input value (converted to half-precision). |
| index | Value index, or -1 for the full variable. |
Definition at line 1027 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFloat4 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Set a C++ float value into the variable using Float4 (E2M1) conversion.
| value | Source float value. |
| index | Variable index for list variables, or -1 for full variable. |
Definition at line 1127 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFloat6 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets 6-bit E3M2 float value.
Valid when this variable is configured for E3M2 conversion. Converts float to 6-bit E3M2, stages bytes and issues a write/verify transaction through the parent block.
| value | Input value (converted to E3M2). |
| index | Value index, or -1 for the full variable. |
Definition at line 1107 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setFloat8 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets 8-bit E4M3 float value.
Valid when this variable is configured for E4M3 conversion. Converts float to 8-bit E4M3, stages bytes and issues a write/verify transaction through the parent block.
| value | Input value (converted to E4M3). |
| index | Value index, or -1 for the full variable. |
Definition at line 1047 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setInt | ( | int64_t & | value, |
| int32_t | index = -1 |
||
| ) |
Sets signed integer value.
Valid when this variable is configured for a signed-integer conversion path. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 938 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setLogLevel | ( | uint32_t | level | ) |
Sets logging level for variable's block.
Definition at line 799 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setString | ( | const std::string & | value, |
| int32_t | index = -1 |
||
| ) |
Sets string value.
Valid when this variable is configured for string conversion. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input string value. |
| index | Value index, or -1 for the full variable. |
Definition at line 978 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setTensorFloat32 | ( | float & | value, |
| int32_t | index = -1 |
||
| ) |
Sets TensorFloat32 value.
Valid when this variable is configured for TensorFloat32 conversion. Converts float to 32-bit TF32 (lower 13 mantissa bits zeroed), stages bytes and issues a write/verify transaction through the parent block.
| value | Input value (converted to TensorFloat32). |
| index | Value index, or -1 for the full variable. |
Definition at line 1087 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::setUInt | ( | uint64_t & | value, |
| int32_t | index = -1 |
||
| ) |
Sets an unsigned integer value.
Valid when this variable is configured for an unsigned-integer conversion path. Stages bytes and issues a write/verify transaction through the parent block.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 918 of file Variable.cpp.
|
static |
Registers Python bindings for this class.
Definition at line 89 of file Variable.cpp.
|
inline |
Convenience alias for setBool.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 715 of file Variable.h.
|
inline |
Convenience alias for setString.
| value | Input string value. |
| index | Value index, or -1 for the full variable. |
Definition at line 763 of file Variable.h.
|
inline |
Convenience alias for setDouble.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 1032 of file Variable.h.
|
inline |
Convenience alias for setFloat.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 819 of file Variable.h.
|
inline |
Convenience alias for setInt.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 667 of file Variable.h.
|
inline |
Convenience alias for setUInt.
| value | Input value. |
| index | Value index, or -1 for the full variable. |
Definition at line 619 of file Variable.h.
| void rogue::interfaces::memory::Variable::shiftOffsetDown | ( | uint32_t | shift, |
| uint32_t | minSize | ||
| ) |
Shifts variable offset and packed bit fields downward.
Used by Block during mapping/normalization to convert an absolute bit layout into block-local coordinates and to recompute cached transfer boundaries. This updates derived members such as byte coverage, fast-copy regions, and per-value low/high transaction byte ranges.
| shift | Number of bits to shift down. |
| minSize | Minimum alignment/size constraint in bits. |
Definition at line 569 of file Variable.cpp.
| void rogue::interfaces::memory::Variable::updatePath | ( | std::string | path | ) |
Updates the hierarchical path string for this variable.
Called when the variable is attached/moved within a device tree so logs, diagnostics, and exported metadata reflect the full resolved path.
| path | New full path in the variable tree. |
Definition at line 629 of file Variable.cpp.
|
inline |
Returns number of bits per value.
Definition at line 523 of file Variable.h.
|
inline |
Returns number of bytes per value.
Definition at line 528 of file Variable.h.
|
inline |
Returns byte stride per value.
Definition at line 533 of file Variable.h.
| uint32_t rogue::interfaces::memory::Variable::varBytes | ( | ) |
Returns variable range in bytes.
Return variable range bytes.
Definition at line 644 of file Variable.cpp.
| bool rogue::interfaces::memory::Variable::verifyEn | ( | ) |
|
friend |
Definition at line 63 of file Variable.h.
|
protected |
Definition at line 136 of file Variable.h.
|
protected |
Definition at line 100 of file Variable.h.
|
protected |
Definition at line 82 of file Variable.h.
|
protected |
Definition at line 103 of file Variable.h.
|
protected |
Definition at line 85 of file Variable.h.
|
protected |
Definition at line 67 of file Variable.h.
|
protected |
Definition at line 112 of file Variable.h.
|
protected |
Definition at line 79 of file Variable.h.
|
protected |
Definition at line 91 of file Variable.h.
|
protected |
Definition at line 133 of file Variable.h.
|
protected |
Definition at line 88 of file Variable.h.
|
protected |
Definition at line 277 of file Variable.h.
|
protected |
Definition at line 217 of file Variable.h.
|
protected |
Definition at line 185 of file Variable.h.
|
protected |
Definition at line 247 of file Variable.h.
|
protected |
Definition at line 317 of file Variable.h.
|
protected |
Definition at line 257 of file Variable.h.
|
protected |
Definition at line 307 of file Variable.h.
|
protected |
Definition at line 297 of file Variable.h.
|
protected |
Definition at line 267 of file Variable.h.
|
protected |
Definition at line 237 of file Variable.h.
|
protected |
Definition at line 173 of file Variable.h.
|
protected |
Definition at line 207 of file Variable.h.
|
protected |
Definition at line 227 of file Variable.h.
|
protected |
Definition at line 287 of file Variable.h.
|
protected |
Definition at line 197 of file Variable.h.
|
protected |
Definition at line 130 of file Variable.h.
|
protected |
Definition at line 127 of file Variable.h.
|
protected |
Definition at line 109 of file Variable.h.
|
protected |
Definition at line 106 of file Variable.h.
|
protected |
Definition at line 118 of file Variable.h.
|
protected |
Definition at line 76 of file Variable.h.
|
protected |
Definition at line 70 of file Variable.h.
|
protected |
Definition at line 148 of file Variable.h.
|
protected |
Definition at line 97 of file Variable.h.
|
protected |
Definition at line 121 of file Variable.h.
|
protected |
Definition at line 73 of file Variable.h.
|
protected |
Definition at line 160 of file Variable.h.
|
protected |
Definition at line 273 of file Variable.h.
|
protected |
Definition at line 213 of file Variable.h.
|
protected |
Definition at line 181 of file Variable.h.
|
protected |
Definition at line 243 of file Variable.h.
|
protected |
Definition at line 313 of file Variable.h.
|
protected |
Definition at line 253 of file Variable.h.
|
protected |
Definition at line 303 of file Variable.h.
|
protected |
Definition at line 293 of file Variable.h.
|
protected |
Definition at line 263 of file Variable.h.
|
protected |
Definition at line 233 of file Variable.h.
|
protected |
Definition at line 168 of file Variable.h.
|
protected |
Definition at line 203 of file Variable.h.
|
protected |
Definition at line 223 of file Variable.h.
|
protected |
Definition at line 283 of file Variable.h.
|
protected |
Definition at line 193 of file Variable.h.
|
protected |
Definition at line 139 of file Variable.h.
|
protected |
Definition at line 145 of file Variable.h.
|
protected |
Definition at line 142 of file Variable.h.
|
protected |
Definition at line 115 of file Variable.h.
|
protected |
Definition at line 151 of file Variable.h.
|
protected |
Definition at line 154 of file Variable.h.
|
protected |
Definition at line 157 of file Variable.h.
|
protected |
Definition at line 94 of file Variable.h.
|
protected |
Definition at line 124 of file Variable.h.