diff --git a/src/sim/signal.hh b/src/sim/signal.hh index 233de07658..e89fbe0b9f 100644 --- a/src/sim/signal.hh +++ b/src/sim/signal.hh @@ -51,12 +51,11 @@ class SignalSinkPort : public Port SignalSourcePort *_source = nullptr; State _state = {}; - OnChangeFunc _onChange; protected: // if bypass_on_change is specified true, it will not call the _onChange // function. Only _state will be updated if needed. - void + virtual void set(const State &new_state, const bool bypass_on_change = false) { if (new_state == _state) @@ -67,6 +66,8 @@ class SignalSinkPort : public Port _onChange(_state); } + OnChangeFunc _onChange; + public: SignalSinkPort(const std::string &_name, PortID _id=InvalidPortID) : Port(_name, _id)