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

#include <HDLThread.h>

Collaboration diagram for systemc_hdl::HDLThread:
Collaboration graph
[legend]

Public Member Functions

 HDLThread (EntryFunctionContainer *efc, hNodep &h_top, hNodep &h_portsigvarlist, clang::DiagnosticsEngine &diag_engine, const ASTContext &ast_context, hdecl_name_map_t &mod_vname_map, hfunc_name_map_t &allmethods, overridden_method_map_t &overridden_method_map, hNodep h_resetvarinfo)
 
virtual ~HDLThread ()
 

Public Attributes

hfunc_name_map_t methodecls
 
clang::DiagnosticsEngine & diag_e
 

Private Member Functions

string NameNext (string &s)
 
void updatepnvisited (int i)
 
bool isBreak (const Stmt *S)
 
void FindStatements (const CFGBlock &B, std::vector< const Stmt * > &SS)
 
void FindStatements (const SplitCFGBlock *B, std::vector< const Stmt * > &SS)
 
void MarkStatements (const Stmt *S, llvm::SmallDenseMap< const Stmt *, bool > &Map)
 
void CheckVardecls (hNodep &hp, string &cfgblockid)
 
void ProcessDeclStmt (const DeclStmt *declstmt, hNodep htmp)
 
int GetFalseLength (const SplitCFG::SplitCFGPath &pt, int cond_node_ix, int state_num)
 
void ProcessSplitGraphGroup (const SplitCFG::SplitCFGPath pt, int startix, int num_ele, int state_num, hNodep h_switchcase)
 
void ProcessSplitGraphBlock (const SplitCFG::SplitCFGPath &pt, int thisix, int state_num, hNodep h_switchcase)
 
void GenerateStateUpdate (hNodep hstatemethod, hNodep hlocalvarsp)
 
void GenerateStateVar (string sname)
 
void GenerateWaitCntUpdate (hNodep h_switchcase)
 
hNodep GenerateBinop (string opname, string lhs, string rhs, bool rhs_is_literal=true)
 
bool IsWaitStmt (hNodep hp)
 
bool isContinueorBreak (const Stmt *S)
 
void ProcessHWait (hNodep htmp, int nxtstate)
 
void ProcessBB (const CFGBlock &BI)
 
void AddThreadMethod (const CFGBlock &BI)
 

Private Attributes

SplitCFG scfg
 
hNodep h_ret
 
EntryFunctionContainerefc_
 
hNodep h_top_
 
hNodep hthreadblocksp
 
hNodep hlocalvarsp
 
hdecl_name_map_t thread_vname_map
 
bool add_info
 
hdecl_name_map_tmod_vname_map_
 
hNodep h_resetvarinfo_
 
HDLBodyxtbodyp
 
hfunc_name_map_t allmethodecls_
 
overridden_method_map_toverridden_method_map_
 
string state_string
 
string nextstate_string
 
string waitctr_string
 
string nextwaitctr_string
 
string waitnextstate_string
 
string savewaitnextstate_string
 
int numstates
 
bool needwaitswitchcase
 
const string nextstring {"_next_"}
 
const string shadowstring {"_main_"}
 
const string statestringsymbol {"#"}
 
std::unordered_map< std::string, int > SGVisited
 
std::unordered_set< int > pathnodevisited
 
util lutil
 
const clang::ASTContext & ast_context_
 

Detailed Description

Definition at line 25 of file HDLThread.h.

Constructor & Destructor Documentation

◆ HDLThread()

systemc_hdl::HDLThread::HDLThread ( EntryFunctionContainer * efc,
hNodep & h_top,
hNodep & h_portsigvarlist,
clang::DiagnosticsEngine & diag_engine,
const ASTContext & ast_context,
hdecl_name_map_t & mod_vname_map,
hfunc_name_map_t & allmethods,
overridden_method_map_t & overridden_method_map,
hNodep h_resetvarinfo )

Definition at line 24 of file HDLThread.cpp.

◆ ~HDLThread()

systemc_hdl::HDLThread::~HDLThread ( )
virtual

Definition at line 181 of file HDLThread.cpp.

Member Function Documentation

◆ AddThreadMethod()

void systemc_hdl::HDLThread::AddThreadMethod ( const CFGBlock & BI)
private

