mem: Move bind() and unbind() into the Port class.
authorGabe Black <gabeblack@google.com>
Thu, 7 Mar 2019 09:32:54 +0000 (01:32 -0800)
committerGabe Black <gabeblack@google.com>
Tue, 19 Mar 2019 10:21:46 +0000 (10:21 +0000)
commit7f1458bec4ae3ea3fb5f0948f0323355e1f20512
tree4bdf685549971f6bd5b56e8049092f88a526f09d
parent8e89366ada0213d45af088945406c82187b5014a
mem: Move bind() and unbind() into the Port class.

These are now pure virtual methods which more specialized port
subclasses will need to implement. The SlavePort class implements them
by ignoring them and then providing parallel functions for the
MasterPort to call. The MasterPort's methods do basically what they
did before, except now bind() uses dynamic cast to check if its peer
is of the appropriate type and also to convert it into that type before
connecting to it.

Change-Id: I0948799bc954acaebf371e6b6612cee1d3023bc4
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17038
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
src/dev/net/etherint.cc
src/dev/net/etherint.hh
src/mem/port.cc
src/mem/port.hh
src/sim/port.cc
src/sim/port.hh