diff options
author | Gabe Black <gabeblack@google.com> | 2018-09-05 00:40:04 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-03 00:55:45 +0000 |
commit | df9f2984c776ef4697e71408d8a7c230d4d747da (patch) | |
tree | d19e9f4e9d21310c8748df6962e5c1b1133c29c4 | |
parent | e38594f758d0e01db763724d73cae19c02d65ca0 (diff) | |
download | gem5-df9f2984c776ef4697e71408d8a7c230d4d747da.tar.xz |
systemc: Change the default naming scheme to use sc_gen_unique_name.
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>
-rw-r--r-- | src/systemc/core/object.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/systemc/core/object.cc b/src/systemc/core/object.cc index 0fc046ecc..4e4a996db 100644 --- a/src/systemc/core/object.cc +++ b/src/systemc/core/object.cc @@ -35,6 +35,7 @@ #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 { @@ -82,13 +83,13 @@ nameIsUnique(Objects *objects, Events *events, const std::string &name) } // 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) |