00001 #ifndef OOO_INSTRUMENTATION_H_INCLUDED_
00002 #define OOO_INSTRUMENTATION_H_INCLUDED_
00003
00004 #include <iostream>
00005 #include <cstdlib>
00006
00007 #include "rose.h"
00008
00009 #include "../internal_representation/design.h"
00010 #include "../segment_graph/data_conflict_table.h"
00011 #include "../segment_graph/event_conflict_table.h"
00012 #include "../segment_graph/time_advanced_table.h"
00013 #include "../tools/class_is_derived_from.h"
00014
00015 namespace risc {
00016
00017 namespace inst {
00018
00019 class InstrumentationTraversal: public AstSimpleProcessing
00020 {
00021 public:
00022 InstrumentationTraversal(SgType*, SgExpression*, SgExpression*,
00023 SgClassDefinition*, std::map<SgNode*, int>&);
00024 virtual void visit(SgNode* astNode);
00025
00026 private:
00027 SgType* variableType;
00028 SgExpression* PrimChnlVarRefExp;
00029 SgExpression* SCChnlVarRefExp;
00030 SgClassDefinition* SCModuleClassDef;
00031 std::map<SgNode*, int>& FuncCallExptoID;
00032 };
00033
00034
00035
00036 int
00037 risc_backend (SgProject* project, UnparseFormatHelp *unparseFormatHelp = NULL,
00038 UnparseDelegate* unparseDelagate = NULL);
00039
00040 int
00041 instrumentor (risc::Design& design, risc::sg::DataConflictTable* data_conflict_table,
00042 risc::sg::EventConflictTable* event_conflict_table,
00043 risc::sg::TimeAdvancedTable* time_advance_table,
00044 std::map<SgNode*, int>& FuncCallExptoID);
00045
00046 struct ParseStatus
00047 {
00048 unsigned int VerbosityLevel;
00049 unsigned int WarningLevel;
00050
00051 ParseStatus();
00052 ParseStatus& operator=(const ParseStatus& copy);
00053 };
00054
00055 ParseStatus
00056 ParseCommandlineOptions(int &argc, char** &argv);
00057
00058
00059 }
00060
00061 }
00062
00063 #endif
00064
00065