◆ CheckVardecls()

void systemc_hdl::HDLThread::CheckVardecls ( hNodep & hp,
string & cfgblockid )
private

Definition at line 195 of file HDLThread.cpp.

◆ FindStatements() [1/2]

void systemc_hdl::HDLThread::FindStatements ( const CFGBlock & B,
std::vector< const Stmt * > & SS )
private

Definition at line 253 of file HDLThread.cpp.

◆ FindStatements() [2/2]

void systemc_hdl::HDLThread::FindStatements ( const SplitCFGBlock * B,
std::vector< const Stmt * > & SS )
private

Definition at line 283 of file HDLThread.cpp.

◆ GenerateBinop()

hNodep systemc_hdl::HDLThread::GenerateBinop ( string opname,
string lhs,
string rhs,
bool rhs_is_literal = true )
private

Definition at line 616 of file HDLThread.cpp.

◆ GenerateStateUpdate()

void systemc_hdl::HDLThread::GenerateStateUpdate ( hNodep hstatemethod,
hNodep hlocalvarsp )
private

Definition at line 560 of file HDLThread.cpp.

◆ GenerateStateVar()

void systemc_hdl::HDLThread::GenerateStateVar ( string sname)
private

Definition at line 606 of file HDLThread.cpp.

◆ GenerateWaitCntUpdate()

void systemc_hdl::HDLThread::GenerateWaitCntUpdate ( hNodep h_switchcase)
private

Definition at line 546 of file HDLThread.cpp.

◆ GetFalseLength()

int systemc_hdl::HDLThread::GetFalseLength ( const SplitCFG::SplitCFGPath & pt,
int cond_node_ix,
int state_num )
private

Definition at line 321 of file HDLThread.cpp.

◆ isBreak()

bool systemc_hdl::HDLThread::isBreak ( const Stmt * S)
inlineprivate

Definition at line 80 of file HDLThread.h.

◆ isContinueorBreak()

bool systemc_hdl::HDLThread::isContinueorBreak ( const Stmt * S)
private

Definition at line 185 of file HDLThread.cpp.

◆ IsWaitStmt()

bool systemc_hdl::HDLThread::IsWaitStmt ( hNodep hp)
private

Definition at line 191 of file HDLThread.cpp.

◆ MarkStatements()

void systemc_hdl::HDLThread::MarkStatements ( const Stmt * S,
llvm::SmallDenseMap< const Stmt *, bool > & Map )
private

Definition at line 244 of file HDLThread.cpp.

◆ NameNext()

string systemc_hdl::HDLThread::NameNext ( string & s)
inlineprivate

Definition at line 67 of file HDLThread.h.

◆ ProcessBB()

void systemc_hdl::HDLThread::ProcessBB ( const CFGBlock & BI)
private

◆ ProcessDeclStmt()

void systemc_hdl::HDLThread::ProcessDeclStmt ( const DeclStmt * declstmt,
hNodep htmp )
private

called when a declstmt is instantiated more than once can skip the decl, but need to process initializer

Definition at line 218 of file HDLThread.cpp.

◆ ProcessHWait()

void systemc_hdl::HDLThread::ProcessHWait ( hNodep htmp,
int nxtstate )
private

Definition at line 520 of file HDLThread.cpp.

◆ ProcessSplitGraphBlock()

void systemc_hdl::HDLThread::ProcessSplitGraphBlock ( const SplitCFG::SplitCFGPath & pt,
int thisix,
int state_num,
hNodep h_switchcase )
private

Definition at line 360 of file HDLThread.cpp.

◆ ProcessSplitGraphGroup()

void systemc_hdl::HDLThread::ProcessSplitGraphGroup ( const SplitCFG::SplitCFGPath pt,
int startix,
int num_ele,
int state_num,
hNodep h_switchcase )
private

Definition at line 339 of file HDLThread.cpp.

◆ updatepnvisited()

void systemc_hdl::HDLThread::updatepnvisited ( int i)
inlineprivate

Definition at line 74 of file HDLThread.h.

Member Data Documentation

◆ add_info

bool systemc_hdl::HDLThread::add_info
private

Definition at line 46 of file HDLThread.h.

◆ allmethodecls_

