All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | Private Member Functions | List of all members
risc::Interface Class Reference

#include <interface.h>

Inheritance diagram for risc::Interface:
Inheritance graph
Collaboration diagram for risc::Interface:
Collaboration graph

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

 Interface (SgClassDefinition *ast_node)
 default constructor More...
 
virtual std::string get_ast_type_name ()
 Get function for the name of the ast type of the port. More...
 
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...
 
Variablefind_variable (SgVariableDefinition *var_def)
 Find a port by it's ast variable definition. More...
 
Portfind_port (SgVariableDefinition *var_def)
 Find a port by it's ast variable definition. More...
 
Eventfind_event (SgVariableDefinition *var_def)
 Find an event by it's ast variable definition. More...
 
EventAndListfind_event_and_list (SgVariableDefinition *var_def)
 Find an event by it's ast variable definition. More...
 
EventOrListfind_event_or_list (SgVariableDefinition *var_def)
 Find an event by it's ast variable definition. More...
 
ModuleInstancefind_module (SgVariableDefinition *var_def)
 Find an module by it's ast variable definition. More...
 
PrimitiveChannelInstancefind_prim_channel (SgVariableDefinition *var_def)
 find a prim channel by it's ast variable definition More...
 
HierarchicalChannelInstancefind_hier_channel (SgVariableDefinition *var_def)
 find a hier channel by it's ast variable definition More...
 
Instancefind_instance (SgVariableDefinition *var_def)
 find a hier channel/module/ prim channel by it's ast variable definition More...
 
Socketfind_socket (SgVariableDefinition *var_def)
 
TargetSocketfind_target_socket (SgVariableDefinition *var_def)
 find a target socket by it's ast variable definition More...
 
InitiatorSocketfind_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...
 
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

 Interface (const Interface &i)
 Disabled copy constructor. More...
 

Member Typedef Documentation

typedef std::set< std::pair< std::list<SgVariableSymbol*>, std::list<SgVariableSymbol*> > > risc::Class::PathMappingType
inherited

Member Enumeration Documentation

enum risc::Definition::Type
inherited

We are using these enums to identify type type of and instance or definition during traversal.

Enumerator
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 

Constructor & Destructor Documentation

risc::Interface::Interface ( SgClassDefinition *  ast_node)
explicit

default constructor

risc::Interface::Interface ( const Interface i)
private

Disabled copy constructor.

Member Function Documentation

risc::Class::analyze_general_mapping ( )
inherited

This is a helper function for internal use only.

risc::Class::analyze_port_mapping ( Module parent_module,
ModuleInstance sub_module_instance,
Port port 
)
inherited

This is a helper function for internal use only.

risc::Class::analyze_port_mapping_style3 ( Module parent_module,
ModuleInstance sub_module_instance,
Port port 
)
inherited

This is a helper function for internal use only.

risc::Class::analyze_socket_mapping ( Module parent_module,
ModuleInstance sub_module_instance,
Socket socket 
)
inherited

This is a helper function for internal use only.

risc::Event * risc::Class::find_event ( SgVariableDefinition *  var_def)
inherited

Find an event by it's ast variable definition.

risc::EventAndList * risc::Class::find_event_and_list ( SgVariableDefinition *  var_def)
inherited

Find an event by it's ast variable definition.

risc::EventOrList * risc::Class::find_event_or_list ( SgVariableDefinition *  var_def)
inherited

Find an event by it's ast variable definition.

risc::HierarchicalChannelInstance * risc::Class::find_hier_channel ( SgVariableDefinition *  var_def)
inherited

find a hier channel by it's ast variable definition

risc::InitiatorSocket * risc::Class::find_initiator_socket ( SgVariableDefinition *  var_def)
inherited

find an initiator socket by it's ast variable definition

risc::Instance * risc::Class::find_instance ( SgVariableDefinition *  var_def)
inherited

find a hier channel/module/ prim channel by it's ast variable definition

risc::ModuleInstance * risc::Class::find_module ( SgVariableDefinition *  var_def)
inherited

Find an module by it's ast variable definition.

