REDAC HybridController
Firmware for LUCIDAC/REDAC Teensy
|
The Lucidac class represents a single cluster. More...
#include <cluster.h>


Public Member Functions | |
Cluster (uint8_t cluster_idx=0) | |
metadata::eui_t | get_entity_eui () const override |
bool | init () |
returns true in case of success | |
std::array< blocks::FunctionBlock *, 6 > | get_blocks () const |
bool | calibrate_offsets () |
bool | calibrate_routes () |
utils::status | write_to_hardware () override |
returns true in case of success | |
uint8_t | get_cluster_idx () const |
bool | route (uint8_t u_in, uint8_t u_out, float c_factor, uint8_t i_out) |
Register a route throught the cluster. | |
bool | add_constant (blocks::UBlock::Transmission_Mode signal_type, uint8_t u_out, float c_factor, uint8_t i_out) |
bool | route_in_external (uint8_t input, uint8_t i_out) |
Allows to route in an external signal from the lucidac front panel. input can be between 0 - 7. | |
bool | route_out_external (uint8_t u_in, uint8_t output, float c_factor) |
Allows to route an signal to the external outputs on the lucidac front panel. | |
void | reset (entities::ResetAction action) |
std::vector< Entity * > | get_child_entities () override |
Entity * | get_child_entity (const std::string &child_id) override |
utils::status | config_self_from_json (JsonObjectConst cfg) override |
Deserialize a new configuration for this entity from a JsonObject. | |
![]() | |
Entity ()=default | |
Entity (std::string entityId) | |
const std::string & | get_entity_id () const |
void | rename_entity (const std::string entityId) |
EntityClassifier | get_entity_classifier () const |
EntityClass | get_entity_class () const |
uint8_t | get_entity_type () const |
Version | get_entity_version () const |
uint8_t | get_entity_variant () const |
bool | is_entity_class (EntityClass class_) const |
bool | is_entity_type (uint8_t type_) const |
bool | is_entity_version (Version version_) const |
bool | is_entity_variant (uint8_t variant_) const |
Entity * | resolve_child_entity (std::string paths[], size_t len) |
Entity * | resolve_child_entity (JsonArrayConstIterator begin, JsonArrayConstIterator end) |
Entity * | resolve_child_entity (JsonArrayConst path) |
utils::status | config_from_json (JsonObjectConst cfg) |
Deserialize a new configuration for this entity and all its children from a JsonObject. | |
void | config_to_json (JsonObject &cfg, bool recursive=true) |
Serialize the configuration for this entity to a JsonObject. | |
utils::status | user_set_config (JsonObjectConst msg_in, JsonObject &msg_out) |
utils::status | user_get_config (JsonObjectConst msg_in, JsonObject &msg_out) |
utils::status | user_reset_config (JsonObjectConst msg_in, JsonObject &msg_out) |
void | classifier_to_json (JsonObject &out) |
Provide recursive entity information in a tree. | |
Public Attributes | |
blocks::MBlock * | m0block = nullptr |
blocks::MBlock * | m1block = nullptr |
blocks::UBlock * | ublock = nullptr |
blocks::CBlock * | cblock = nullptr |
blocks::IBlock * | iblock = nullptr |
blocks::SHBlock * | shblock = nullptr |
Static Public Attributes | |
static constexpr auto | CLASS_ = entities::EntityClass::CLUSTER |
Additional Inherited Members | |
![]() | |
utils::status | config_children_from_json (JsonObjectConst &cfg) |
Deserialize a new configuration for all child entities from a JsonObject. | |
virtual void | config_self_to_json (JsonObject &cfg) |
Serialize the configuration of this entity to a JsonObject. | |
void | config_children_to_json (JsonObject &cfg) |
Serialize the configuration of the child entities of this entity to a JsonObject. | |
![]() | |
std::string | entity_id |
EntityClassifier | classifier |
Detailed Description
The Lucidac class represents a single cluster.
A cluster holds a number of "blocks" (also refered to as DIMM modules) where the interconnection matrix is composed by the U/C/I blocks and the computing elements by the M blocks.
Constructor & Destructor Documentation
◆ Cluster()
|
explicit |
Definition at line 69 of file cluster.cpp.
References CLASS_, and entities::Entity::classifier.
Member Function Documentation
◆ add_constant()
FLASHMEM bool platform::Cluster::add_constant | ( | blocks::UBlock::Transmission_Mode | signal_type, |
uint8_t | u_out, | ||
float | c_factor, | ||
uint8_t | i_out ) |
Definition at line 246 of file cluster.cpp.
Referenced by blocks::MIntBlock_V_1_1_X::calibrate(), and blocks::MMulBlock::calibrate().
◆ calibrate_offsets()
FLASHMEM bool platform::Cluster::calibrate_offsets | ( | ) |
Definition at line 74 of file cluster.cpp.
References LOG_ANABRID_DEBUG_CALIBRATION.
Referenced by blocks::MMulBlock::calibrate(), and blocks::MMulBlock_FullAutoCalibration::calibrate().
◆ calibrate_routes()
FLASHMEM bool platform::Cluster::calibrate_routes | ( | ) |
Definition at line 95 of file cluster.cpp.
References daq::average(), blocks::GAIN_EIGHT_TO_FIFTEEN, blocks::GAIN_ZERO_TO_SEVEN, blocks::IBlock::INPUT_IDX_RANGE(), LOG_ANABRID_DEBUG_CALIBRATION, blocks::IBlock::OUTPUT_IDX_RANGE(), daq::sample(), and success.
Referenced by carrier::Carrier::calibrate_routes_in_cluster().
◆ config_self_from_json()
|
overridevirtual |
Deserialize a new configuration for this entity from a JsonObject.
Implementations shall not traverse to children,
- See also
- config_children_from_json() instead.
- Returns
- true in case of success, else false
Implements entities::Entity.
Definition at line 302 of file cluster.cpp.
References utils::status::success().
◆ get_blocks()
FLASHMEM std::array< blocks::FunctionBlock *, 6 > platform::Cluster::get_blocks | ( | ) | const |
◆ get_child_entities()
|
overridevirtual |
Implements entities::Entity.
Definition at line 311 of file cluster.cpp.
◆ get_child_entity()
|
overridevirtual |
Implements entities::Entity.
Definition at line 286 of file cluster.cpp.
◆ get_cluster_idx()
FLASHMEM uint8_t platform::Cluster::get_cluster_idx | ( | ) | const |
Definition at line 318 of file cluster.cpp.
Referenced by carrier::Carrier::calibrate_routes_in_cluster().
◆ get_entity_eui()
|
inlineoverridevirtual |
Implements entities::Entity.
◆ init()
|
virtual |
returns true in case of success
Reimplemented from entities::Entity.
Definition at line 19 of file cluster.cpp.
References bus::C_BLOCK_IDX, entities::detect(), entities::ResetAction::EVERYTHING, bus::I_BLOCK_IDX, bus::idx_to_addr(), LOG, LOG_ERROR, bus::M0_BLOCK_IDX, bus::M1_BLOCK_IDX, bus::SH_BLOCK_IDX, and bus::U_BLOCK_IDX.
◆ reset()
|
virtual |
Reimplemented from entities::Entity.
Definition at line 279 of file cluster.cpp.
Referenced by blocks::MIntBlock_V_1_1_X::calibrate(), and blocks::MMulBlock::calibrate().
◆ route()
FLASHMEM bool platform::Cluster::route | ( | uint8_t | u_in, |
uint8_t | u_out, | ||
float | c_factor, | ||
uint8_t | i_out ) |
Register a route throught the cluster.
Note that this does not immediately configure hardware but just prepares the in-memory representations of the individual blocks. Use write_to_hardware() to flush all blocks.
Note that previously existing routes (also from previous IC/OP cycles) most certainly still exist both in-memory representation and in the hardware. Use reset() to flush both of them.
Note that this currently yields undefined behaviour if a route on the same u_out already exists.
- u_in Row index [0..15] for U-Block input (corresponding to some M-Block output)
- u_out Column index [0..31] to use for routing through U/C/I block
- c_factor Coefficient value [-20,+20] for coefficient at position idx=u_out
- i_out Row index [0..15] for I-Block output (corresponding to some M-Block input)
- Returns
- false in case of illegal input data, else true
Definition at line 230 of file cluster.cpp.
◆ route_in_external()
FLASHMEM bool platform::Cluster::route_in_external | ( | uint8_t | input, |
uint8_t | i_out ) |
Allows to route in an external signal from the lucidac front panel. input can be between 0 - 7.
Definition at line 263 of file cluster.cpp.
◆ route_out_external()
FLASHMEM bool platform::Cluster::route_out_external | ( | uint8_t | u_in, |
uint8_t | output, | ||
float | c_factor ) |
Allows to route an signal to the external outputs on the lucidac front panel.
Output can be between 0 - 7.
Definition at line 270 of file cluster.cpp.
◆ write_to_hardware()
|
nodiscardoverridevirtual |
returns true in case of success
Reimplemented from entities::Entity.
Definition at line 219 of file cluster.cpp.
References utils::status::failure(), LOG, and utils::status::success().
Referenced by blocks::MIntBlock_V_1_1_X::calibrate(), and blocks::MMulBlock::calibrate().
Member Data Documentation
◆ cblock
blocks::CBlock* platform::Cluster::cblock = nullptr |
Definition at line 28 of file cluster.h.
Referenced by blocks::MMulBlock::calibrate(), blocks::MMulBlock_FullAutoCalibration::calibrate(), and get_blocks().
◆ CLASS_
|
staticconstexpr |
◆ iblock
blocks::IBlock* platform::Cluster::iblock = nullptr |
Definition at line 29 of file cluster.h.
Referenced by get_blocks().
◆ m0block
blocks::MBlock* platform::Cluster::m0block = nullptr |
Definition at line 25 of file cluster.h.
Referenced by get_blocks().
◆ m1block
blocks::MBlock* platform::Cluster::m1block = nullptr |
Definition at line 26 of file cluster.h.
Referenced by get_blocks().
◆ shblock
blocks::SHBlock* platform::Cluster::shblock = nullptr |
Definition at line 30 of file cluster.h.
Referenced by get_blocks().
◆ ublock
blocks::UBlock* platform::Cluster::ublock = nullptr |
Definition at line 27 of file cluster.h.
Referenced by blocks::MIntBlock_V_1_1_X::calibrate(), blocks::MMulBlock::calibrate(), and get_blocks().
The documentation for this class was generated from the following files:
- lib/platform-lucidac/src/carrier/cluster.h
- lib/platform-lucidac/src/carrier/cluster.cpp