hfunc_name_map_t systemc_hdl::HDLThread::allmethodecls_
private

Definition at line 52 of file HDLThread.h.

◆ ast_context_

const clang::ASTContext& systemc_hdl::HDLThread::ast_context_
private

Definition at line 110 of file HDLThread.h.

◆ diag_e

clang::DiagnosticsEngine& systemc_hdl::HDLThread::diag_e

Definition at line 34 of file HDLThread.h.

◆ efc_

EntryFunctionContainer* systemc_hdl::HDLThread::efc_
private

Definition at line 40 of file HDLThread.h.

◆ h_resetvarinfo_

hNodep systemc_hdl::HDLThread::h_resetvarinfo_
private

Definition at line 49 of file HDLThread.h.

◆ h_ret

hNodep systemc_hdl::HDLThread::h_ret
private

Definition at line 39 of file HDLThread.h.

◆ h_top_

hNodep systemc_hdl::HDLThread::h_top_
private

Definition at line 41 of file HDLThread.h.

◆ hlocalvarsp

hNodep systemc_hdl::HDLThread::hlocalvarsp
private

Definition at line 43 of file HDLThread.h.

◆ hthreadblocksp

hNodep systemc_hdl::HDLThread::hthreadblocksp
private

Definition at line 42 of file HDLThread.h.

◆ lutil

util systemc_hdl::HDLThread::lutil
private

Definition at line 108 of file HDLThread.h.

◆ methodecls

hfunc_name_map_t systemc_hdl::HDLThread::methodecls

Definition at line 32 of file HDLThread.h.

◆ mod_vname_map_

hdecl_name_map_t& systemc_hdl::HDLThread::mod_vname_map_
private

Definition at line 47 of file HDLThread.h.

◆ needwaitswitchcase

bool systemc_hdl::HDLThread::needwaitswitchcase
private

Definition at line 61 of file HDLThread.h.

◆ nextstate_string

string systemc_hdl::HDLThread::nextstate_string
private

Definition at line 55 of file HDLThread.h.

◆ nextstring

const string systemc_hdl::HDLThread::nextstring {"_next_"}
private

Definition at line 63 of file HDLThread.h.

◆ nextwaitctr_string

string systemc_hdl::HDLThread::nextwaitctr_string
private

Definition at line 57 of file HDLThread.h.

◆ numstates

int systemc_hdl::HDLThread::numstates
private

Definition at line 60 of file HDLThread.h.

◆ overridden_method_map_

overridden_method_map_t& systemc_hdl::HDLThread::overridden_method_map_
private

Definition at line 53 of file HDLThread.h.

◆ pathnodevisited

std::unordered_set<int> systemc_hdl::HDLThread::pathnodevisited
private

Definition at line 72 of file HDLThread.h.

◆ savewaitnextstate_string

string systemc_hdl::HDLThread::savewaitnextstate_string
private

Definition at line 59 of file HDLThread.h.

◆ scfg

SplitCFG systemc_hdl::HDLThread::scfg
private

Definition at line 38 of file HDLThread.h.

◆ SGVisited

std::unordered_map<std::string, int> systemc_hdl::HDLThread::SGVisited
private

Definition at line 70 of file HDLThread.h.

◆ shadowstring

const string systemc_hdl::HDLThread::shadowstring {"_main_"}
private

Definition at line 64 of file HDLThread.h.

◆ state_string

string systemc_hdl::HDLThread::state_string
private

Definition at line 54 of file HDLThread.h.

◆ statestringsymbol

const string systemc_hdl::HDLThread::statestringsymbol {"#"}
private

Definition at line 65 of file HDLThread.h.

◆ thread_vname_map

hdecl_name_map_t systemc_hdl::HDLThread::thread_vname_map
private

Definition at line 45 of file HDLThread.h.

◆ waitctr_string

string systemc_hdl::HDLThread::waitctr_string
private

Definition at line 56 of file HDLThread.h.

◆ waitnextstate_string

string systemc_hdl::HDLThread::waitnextstate_string
private

Definition at line 58 of file HDLThread.h.

◆ xtbodyp

HDLBody* systemc_hdl::HDLThread::xtbodyp
private

Definition at line 51 of file HDLThread.h.


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