PandA-2024.02
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
commandport_obj Class Reference

This class manages command ports into datapath. More...

#include <commandport_obj.hpp>

Inheritance diagram for commandport_obj:
Inheritance graph
[legend]
Collaboration diagram for commandport_obj:
Collaboration graph
[legend]

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 vertexget_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_objRefget_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< transitionactivations
 
Wrefcount< structural_objectcontroller_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_objectSM
 structural_object associated to element More...
 
Wrefcount< structural_objectout_sign
 output signal associated to element. More...
 
std::string name
 connection obj id More...
 

Detailed Description

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.

Member Typedef Documentation

◆ command_type

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.

◆ data_operation_pair

using commandport_obj::data_operation_pair = std::pair<unsigned int, vertex>

Definition at line 87 of file commandport_obj.hpp.

◆ transition

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.

Constructor & Destructor Documentation

◆ commandport_obj() [1/2]

commandport_obj::commandport_obj ( const vertex signal_,
unsigned int  _mode,
const std::string &  _name 
)
inline

This is the constructor of the commandport_obj class.

It initializes type for generic_obj superclass

Parameters
signal_is vertex associated to port
modeis command type

Definition at line 116 of file commandport_obj.hpp.

References THROW_ASSERT.

◆ commandport_obj() [2/2]

commandport_obj::commandport_obj ( generic_objRef  _elem,
unsigned int  _mode,
const std::string &  _name 
)
inline

Definition at line 123 of file commandport_obj.hpp.

References THROW_ASSERT, and ~commandport_obj().

Here is the call graph for this function:

◆ ~commandport_obj()

commandport_obj::~commandport_obj ( )
overridedefault

Destructor.

Referenced by commandport_obj().

Here is the caller graph for this function:

Member Function Documentation

◆ add_activation()

void commandport_obj::add_activation ( const transition act)
inline

Definition at line 161 of file commandport_obj.hpp.

◆ get_activations()

const CustomOrderedSet<transition>& commandport_obj::get_activations ( ) const
inline

Definition at line 156 of file commandport_obj.hpp.

References activations.

◆ get_command_type()

unsigned int commandport_obj::get_command_type ( ) const
inline

Gets command type.

Returns
an integer associated with command type

Definition at line 151 of file commandport_obj.hpp.

References mode.

◆ get_controller_obj()

const structural_objectRef commandport_obj::get_controller_obj ( ) const
inline

Gets structural_object associated to this object.

Returns
a reference to structural_object associated

Definition at line 179 of file commandport_obj.hpp.

References Wrefcount< T >::lock().

Here is the call graph for this function:

◆ get_elem()

const generic_objRef& commandport_obj::get_elem ( ) const
inline

Definition at line 184 of file commandport_obj.hpp.

References elem, and THROW_ASSERT.

◆ get_mode_string()

static const std::string commandport_obj::get_mode_string ( unsigned int  _mode)
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().

Here is the caller graph for this function:

◆ get_phi_write_enable()

bool commandport_obj::get_phi_write_enable ( )
inline

Definition at line 225 of file commandport_obj.hpp.

References is_a_phi_write_enable.

◆ get_vertex()

const vertex& commandport_obj::get_vertex ( ) const
inline

Gets the vertex associated with port.

Returns
reference to vertex

Definition at line 140 of file commandport_obj.hpp.

References signal, and THROW_ASSERT.

◆ set_controller_obj()

void commandport_obj::set_controller_obj ( const structural_objectRef _SM)
inline

Sets structural_object associated to this object.

Parameters
_SMis reference to structural_object to be associated

Definition at line 170 of file commandport_obj.hpp.

◆ set_phi_write_enable()

void commandport_obj::set_phi_write_enable ( )
inline

Definition at line 220 of file commandport_obj.hpp.

Field Documentation

◆ activations

CustomOrderedSet<transition> commandport_obj::activations
private

Definition at line 105 of file commandport_obj.hpp.

Referenced by get_activations().

◆ controller_SM

Wrefcount<structural_object> commandport_obj::controller_SM
private

structural_object associated with the element inside the controller

Definition at line 108 of file commandport_obj.hpp.

◆ elem

generic_objRef commandport_obj::elem
private

Definition at line 98 of file commandport_obj.hpp.

Referenced by get_elem().

◆ is_a_phi_write_enable

bool commandport_obj::is_a_phi_write_enable
private

Definition at line 103 of file commandport_obj.hpp.

Referenced by get_phi_write_enable().

◆ mode

unsigned int commandport_obj::mode
private

It's command type for the port.

Definition at line 101 of file commandport_obj.hpp.

Referenced by get_command_type().

◆ signal

vertex commandport_obj::signal
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().


The documentation for this class was generated from the following file:

Generated on Mon Feb 12 2024 13:03:47 for PandA-2024.02 by doxygen 1.8.13