summaryrefslogtreecommitdiff
path: root/src/systemc/core/channel.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-08-15 23:35:38 -0700
committerGabe Black <gabeblack@google.com>2018-09-20 01:50:03 +0000
commitf9298649bb4d1f20b244a6e0930bb82be5ec7397 (patch)
tree28a7d86e1e7b26313f674407993b56e7306364fc /src/systemc/core/channel.cc
parent82958266d412e82c910b2ce35ac2a72e6c9fe358 (diff)
downloadgem5-f9298649bb4d1f20b244a6e0930bb82be5ec7397.tar.xz
systemc: Track exports and prim channels, and call their callbacks.
Also call the callbacks on the ports which were already being tracked. Change-Id: I5ba8ea366e87fc48b58712f35b93c27bccf92cb3 Reviewed-on: https://gem5-review.googlesource.com/12210 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/channel.cc')
-rw-r--r--src/systemc/core/channel.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/systemc/core/channel.cc b/src/systemc/core/channel.cc
index 4a862b8aa..49d9f6cb7 100644
--- a/src/systemc/core/channel.cc
+++ b/src/systemc/core/channel.cc
@@ -34,6 +34,16 @@
namespace sc_gem5
{
+Channel::Channel(sc_core::sc_prim_channel *_sc_chan) : _sc_chan(_sc_chan)
+{
+ allChannels.insert(this);
+}
+
+Channel::~Channel()
+{
+ allChannels.erase(this);
+}
+
void
Channel::requestUpdate()
{
@@ -47,4 +57,6 @@ Channel::asyncRequestUpdate()
scheduler.requestUpdate(this);
}
+std::set<Channel *> allChannels;
+
} // namespace sc_gem5