module.hh (13091:81fceed26e1e) | module.hh (13191:a2254693aa5b) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 60 unchanged lines hidden (view full) --- 69}; 70 71class Module 72{ 73 private: 74 const char *_name; 75 sc_core::sc_module *_sc_mod; 76 Object *_obj; | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 60 unchanged lines hidden (view full) --- 69}; 70 71class Module 72{ 73 private: 74 const char *_name; 75 sc_core::sc_module *_sc_mod; 76 Object *_obj; |
77 bool _ended; 78 bool _deprecatedConstructor; |
|
77 78 UniqueNameGen nameGen; 79 80 public: 81 82 Module(const char *name); 83 ~Module(); 84 85 void finish(Object *this_obj); 86 87 const char *name() const { return _name; } | 79 80 UniqueNameGen nameGen; 81 82 public: 83 84 Module(const char *name); 85 ~Module(); 86 87 void finish(Object *this_obj); 88 89 const char *name() const { return _name; } |
90 void endModule() { _ended = true; } 91 void deprecatedConstructor() { _deprecatedConstructor = true; } |
|
88 89 sc_core::sc_module * 90 sc_mod() const 91 { 92 assert(_sc_mod); 93 return _sc_mod; 94 } 95 --- 14 unchanged lines hidden (view full) --- 110 void pop(); 111 112 const char *uniqueName(const char *seed) { return nameGen.gen(seed); } 113 114 void bindPorts(std::vector<const ::sc_core::sc_bind_proxy *> &proxies); 115 116 std::vector<::sc_core::sc_port_base *> ports; 117 std::vector<::sc_core::sc_export_base *> exports; | 92 93 sc_core::sc_module * 94 sc_mod() const 95 { 96 assert(_sc_mod); 97 return _sc_mod; 98 } 99 --- 14 unchanged lines hidden (view full) --- 114 void pop(); 115 116 const char *uniqueName(const char *seed) { return nameGen.gen(seed); } 117 118 void bindPorts(std::vector<const ::sc_core::sc_bind_proxy *> &proxies); 119 120 std::vector<::sc_core::sc_port_base *> ports; 121 std::vector<::sc_core::sc_export_base *> exports; |
122 123 void beforeEndOfElaboration(); 124 void endOfElaboration(); 125 void startOfSimulation(); 126 void endOfSimulation(); |
|
118}; 119 120Module *currentModule(); 121Module *newModuleChecked(); 122Module *newModule(); 123 124void callbackModule(Module *m); 125Module *callbackModule(); 126 127extern std::list<Module *> allModules; 128 129} // namespace sc_gem5 130 131#endif //__SYSTEMC_CORE_MODULE_HH__ | 127}; 128 129Module *currentModule(); 130Module *newModuleChecked(); 131Module *newModule(); 132 133void callbackModule(Module *m); 134Module *callbackModule(); 135 136extern std::list<Module *> allModules; 137 138} // namespace sc_gem5 139 140#endif //__SYSTEMC_CORE_MODULE_HH__ |