summaryrefslogtreecommitdiff
path: root/src/mem/secure_port_proxy.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-08-15 16:53:20 -0700
committerGabe Black <gabeblack@google.com>2019-08-28 06:06:05 +0000
commit9ad74b7d0c0f726e933f3589c69fedc945855e3c (patch)
treed8d11476da83164ef75efaaf125bfe5c84cee571 /src/mem/secure_port_proxy.hh
parentb16e525e4073b27f70bf6cf960313ea76cf6ed54 (diff)
downloadgem5-9ad74b7d0c0f726e933f3589c69fedc945855e3c.tar.xz
mem: Make PortProxy use a delegate for a sendFunctional function.
The only part of the MaserPort the PortProxy uses is the sendFunctional function which is part of the functional protocol. Rather than require a MasterPort which comes along with a lot of other mechanisms, this change slightly adjusts the PortProxy to only require that function through the use of a delegate. That allows lots of flexibility in how the actual packet gets sent and what sends it. In cases where code constructs a PortProxy and passes its constructor an unbound MasterPort, the PortProxy will create a delegate to the sendFunctional method on its own. This should also make it easier for objects which don't have traditional gem5 style ports, for instance systemc models, to implement just the little bit of the protocol they need, rather than having to stub out a whole port class, most of which will be ignored. Change-Id: I234b42ce050f12313b551a61736186ddf2c9e2c7 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20229 Maintainer: Gabe Black <gabeblack@google.com> Reviewed-by: Gabe Black <gabeblack@google.com> Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'src/mem/secure_port_proxy.hh')
-rw-r--r--src/mem/secure_port_proxy.hh3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mem/secure_port_proxy.hh b/src/mem/secure_port_proxy.hh
index 9a2200c9e..5ce0c299a 100644
--- a/src/mem/secure_port_proxy.hh
+++ b/src/mem/secure_port_proxy.hh
@@ -70,8 +70,7 @@
class SecurePortProxy : public PortProxy
{
public:
- SecurePortProxy(MasterPort &port, unsigned int cache_line_size)
- : PortProxy(port, cache_line_size) {}
+ using PortProxy::PortProxy;
bool tryReadBlob(Addr addr, void *p, int size) const override;
bool tryWriteBlob(Addr addr, const void *p, int size) const override;