PandA-2024.02
|
Generic class managing all resources into datapath. More...
#include <generic_obj.hpp>
Public Types | |
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 | |
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 |
Protected Attributes | |
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... | |
Friends | |
std::ostream & | operator<< (std::ostream &os, const generic_obj &s) |
Friend definition of the << operator. More... | |
Generic class managing all resources into datapath.
Definition at line 66 of file generic_obj.hpp.
Admissible resource types.
Definition at line 70 of file generic_obj.hpp.
|
inline |
This is the constructor of the object class.
Definition at line 107 of file generic_obj.hpp.
References ~generic_obj().
|
virtualdefault |
|
inline |
Gets structural_object of output signal associated to this object.
Definition at line 187 of file generic_obj.hpp.
References Wrefcount< T >::lock(), and operator<().
Referenced by fu_binding::add_to_SM(), and conn_binding::mux_connection().
|
inline |
Returns the name associated with the element.
Definition at line 141 of file generic_obj.hpp.
References name.
Referenced by conn_binding::add_command_ports(), reg_binding::add_to_SM(), conn_binding::AddConnectionCB(), conn_binding::bind_selector_port(), mux_connection_binding::connect_to_registers(), mux_connection_binding::create_connections(), mux_connection_binding::create_single_conn(), mux_connection_binding::input_logic(), conn_binding::mux_connection(), mux_connection_binding::mux_interconnection(), GenericObjSorter::operator()(), operator<(), and conn_binding::print().
|
inline |
Gets structural_object associated to this object.
Definition at line 178 of file generic_obj.hpp.
References Wrefcount< T >::lock().
Referenced by conn_binding::add_command_ports(), conn_binding::mux_allocation(), conn_binding::mux_connection(), and conn_binding::specialise_mux().
|
inline |
Return generic_obj type.
Definition at line 151 of file generic_obj.hpp.
References type.
Referenced by conn_binding::add_command_ports().
bool generic_obj::operator< | ( | const generic_obj & | other | ) | const |
other | is the second operand |
Definition at line 79 of file generic_obj.cpp.
References get_string().
Referenced by get_out_sign().
|
inline |
Prints elements into given stream.
os | is the selected stream |
Definition at line 120 of file generic_obj.hpp.
References name.
Referenced by conn_binding::mux_connection().
|
inline |
Sets structural_object of output signal associated to this object.
SM_ | is reference to structural_object of signal to be associated |
Definition at line 169 of file generic_obj.hpp.
Referenced by classic_datapath::add_ports(), and conn_binding::mux_connection().
|
inline |
Sets structural_object associated to this object.
SM_ | is reference to structural_object to be associated |
Definition at line 160 of file generic_obj.hpp.
Referenced by classic_datapath::add_ports(), reg_binding::add_to_SM(), and fu_binding::add_to_SM().
|
friend |
Friend definition of the << operator.
os | is output stream |
s | is object to be written |
Definition at line 131 of file generic_obj.hpp.
|
protected |
connection obj id
Definition at line 101 of file generic_obj.hpp.
Referenced by get_string(), and print().
|
protected |
output signal associated to element.
It allows to connect multiple elements to output of this object. So broadcast communication is possible
Definition at line 98 of file generic_obj.hpp.
|
protected |
structural_object associated to element
Definition at line 94 of file generic_obj.hpp.
|
protected |