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

#include <PortBinding.h>

Public Types

typedef std::vector< const clang::Expr * > ArraySubscriptsExprType
 

Public Member Functions

const std::string getCallerInstanceName () const
 
const std::string getCallerInstanceTypeName () const
 
const std::string getCallerPortName () const
 
const std::string getCalleeInstanceName () const
 
const std::string getCalleePortName () const
 
ArraySubscriptsExprType getCallerArraySubscripts () const
 
ArraySubscriptsExprType getCallerPortArraySubscripts () const
 
ArraySubscriptsExprType getCalleeArraySubscripts () const
 
void setInstanceVarName (const std::string &name)
 
void setInstanceConstructorName (const std::string &name)
 
const std::string & getPortName () const
 
const clang::MemberExpr * getCallerMemberExpr () const
 
const std::string & getInstanceType () const
 
const std::string & getInstanceVarName () const
 
const std::string & getInstanceConstructorName () const
 
const clang::CXXRecordDecl * getInstanceTypeDecl () const
 
const std::string toString () const
 
void dump ()
 
 PortBinding (clang::Expr *caller_expr, clang::Expr *caller_port_expr, clang::MemberExpr *caller_port_me_expr, clang::Expr *callee_expr, clang::MemberExpr *callee_port_me_expr)
 

Private Attributes

const clang::Expr * caller_expr_
 Caller.
 
const clang::ArraySubscriptExpr * caller_array_expr_
 
const clang::MemberExpr * caller_instance_me_expr_
 
const clang::Expr * caller_port_array_expr_
 
ArraySubscriptsExprType caller_port_array_subscripts_
 
const clang::MemberExpr * caller_port_me_expr_
 
ArraySubscriptsExprType caller_array_subscripts_
 
const clang::Expr * callee_expr_
 Callee.
 
const clang::MemberExpr * callee_port_me_expr_
 
const clang::MemberExpr * callee_instance_me_expr_
 
const clang::ArraySubscriptExpr * callee_array_expr_
 
ArraySubscriptsExprType callee_array_subscripts_
 
std::string caller_instance_name_
 We no longer support sc_main parsing.
 
std::string caller_port_name_
 
std::string caller_instance_type_name_
 
std::string callee_instance_name_
 
std::string callee_port_name_
 
std::string callee_type_name_
 
std::string instance_type_
 
std::string instance_var_name_
 
std::string instance_constructor_name_
 
const clang::CXXRecordDecl * instance_type_decl_
 

Detailed Description

Definition at line 12 of file PortBinding.h.

Member Typedef Documentation

◆ ArraySubscriptsExprType

std::vector<const clang::Expr *> systemc_clang::PortBinding::ArraySubscriptsExprType

Definition at line 14 of file PortBinding.h.

Constructor & Destructor Documentation

◆ PortBinding()

systemc_clang::PortBinding::PortBinding ( clang::Expr * caller_expr,
clang::Expr * caller_port_expr,
clang::MemberExpr * caller_port_me_expr,
clang::Expr * callee_expr,
clang::MemberExpr * callee_port_me_expr )
inline

Constructor that records the port binding.

Parameters
caller_exprprovides access to the caller information irrespective of whether it is an array or not.
caller_port_exprprovides access to the caller's port.

Cast to see if it's an array.

If it is an array.

Definition at line 230 of file PortBinding.h.

Member Function Documentation

◆ dump()

void systemc_clang::PortBinding::dump ( )
inline

Dumps to llvm::outs() the recorded port binding information.

Definition at line 170 of file PortBinding.h.

◆ getCalleeArraySubscripts()

ArraySubscriptsExprType systemc_clang::PortBinding::getCalleeArraySubscripts ( ) const
inline

Definition at line 73 of file PortBinding.h.

◆ getCalleeInstanceName()

const std::string systemc_clang::PortBinding::getCalleeInstanceName ( ) const
inline

Definition at line 60 of file PortBinding.h.

◆ getCalleePortName()

const std::string systemc_clang::PortBinding::getCalleePortName ( ) const
inline

Definition at line 63 of file PortBinding.h.

◆ getCallerArraySubscripts()

ArraySubscriptsExprType systemc_clang::PortBinding::getCallerArraySubscripts ( ) const
inline

Definition at line 65 of file PortBinding.h.

◆ getCallerInstanceName()

const std::string systemc_clang::PortBinding::getCallerInstanceName ( ) const
inline

Definition at line 52 of file PortBinding.h.

◆ getCallerInstanceTypeName()

const std::string systemc_clang::PortBinding::getCallerInstanceTypeName ( ) const
inline

Definition at line 55 of file PortBinding.h.

◆ getCallerMemberExpr()

const clang::MemberExpr * systemc_clang::PortBinding::getCallerMemberExpr ( ) const
inline

Definition at line 85 of file PortBinding.h.

◆ getCallerPortArraySubscripts()

ArraySubscriptsExprType systemc_clang::PortBinding::getCallerPortArraySubscripts ( ) const
inline

Definition at line 69 of file PortBinding.h.

◆ getCallerPortName()

const std::string systemc_clang::PortBinding::getCallerPortName ( ) const
inline

