systemc-clang 2.0.0
Parsing SystemC constructs
Loading...
Searching...
No Matches
FindNetlist.h
Go to the documentation of this file.
1#ifndef _NETLIST_GEN_H_
2#define _NETLIST_GEN_H_
3
4#include "clang/AST/DeclCXX.h"
5#include "clang/AST/RecursiveASTVisitor.h"
6#include "llvm/Support/raw_ostream.h"
7#include <map>
8namespace systemc_clang {
9
10using namespace clang;
11using namespace std;
12
13class FindNetlist : public RecursiveASTVisitor<FindNetlist> {
14public:
15 // Removed Model::moduleMapType from constructor
16 // Have to think of a way to include building
17 // netlist from module constructors. Right now I am not
18 // doing it.
19 FindNetlist(FunctionDecl *);
20 FindNetlist(const FindNetlist &);
21 virtual ~FindNetlist();
22
23public:
24 typedef pair<string, string> instanceModulePairType;
25 typedef map<string, string> instanceModuleMapType;
26
27 typedef pair<string, string> portSignalPairType;
28 typedef map<string, string> portSignalMapType;
29
30 typedef pair<string, portSignalMapType> instancePortSignalPairType;
31 typedef map<string, portSignalMapType> instancePortSignalMapType;
32
33 typedef pair<string, vector<string>> instanceListModulePairType;
34 typedef map<string, vector<string>> instanceListModuleMapType;
35
36public:
37 virtual bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr *ce);
38
39 void updateInstanceListModuleMap(const std::string &, const std::string &);
40
45 int getNumInstances(std::string);
46 void dump();
47
48private:
49 int _pass;
54};
55} // namespace systemc_clang
56#endif
virtual bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr *ce)
void updateInstanceListModuleMap(const std::string &, const std::string &)
const instancePortSignalMapType & getInstancePortSignalMap()
portSignalMapType port_signal_map_
Definition FindNetlist.h:51
pair< string, vector< string > > instanceListModulePairType
Definition FindNetlist.h:33
instanceListModuleMapType inst_list_module_map_
Definition FindNetlist.h:53
pair< string, string > portSignalPairType
Definition FindNetlist.h:27
const portSignalMapType & getPortSignalMap()
const instanceListModuleMapType & getInstanceListModuleMap()
pair< string, string > instanceModulePairType
Definition FindNetlist.h:24
instancePortSignalMapType inst_port_signal_map_
Definition FindNetlist.h:52
map< string, portSignalMapType > instancePortSignalMapType
Definition FindNetlist.h:31
pair< string, portSignalMapType > instancePortSignalPairType
Definition FindNetlist.h:30
instanceModuleMapType inst_module_map_
Definition FindNetlist.h:50
const instanceModuleMapType & getInstanceModuleMap()
FindNetlist(FunctionDecl *)
map< string, vector< string > > instanceListModuleMapType
Definition FindNetlist.h:34
int getNumInstances(std::string)
map< string, string > instanceModuleMapType
Definition FindNetlist.h:25
map< string, string > portSignalMapType
Definition FindNetlist.h:28
Clang forward declarations.
Definition FindArgument.h:6