1 #ifndef CLASS_H_INCLUDED_
2 #define CLASS_H_INCLUDED_
18 class HierarchicalChannelInstance;
26 class PrimitiveChannelInstance;
31 class InitiatorSocket;
38 typedef std::vector<HierarchicalChannelInstance*>
60 explicit Class(SgClassDefinition *ast_node,
Type type);
275 std::list<SgVariableSymbol*>,
276 std::list<SgVariableSymbol*>
std::vector< InitiatorSocket * > InitiatorSocketVector
Definition: class.h:50
PrimitiveChannelInstanceVector sub_prim_channel_
Vector of primitive channel instances which are declared in this module.
Definition: class.h:205
InPortVector inports_
Vector of inports which are defined in this module.
Definition: class.h:179
Definition: initiatorsocket.h:13
std::set< std::pair< std::list< SgVariableSymbol * >, std::list< SgVariableSymbol * > > > PathMappingType
Definition: class.h:278
Definition: primitive_channel_instance.h:15
ModuleInstanceVector sub_modules_
Vector of module instances which are declared in this module.
Definition: class.h:216
TargetSocket * find_target_socket(SgVariableDefinition *var_def)
find a target socket by it's ast variable definition
Definition: class.cpp:599
VariableVector variables_
Vector of C++ builtin variables that are declared in the module.
Definition: class.h:174
std::vector< EventOrList * > EventOrListVector
Definition: class.h:36
Definition: targetsocket.h:13
Definition: definition.h:12
Variable * find_variable(SgVariableDefinition *var_def)
Find a port by it's ast variable definition.
Definition: class.cpp:499
Class(SgClassDefinition *ast_node, Type type)
Default constructor.
Definition: class.cpp:29
Event * find_event(SgVariableDefinition *var_def)
Find an event by it's ast variable definition.
Definition: class.cpp:454
std::vector< Function * > FunctionVector
Definition: class.h:37
Instance * find_instance(SgVariableDefinition *var_def)
find a hier channel/module/ prim channel by it's ast variable definition
Definition: class.cpp:650
std::vector< ModuleInstance * > ModuleInstanceVector
Definition: class.h:42
bool has_channel_pointers()
This functions returns true if the class has channel member which is declared as a pointer...
Definition: class.cpp:1349
EventOrListVector event_or_lists_
Vector of event or lists which are defined in this module.
Definition: class.h:169
InitiatorSocketVector initiatorsockets_
Vector of initiator sockets which are defined in this module.
Definition: class.h:194
EventOrList * find_event_or_list(SgVariableDefinition *var_def)
Find an event by it's ast variable definition.
Definition: class.cpp:484
void analyze_socket_mapping(Module *parent_module, ModuleInstance *sub_module_instance, Socket *socket)
This is a helper function for internal use only.
Definition: class.cpp:1120
Definition: event_and_list.h:12
void initialize_variables()
This function searches for all variable declarations in the module definition. The corresponding vari...
Definition: class.cpp:177
std::vector< Variable * > VariableVector
Definition: class.h:46
HierarchicalChannelInstanceVector sub_hier_channel_
Vector of hierarchical channel instances which are declared in this module.
Definition: class.h:211
SgClassDefinition * get_ast_node()
Returns the ast definition of the class.
Definition: class.cpp:160
bool is_used_
Definition: class.h:282
PathMappingType path_mappings
Definition: class.h:280
Definition: event_or_list.h:12
EventAndListVector event_and_lists_
Vector of event and lists which are defined in this module.
Definition: class.h:164
void analyze_port_mapping(Module *parent_module, ModuleInstance *sub_module_instance, Port *port)
This is a helper function for internal use only.
Definition: class.cpp:1188
void analyze_general_mapping()
This is a helper function for internal use only.
Definition: class.cpp:793
std::vector< PrimitiveChannelInstance * > PrimitiveChannelInstanceVector
Definition: class.h:45
std::vector< Port * > PortVector
Definition: class.h:44
InOutPortVector inoutports_
Vector of inoutports which are defined in this module.
Definition: class.h:184
std::string get_name()
returns the name of the module definition
Definition: class.cpp:171
FunctionVector functions_
Vector of functions which are defined in this module.
Definition: class.h:221
Definition: instance.h:17
InitiatorSocket * find_initiator_socket(SgVariableDefinition *var_def)
find an initiator socket by it's ast variable definition
Definition: class.cpp:616
Definition: hierarchical_channel_instance.h:15
EventAndList * find_event_and_list(SgVariableDefinition *var_def)
Find an event by it's ast variable definition.
Definition: class.cpp:469
PrimitiveChannelInstance * find_prim_channel(SgVariableDefinition *var_def)
find a prim channel by it's ast variable definition
Definition: class.cpp:535
This class represents instances.
Definition: module.h:49
std::vector< EventAndList * > EventAndListVector
Definition: class.h:35
TargetSocketVector targetsockets_
Vector of targets sockets which are defined in this module.
Definition: class.h:199
Socket * find_socket(SgVariableDefinition *var_def)
Definition: class.cpp:570
void analyze_port_mapping_style3(Module *parent_module, ModuleInstance *sub_module_instance, Port *port)
This is a helper function for internal use only.
Definition: class.cpp:1240
virtual void initialize_functions()
Definition: class.cpp:128
bool has_module_pointers()
This functions returns true if the class has module member which is declared as a pointer...
Definition: class.cpp:1276
EventVector events_
Vector of events which are defined in this module.
Definition: class.h:159
std::vector< HierarchicalChannelInstance * > HierarchicalChannelInstanceVector
Definition: class.h:39
HierarchicalChannelInstance * find_hier_channel(SgVariableDefinition *var_def)
find a hier channel by it's ast variable definition
Definition: class.cpp:552
This class represents a instance of a module.
Definition: module_instance.h:27
~Class()
Definition: class.cpp:36
OutPortVector outports_
Vector of outports which are defined in this module.
Definition: class.h:189
void initialize_mapping()
This function analyzes the mapping between a module/channel definition and its children.
Definition: class.cpp:667
std::vector< OutPort * > OutPortVector
Definition: class.h:43
Type
We are using these enums to identify type type of and instance or definition during traversal...
Definition: definition.h:20
std::vector< InPort * > InPortVector
Definition: class.h:41
std::vector< Socket * > SocketVector
Definition: class.h:49
std::vector< TargetSocket * > TargetSocketVector
Definition: class.h:51
std::vector< InOutPort * > InOutPortVector
Definition: class.h:40
ModuleInstance * find_module(SgVariableDefinition *var_def)
Find an module by it's ast variable definition.
Definition: class.cpp:633
std::vector< Event * > EventVector
Definition: class.h:32
Port * find_port(SgVariableDefinition *var_def)
Find a port by it's ast variable definition.
Definition: class.cpp:419
virtual std::string get_ast_type_name()
Returns the name of the module type.
Definition: class.cpp:166
SgFunctionDefinition * get_before_end_of_elaboration_definition()
This function return a pointer to the definition of the function before_end_of_elaboration.
Definition: class.cpp:515
This class represents a variable in a module.
Definition: variable.h:22