Deleted Added
sdiff udiff text old ( 13091:81fceed26e1e ) new ( 13191:a2254693aa5b )
full compact
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;
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; }
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();
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__