The spec says the default name should just be "object", but the
Accellera implementation calls sc_gen_unique_name, and the tests
expects that.
Change-Id: Ic6922a6d9fb53f3126a9d527868fc11da5320446
Reviewed-on: https://gem5-review.googlesource.com/c/12593
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
#include "systemc/core/event.hh"
#include "systemc/core/module.hh"
#include "systemc/core/scheduler.hh"
+#include "systemc/ext/core/sc_module.hh"
namespace sc_gem5
{
} // anonymous namespace
-Object::Object(sc_core::sc_object *_sc_obj) : Object(_sc_obj, "object") {}
+Object::Object(sc_core::sc_object *_sc_obj) : Object(_sc_obj, nullptr) {}
Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) :
_sc_obj(_sc_obj), _basename(obj_name ? obj_name : ""), parent(nullptr)
{
if (_basename == "")
- _basename = "object";
+ _basename = ::sc_core::sc_gen_unique_name("object");
Module *p = currentModule();
if (!p)