systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
systemc_clang::ModuleInstance Class Reference

Forward declarations. More...

#include <ModuleInstance.h>

Collaboration diagram for systemc_clang::ModuleInstance:

Public Types

typedef std::pair< std::string, SignalDecl * > signalPairType
 
typedef std::map< std::string, SignalDecl * > signalMapType
 
typedef std::pair< std::string, InterfaceDecl * > interfacePairType
 
typedef std::map< std::string, InterfaceDecl * > interfaceMapType
 
typedef std::pair< std::string, ProcessDecl * > processPairType
 
typedef std::map< std::string, ProcessDecl * > processMapType
 
typedef std::pair< std::string, std::string > moduleProcessPairType
 
typedef std::pair< std::string, std::string > portSignalPairType
 
typedef std::map< std::string, std::string > portSignalMapType
 
typedef std::vector< std::string > instanceName
 
typedef std::pair< std::string, PortBinding * > portBindingPairType
 
typedef std::map< std::string, PortBinding * > portBindingMapType
 
typedef std::vector< std::tuple< std::string, PortDecl * > > PortType
 
typedef std::vector< std::tuple< std::string, PortDecl * > > portMapType
 

Public Member Functions

 ModuleInstance ()
 Default constructor.
 
 ModuleInstance (const std::string &, const clang::CXXRecordDecl *)
 Overloaded constructors.
 
 ModuleInstance (const std::tuple< const std::string &, clang::CXXRecordDecl * > &)
 
 ModuleInstance (const ModuleInstance &from)
 
ModuleInstanceoperator= (const ModuleInstance &from)
 
virtual ~ModuleInstance ()
 
void addPorts (const PortType &found_ports, const std::string &port_type)
 
void addConstructor (FindConstructor *)
 
void addConstructor (clang::Stmt *)
 
void addInputInterfaces (FindTLMInterfaces::interfaceType)
 
void addOutputInterfaces (FindTLMInterfaces::interfaceType)
 
void addInputOutputInterfaces (FindTLMInterfaces::interfaceType)
 
void addProcess (FindEntryFunctions::entryFunctionVectorType *)
 
void addInstances (const std::vector< std::string > &)
 
void addPortBinding (const std::string &port_name, PortBinding *pb)
 
void addSignalBinding (std::map< std::string, std::string >)
 
void addBaseInstance (ModuleInstance *)
 
void addNestedModule (ModuleInstance *submodule)
 
void setInstanceInfo (const sc_ast_matchers::ModuleInstanceType &info)
 
void setInstanceName (const std::string &)
 
void setInstanceDecl (Decl *)
 
void setModuleName (const std::string &)
 
void setTemplateParameters (const vector< std::string > &)
 
void setTemplateArgs (const vector< std::string > &)
 
const std::vector< std::string > & getTemplateParameters () const
 
std::string getName () const
 
std::string getInstanceName () const
 
const clang::CXXRecordDecl * getModuleClassDecl ()
 
clang::FieldDecl * getInstanceFieldDecl ()
 
clang::VarDecl * getInstanceVarDecl ()
 
const clang::Decl * getInstanceDecl ()
 
bool isInstanceFieldDecl () const
 
ModuleInstanceType getInstanceInfo ()
 
bool isModuleClassDeclNull ()
 
const portMapTypegetOPorts ()
 
const portMapTypegetIPorts ()
 
const portMapTypegetIOPorts ()
 
const portMapTypegetOtherVars ()
 
const portMapTypegetSubmodules ()
 
const portMapTypegetInputStreamPorts ()
 
const portMapTypegetOutputStreamPorts ()
 
const std::vector< ModuleInstance * > & getBaseInstances ()
 
const portBindingMapTypegetPortBindings ()
 
const processMapTypegetProcessMap ()
 
const clang::Stmt * getConstructorStmt () const
 
const clang::CXXConstructorDecl * getConstructorDecl () const
 
const interfaceMapTypegetIInterfaces ()
 
const interfaceMapTypegetOInterfaces ()
 
const interfaceMapTypegetIOInterfaces ()
 
const std::vector< std::string > & getInstanceList ()
 
const std::vector< EntryFunctionContainer * > & getEntryFunctionContainer ()
 
int getNumInstances () const
 
const signalMapTypegetSignals () const
 
const std::vector< ModuleInstance * > & getNestedModuleInstances () const
 
void dumpPorts (llvm::raw_ostream &)
 
std::string dumpPortBinding ()
 
void dumpInterfaces (llvm::raw_ostream &, int)
 
