#include <class.h>
Public Types | |
typedef std::set< std::pair < std::list< SgVariableSymbol * > , std::list< SgVariableSymbol * > > > | PathMappingType |
enum | Type { CThreadType, ChannelType, ChannelInstanceType, ClassType, DefinitionType, EventType, FunctionType, HierarchicalChannelType, HierarchicalChannelInstanceType, InOutPortType, InPortType, InstanceType, InterfaceType, MethodType, ModuleType, ModuleInstanceType, ObjectType, OutPortType, PortType, PrimitiveChannelType, PrimitiveChannelInstanceType, ThreadType, VariableType, SocketType, InitiatorSocketType, TargetSocketType } |
We are using these enums to identify type type of and instance or definition during traversal. More... | |
Public Member Functions | |
Class (SgClassDefinition *ast_node, Type type) | |
Default constructor. More... | |
~Class () | |
virtual void | initialize_functions () |
void | initialize_variables () |
This function searches for all variable declarations in the module definition. The corresponding variable vectors will be used. More... | |
SgFunctionDefinition * | get_before_end_of_elaboration_definition () |
This function return a pointer to the definition of the function before_end_of_elaboration. More... | |
Variable * | find_variable (SgVariableDefinition *var_def) |
Find a port by it's ast variable definition. More... | |
Port * | find_port (SgVariableDefinition *var_def) |
Find a port by it's ast variable definition. More... | |
Event * | find_event (SgVariableDefinition *var_def) |
Find an event by it's ast variable definition. More... | |
EventAndList * | find_event_and_list (SgVariableDefinition *var_def) |
Find an event by it's ast variable definition. More... | |
EventOrList * | find_event_or_list (SgVariableDefinition *var_def) |
Find an event by it's ast variable definition. More... | |
ModuleInstance * | find_module (SgVariableDefinition *var_def) |
Find an module by it's ast variable definition. More... | |
PrimitiveChannelInstance * | find_prim_channel (SgVariableDefinition *var_def) |
find a prim channel by it's ast variable definition More... | |
HierarchicalChannelInstance * | find_hier_channel (SgVariableDefinition *var_def) |
find a hier channel by it's ast variable definition More... | |
Instance * | find_instance (SgVariableDefinition *var_def) |
find a hier channel/module/ prim channel by it's ast variable definition More... | |
Socket * | find_socket (SgVariableDefinition *var_def) |
TargetSocket * | find_target_socket (SgVariableDefinition *var_def) |
find a target socket by it's ast variable definition More... | |
InitiatorSocket * | find_initiator_socket (SgVariableDefinition *var_def) |
find an initiator socket by it's ast variable definition More... | |
SgClassDefinition * | get_ast_node () |
Returns the ast definition of the class. More... | |
std::string | get_name () |
returns the name of the module definition More... | |
virtual std::string | get_ast_type_name () |
Returns the name of the module type. More... | |
void | initialize_mapping () |
This function analyzes the mapping between a module/channel definition and its children. More... | |
void | analyze_port_mapping (Module *parent_module, ModuleInstance *sub_module_instance, Port *port) |
This is a helper function for internal use only. More... | |
void | analyze_port_mapping_style3 (Module *parent_module, ModuleInstance *sub_module_instance, Port *port) |
This is a helper function for internal use only. More... | |
void | analyze_socket_mapping (Module *parent_module, ModuleInstance *sub_module_instance, Socket *socket) |
This is a helper function for internal use only. More... | |
void | analyze_general_mapping () |
This is a helper function for internal use only. More... | |
bool | has_module_pointers () |
This functions returns true if the class has module member which is declared as a pointer. More... | |
bool | has_channel_pointers () |
This functions returns true if the class has channel member which is declared as a pointer. More... | |
virtual SgType * | get_ast_type () |
Returns the type of the ast node. More... | |
bool | has_source_location () |
Determines if a ast node has an associated ast node. More... | |
std::string | get_file_name () |
Get the name of the file where the declaration is located. More... | |
int | get_line_number () |
Get the line number of the instance. More... | |
int | get_position_in_line () |
Get the position of the in declaration in the corresponding line In other words the column in the line. More... | |
Public Attributes | |
EventVector | events_ |
Vector of events which are defined in this module. More... | |
EventAndListVector | event_and_lists_ |
Vector of event and lists which are defined in this module. More... | |
EventOrListVector | event_or_lists_ |
Vector of event or lists which are defined in this module. More... | |
VariableVector | variables_ |
Vector of C++ builtin variables that are declared in the module. More... | |
InPortVector | inports_ |
Vector of inports which are defined in this module. More... | |
InOutPortVector | inoutports_ |
Vector of inoutports which are defined in this module. More... | |
OutPortVector | outports_ |
Vector of outports which are defined in this module. More... | |
InitiatorSocketVector | initiatorsockets_ |
Vector of initiator sockets which are defined in this module. More... | |
TargetSocketVector | targetsockets_ |
Vector of targets sockets which are defined in this module. More... | |
PrimitiveChannelInstanceVector | sub_prim_channel_ |
Vector of primitive channel instances which are declared in this module. More... | |
HierarchicalChannelInstanceVector | sub_hier_channel_ |
Vector of hierarchical channel instances which are declared in this module. More... | |
ModuleInstanceVector | sub_modules_ |
Vector of module instances which are declared in this module. More... | |
FunctionVector | functions_ |
Vector of functions which are defined in this module. More... | |
PathMappingType | path_mappings |
bool | is_used_ |
Type | type_ |
SgNode * | ast_node_ |
SgType * | ast_type_pointer_ |
Private Member Functions | |
Class (const Class &c) | |
Disabled copy constructor. More... | |
typedef std::set< std::pair< std::list<SgVariableSymbol*>, std::list<SgVariableSymbol*> > > risc::Class::PathMappingType |
|
inherited |
We are using these enums to identify type type of and instance or definition during traversal.
|
explicit |
Default constructor.
risc::Class::~Class | ( | ) |
|
private |
Disabled copy constructor.
risc::Class::analyze_general_mapping | ( | ) |
This is a helper function for internal use only.
risc::Class::analyze_port_mapping | ( | Module * | parent_module, |
ModuleInstance * | sub_module_instance, | ||
Port * | port | ||
) |
This is a helper function for internal use only.
risc::Class::analyze_port_mapping_style3 | ( | Module * | parent_module, |
ModuleInstance * | sub_module_instance, | ||
Port * | port | ||
) |
This is a helper function for internal use only.
risc::Class::analyze_socket_mapping | ( | Module * | parent_module, |
ModuleInstance * | sub_module_instance, | ||
Socket * | socket | ||
) |
This is a helper function for internal use only.
risc::Event * risc::Class::find_event | ( | SgVariableDefinition * | var_def | ) |
Find an event by it's ast variable definition.
risc::EventAndList * risc::Class::find_event_and_list | ( | SgVariableDefinition * | var_def | ) |
Find an event by it's ast variable definition.
risc::EventOrList * risc::Class::find_event_or_list | ( | SgVariableDefinition * | var_def | ) |
Find an event by it's ast variable definition.
risc::HierarchicalChannelInstance * risc::Class::find_hier_channel | ( | SgVariableDefinition * | var_def | ) |
find a hier channel by it's ast variable definition
risc::InitiatorSocket * risc::Class::find_initiator_socket | ( | SgVariableDefinition * | var_def | ) |
find an initiator socket by it's ast variable definition
risc::Instance * risc::Class::find_instance | ( | SgVariableDefinition * | var_def | ) |
find a hier channel/module/ prim channel by it's ast variable definition
risc::ModuleInstance * risc::Class::find_module | ( | SgVariableDefinition * | var_def | ) |
Find an module by it's ast variable definition.
risc::Port * risc::Class::find_port | ( | SgVariableDefinition * | var_def | ) |
Find a port by it's ast variable definition.
risc::PrimitiveChannelInstance * risc::Class::find_prim_channel | ( | SgVariableDefinition * | var_def | ) |
find a prim channel by it's ast variable definition
risc::Socket * risc::Class::find_socket | ( | SgVariableDefinition * | var_def | ) |
risc::TargetSocket * risc::Class::find_target_socket | ( | SgVariableDefinition * | var_def | ) |
find a target socket by it's ast variable definition
risc::Variable * risc::Class::find_variable | ( | SgVariableDefinition * | var_def | ) |
Find a port by it's ast variable definition.
|
virtual |
Returns the ast definition of the class.
Reimplemented from risc::Definition.
|
virtualinherited |
Returns the type of the ast node.
|
virtual |
Returns the name of the module type.
Reimplemented from risc::Definition.
Reimplemented in risc::Interface.
risc::Class::get_before_end_of_elaboration_definition | ( | ) |
This function return a pointer to the definition of the function before_end_of_elaboration.
|
inherited |
Get the name of the file where the declaration is located.
|
inherited |
Get the line number of the instance.
|
virtual |
returns the name of the module definition
Reimplemented from risc::Definition.
|
inherited |
Get the position of the in declaration in the corresponding line In other words the column in the line.
risc::Class::has_channel_pointers | ( | ) |
This functions returns true if the class has channel member which is declared as a pointer.
risc::Class::has_module_pointers | ( | ) |
This functions returns true if the class has module member which is declared as a pointer.
|
inherited |
Determines if a ast node has an associated ast node.
|
virtual |
Reimplemented in risc::Module.
risc::Class::initialize_mapping | ( | ) |
This function analyzes the mapping between a module/channel definition and its children.
void risc::Class::initialize_variables | ( | ) |
This function searches for all variable declarations in the module definition. The corresponding variable vectors will be used.
|
inherited |
|
inherited |
EventAndListVector risc::Class::event_and_lists_ |
Vector of event and lists which are defined in this module.
EventOrListVector risc::Class::event_or_lists_ |
Vector of event or lists which are defined in this module.
EventVector risc::Class::events_ |
Vector of events which are defined in this module.
FunctionVector risc::Class::functions_ |
Vector of functions which are defined in this module.
InitiatorSocketVector risc::Class::initiatorsockets_ |
Vector of initiator sockets which are defined in this module.
InOutPortVector risc::Class::inoutports_ |
Vector of inoutports which are defined in this module.
InPortVector risc::Class::inports_ |
Vector of inports which are defined in this module.
bool risc::Class::is_used_ |
OutPortVector risc::Class::outports_ |
Vector of outports which are defined in this module.
PathMappingType risc::Class::path_mappings |
HierarchicalChannelInstanceVector risc::Class::sub_hier_channel_ |
Vector of hierarchical channel instances which are declared in this module.
ModuleInstanceVector risc::Class::sub_modules_ |
Vector of module instances which are declared in this module.
PrimitiveChannelInstanceVector risc::Class::sub_prim_channel_ |
Vector of primitive channel instances which are declared in this module.
TargetSocketVector risc::Class::targetsockets_ |
Vector of targets sockets which are defined in this module.
|
inherited |
VariableVector risc::Class::variables_ |
Vector of C++ builtin variables that are declared in the module.