Block
The memory interface Block class provides a mirror for the hardware register space as well as serving as a translater between python types and hardware bits and bytes.
Block objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::interfaces::memory::Block> rogue::interfaces::memory::BlockPtr
Alias for using shared pointer as BlockPtr.
The class description is shown below:
-
class Block : public rogue::interfaces::memory::Master
Memory interface Block device.
Public Functions
-
std::string path()
Return the path of the block.
Return the path of the block in the device tree
Exposed as path property to Python
- Returns:
Full path of the block
-
std::string mode()
Return the mode of the block.
Return the mode of the block, the supported modes are “RW”, “RO” and “WO”
Exposed as mode property to Python
- Returns:
Mode string
-
bool bulkOpEn()
Return bulk enable flag.
Return the bulk enable flag, indicating if this block should be included in bulk read and write operations.
Exposed as bulkOpEn property to Python
- Returns:
bulk enable flag
-
void setEnable(bool)
Set enable state.
Set the enable state
Exposed as setEnable method to Python
-
inline void setLogLevel(uint32_t level)
Set logging level for block.
-
uint64_t offset()
Get offset of this Block.
Return the offset of this Block
Exposed as offset property to Python
- Returns:
64-bit address offset
-
uint64_t address()
Get full address of this Block.
Return the full address of this block, including the parent address plus the local offset.
Exposed as address property to Python
- Returns:
64-bit address
-
uint32_t size()
Get size of this block in bytes.
Return the size of this block in bytes.
Exposed as size property to Python
- Returns:
32-bit size
-
bool blockPyTrans()
Get block python transactions flag.
-
void startTransaction(uint32_t type, bool forceWr, bool check, rogue::interfaces::memory::Variable *var, int32_t index = -1)
Start a c++ transaction for this block.
Start a c++ transaction with the passed type and access range
- Parameters:
type – Transaction type
forceWr – Force write of non-stale block
check – Flag to indicate if the transaction results should be immediately checked
var – Variable associated with transaction
index – Variable index for list variables, -1 for full variable
Start a transaction for this block, python version.
Start a transaction with the passed type and access range
Exposed as startTransaction() method to Python
- Parameters:
type – Transaction type
forceWr – Force write of non-stale block
check – Flag to indicate if the transaction results should be immediately checked
var – Variable associated with transaction, None for block level
index – Variable index for list variables, -1 for full variable
-
bool checkTransaction()
Check transaction result, C++ version without python update calls.
Check transaction result, an exception is thrown if an error occured.
-
void checkTransactionPy()
Check transaction result, python version with update calls.
Check transaction result, an exception is thrown if an error occured.
Exposed as checkTransaction() method to Python
-
void write(rogue::interfaces::memory::Variable *var, int32_t index = -1)
Issue write/verify/check sequence from c++.
-
void read(rogue::interfaces::memory::Variable *var, int32_t index = -1)
Issue read/check sequence from c++.
Add variables to block, C++ version.
Add the passed list of variables to this block
Exposed as addVariables() method to Python
- Parameters:
variables – Variable list
-
void addVariablesPy(boost::python::object variables)
Add variables to block, Python version.
Add the passed list of variables to this block
- Parameters:
variables – Variable list
-
std::vector<std::shared_ptr<rogue::interfaces::memory::Variable>> variables()
Return a list of variables in this block, C++ version.
-
boost::python::object variablesPy()
Return a list of variables in the block, python version.
Return the list of variables associated with this block
Exposed as variables property to Python
-
void rateTest()
Rate test function for perfmance tests.
Exposed as rateTest method to Python
-
void setByteArrayPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using byte array, python version.
-
boost::python::object getByteArrayPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using byte array, python version.
-
void setByteArray(const uint8_t *value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using byte array, C++ Version.
-
void getByteArray(uint8_t *value, rogue::interfaces::memory::Variable *var, int32_t index)
Get data using byte array, C++ Version.
-
void setUIntPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using unsigned int, python version.
-
boost::python::object getUIntPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using unsigned int, python version.
-
void setUInt(const uint64_t &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using unsigned int, C++ Version.
-
uint64_t getUInt(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using unsigned int, C++ Version.
-
void setIntPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using int, python version.
-
boost::python::object getIntPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using int, python version.
-
void setInt(const int64_t &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using int, C++ Version.
-
int64_t getInt(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using int, C++ Version.
-
void setBoolPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using bool, python version.
-
boost::python::object getBoolPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using bool, python version.
-
void setBool(const bool &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using bool, C++ Version.
-
bool getBool(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using bool, C++ Version.
-
void setStringPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using String, python version.
-
boost::python::object getStringPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using String, python version.
-
void setString(const std::string &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using String, C++ Version.
-
std::string getString(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using String, C++ Version.
-
void getString(rogue::interfaces::memory::Variable *var, std::string &valueRet, int32_t index)
Get data into String, C++ Version.
-
inline void getValue(rogue::interfaces::memory::Variable *var, std::string &valueRet, int32_t index)
Get data into String, C++ Version.
-
void setFloatPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Float, python version.
-
boost::python::object getFloatPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Float, python version.
-
void setFloat(const float &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Float, C++ Version.
-
float getFloat(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Float, C++ Version.
-
void setDoublePy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Double, python version.
-
boost::python::object getDoublePy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Double, python version.
-
void setDouble(const double &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Double, C++ Version.
-
double getDouble(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Double, C++ Version.
-
void setFixedPy(boost::python::object &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Fixed Point, Python version.
-
boost::python::object getFixedPy(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Fixed Point, Python version.
-
void setFixed(const double &value, rogue::interfaces::memory::Variable *var, int32_t index)
Set data using Fixed Point, C++ Version.
-
double getFixed(rogue::interfaces::memory::Variable *var, int32_t index)
Get data using Fixed Point, C++ Version.
Public Static Functions
-
static std::shared_ptr<rogue::interfaces::memory::Block> create(uint64_t offset, uint32_t size)
Class factory which returns a pointer to a Block (BlockPtr)
Exposed to Python as rogue.interfaces.memory.Block()
-
std::string path()