summaryrefslogtreecommitdiff
path: root/src/systemc/core/sc_sensitive.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-07-16 16:14:33 -0700
committerGabe Black <gabeblack@google.com>2018-09-05 06:06:00 +0000
commitf2ab5e7a9e11783da3b9d7338775cf4b5fe2c29c (patch)
treec8b08f18270cb3131f37b6e0bfe1e8f2e94da63d /src/systemc/core/sc_sensitive.cc
parentd7755ec828868582e2b409ba14f1c8c920c7f184 (diff)
downloadgem5-f2ab5e7a9e11783da3b9d7338775cf4b5fe2c29c.tar.xz
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 <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/sc_sensitive.cc')
-rw-r--r--src/systemc/core/sc_sensitive.cc22
1 files changed, 14 insertions, 8 deletions
diff --git a/src/systemc/core/sc_sensitive.cc b/src/systemc/core/sc_sensitive.cc
index d233cda6a..25bc1bb08 100644
--- a/src/systemc/core/sc_sensitive.cc
+++ b/src/systemc/core/sc_sensitive.cc
@@ -28,6 +28,8 @@
*/
#include "base/logging.hh"
+#include "systemc/core/process.hh"
+#include "systemc/ext/core/sc_interface.hh"
#include "systemc/ext/core/sc_sensitive.hh"
namespace sc_core
@@ -36,30 +38,34 @@ namespace sc_core
sc_sensitive::sc_sensitive() : currentProcess(nullptr) {}
sc_sensitive &
-sc_sensitive::operator << (const sc_event &)
+sc_sensitive::operator << (const sc_event &e)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ currentProcess->addStatic(
+ new sc_gem5::PendingSensitivityEvent(currentProcess, &e));
return *this;
}
sc_sensitive &
-sc_sensitive::operator << (const sc_interface &)
+sc_sensitive::operator << (const sc_interface &i)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ currentProcess->addStatic(
+ new sc_gem5::PendingSensitivityInterface(currentProcess, &i));
return *this;
}
sc_sensitive &
-sc_sensitive::operator << (const sc_port_base &)
+sc_sensitive::operator << (const sc_port_base &b)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ currentProcess->addStatic(
+ new sc_gem5::PendingSensitivityPort(currentProcess, &b));
return *this;
}
sc_sensitive &
-sc_sensitive::operator << (sc_event_finder &)
+sc_sensitive::operator << (sc_event_finder &f)
{
- warn("%s not implemented.\n", __PRETTY_FUNCTION__);
+ currentProcess->addStatic(
+ new sc_gem5::PendingSensitivityFinder(currentProcess, &f));
return *this;
}