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::HierarchicalChannel Class Reference

#include <hierarchical_channel.h>

Inheritance diagram for risc::HierarchicalChannel:
Inheritance graph
Collaboration diagram for risc::HierarchicalChannel:
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

 HierarchicalChannel (SgClassDefinition *ast_node)
 Default constructor. More...
 
void print_hierarchical_channel_definition ()
 
std::list< Interface * > get_interfaces ()
 Returns all implemented interfaces. More...
 
virtual void initialize_functions ()
 This function searches for all functions, SC_THREADS, SC_CTHREADS, and SC_METHODS in the module definition. The corresponding variable vectors will be used. More...
 
void initialize_socket_registration ()
 This function searches for b_transport registration or dmi registration in the module definition. The registered function definition will be stored in corresponding Socket. More...
 
void print_module_definition ()
 Prints the complete module design into the terminal. More...
 
void print_hierarchy (unsigned indent_level=0)
 Prints the hierarchy. Roots is this definition. More...
 
std::string get_qualified_type_name ()
 This function returns the qualified type name of the module. More...
 
std::string get_mangled_type_name ()
 This function returns the manged type name of the module. More...
 
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...
 
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

int instance_counter_
 This variable counts how many instances of this given type exsist in the desgin. More...
 
ThreadVector threads_
 Vector of threads which are defined in this module. More...
 
CThreadVector cthreads_
 Vector of cthreads which are defined in this module. More...
 
MethodVector methods_
 Vector of methods which are defined in this module. More...
 
ResetSignalVector reset_signals_
 Vector of reset signals which are registered in this module. More...
 
ResetSignalVector async_reset_signals_
 Vector of async reset signals which are registered in this module. More...
 
std::list< Instance * > instances_
 
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

 HierarchicalChannel (const HierarchicalChannel &hcd)
 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::HierarchicalChannel::HierarchicalChannel ( SgClassDefinition *  ast_node)
explicit

Default constructor.

risc::HierarchicalChannel::HierarchicalChannel ( const HierarchicalChannel hcd)
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::Class::get_ast_type_name ( )
virtualinherited

Returns the name of the module type.

Returns
name of the module instance

Reimplemented from risc::Definition.

Reimplemented in risc::Interface.

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
std::list< risc::Interface * > risc::HierarchicalChannel::get_interfaces ( )

Returns all implemented interfaces.

int risc::Definition::get_line_number ( )
inherited

Get the line number of the instance.

Returns
line number
risc::Module::get_mangled_type_name ( )
inherited

This function returns the manged type name of the module.

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::Module::get_qualified_type_name ( )
inherited

This function returns the qualified type name of the module.

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::Module::initialize_functions ( )
virtualinherited

This function searches for all functions, SC_THREADS, SC_CTHREADS, and SC_METHODS in the module definition. The corresponding variable vectors will be used.

Reimplemented from risc::Class.

risc::Class::initialize_mapping ( )
inherited

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

void risc::Module::initialize_socket_registration ( )
inherited

This function searches for b_transport registration or dmi registration in the module definition. The registered function definition will be stored in corresponding Socket.

void risc::Class::initialize_variables ( )
inherited

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

void risc::HierarchicalChannel::print_hierarchical_channel_definition ( )
void risc::Module::print_hierarchy ( unsigned  indent_level = 0)
inherited

Prints the hierarchy. Roots is this definition.

void risc::Module::print_module_definition ( )
inherited

Prints the complete module design into the terminal.

Member Data Documentation

SgNode* risc::Definition::ast_node_
inherited
SgType* risc::Definition::ast_type_pointer_
inherited
ResetSignalVector risc::Module::async_reset_signals_
inherited

Vector of async reset signals which are registered in this module.

CThreadVector risc::Module::cthreads_
inherited

Vector of cthreads which are defined in this module.

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.

int risc::HierarchicalChannel::instance_counter_

This variable counts how many instances of this given type exsist in the desgin.

std::list<Instance*> risc::Module::instances_
inherited

This container stores all instances of the module/hierachical channel instances

bool risc::Class::is_used_
inherited
MethodVector risc::Module::methods_
inherited

Vector of methods which are defined in this module.

OutPortVector risc::Class::outports_
inherited

Vector of outports which are defined in this module.

PathMappingType risc::Class::path_mappings
inherited
ResetSignalVector risc::Module::reset_signals_
inherited

Vector of reset signals which are registered in this module.

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.

ThreadVector risc::Module::threads_
inherited

Vector of threads 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: