00001 #ifndef MODULE_H_INCLUDED_ 00002 #define MODULE_H_INCLUDED_ 00003 00004 #include<iostream> 00005 #include<string> 00006 #include<vector> 00007 00008 #include "module_instance.h" 00009 #include "variable.h" 00010 00011 #include "function.h" 00012 #include "thread.h" 00013 #include "cthread.h" 00014 #include "method.h" 00015 00016 #include "hierarchical_channel.h" 00017 #include "hierarchical_channel_instance.h" 00018 #include "primitive_channel.h" 00019 #include "primitive_channel_instance.h" 00020 00021 00022 #include "class.h" 00023 00024 00025 namespace risc { 00026 00027 class Module; 00028 typedef std::vector<Module*> ModuleVector; 00029 typedef std::vector<Module*>::iterator ModuleVectorIter; 00030 typedef std::vector<Module*>::const_iterator ModuleVectorConstIter; 00031 00039 class Module: public Class { 00040 00041 public: 00042 00049 explicit Module(SgClassDefinition *ast_node); 00050 00051 ~Module(); 00052 00053 00055 00061 virtual void initialize_functions(); 00062 00064 00068 void print_module_definition(); 00069 00073 void print_hierarchy(unsigned indent_level = 0); 00074 00076 00080 ModuleVector sub_modules_defs_; 00081 00087 PrimitiveChannelVector sub_prim_channel_defs_; 00088 00094 HierarchicalChannelVector sub_hier_channel_defs_; 00095 00099 ThreadVector threads_; 00100 00104 CThreadVector cthreads_; 00105 00109 MethodVector methods_; 00110 00114 ResetSignalVector reset_signals_; 00115 00119 ResetSignalVector async_reset_signals_; 00120 00125 int instance_counter_; 00126 00127 private: 00128 00132 Module(const Module &md); 00133 }; 00134 00135 } // end of namespace risc 00136 00137 #endif /* MODULE_H_INCLUDED_ */ 00138 00139 /* ex: set softtabstop=2 tabstop=2 shiftwidth=2 expandtab: */