systemc-clang 2.0.0
Parsing SystemC constructs
|
Class SensitivityMatcher. More...
#include <SensitivityMatcher.h>
Public Types | |
typedef std::tuple< std::string, clang::ValueDecl *, clang::MemberExpr *, clang::VarDecl *, clang::ArraySubscriptExpr *, clang::ForStmt * > | SensitivityTupleType |
typedef std::pair< std::string, std::vector< SensitivityTupleType > > | SensitivityPairType |
This is the pair for inserting key-value entries in the map. | |
typedef std::map< std::string, std::vector< SensitivityTupleType > > | SenseMapType |
The key is going to be the name of the FieldDecl/VarDecl. | |
Public Member Functions | |
SenseMapType | getSensitivityMap () |
Return the sensitivity map that has been created. | |
void | registerMatchers (MatchFinder &finder) |
Defines the matcher, and setup the matcher. | |
virtual void | run (const MatchFinder::MatchResult &result) |
This is the callback function whenever there is a match. | |
void | dump () |
Dump out the detected sensitivity list for every process. | |
Private Member Functions | |
std::string | generateSensitivityName (const std::vector< SensitivityTupleType > &sense_args) |
This generates an encoded name of the argument for the sensitivity. | |
Private Attributes | |
SenseMapType | sensitivity_ |
This is the map structure to store the identified sensitivity list. | |
clang::VarDecl * | process_handle_ |
This provides access to the SystemC process' entry function handler. | |
Class SensitivityMatcher.
Definition at line 211 of file SensitivityMatcher.h.
std::map<std::string, std::vector<SensitivityTupleType> > sc_ast_matchers::SensitivityMatcher::SenseMapType |
The key is going to be the name of the FieldDecl/VarDecl.
Definition at line 228 of file SensitivityMatcher.h.
std::pair<std::string, std::vector<SensitivityTupleType> > sc_ast_matchers::SensitivityMatcher::SensitivityPairType |
This is the pair for inserting key-value entries in the map.
Definition at line 224 of file SensitivityMatcher.h.
std::tuple<std::string, clang::ValueDecl*, clang::MemberExpr*, clang::VarDecl*, clang::ArraySubscriptExpr*, clang::ForStmt*> sc_ast_matchers::SensitivityMatcher::SensitivityTupleType |
A sensitivity will typically have a member field, and sometimes a call on the member field. The ValueDecl records the FieldDecl, and the VarDecl that may be used in the sensitivity list. The MemberExpr is just a way to represent where this particular ValueDecl was found for further parsing. The VarDecl* is the process handle to which this sensitivity is bound to.
Definition at line 220 of file SensitivityMatcher.h.
|
inline |
Dump out the detected sensitivity list for every process.
This is going to print out the sensitivity list.
Definition at line 429 of file SensitivityMatcher.h.
|
inlineprivate |
This generates an encoded name of the argument for the sensitivity.
Definition at line 238 of file SensitivityMatcher.h.
|
inline |
Return the sensitivity map that has been created.
This method just returns the identified map of sensitivity lists.
Definition at line 255 of file SensitivityMatcher.h.
|
inline |
Defines the matcher, and setup the matcher.
Add the matcher.
Definition at line 259 of file SensitivityMatcher.h.
|
inlinevirtual |
This is the callback function whenever there is a match.
Debug code
If the argument to the operator<<() is a MemberExpr. This is the situation when we only have a FieldDecl as a part of the sensitivity list. This is when there is no member call being invoked on the FieldDecl.
If the argument to the operator<<() is a CXXMemberCallExpr. This is needed when there is a clk.pos() in the sensitivity list. This is when we have member call expressions on the FieldDecl.
If the argument is an ArraySubscriptExpr, then only provide access to the pointer to ArraySubscriptExpr.
Definition at line 307 of file SensitivityMatcher.h.
|
private |
This provides access to the SystemC process' entry function handler.
Definition at line 235 of file SensitivityMatcher.h.
|
private |
This is the map structure to store the identified sensitivity list.
Definition at line 232 of file SensitivityMatcher.h.