void dumpProcesses (llvm::raw_ostream &, int)
 
void dumpSignals (llvm::raw_ostream &, int)
 
void dump (llvm::raw_ostream &)
 
void dumpInstances (llvm::raw_ostream &, int)
 
void dumpSignalBinding (llvm::raw_ostream &, int)
 
void dump_base_instances (llvm::raw_ostream &os)
 
void clearOnlyGlobal ()
 
std::string dump_json ()
 

Private Attributes

std::string module_name_
 
std::string instance_name_
 
ModuleInstanceType instance_info_
 
std::vector< ModuleInstance * > base_instances_
 
clang::CXXRecordDecl * class_decl_
 
clang::Stmt * constructor_stmt_
 
clang::CXXConstructorDecl * constructor_decl_
 
clang::Decl * instance_decl_
 
processMapType process_map_
 
portMapType in_ports_
 
portMapType out_ports_
 
portMapType inout_ports_
 
portMapType other_fields_
 
portMapType istreamports_
 
portMapType ostreamports_
 
portBindingMapType port_bindings_
 
interfaceMapType iinterfaces_
 
interfaceMapType ointerfaces_
 
interfaceMapType iointerfaces_
 
signalMapType signals_
 
std::vector< std::string > instance_list_
 
portSignalMapType port_signal_map_
 
std::vector< EntryFunctionContainer * > vef_
 
std::vector< ModuleInstance * > nested_modules_
 Nested modules.
 
std::vector< std::string > template_parameters_
 Class template parameters.
 
std::vector< std::string > template_args_
 

Detailed Description

Forward declarations.

Definition at line 37 of file ModuleInstance.h.

Member Typedef Documentation

◆ instanceName

Definition at line 56 of file ModuleInstance.h.

◆ interfaceMapType

Definition at line 43 of file ModuleInstance.h.

◆ interfacePairType

Definition at line 42 of file ModuleInstance.h.

◆ moduleProcessPairType

std::pair<std::string, std::string> systemc_clang::ModuleInstance::moduleProcessPairType

Definition at line 50 of file ModuleInstance.h.

◆ portBindingMapType

Definition at line 60 of file ModuleInstance.h.

◆ portBindingPairType

Definition at line 59 of file ModuleInstance.h.

◆ portMapType

std::vector<std::tuple<std::string, PortDecl *> > systemc_clang::ModuleInstance::portMapType

Definition at line 64 of file ModuleInstance.h.

◆ portSignalMapType

std::map<std::string, std::string> systemc_clang::ModuleInstance::portSignalMapType

Definition at line 53 of file ModuleInstance.h.

◆ portSignalPairType

std::pair<std::string, std::string> systemc_clang::ModuleInstance::portSignalPairType

Definition at line 52 of file ModuleInstance.h.

◆ PortType

std::vector<std::tuple<std::string, PortDecl *> > systemc_clang::ModuleInstance::PortType

Definition at line 63 of file ModuleInstance.h.

◆ processMapType

Definition at line 48 of file ModuleInstance.h.

◆ processPairType

Definition at line 47 of file ModuleInstance.h.

◆ signalMapType

Definition at line 40 of file ModuleInstance.h.

◆ signalPairType

Definition at line 39 of file ModuleInstance.h.

Constructor & Destructor Documentation

◆ ModuleInstance() [1/4]

ModuleInstance::ModuleInstance ( )

Default constructor.

Definition at line 12 of file ModuleInstance.cpp.

◆ ModuleInstance() [2/4]

ModuleInstance::ModuleInstance ( const std::string & name,
const clang::CXXRecordDecl * decl )

Overloaded constructors.

Definition at line 20 of file ModuleInstance.cpp.

◆ ModuleInstance() [3/4]

ModuleInstance::ModuleInstance ( const std::tuple< const std::string &, clang::CXXRecordDecl * > & element)

Definition at line 27 of file ModuleInstance.cpp.

◆ ModuleInstance() [4/4]

ModuleInstance::ModuleInstance ( const ModuleInstance & from)

Definition at line 31 of file ModuleInstance.cpp.

◆ ~ModuleInstance()

ModuleInstance::~ModuleInstance ( )
virtual

Definition at line 130 of file ModuleInstance.cpp.

Member Function Documentation

◆ addBaseInstance()

void ModuleInstance::addBaseInstance ( ModuleInstance * base)

Definition at line 214 of file ModuleInstance.cpp.

◆ addConstructor() [1/2]

void systemc_clang::ModuleInstance::addConstructor ( clang::Stmt * )

◆ addConstructor() [2/2]

