module.cc (13303:045f002c325c) | module.cc (13317:36c574a4036e) |
---|---|
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 --- 18 unchanged lines hidden (view full) --- 27 * Authors: Gabe Black 28 */ 29 30#include "systemc/core/module.hh" 31 32#include <cassert> 33 34#include "base/logging.hh" | 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 --- 18 unchanged lines hidden (view full) --- 27 * Authors: Gabe Black 28 */ 29 30#include "systemc/core/module.hh" 31 32#include <cassert> 33 34#include "base/logging.hh" |
35#include "systemc/ext/core/messages.hh" |
|
35#include "systemc/ext/core/sc_export.hh" 36#include "systemc/ext/core/sc_port.hh" 37#include "systemc/ext/utils/sc_report_handler.hh" 38 39namespace sc_gem5 40{ 41 42namespace --- 95 unchanged lines hidden (view full) --- 138 popParentModule(); 139} 140 141void 142Module::endOfElaboration() 143{ 144 if (_deprecatedConstructor && !_ended) { 145 std::string msg = csprintf("module '%s'", name()); | 36#include "systemc/ext/core/sc_export.hh" 37#include "systemc/ext/core/sc_port.hh" 38#include "systemc/ext/utils/sc_report_handler.hh" 39 40namespace sc_gem5 41{ 42 43namespace --- 95 unchanged lines hidden (view full) --- 139 popParentModule(); 140} 141 142void 143Module::endOfElaboration() 144{ 145 if (_deprecatedConstructor && !_ended) { 146 std::string msg = csprintf("module '%s'", name()); |
146 SC_REPORT_WARNING("(W509) module construction not properly completed: " 147 "did you forget to add a sc_module_name parameter to " 148 "your module constructor?", msg.c_str()); | 147 SC_REPORT_WARNING(sc_core::SC_ID_END_MODULE_NOT_CALLED_, msg.c_str()); |
149 } 150 pushParentModule(this); 151 try { 152 _sc_mod->end_of_elaboration(); 153 for (auto e: exports) 154 e->end_of_elaboration(); 155 } catch (...) { 156 popParentModule(); --- 38 unchanged lines hidden (view full) --- 195 if (_modules.empty()) 196 return nullptr; 197 return _modules.back(); 198} 199 200Module * 201newModuleChecked() 202{ | 148 } 149 pushParentModule(this); 150 try { 151 _sc_mod->end_of_elaboration(); 152 for (auto e: exports) 153 e->end_of_elaboration(); 154 } catch (...) { 155 popParentModule(); --- 38 unchanged lines hidden (view full) --- 194 if (_modules.empty()) 195 return nullptr; 196 return _modules.back(); 197} 198 199Module * 200newModuleChecked() 201{ |
203 if (!_new_module) { 204 SC_REPORT_ERROR("(E533) module name stack is empty: " 205 "did you forget to add a sc_module_name parameter to " 206 "your module constructor?", nullptr); 207 } | 202 if (!_new_module) 203 SC_REPORT_ERROR(sc_core::SC_ID_MODULE_NAME_STACK_EMPTY_, ""); |
208 return _new_module; 209} 210 211Module * 212newModule() 213{ 214 return _new_module; 215} 216 217std::list<Module *> allModules; 218 219} // namespace sc_gem5 | 204 return _new_module; 205} 206 207Module * 208newModule() 209{ 210 return _new_module; 211} 212 213std::list<Module *> allModules; 214 215} // namespace sc_gem5 |