systemc-clang 2.0.0
Parsing SystemC constructs
|
#include <NetlistMatcher.h>
Public Member Functions | |
void | registerMatchers (MatchFinder &finder, systemc_clang::Model *model, ModuleDeclarationMatcher *module_matcher) |
virtual void | run (const MatchFinder::MatchResult &result) |
void | dump () |
Private Member Functions | |
ModuleInstance * | findModuleDeclInstance (clang::Decl *decl) |
Private Attributes | |
Model * | model_ |
const InstanceMatcher * | instance_matcher_ |
ModuleDeclarationMatcher * | module_matcher_ |
std::string | top_ |
Class NetlistMatcher
Definition at line 26 of file NetlistMatcher.h.
|
inline |
Definition at line 294 of file NetlistMatcher.h.
|
inlineprivate |
Definition at line 33 of file NetlistMatcher.h.
|
inline |
Either a port (with sc_port base class) or module (with sc_module base class) can be bound. This will match if either one of those is the type.
Callers are nested within the CXXOperatorCallExpr; hence, the hasDescendant().
This priority is imporant. anyOf() priority is in the order of specification. Thus, we check if there is an ArraySubscriptExpr for the port, and only if it is not then we check a non-array port. The caller port could also be a array, so we need to check if the ancestor has an ArraySubscriptExpr. This should have worked better with using optionally(), but it didn't work.
Callees are children of the cxxOperatorCallExpr; hence, the use of has().
The memberExpr gives the port name. The arraySubscriptExpr gives the ArraySubscriptExpr to the array.
Definition at line 48 of file NetlistMatcher.h.
|
inlinevirtual |
Rework
MemberExpr that gives the method name (port name).
This string is necessary since addPortbinding stores a map of string => Portbinding. Thus just using port name is not unique.
Definition at line 183 of file NetlistMatcher.h.
|
private |
Definition at line 29 of file NetlistMatcher.h.
|
private |
Definition at line 28 of file NetlistMatcher.h.
|
private |
Definition at line 30 of file NetlistMatcher.h.
|
private |
Definition at line 31 of file NetlistMatcher.h.