diff options
author | Gabe Black <gabeblack@google.com> | 2018-07-16 16:14:33 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-09-05 06:06:00 +0000 |
commit | f2ab5e7a9e11783da3b9d7338775cf4b5fe2c29c (patch) | |
tree | c8b08f18270cb3131f37b6e0bfe1e8f2e94da63d /src/systemc/ext/core | |
parent | d7755ec828868582e2b409ba14f1c8c920c7f184 (diff) | |
download | gem5-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/ext/core')
-rw-r--r-- | src/systemc/ext/core/sc_event.hh | 4 | ||||
-rw-r--r-- | src/systemc/ext/core/sc_port.hh | 22 |
2 files changed, 24 insertions, 2 deletions
diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh index d037a84bf..c2154967d 100644 --- a/src/systemc/ext/core/sc_event.hh +++ b/src/systemc/ext/core/sc_event.hh @@ -39,6 +39,8 @@ namespace sc_gem5 { class Event; +class SensitivityEventAndList; +class SensitivityEventOrList; } @@ -100,6 +102,7 @@ class sc_event_and_list private: friend class sc_event_and_expr; + friend class sc_gem5::SensitivityEventAndList; explicit sc_event_and_list(bool auto_delete); @@ -131,6 +134,7 @@ class sc_event_or_list private: friend class sc_event_or_expr; + friend class sc_gem5::SensitivityEventOrList; explicit sc_event_or_list(bool auto_delete); diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh index 262ca382b..0f5a66189 100644 --- a/src/systemc/ext/core/sc_port.hh +++ b/src/systemc/ext/core/sc_port.hh @@ -30,9 +30,19 @@ #ifndef __SYSTEMC_EXT_CORE_SC_PORT_HH__ #define __SYSTEMC_EXT_CORE_SC_PORT_HH__ +#include <vector> + #include "sc_module.hh" // for sc_gen_unique_name #include "sc_object.hh" +namespace sc_gem5 +{ + +class BindInfo; +class PendingSensitivityPort; + +}; + namespace sc_core { @@ -48,11 +58,13 @@ enum sc_port_policy class sc_port_base : public sc_object { public: - sc_port_base(const char *name, int n, sc_port_policy p) : sc_object(name) - {} + sc_port_base(const char *name, int n, sc_port_policy p); void warn_unimpl(const char *func) const; + int maxSize() const; + int size() const; + protected: // Implementation defined, but depended on by the tests. void bind(sc_interface &); @@ -61,6 +73,12 @@ class sc_port_base : public sc_object // Implementation defined, but depended on by the tests. virtual int vbind(sc_interface &) = 0; virtual int vbind(sc_port_base &) = 0; + + private: + friend class ::sc_gem5::PendingSensitivityPort; + + std::vector<::sc_gem5::BindInfo *> _gem5BindInfo; + int _maxSize; }; template <class IF> |