_valueChangedEvent.notify(sc_core::SC_ZERO_TIME);
}
+void
+ScSignalBaseBinary::_signalPosedge()
+{
+ _posStamp = getChangeStamp();
+ _posedgeEvent.notify(sc_core::SC_ZERO_TIME);
+}
+
+void
+ScSignalBaseBinary::_signalNegedge()
+{
+ _negStamp = getChangeStamp();
+ _negedgeEvent.notify(sc_core::SC_ZERO_TIME);
+}
+
namespace
{
uint64_t _posStamp;
uint64_t _negStamp;
+
+ void _signalPosedge();
+ void _signalNegedge();
};
template <class T>
return;
this->m_cur_val = this->m_new_val;
- this->_signalReset();
this->_signalChange();
- if (this->m_cur_val) {
- this->_posStamp = ::sc_gem5::getChangeStamp();
- this->_posedgeEvent.notify(SC_ZERO_TIME);
- } else {
- this->_negStamp = ::sc_gem5::getChangeStamp();
- this->_negedgeEvent.notify(SC_ZERO_TIME);
- }
+ }
+
+ void
+ _signalChange()
+ {
+ sc_gem5::ScSignalBinary<bool, WRITER_POLICY>::_signalChange();
+ this->_signalReset();
+ if (this->m_cur_val)
+ this->_signalPosedge();
+ else
+ this->_signalNegedge();
}
private:
this->m_cur_val = this->m_new_val;
this->_signalChange();
- if (this->m_cur_val == sc_dt::SC_LOGIC_1) {
- this->_posStamp = ::sc_gem5::getChangeStamp();
- this->_posedgeEvent.notify(SC_ZERO_TIME);
- } else if (this->m_cur_val == sc_dt::SC_LOGIC_0) {
- this->_negStamp = ::sc_gem5::getChangeStamp();
- this->_negedgeEvent.notify(SC_ZERO_TIME);
- }
+ }
+
+ void
+ _signalChange()
+ {
+ sc_gem5::ScSignalBinary<sc_dt::sc_logic, WRITER_POLICY>::
+ _signalChange();
+ if (this->m_cur_val == sc_dt::SC_LOGIC_1)
+ this->_signalPosedge();
+ else if (this->m_cur_val == sc_dt::SC_LOGIC_0)
+ this->_signalNegedge();
}
private: