systemc: Make sure otherwise unnamed events get autogenerated ones.
authorGabe Black <gabeblack@google.com>
Tue, 2 Oct 2018 23:59:16 +0000 (16:59 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 16 Oct 2018 00:47:03 +0000 (00:47 +0000)
Change-Id: Iec4e0bd504e70d0096a4c90d5fbba9565dd0deed
Reviewed-on: https://gem5-review.googlesource.com/c/13205
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/core/sc_event.cc

index 59581ee90f1f630c90fc3f8d014ef76b2b638f72..318fea62452b57b6b33494d166854b7408debc22 100644 (file)
@@ -30,6 +30,7 @@
 #include "base/logging.hh"
 #include "systemc/core/event.hh"
 #include "systemc/ext/core/sc_event.hh"
+#include "systemc/ext/core/sc_module.hh"
 
 namespace sc_core
 {
@@ -311,7 +312,10 @@ operator | (sc_event_or_expr expr, sc_event_or_list const &eol)
  * sc_event
  */
 
-sc_event::sc_event() : _gem5_event(new ::sc_gem5::Event(this)) {}
+sc_event::sc_event() :
+    _gem5_event(new ::sc_gem5::Event(
+                this, sc_core::sc_gen_unique_name("event")))
+{}
 
 sc_event::sc_event(const char *_name) :
     _gem5_event(new ::sc_gem5::Event(this, _name))