summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-08-16 15:27:35 -0700
committerGabe Black <gabeblack@google.com>2019-08-27 22:17:45 +0000
commit2a566b4fa7fbd805746d598d0ffc096c2710cef9 (patch)
tree12c10fb70e8151a81eafefae2e4a5efdf3c63ef3 /src/mem/port.hh
parent3126e84db773f64e46b1d02a9a27892bf6612d30 (diff)
downloadgem5-2a566b4fa7fbd805746d598d0ffc096c2710cef9.tar.xz
mem, sim, systemc: Reorganize Port and co.s bind, unbind slightly.
The base Port class can keep track of its peer, and also whether it's connected. This is partially delegated away from the port subclasses which still keep track of a cast version of their peer pointer for their own conveneince, so that it can be used by generic code. Even with the Port mechanism's new flexibility, each port still has exactly one peer and is either connected or not based on whether there is a peer currently. Change-Id: Id3228617dd1604d196814254a1aadeac5ade7cde Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20232 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 847bd1e7d..0b589dafc 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -78,6 +78,8 @@ class BaseMasterPort : public Port
public:
BaseSlavePort& getSlavePort() const;
+ void bind(Port &peer) override;
+ void unbind() override;
};
/**
@@ -94,6 +96,8 @@ class BaseSlavePort : public Port
public:
BaseMasterPort& getMasterPort() const;
+ void bind(Port &peer) override;
+ void unbind() override;
};
/** Forward declaration */