PandA-2024.02
|
This class manages command ports into datapath. More...
#include <commandport_obj.hpp>
Public Types | |
using | command_type = enum { OPERATION=0, CONDITION, SWITCH, MULTIIF, SELECTOR, ALUSELECTOR, UNBOUNDED, MULTI_UNBOUNDED, MULTI_UNBOUNDED_ENABLE, WRENABLE } |
Available command types. More... | |
using | data_operation_pair = std::pair< unsigned int, vertex > |
using | transition = std::tuple< vertex, vertex, data_operation_pair > |
describe a transition from a source state to the target state plus the tree_node of the data transferred and the operation vertex where the computation is performed More... | |
Public Types inherited from generic_obj | |
enum | resource_type { FUNCTIONAL_UNIT = 0, REGISTER, MULTI_UNBOUNDED_OBJ, COMMAND_PORT, DATA_PORT, CONNECTION_ELEMENT, ADDER_CONN_OBJ, UU_CONV_CONN_OBJ, UI_CONV_CONN_OBJ, IU_CONV_CONN_OBJ, II_CONV_CONN_OBJ, FF_CONV_CONN_OBJ, I_ASSIGN_CONN_OBJ, U_ASSIGN_CONN_OBJ, F_ASSIGN_CONN_OBJ } |
Admissible resource types. More... | |
Public Member Functions | |
commandport_obj (const vertex &signal_, unsigned int _mode, const std::string &_name) | |
This is the constructor of the commandport_obj class. More... | |
commandport_obj (generic_objRef _elem, unsigned int _mode, const std::string &_name) | |
~commandport_obj () override=default | |
Destructor. More... | |
const vertex & | get_vertex () const |
Gets the vertex associated with port. More... | |
unsigned int | get_command_type () const |
Gets command type. More... | |
const CustomOrderedSet< transition > & | get_activations () const |
void | add_activation (const transition &act) |
void | set_controller_obj (const structural_objectRef &_SM) |
Sets structural_object associated to this object. More... | |
const structural_objectRef | get_controller_obj () const |
Gets structural_object associated to this object. More... | |
const generic_objRef & | get_elem () const |
void | set_phi_write_enable () |
bool | get_phi_write_enable () |
Public Member Functions inherited from generic_obj | |
generic_obj (const resource_type t, const std::string &_name) | |
This is the constructor of the object class. More... | |
virtual | ~generic_obj ()=default |
Destructor. More... | |
void | print (std::ostream &os) const |
Prints elements into given stream. More... | |
const std::string | get_string () const |
Returns the name associated with the element. More... | |
unsigned int | get_type () const |
Return generic_obj type. More... | |
void | set_structural_obj (const structural_objectRef &SM_) |
Sets structural_object associated to this object. More... | |
void | set_out_sign (const structural_objectRef &out_sign_) |
Sets structural_object of output signal associated to this object. More... | |
const structural_objectRef | get_structural_obj () const |
Gets structural_object associated to this object. More... | |
const structural_objectRef | get_out_sign () const |
Gets structural_object of output signal associated to this object. More... | |
bool | operator< (const generic_obj &other) const |
Static Public Member Functions | |
static const std::string | get_mode_string (unsigned int _mode) |
Private Attributes | |
vertex | signal |
TODO: substitute with a functor operation vertex associated with the command port signal (if type is condition or operation) or state vertex associated with the command port signal. More... | |
generic_objRef | elem |
unsigned int | mode |
It's command type for the port. More... | |
bool | is_a_phi_write_enable |
CustomOrderedSet< transition > | activations |
Wrefcount< structural_object > | controller_SM |
structural_object associated with the element inside the controller More... | |
Additional Inherited Members | |
Protected Attributes inherited from generic_obj | |
const resource_type | type |
type of resource More... | |
Wrefcount< structural_object > | SM |
structural_object associated to element More... | |
Wrefcount< structural_object > | out_sign |
output signal associated to element. More... | |
std::string | name |
connection obj id More... | |
This class manages command ports into datapath.
It contains information about operation vertex giving command if it is operation or a condition. It also contains information about port direction. All these command ports are connected to controller.
Definition at line 69 of file commandport_obj.hpp.
using commandport_obj::command_type = enum { OPERATION = 0, CONDITION, SWITCH, MULTIIF, SELECTOR, ALUSELECTOR, UNBOUNDED, MULTI_UNBOUNDED, MULTI_UNBOUNDED_ENABLE, WRENABLE } |
Available command types.
Definition at line 85 of file commandport_obj.hpp.
using commandport_obj::data_operation_pair = std::pair<unsigned int, vertex> |
Definition at line 87 of file commandport_obj.hpp.
using commandport_obj::transition = std::tuple<vertex, vertex, data_operation_pair> |
describe a transition from a source state to the target state plus the tree_node of the data transferred and the operation vertex where the computation is performed
Definition at line 90 of file commandport_obj.hpp.
|
inline |
This is the constructor of the commandport_obj class.
It initializes type for generic_obj superclass
signal_ | is vertex associated to port |
mode | is command type |
Definition at line 116 of file commandport_obj.hpp.
References THROW_ASSERT.
|
inline |
Definition at line 123 of file commandport_obj.hpp.
References THROW_ASSERT, and ~commandport_obj().
|
overridedefault |
|
inline |
Definition at line 161 of file commandport_obj.hpp.
|
inline |
Definition at line 156 of file commandport_obj.hpp.
References activations.
|
inline |
Gets command type.
Definition at line 151 of file commandport_obj.hpp.
References mode.
|
inline |
Gets structural_object associated to this object.
Definition at line 179 of file commandport_obj.hpp.
References Wrefcount< T >::lock().
|
inline |
Definition at line 184 of file commandport_obj.hpp.
References elem, and THROW_ASSERT.
|
inlinestatic |
Definition at line 192 of file commandport_obj.hpp.
References THROW_ERROR.
Referenced by conn_binding::bind_command_port(), and conn_binding::bind_selector_port().
|
inline |
Definition at line 225 of file commandport_obj.hpp.
References is_a_phi_write_enable.
|
inline |
Gets the vertex associated with port.
Definition at line 140 of file commandport_obj.hpp.
References signal, and THROW_ASSERT.
|
inline |
Sets structural_object associated to this object.
_SM | is reference to structural_object to be associated |
Definition at line 170 of file commandport_obj.hpp.
|
inline |
Definition at line 220 of file commandport_obj.hpp.
|
private |
Definition at line 105 of file commandport_obj.hpp.
Referenced by get_activations().
|
private |
structural_object associated with the element inside the controller
Definition at line 108 of file commandport_obj.hpp.
|
private |
Definition at line 98 of file commandport_obj.hpp.
Referenced by get_elem().
|
private |
Definition at line 103 of file commandport_obj.hpp.
Referenced by get_phi_write_enable().
|
private |
It's command type for the port.
Definition at line 101 of file commandport_obj.hpp.
Referenced by get_command_type().
|
private |
TODO: substitute with a functor operation vertex associated with the command port signal (if type is condition or operation) or state vertex associated with the command port signal.
Definition at line 96 of file commandport_obj.hpp.
Referenced by get_vertex().