void ModuleInstance::addConstructor ( FindConstructor * ctor)

Definition at line 300 of file ModuleInstance.cpp.

◆ addInputInterfaces()

void ModuleInstance::addInputInterfaces ( FindTLMInterfaces::interfaceType p)

Definition at line 272 of file ModuleInstance.cpp.

◆ addInputOutputInterfaces()

void ModuleInstance::addInputOutputInterfaces ( FindTLMInterfaces::interfaceType p)

Definition at line 292 of file ModuleInstance.cpp.

◆ addInstances()

void ModuleInstance::addInstances ( const std::vector< std::string > & instanceList)

Definition at line 218 of file ModuleInstance.cpp.

◆ addNestedModule()

void ModuleInstance::addNestedModule ( ModuleInstance * submodule)

Definition at line 352 of file ModuleInstance.cpp.

◆ addOutputInterfaces()

void ModuleInstance::addOutputInterfaces ( FindTLMInterfaces::interfaceType p)

Definition at line 282 of file ModuleInstance.cpp.

◆ addPortBinding()

void ModuleInstance::addPortBinding ( const std::string & port_name,
PortBinding * pb )

Definition at line 223 of file ModuleInstance.cpp.

◆ addPorts()

void ModuleInstance::addPorts ( const PortType & found_ports,
const std::string & port_type )

SignalDecl derived from PortDecl

Definition at line 233 of file ModuleInstance.cpp.

◆ addProcess()

void ModuleInstance::addProcess ( FindEntryFunctions::entryFunctionVectorType * efv)

Definition at line 317 of file ModuleInstance.cpp.

◆ addSignalBinding()

void ModuleInstance::addSignalBinding ( std::map< std::string, std::string > portSignalMap)

Definition at line 228 of file ModuleInstance.cpp.

◆ clearOnlyGlobal()

void ModuleInstance::clearOnlyGlobal ( )

Definition at line 112 of file ModuleInstance.cpp.

◆ dump()

void ModuleInstance::dump ( llvm::raw_ostream & os)

Definition at line 690 of file ModuleInstance.cpp.

◆ dump_base_instances()

void ModuleInstance::dump_base_instances ( llvm::raw_ostream & os)

Definition at line 683 of file ModuleInstance.cpp.

◆ dump_json()

std::string ModuleInstance::dump_json ( )

Definition at line 715 of file ModuleInstance.cpp.

◆ dumpInstances()

void ModuleInstance::dumpInstances ( llvm::raw_ostream & ,
int  )

Definition at line 442 of file ModuleInstance.cpp.

◆ dumpInterfaces()

void ModuleInstance::dumpInterfaces ( llvm::raw_ostream & ,
int  )

Definition at line 568 of file ModuleInstance.cpp.

◆ dumpPortBinding()

std::string ModuleInstance::dumpPortBinding ( )

Definition at line 467 of file ModuleInstance.cpp.

◆ dumpPorts()

void ModuleInstance::dumpPorts ( llvm::raw_ostream & )

Definition at line 604 of file ModuleInstance.cpp.

◆ dumpProcesses()

void ModuleInstance::dumpProcesses ( llvm::raw_ostream & ,
int  )

Definition at line 552 of file ModuleInstance.cpp.

◆ dumpSignalBinding()

void ModuleInstance::dumpSignalBinding ( llvm::raw_ostream & ,
int  )

Definition at line 541 of file ModuleInstance.cpp.

◆ dumpSignals()

void ModuleInstance::dumpSignals ( llvm::raw_ostream & ,
int  )

Definition at line 668 of file ModuleInstance.cpp.

◆ getBaseInstances()

const std::vector< ModuleInstance * > & ModuleInstance::getBaseInstances ( )

Definition at line 380 of file ModuleInstance.cpp.

◆ getConstructorDecl()

const clang::CXXConstructorDecl * ModuleInstance::getConstructorDecl ( ) const

Definition at line 313 of file ModuleInstance.cpp.

◆ getConstructorStmt()

const clang::Stmt * ModuleInstance::getConstructorStmt ( ) const

Definition at line 309 of file ModuleInstance.cpp.

◆ getEntryFunctionContainer()

const std::vector< EntryFunctionContainer * > & ModuleInstance::getEntryFunctionContainer ( )

Definition at line 361 of file ModuleInstance.cpp.

◆ getIInterfaces()

const ModuleInstance::interfaceMapType & ModuleInstance::getIInterfaces ( )

Definition at line 412 of file ModuleInstance.cpp.

◆ getInputStreamPorts()

