systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
HDLType Class Reference

#include <HDLType.h>

Collaboration diagram for HDLType:
Collaboration graph
[legend]

Classes

struct  usertype_info_t
 

Public Types

typedef std::unordered_map< string, QualType > usertype_map_t
 
typedef std::unordered_map< const clang::Type *, string > userrectype_map_t
 

Public Member Functions

 HDLType ()
 
 ~HDLType ()
 
void SCtype2hcode (string prefix, Tree< TemplateType > *template_argtp, std::vector< llvm::APInt > *arr_sizes, hNode::hdlopsEnum h_op, hNodep &h_info)
 
void generatetype (systemc_clang::TreeNode< systemc_clang::TemplateType > *const &node, systemc_clang::Tree< systemc_clang::TemplateType > *const &treehead, hNodep &h_info, bool generate_initial_htype=true)
 
bool checkusertype (systemc_clang::TreeNode< systemc_clang::TemplateType > *const &node, systemc_clang::Tree< systemc_clang::TemplateType > *const &treehead, string &tmps)
 
hNodep addtype (string typname, QualType qtyp, ASTContext &astcontext)
 
void addfieldtype (const FieldDecl *fld, hNodep &h_typdef)
 
void print (llvm::raw_ostream &modelout=llvm::outs(), unsigned int indnt=2)
 
void print ()
 

Public Attributes

usertype_info_t usertype_info
 

Private Attributes

util tutil
 

Detailed Description

Definition at line 16 of file HDLType.h.

Member Typedef Documentation

◆ userrectype_map_t

typedef std::unordered_map<const clang::Type *, string> HDLType::userrectype_map_t

Definition at line 21 of file HDLType.h.

◆ usertype_map_t

typedef std::unordered_map<string, QualType> HDLType::usertype_map_t

Definition at line 20 of file HDLType.h.

Constructor & Destructor Documentation

◆ HDLType()

HDLType::HDLType ( )
inline

Definition at line 18 of file HDLType.h.

◆ ~HDLType()

HDLType::~HDLType ( )
inline

Definition at line 19 of file HDLType.h.

Member Function Documentation

◆ addfieldtype()

void HDLType::addfieldtype ( const FieldDecl * fld,
hNodep & h_typdef )

Definition at line 247 of file HDLType.cpp.

◆ addtype()

hNodep HDLType::addtype ( string typname,
QualType qtyp,
ASTContext & astcontext )

Definition at line 178 of file HDLType.cpp.

◆ checkusertype()

bool HDLType::checkusertype ( systemc_clang::TreeNode< systemc_clang::TemplateType > *const & node,
systemc_clang::Tree< systemc_clang::TemplateType > *const & treehead,
string & tmps )

Definition at line 131 of file HDLType.cpp.

◆ generatetype()

void HDLType::generatetype ( systemc_clang::TreeNode< systemc_clang::TemplateType > *const & node,
systemc_clang::Tree< systemc_clang::TemplateType > *const & treehead,
hNodep & h_info,
bool generate_initial_htype = true )

Definition at line 94 of file HDLType.cpp.

◆ print() [1/2]

void HDLType::print ( )
inline

Definition at line 54 of file HDLType.h.

◆ print() [2/2]

void HDLType::print ( llvm::raw_ostream & modelout = llvm::outs(),
unsigned int indnt = 2 )
inline

Definition at line 45 of file HDLType.h.

◆ SCtype2hcode()

void HDLType::SCtype2hcode ( string prefix,
Tree< TemplateType > * template_argtp,
std::vector< llvm::APInt > * arr_sizes,
hNode::hdlopsEnum h_op,
hNodep & h_info )

Resolve types of systemc variables, signals, and ports including templated types and generate primitive type declarations Relies on TemplateTree matcher provided by front end and can handle structured types.

Definition at line 29 of file HDLType.cpp.

Member Data Documentation

◆ tutil

util HDLType::tutil
private

Definition at line 62 of file HDLType.h.

◆ usertype_info

usertype_info_t HDLType::usertype_info

Definition at line 44 of file HDLType.h.


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