diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-06 00:10:20 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:00:42 +0000 |
commit | 05f2a5f4f67c6d6b71497a0b6c75faf728f963f6 (patch) | |
tree | 9901e11e6fcefc25d8f4b4e09957e3ee12b69a76 /src/systemc/ext | |
parent | e9b366922b6b2dcb9e36bfa87eb58aefc3e138fb (diff) | |
download | gem5-05f2a5f4f67c6d6b71497a0b6c75faf728f963f6.tar.xz |
systemc: Distinguish internal events from normal sc_events.
The internal events aren't supposed to show up in the namespace or as
children of objects.
Change-Id: Id04b9bfe2e1f8f216390dd989797558eaf33d715
Reviewed-on: https://gem5-review.googlesource.com/c/13309
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext')
-rw-r--r-- | src/systemc/ext/channel/sc_event_queue.hh | 2 | ||||
-rw-r--r-- | src/systemc/ext/channel/sc_fifo.hh | 4 | ||||
-rw-r--r-- | src/systemc/ext/channel/sc_mutex.hh | 2 | ||||
-rw-r--r-- | src/systemc/ext/channel/sc_semaphore.hh | 2 | ||||
-rw-r--r-- | src/systemc/ext/channel/sc_signal.hh | 6 | ||||
-rw-r--r-- | src/systemc/ext/core/sc_event.hh | 19 | ||||
-rw-r--r-- | src/systemc/ext/core/sc_join.hh | 2 |
7 files changed, 27 insertions, 10 deletions
diff --git a/src/systemc/ext/channel/sc_event_queue.hh b/src/systemc/ext/channel/sc_event_queue.hh index 05ff46ecb..d9b041da9 100644 --- a/src/systemc/ext/channel/sc_event_queue.hh +++ b/src/systemc/ext/channel/sc_event_queue.hh @@ -72,7 +72,7 @@ class sc_event_queue : public sc_event_queue_if, public sc_module private: void _trigger(); - sc_event _defaultEvent; + sc_gem5::InternalScEvent _defaultEvent; std::priority_queue< sc_time, std::vector<sc_time>, std::greater<sc_time> > _times; }; diff --git a/src/systemc/ext/channel/sc_fifo.hh b/src/systemc/ext/channel/sc_fifo.hh index 02a0ddb98..a1c454a8f 100644 --- a/src/systemc/ext/channel/sc_fifo.hh +++ b/src/systemc/ext/channel/sc_fifo.hh @@ -211,8 +211,8 @@ class sc_fifo : public sc_fifo_in_if<T>, {} sc_fifo &operator = (const sc_fifo<T> &) { return *this; } - sc_event _dataReadEvent; - sc_event _dataWriteEvent; + sc_gem5::InternalScEvent _dataReadEvent; + sc_gem5::InternalScEvent _dataWriteEvent; sc_port_base *_reader; sc_port_base *_writer; diff --git a/src/systemc/ext/channel/sc_mutex.hh b/src/systemc/ext/channel/sc_mutex.hh index 12205da9b..0b85ca68f 100644 --- a/src/systemc/ext/channel/sc_mutex.hh +++ b/src/systemc/ext/channel/sc_mutex.hh @@ -56,7 +56,7 @@ class sc_mutex : public sc_mutex_if, public sc_object sc_mutex &operator = (const sc_mutex &) { return *this; } sc_process_handle holder; - sc_event unlockEvent; + sc_gem5::InternalScEvent unlockEvent; }; } // namespace sc_core diff --git a/src/systemc/ext/channel/sc_semaphore.hh b/src/systemc/ext/channel/sc_semaphore.hh index 31af9c708..3669f771e 100644 --- a/src/systemc/ext/channel/sc_semaphore.hh +++ b/src/systemc/ext/channel/sc_semaphore.hh @@ -59,7 +59,7 @@ class sc_semaphore : public sc_semaphore_if, public sc_object sc_semaphore &operator = (const sc_semaphore &) { return *this; } int _value; - sc_event posted; + sc_gem5::InternalScEvent posted; }; } // namespace sc_core diff --git a/src/systemc/ext/channel/sc_signal.hh b/src/systemc/ext/channel/sc_signal.hh index 3b2765db5..522638dde 100644 --- a/src/systemc/ext/channel/sc_signal.hh +++ b/src/systemc/ext/channel/sc_signal.hh @@ -71,7 +71,7 @@ class ScSignalBase : public sc_core::sc_prim_channel virtual sc_core::sc_writer_policy get_writer_policy() const = 0; - sc_core::sc_event _valueChangedEvent; + InternalScEvent _valueChangedEvent; uint64_t _changeStamp; sc_core::sc_port_base *_gem5WriterPort; }; @@ -91,8 +91,8 @@ class ScSignalBaseBinary : public ScSignalBase bool posedge() const; bool negedge() const; - sc_core::sc_event _posedgeEvent; - sc_core::sc_event _negedgeEvent; + InternalScEvent _posedgeEvent; + InternalScEvent _negedgeEvent; uint64_t _posStamp; uint64_t _negStamp; diff --git a/src/systemc/ext/core/sc_event.hh b/src/systemc/ext/core/sc_event.hh index 90c1911ca..90fd41f2a 100644 --- a/src/systemc/ext/core/sc_event.hh +++ b/src/systemc/ext/core/sc_event.hh @@ -45,6 +45,7 @@ namespace sc_gem5 class Event; class DynamicSensitivityEventAndList; class DynamicSensitivityEventOrList; +class InternalScEvent; } @@ -196,6 +197,10 @@ class sc_event sc_event_or_expr operator | (const sc_event &) const; sc_event_or_expr operator | (const sc_event_or_list &) const; + protected: + explicit sc_event(bool); + explicit sc_event(bool, const char *); + private: // Disabled sc_event(const sc_event &) {} @@ -235,7 +240,7 @@ class sc_event_finder_t : public sc_event_finder const sc_event & find_event(sc_interface *if_p=NULL) const override { - static const sc_event none; + static const sc_gem5::InternalScEvent none; const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) : dynamic_cast<const IF *>(_port->get_interface()); if (!iface) { @@ -258,4 +263,16 @@ sc_event *sc_find_event(const char *); } // namespace sc_core +namespace sc_gem5 +{ + +class InternalScEvent : public ::sc_core::sc_event +{ + public: + InternalScEvent(); + InternalScEvent(const char *); +}; + +} // namespace sc_gem5 + #endif //__SYSTEMC_EXT_CORE_SC_INTERFACE_HH__ diff --git a/src/systemc/ext/core/sc_join.hh b/src/systemc/ext/core/sc_join.hh index 49e54ceee..3b227d311 100644 --- a/src/systemc/ext/core/sc_join.hh +++ b/src/systemc/ext/core/sc_join.hh @@ -52,7 +52,7 @@ class sc_join void wait_clocked(); private: - sc_event joinEvent; + sc_gem5::InternalScEvent joinEvent; int remaining; }; |