const ModuleInstance::portMapType & ModuleInstance::getInputStreamPorts ( )

Definition at line 400 of file ModuleInstance.cpp.

◆ getInstanceDecl()

const clang::Decl * ModuleInstance::getInstanceDecl ( )

Definition at line 439 of file ModuleInstance.cpp.

◆ getInstanceFieldDecl()

clang::FieldDecl * systemc_clang::ModuleInstance::getInstanceFieldDecl ( )

◆ getInstanceInfo()

ModuleInstanceType ModuleInstance::getInstanceInfo ( )

Definition at line 195 of file ModuleInstance.cpp.

◆ getInstanceList()

const std::vector< std::string > & ModuleInstance::getInstanceList ( )

Definition at line 356 of file ModuleInstance.cpp.

◆ getInstanceName()

std::string ModuleInstance::getInstanceName ( ) const

Definition at line 426 of file ModuleInstance.cpp.

◆ getInstanceVarDecl()

clang::VarDecl * systemc_clang::ModuleInstance::getInstanceVarDecl ( )

◆ getIOInterfaces()

const ModuleInstance::interfaceMapType & ModuleInstance::getIOInterfaces ( )

Definition at line 416 of file ModuleInstance.cpp.

◆ getIOPorts()

const ModuleInstance::portMapType & ModuleInstance::getIOPorts ( )

Definition at line 392 of file ModuleInstance.cpp.

◆ getIPorts()

const ModuleInstance::portMapType & ModuleInstance::getIPorts ( )

Definition at line 388 of file ModuleInstance.cpp.

◆ getModuleClassDecl()

const clang::CXXRecordDecl * ModuleInstance::getModuleClassDecl ( )

Definition at line 434 of file ModuleInstance.cpp.

◆ getName()

std::string ModuleInstance::getName ( ) const

Definition at line 424 of file ModuleInstance.cpp.

◆ getNestedModuleInstances()

const std::vector< ModuleInstance * > & ModuleInstance::getNestedModuleInstances ( ) const

Definition at line 371 of file ModuleInstance.cpp.

◆ getNumInstances()

int ModuleInstance::getNumInstances ( ) const

Definition at line 365 of file ModuleInstance.cpp.

◆ getOInterfaces()

const ModuleInstance::interfaceMapType & ModuleInstance::getOInterfaces ( )

Definition at line 408 of file ModuleInstance.cpp.

◆ getOPorts()

const ModuleInstance::portMapType & ModuleInstance::getOPorts ( )

Definition at line 384 of file ModuleInstance.cpp.

◆ getOtherVars()

const ModuleInstance::portMapType & ModuleInstance::getOtherVars ( )

Definition at line 396 of file ModuleInstance.cpp.

◆ getOutputStreamPorts()

const ModuleInstance::portMapType & ModuleInstance::getOutputStreamPorts ( )

Definition at line 404 of file ModuleInstance.cpp.

◆ getPortBindings()

const ModuleInstance::portBindingMapType & ModuleInstance::getPortBindings ( )

Definition at line 420 of file ModuleInstance.cpp.

◆ getProcessMap()

const ModuleInstance::processMapType & ModuleInstance::getProcessMap ( )

Definition at line 376 of file ModuleInstance.cpp.

◆ getSignals()

const ModuleInstance::signalMapType & ModuleInstance::getSignals ( ) const

Definition at line 367 of file ModuleInstance.cpp.

◆ getSubmodules()

const portMapType & systemc_clang::ModuleInstance::getSubmodules ( )

◆ getTemplateParameters()

const std::vector< std::string > & ModuleInstance::getTemplateParameters ( ) const

Definition at line 207 of file ModuleInstance.cpp.

◆ isInstanceFieldDecl()

bool systemc_clang::ModuleInstance::isInstanceFieldDecl ( ) const

◆ isModuleClassDeclNull()

bool ModuleInstance::isModuleClassDeclNull ( )

Definition at line 430 of file ModuleInstance.cpp.

◆ operator=()

ModuleInstance & ModuleInstance::operator= ( const ModuleInstance & from)

Base instances

Definition at line 69 of file ModuleInstance.cpp.

◆ setInstanceDecl()

void systemc_clang::ModuleInstance::setInstanceDecl ( Decl * )

◆ setInstanceInfo()

void ModuleInstance::setInstanceInfo ( const sc_ast_matchers::ModuleInstanceType & info)

Definition at line 190 of file ModuleInstance.cpp.

◆ setInstanceName()

void systemc_clang::ModuleInstance::setInstanceName ( const std::string & )

◆ setModuleName()

