PandA-2024.02
Public Member Functions | Private Attributes
funit_obj Class Reference

Class representing functional units in the datapath. More...

#include <funit_obj.hpp>

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

Public Member Functions

 funit_obj (const std::string &_name, unsigned int _type, unsigned int _index)
 This is the constructor of the object class, with a given id. More...
 
unsigned int get_fu () const
 Get funit name. More...
 
unsigned int get_index () const
 Get funit index. More...
 
void add_selector_op (const generic_objRef &new_sel, const std::string &op_name)
 Add selector to list. More...
 
generic_objRef GetSelector_op (const std::string &op_name)
 Get selector object. More...
 
- 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
 

Private Attributes

const unsigned int index
 instance number of the unit More...
 
const unsigned int fu_type
 type of the functional unit More...
 
std::map< std::string, generic_objReffuOpSelectors
 

Additional Inherited Members

- 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...
 
- 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

Class representing functional units in the datapath.

Definition at line 56 of file funit_obj.hpp.

Constructor & Destructor Documentation

◆ funit_obj()

funit_obj::funit_obj ( const std::string &  _name,
unsigned int  _type,
unsigned int  _index 
)
inline

This is the constructor of the object class, with a given id.

Parameters
_nameis the id
_indexis the instance of the functional unit
_typeis the functional unit type

Definition at line 73 of file funit_obj.hpp.

Member Function Documentation

◆ add_selector_op()

void funit_obj::add_selector_op ( const generic_objRef new_sel,
const std::string &  op_name 
)
inline

Add selector to list.

Parameters
new_selis the selector
op_nameis the operation name

Definition at line 101 of file funit_obj.hpp.

◆ get_fu()

unsigned int funit_obj::get_fu ( ) const
inline

Get funit name.

Returns
the name of selected funit

Definition at line 82 of file funit_obj.hpp.

References fu_type.

◆ get_index()

unsigned int funit_obj::get_index ( ) const
inline

Get funit index.

Returns
the index of selected funit

Definition at line 91 of file funit_obj.hpp.

References index.

◆ GetSelector_op()

generic_objRef funit_obj::GetSelector_op ( const std::string &  op_name)
inline

Get selector object.

Parameters
op_nameoperation name (e.g. LOAD, STORE,..)
Returns
the index of selected funit

Definition at line 110 of file funit_obj.hpp.

Field Documentation

◆ fu_type

const unsigned int funit_obj::fu_type
private

type of the functional unit

Definition at line 61 of file funit_obj.hpp.

Referenced by get_fu().

◆ fuOpSelectors

std::map<std::string, generic_objRef> funit_obj::fuOpSelectors
private

Definition at line 64 of file funit_obj.hpp.

◆ index

const unsigned int funit_obj::index
private

instance number of the unit

Definition at line 59 of file funit_obj.hpp.

Referenced by get_index().


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

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