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/ext/core/sc_port.hh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/systemc/ext/core/sc_port.hh') 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 + #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 -- cgit v1.2.3