From: Gabe Black Date: Sat, 3 Nov 2018 00:43:29 +0000 (-0700) Subject: systemc: Explicitly keep the sc_port bind alongside sc_in's version. X-Git-Tag: v19.0.0.0~1436 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f6ffc404f26e80905d72215d5c688abfbd2d1a33;p=gem5.git systemc: Explicitly keep the sc_port bind alongside sc_in's version. The sc_in bind function was hiding the one from sc_port by changing the const-ness of its parameter. This change explicitly exposes the underlying sc_port version, and keeps it alongside the new sc_in version. This seems mildly dangerous and undesirable because now there are two very similar functions which would both need to be overridden in order to get new behavior, but I don't think it's any more dangerous and undesirable than as (perhaps unintentionally) specified in the standard. Change-Id: Ib42a1f8e70bc97abeeeb8d614e71c4019b3a2323 Reviewed-on: https://gem5-review.googlesource.com/c/13880 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/systemc/ext/channel/sc_in.hh b/src/systemc/ext/channel/sc_in.hh index 3fea8a803..85d089dbc 100644 --- a/src/systemc/ext/channel/sc_in.hh +++ b/src/systemc/ext/channel/sc_in.hh @@ -225,6 +225,8 @@ class sc_in : public sc_port, 1> _negFinder(*this, &sc_signal_in_if::negedge_event) {} + using sc_port, 1>::bind; + virtual void bind(const sc_signal_in_if &i) { @@ -390,6 +392,8 @@ class sc_in : _negFinder(*this, &sc_signal_in_if::negedge_event) {} + using sc_port, 1>::bind; + virtual void bind(const sc_signal_in_if &i) {