risc::Port * risc::Class::find_port ( SgVariableDefinition *  var_def)
inherited

Find a port by it's ast variable definition.

risc::PrimitiveChannelInstance * risc::Class::find_prim_channel ( SgVariableDefinition *  var_def)
inherited

find a prim channel by it's ast variable definition

risc::Socket * risc::Class::find_socket ( SgVariableDefinition *  var_def)
inherited
risc::TargetSocket * risc::Class::find_target_socket ( SgVariableDefinition *  var_def)
inherited

find a target socket by it's ast variable definition

risc::Variable * risc::Class::find_variable ( SgVariableDefinition *  var_def)
inherited

Find a port by it's ast variable definition.

SgClassDefinition * risc::Class::get_ast_node ( )
virtualinherited

Returns the ast definition of the class.

Returns
Pointer to the definition

Reimplemented from risc::Definition.

SgType * risc::Definition::get_ast_type ( )
virtualinherited

Returns the type of the ast node.

std::string risc::Interface::get_ast_type_name ( )
virtual

Get function for the name of the ast type of the port.

Returns
Name as std::string

Reimplemented from risc::Class.

risc::Class::get_before_end_of_elaboration_definition ( )
inherited

This function return a pointer to the definition of the function before_end_of_elaboration.

std::string risc::Definition::get_file_name ( )
inherited

Get the name of the file where the declaration is located.

Returns
filename
int risc::Definition::get_line_number ( )
inherited

Get the line number of the instance.

Returns
line number
std::string risc::Class::get_name ( )
virtualinherited

returns the name of the module definition

Reimplemented from risc::Definition.

int risc::Definition::get_position_in_line ( )
inherited

Get the position of the in declaration in the corresponding line In other words the column in the line.

Returns
position in line
risc::Class::has_channel_pointers ( )
inherited

This functions returns true if the class has channel member which is declared as a pointer.

risc::Class::has_module_pointers ( )
inherited

This functions returns true if the class has module member which is declared as a pointer.

bool risc::Definition::has_source_location ( )
inherited

Determines if a ast node has an associated ast node.

void risc::Class::initialize_functions ( )
virtualinherited

Reimplemented in risc::Module.

risc::Class::initialize_mapping ( )
inherited

This function analyzes the mapping between a module/channel definition and its children.

void risc::Class::initialize_variables ( )
inherited

This function searches for all variable declarations in the module definition. The corresponding variable vectors will be used.

Member Data Documentation

SgNode* risc::Definition::ast_node_
inherited
SgType* risc::Definition::ast_type_pointer_
inherited
EventAndListVector risc::Class::event_and_lists_
inherited

Vector of event and lists which are defined in this module.

EventOrListVector risc::Class::event_or_lists_
inherited

Vector of event or lists which are defined in this module.

EventVector risc::Class::events_
inherited

Vector of events which are defined in this module.

FunctionVector risc::Class::functions_
inherited

Vector of functions which are defined in this module.

InitiatorSocketVector risc::Class::initiatorsockets_
inherited

Vector of initiator sockets which are defined in this module.

InOutPortVector risc::Class::inoutports_
inherited

Vector of inoutports which are defined in this module.

InPortVector risc::Class::inports_
inherited

Vector of inports which are defined in this module.

bool risc::Class::is_used_
inherited
OutPortVector risc::Class::outports_
inherited

Vector of outports which are defined in this module.

PathMappingType risc::Class::path_mappings
inherited
HierarchicalChannelInstanceVector risc::Class::sub_hier_channel_
inherited

Vector of hierarchical channel instances which are declared in this module.

ModuleInstanceVector risc::Class::sub_modules_
inherited

Vector of module instances which are declared in this module.

PrimitiveChannelInstanceVector risc::Class::sub_prim_channel_
inherited

Vector of primitive channel instances which are declared in this module.

TargetSocketVector risc::Class::targetsockets_
inherited

Vector of targets sockets which are defined in this module.

Type risc::Definition::type_
inherited
VariableVector risc::Class::variables_
inherited

Vector of C++ builtin variables that are declared in the module.


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