46 #ifndef COMMANDPORT_OBJ_HPP 47 #define COMMANDPORT_OBJ_HPP 83 MULTI_UNBOUNDED_ENABLE,
90 using transition = std::tuple<vertex, vertex, data_operation_pair>;
119 THROW_ASSERT(mode == OPERATION or mode == CONDITION or mode == SWITCH or mode == MULTIIF or mode == UNBOUNDED,
120 "Command mode not allowed into this constructor");
126 THROW_ASSERT(mode == SELECTOR || mode == WRENABLE || mode == ALUSELECTOR or mode == MULTI_UNBOUNDED or
127 mode == MULTI_UNBOUNDED_ENABLE,
128 "Selector port is wrong");
142 THROW_ASSERT(mode == OPERATION or mode == CONDITION or mode == SWITCH or mode == MULTIIF or mode == UNBOUNDED,
143 "Command mode not allowed");
163 activations.insert(act);
181 return controller_SM.
lock();
186 THROW_ASSERT(mode == SELECTOR || mode == WRENABLE || mode == ALUSELECTOR || mode == MULTI_UNBOUNDED or
187 mode == MULTI_UNBOUNDED_ENABLE,
188 "Selector port is wrong");
206 case MULTI_UNBOUNDED:
207 return "MULTI_UNBOUNDED";
208 case MULTI_UNBOUNDED_ENABLE:
209 return "MULTI_UNBOUNDED_ENABLE";
222 is_a_phi_write_enable =
true;
a multi unbounded controller
std::pair< unsigned int, vertex > data_operation_pair
REF_FORWARD_DECL(commandport_obj)
vertex signal
TODO: substitute with a functor operation vertex associated with the command port signal (if type is ...
const structural_objectRef get_controller_obj() const
Gets structural_object associated to this object.
void set_controller_obj(const structural_objectRef &_SM)
Sets structural_object associated to this object.
enum { OPERATION=0, CONDITION, SWITCH, MULTIIF, SELECTOR, ALUSELECTOR, UNBOUNDED, MULTI_UNBOUNDED, MULTI_UNBOUNDED_ENABLE, WRENABLE } command_type
Available command types.
const generic_objRef & get_elem() const
This class manages command ports into datapath.
~commandport_obj() override=default
Destructor.
commandport_obj(generic_objRef _elem, unsigned int _mode, const std::string &_name)
unsigned int mode
It's command type for the port.
static const std::string get_mode_string(unsigned int _mode)
void add_activation(const transition &act)
Base class for all resources into datapath.
bool get_phi_write_enable()
const CustomOrderedSet< transition > & get_activations() const
const vertex & get_vertex() const
Gets the vertex associated with port.
Data structure used to store the interconnection binding of datapath elements.
void set_phi_write_enable()
boost::graph_traits< graph >::vertex_descriptor vertex
vertex definition.
Generic class managing all resources into datapath.
bool is_a_phi_write_enable
#define THROW_ERROR(str_expr)
helper function used to throw an error in a standard way
Template definition of refcount.
refcount< T > lock() const
Wrefcount< structural_object > controller_SM
structural_object associated with the element inside the controller
std::tuple< vertex, vertex, data_operation_pair > transition
describe a transition from a source state to the target state plus the tree_node of the data transfer...
unsigned int get_command_type() const
Gets command type.
CustomOrderedSet< transition > activations
commandport_obj(const vertex &signal_, unsigned int _mode, const std::string &_name)
This is the constructor of the commandport_obj class.
#define THROW_ASSERT(cond, str_expr)
helper function used to check an assert and if needed to throw an error in a standard way ...