void ModuleInstance::setModuleName ( const std::string & name)

Definition at line 211 of file ModuleInstance.cpp.

◆ setTemplateArgs()

void ModuleInstance::setTemplateArgs ( const vector< std::string > & )

Definition at line 202 of file ModuleInstance.cpp.

◆ setTemplateParameters()

void ModuleInstance::setTemplateParameters ( const vector< std::string > & )

Definition at line 197 of file ModuleInstance.cpp.

Member Data Documentation

◆ base_instances_

std::vector<ModuleInstance *> systemc_clang::ModuleInstance::base_instances_
private

Definition at line 163 of file ModuleInstance.h.

◆ class_decl_

clang::CXXRecordDecl* systemc_clang::ModuleInstance::class_decl_
private

Definition at line 166 of file ModuleInstance.h.

◆ constructor_decl_

clang::CXXConstructorDecl* systemc_clang::ModuleInstance::constructor_decl_
private

Definition at line 169 of file ModuleInstance.h.

◆ constructor_stmt_

clang::Stmt* systemc_clang::ModuleInstance::constructor_stmt_
private

Definition at line 168 of file ModuleInstance.h.

◆ iinterfaces_

interfaceMapType systemc_clang::ModuleInstance::iinterfaces_
private

Definition at line 184 of file ModuleInstance.h.

◆ in_ports_

portMapType systemc_clang::ModuleInstance::in_ports_
private

Definition at line 174 of file ModuleInstance.h.

◆ inout_ports_

portMapType systemc_clang::ModuleInstance::inout_ports_
private

Definition at line 176 of file ModuleInstance.h.

◆ instance_decl_

clang::Decl* systemc_clang::ModuleInstance::instance_decl_
private

Definition at line 171 of file ModuleInstance.h.

◆ instance_info_

ModuleInstanceType systemc_clang::ModuleInstance::instance_info_
private

Definition at line 161 of file ModuleInstance.h.

◆ instance_list_

std::vector<std::string> systemc_clang::ModuleInstance::instance_list_
private

Definition at line 189 of file ModuleInstance.h.

◆ instance_name_

std::string systemc_clang::ModuleInstance::instance_name_
private

Definition at line 160 of file ModuleInstance.h.

◆ iointerfaces_

interfaceMapType systemc_clang::ModuleInstance::iointerfaces_
private

Definition at line 186 of file ModuleInstance.h.

◆ istreamports_

portMapType systemc_clang::ModuleInstance::istreamports_
private

Definition at line 179 of file ModuleInstance.h.

◆ module_name_

std::string systemc_clang::ModuleInstance::module_name_
private

Definition at line 159 of file ModuleInstance.h.

◆ nested_modules_

std::vector<ModuleInstance *> systemc_clang::ModuleInstance::nested_modules_
private

Nested modules.

Definition at line 194 of file ModuleInstance.h.

◆ ointerfaces_

interfaceMapType systemc_clang::ModuleInstance::ointerfaces_
private

Definition at line 185 of file ModuleInstance.h.

◆ ostreamports_

portMapType systemc_clang::ModuleInstance::ostreamports_
private

Definition at line 180 of file ModuleInstance.h.

◆ other_fields_

portMapType systemc_clang::ModuleInstance::other_fields_
private

Definition at line 177 of file ModuleInstance.h.

◆ out_ports_

portMapType systemc_clang::ModuleInstance::out_ports_
private

Definition at line 175 of file ModuleInstance.h.

◆ port_bindings_

portBindingMapType systemc_clang::ModuleInstance::port_bindings_
private

Definition at line 182 of file ModuleInstance.h.

◆ port_signal_map_

portSignalMapType systemc_clang::ModuleInstance::port_signal_map_
private

Definition at line 190 of file ModuleInstance.h.

◆ process_map_

processMapType systemc_clang::ModuleInstance::process_map_
private

Definition at line 173 of file ModuleInstance.h.

◆ signals_

signalMapType systemc_clang::ModuleInstance::signals_
private

Definition at line 187 of file ModuleInstance.h.

◆ template_args_

std::vector<std::string> systemc_clang::ModuleInstance::template_args_
private

Definition at line 198 of file ModuleInstance.h.

◆ template_parameters_

std::vector<std::string> systemc_clang::ModuleInstance::template_parameters_
private

Class template parameters.

Definition at line 197 of file ModuleInstance.h.

◆ vef_

std::vector<EntryFunctionContainer *> systemc_clang::ModuleInstance::vef_
private

Definition at line 191 of file ModuleInstance.h.


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