Definition at line 58 of file PortBinding.h.

◆ getInstanceConstructorName()

const std::string & systemc_clang::PortBinding::getInstanceConstructorName ( ) const
inline

Definition at line 90 of file PortBinding.h.

◆ getInstanceType()

const std::string & systemc_clang::PortBinding::getInstanceType ( ) const
inline

Definition at line 88 of file PortBinding.h.

◆ getInstanceTypeDecl()

const clang::CXXRecordDecl * systemc_clang::PortBinding::getInstanceTypeDecl ( ) const
inline

Definition at line 93 of file PortBinding.h.

◆ getInstanceVarName()

const std::string & systemc_clang::PortBinding::getInstanceVarName ( ) const
inline

Definition at line 89 of file PortBinding.h.

◆ getPortName()

const std::string & systemc_clang::PortBinding::getPortName ( ) const
inline

Definition at line 84 of file PortBinding.h.

◆ setInstanceConstructorName()

void systemc_clang::PortBinding::setInstanceConstructorName ( const std::string & name)
inline

Definition at line 80 of file PortBinding.h.

◆ setInstanceVarName()

void systemc_clang::PortBinding::setInstanceVarName ( const std::string & name)
inline

Definition at line 77 of file PortBinding.h.

◆ toString()

const std::string systemc_clang::PortBinding::toString ( ) const
inline

Convert the port binding information into a single string.

This is mainly used in the regression tests. The returned string is compared with what is expected.

Caller port name

Definition at line 101 of file PortBinding.h.

Member Data Documentation

◆ callee_array_expr_

const clang::ArraySubscriptExpr* systemc_clang::PortBinding::callee_array_expr_
private

Definition at line 31 of file PortBinding.h.

◆ callee_array_subscripts_

ArraySubscriptsExprType systemc_clang::PortBinding::callee_array_subscripts_
private

Definition at line 32 of file PortBinding.h.

◆ callee_expr_

const clang::Expr* systemc_clang::PortBinding::callee_expr_
private

Callee.

Definition at line 28 of file PortBinding.h.

◆ callee_instance_me_expr_

const clang::MemberExpr* systemc_clang::PortBinding::callee_instance_me_expr_
private

Definition at line 30 of file PortBinding.h.

◆ callee_instance_name_

std::string systemc_clang::PortBinding::callee_instance_name_
private

Definition at line 41 of file PortBinding.h.

◆ callee_port_me_expr_

const clang::MemberExpr* systemc_clang::PortBinding::callee_port_me_expr_
private

Definition at line 29 of file PortBinding.h.

◆ callee_port_name_

std::string systemc_clang::PortBinding::callee_port_name_
private

Definition at line 42 of file PortBinding.h.

◆ callee_type_name_

std::string systemc_clang::PortBinding::callee_type_name_
private

Definition at line 43 of file PortBinding.h.

◆ caller_array_expr_

const clang::ArraySubscriptExpr* systemc_clang::PortBinding::caller_array_expr_
private

Definition at line 20 of file PortBinding.h.

◆ caller_array_subscripts_

ArraySubscriptsExprType systemc_clang::PortBinding::caller_array_subscripts_
private

Definition at line 25 of file PortBinding.h.

◆ caller_expr_

const clang::Expr* systemc_clang::PortBinding::caller_expr_
private

Caller.

Definition at line 19 of file PortBinding.h.

◆ caller_instance_me_expr_

const clang::MemberExpr* systemc_clang::PortBinding::caller_instance_me_expr_
private

Definition at line 21 of file PortBinding.h.

◆ caller_instance_name_

std::string systemc_clang::PortBinding::caller_instance_name_
private

We no longer support sc_main parsing.

Definition at line 37 of file PortBinding.h.

◆ caller_instance_type_name_

std::string systemc_clang::PortBinding::caller_instance_type_name_
private

Definition at line 39 of file PortBinding.h.

◆ caller_port_array_expr_

const clang::Expr* systemc_clang::PortBinding::caller_port_array_expr_
private

Definition at line 22 of file PortBinding.h.

◆ caller_port_array_subscripts_

ArraySubscriptsExprType systemc_clang::PortBinding::caller_port_array_subscripts_
private

Definition at line 23 of file PortBinding.h.

◆ caller_port_me_expr_

const clang::MemberExpr* systemc_clang::PortBinding::caller_port_me_expr_
private

Definition at line 24 of file PortBinding.h.

◆ caller_port_name_

std::string systemc_clang::PortBinding::caller_port_name_
private

Definition at line 38 of file PortBinding.h.

◆ instance_constructor_name_

std::string systemc_clang::PortBinding::instance_constructor_name_
private

Definition at line 47 of file PortBinding.h.

◆ instance_type_

std::string systemc_clang::PortBinding::instance_type_
private

Definition at line 45 of file PortBinding.h.

◆ instance_type_decl_

const clang::CXXRecordDecl* systemc_clang::PortBinding::instance_type_decl_
private

Definition at line 49 of file PortBinding.h.

◆ instance_var_name_

std::string systemc_clang::PortBinding::instance_var_name_
private

Definition at line 46 of file PortBinding.h.


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