24 const std::string &moduleName) {
26 vector<string> instanceList;
27 instanceList.push_back(instanceName);
31 instanceListModuleMapType::iterator instanceListModuleMapFound =
33 std::vector<std::string> instanceList{instanceListModuleMapFound->second};
34 instanceList.push_back(instanceName);
44 std::string moduleName;
45 std::string instanceName;
47 std::string signalName;
49 for (Stmt::child_iterator it = ce->IgnoreImpCasts()->child_begin(),
50 eit = ce->IgnoreImpCasts()->child_end();
52 if (Expr *e = dyn_cast<Expr>(*it)) {
53 if (MemberExpr *me = dyn_cast<MemberExpr>(e->IgnoreImpCasts())) {
55 dyn_cast<DeclRefExpr>(me->getBase()->IgnoreImpCasts())) {
57 de->getDecl()->getType().getBaseTypeIdentifier()->getName().str();
58 instanceName = de->getFoundDecl()->getNameAsString();
60 portName = me->getMemberDecl()->getNameAsString();
63 if (DeclRefExpr *de = dyn_cast<DeclRefExpr>(e->IgnoreImpCasts())) {
65 signalName = de->getNameInfo().getAsString();
98 string modName = it->second;
99 if (modName == moduleName) {
125 llvm::errs() <<
"\n ----------------- Netlist dump ----------------- \n";
130 llvm::errs() <<
"\n Instance Name : " << it->first
131 <<
" Module Name : " << it->second;
132 string instanceName = it->first;
136 instancePortSignalMapType::iterator instancePortSignalMapFound =
139 for (portSignalMapType::iterator pit = portSignalMap.begin(),
140 pite = portSignalMap.end();
141 pit != pite; pit++) {
142 llvm::errs() <<
"\n Port : " << pit->first <<
" ------> "
146 llvm::errs() <<
"\n No instance name found ////// weird.";
149 <<
"\n ------------------------------------------------------\n";
virtual bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr *ce)
void updateInstanceListModuleMap(const std::string &, const std::string &)
const instancePortSignalMapType & getInstancePortSignalMap()
portSignalMapType port_signal_map_
pair< string, vector< string > > instanceListModulePairType
instanceListModuleMapType inst_list_module_map_
pair< string, string > portSignalPairType
const portSignalMapType & getPortSignalMap()
const instanceListModuleMapType & getInstanceListModuleMap()
pair< string, string > instanceModulePairType
instancePortSignalMapType inst_port_signal_map_
map< string, portSignalMapType > instancePortSignalMapType
pair< string, portSignalMapType > instancePortSignalPairType
instanceModuleMapType inst_module_map_
const instanceModuleMapType & getInstanceModuleMap()
FindNetlist(FunctionDecl *)
map< string, vector< string > > instanceListModuleMapType
int getNumInstances(std::string)
map< string, string > instanceModuleMapType
map< string, string > portSignalMapType