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

This class is a specialization of generic_obj class to represent a multiplexer into the datapath. More...

#include <mux_obj.hpp>

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

Public Member Functions

 mux_obj (const generic_objRef first, const generic_objRef second, unsigned int level, const std::string &name, const generic_objRef overall_target)
 This is the constructor of the object class. More...
 
 ~mux_obj () override
 Destructor. More...
 
void set_target (const generic_objRef tgt)
 Sets target object for multiplexer. More...
 
generic_objRef get_final_target ()
 Returns the object which will receive the mux tree result. More...
 
generic_objRef GetSelector () const
 Gets the selector. More...
 
void set_selector (const generic_objRef sel)
 Sets the element representing the selector. More...
 
unsigned int get_level () const
 Return the level of the multiplexer. More...
 
void add_bitsize (unsigned int _bitsize)
 add a size to the component More...
 
unsigned int get_bitsize () const
 return the maximum bitsize associated with the component 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

unsigned int bitsize
 number of bit of in/out ports More...
 
const generic_objRef first
 reference to generic_obj associated with first input (when selector is TRUE, it's connected to out) More...
 
const generic_objRef second
 reference to generic_obj associated with second input (when selector is FALSE, it's connected to out) More...
 
generic_objRef target
 reference to generic_obj associated with the multiplexer More...
 
generic_objRef tree_target
 reference to generic_obj target of the mux tree's dataflow More...
 
generic_objRef selector
 selector object. It can be both a port or the root of a logic gate More...
 
unsigned int level
 depth level of the mux More...
 

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

This class is a specialization of generic_obj class to represent a multiplexer into the datapath.

Definition at line 57 of file mux_obj.hpp.

Constructor & Destructor Documentation

◆ mux_obj()

mux_obj::mux_obj ( const generic_objRef  first,
const generic_objRef  second,
unsigned int  level,
const std::string &  name,
const generic_objRef  overall_target 
)

This is the constructor of the object class.

It initializes type for generic_obj superclass

Parameters
firstis reference to first input
secondis reference to second input
levelis the mux level
nameis the id
targetis the overall mux tree target

Definition at line 46 of file mux_obj.cpp.

References ~mux_obj().

Here is the call graph for this function:

◆ ~mux_obj()

mux_obj::~mux_obj ( )
overridedefault

Destructor.

Referenced by mux_obj().

Here is the caller graph for this function:

Member Function Documentation

◆ add_bitsize()

void mux_obj::add_bitsize ( unsigned int  _bitsize)
inline

add a size to the component

Definition at line 129 of file mux_obj.hpp.

References bitsize, and get_bitsize().

Here is the call graph for this function:

◆ get_bitsize()

unsigned int mux_obj::get_bitsize ( ) const

return the maximum bitsize associated with the component

Definition at line 83 of file mux_obj.cpp.

References bitsize.

Referenced by add_bitsize().

Here is the caller graph for this function:

◆ get_final_target()

generic_objRef mux_obj::get_final_target ( )

Returns the object which will receive the mux tree result.

Returns
the target of the mux tree

Definition at line 64 of file mux_obj.cpp.

References tree_target.

◆ get_level()

unsigned int mux_obj::get_level ( ) const

Return the level of the multiplexer.

Definition at line 79 of file mux_obj.cpp.

References level.

◆ GetSelector()

generic_objRef mux_obj::GetSelector ( ) const

Gets the selector.

Returns
a reference to the component representing the selector

Definition at line 69 of file mux_obj.cpp.

References selector.

◆ set_selector()

void mux_obj::set_selector ( const generic_objRef  sel)

Sets the element representing the selector.

Parameters
isthe reference to the new selector for the multiplexer

Definition at line 74 of file mux_obj.cpp.

References selector.

◆ set_target()

void mux_obj::set_target ( const generic_objRef  tgt)

Sets target object for multiplexer.

Parameters
tgtis reference to generic_obj where multiplexer output is connected

Definition at line 59 of file mux_obj.cpp.

References target.

Field Documentation

◆ bitsize

unsigned int mux_obj::bitsize
private

number of bit of in/out ports

Definition at line 60 of file mux_obj.hpp.

Referenced by add_bitsize(), and get_bitsize().

◆ first

const generic_objRef mux_obj::first
private

reference to generic_obj associated with first input (when selector is TRUE, it's connected to out)

Definition at line 63 of file mux_obj.hpp.

◆ level

unsigned int mux_obj::level
private

depth level of the mux

Definition at line 78 of file mux_obj.hpp.

Referenced by get_level().

◆ second

const generic_objRef mux_obj::second
private

reference to generic_obj associated with second input (when selector is FALSE, it's connected to out)

Definition at line 66 of file mux_obj.hpp.

◆ selector

generic_objRef mux_obj::selector
private

selector object. It can be both a port or the root of a logic gate

Definition at line 75 of file mux_obj.hpp.

Referenced by GetSelector(), and set_selector().

◆ target

generic_objRef mux_obj::target
private

reference to generic_obj associated with the multiplexer

Definition at line 69 of file mux_obj.hpp.

Referenced by set_target().

◆ tree_target

generic_objRef mux_obj::tree_target
private

reference to generic_obj target of the mux tree's dataflow

Definition at line 72 of file mux_obj.hpp.

Referenced by get_final_target().


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

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