00001 #ifndef DESGIN_H_INCLUDED_ 00002 #define DESGIN_H_INCLUDED_ 00003 00004 #include "rose.h" 00005 00006 #include "module.h" 00007 #include "primitive_channel.h" 00008 #include "hierarchical_channel.h" 00009 00010 #include "event.h" 00011 00012 #include "thread.h" 00013 #include "cthread.h" 00014 #include "method.h" 00015 #include "function.h" 00016 00017 namespace risc { 00018 00023 class Design { 00024 00025 public: 00026 00032 explicit Design(int argc, char* argv[]); 00033 ~Design(); 00034 00035 void initialize_defintions(); 00036 void initialize_declarations(); 00037 void initialize_top_modules(); 00038 00039 00041 void print_all_class_definitions(); 00042 void print_all_primitive_channel_definitions(); 00043 void print_all_hierarchical_channel_definitions(); 00044 void print_all_events(); 00045 void print_all_threads(); 00046 void print_all_cthreads(); 00047 void print_all_methods(); 00048 void print_all_functions(); 00049 void print_design(); 00050 00051 00053 ModuleVector module_definitions_; 00054 ModuleInstanceVector top_modules_; 00055 00056 PrimitiveChannelVector primitive_channel_; 00057 HierarchicalChannelVector hierarchical_channel_; 00058 00059 EventVector events_; 00060 VariableVector variables_; // global variables 00061 00062 ThreadVector threads_; 00063 CThreadVector cthreads_; 00064 MethodVector methods_; 00065 FunctionVector functions_; 00066 00067 00069 Module* find_module_definition(SgClassDefinition* cd); 00070 00071 00073 SgProject* project_; 00074 SgFunctionDeclaration* main_; 00075 00076 00078 00081 SgClassDefinition* sc_module_; 00082 SgClassDefinition* sc_port_; 00083 SgClassDefinition* sc_port_base_; 00084 SgClassDefinition* sc_in_; 00085 SgClassDefinition* sc_out_; 00086 SgClassDefinition* sc_inout_; 00087 SgClassDefinition* sc_event_; 00088 SgClassDefinition* sc_channel_; 00089 SgClassDefinition* sc_prim_channel_; 00090 00094 SgFunctionDeclaration* sc_main_; 00095 00096 private: 00100 Design(const Design &d); 00101 }; 00102 00103 class GlobalDesign { 00104 public: 00105 static Design *design_static; 00106 }; 00107 Design* get_design(); 00108 SgProject* get_project(); 00109 00110 }; // end namespace risc 00111 00112 #endif /* DESGIN_H_INCLUDED_ */ 00113 00114 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */