From f2ab5e7a9e11783da3b9d7338775cf4b5fe2c29c Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 16 Jul 2018 16:14:33 -0700 Subject: systemc: Implement the sensitivity mechanism. This change lets processes be sensitive to events, timeouts, etc. Change-Id: If30a256dfa8a2e92192c1f9c96b48e2aa28ec27e Reviewed-on: https://gem5-review.googlesource.com/11713 Reviewed-by: Gabe Black Maintainer: Gabe Black --- src/systemc/core/event.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/systemc/core/event.hh') diff --git a/src/systemc/core/event.hh b/src/systemc/core/event.hh index bf9afd40f..a9d318382 100644 --- a/src/systemc/core/event.hh +++ b/src/systemc/core/event.hh @@ -30,9 +30,11 @@ #ifndef __SYSTEMC_CORE_EVENT_HH__ #define __SYSTEMC_CORE_EVENT_HH__ +#include #include #include +#include "sim/eventq.hh" #include "systemc/core/list.hh" #include "systemc/core/object.hh" #include "systemc/ext/core/sc_prim.hh" @@ -50,6 +52,8 @@ namespace sc_gem5 typedef std::vector Events; +class Sensitivity; + class Event { public: @@ -88,6 +92,9 @@ class Event return e->_gem5_event; } + void addSensitivity(Sensitivity *s) const { sensitivities.insert(s); } + void delSensitivity(Sensitivity *s) const { sensitivities.erase(s); } + private: sc_core::sc_event *_sc_event; @@ -97,6 +104,10 @@ class Event sc_core::sc_object *parent; EventsIt parentIt; + + EventWrapper delayedNotify; + + mutable std::set sensitivities; }; extern Events topLevelEvents; -- cgit v1.2.3