Added == operator to netlist_time
This commit is contained in:
parent
fdf63818de
commit
ee5b02ebfb
@ -43,7 +43,8 @@ NETLIB_RESET(extclock)
|
|||||||
|
|
||||||
NETLIB_UPDATE(extclock)
|
NETLIB_UPDATE(extclock)
|
||||||
{
|
{
|
||||||
if (m_cnt != 0)
|
#if 0
|
||||||
|
if (m_off == netlist_time::zero)
|
||||||
{
|
{
|
||||||
OUTLOGIC(m_Q, (m_cnt & 1) ^ 1, m_inc[m_cnt]);
|
OUTLOGIC(m_Q, (m_cnt & 1) ^ 1, m_inc[m_cnt]);
|
||||||
m_cnt = (m_cnt + 1) % m_size;
|
m_cnt = (m_cnt + 1) % m_size;
|
||||||
@ -54,6 +55,11 @@ NETLIB_UPDATE(extclock)
|
|||||||
m_cnt = 1;
|
m_cnt = 1;
|
||||||
m_off = netlist_time::zero;
|
m_off = netlist_time::zero;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
OUTLOGIC(m_Q, (m_cnt & 1) ^ 1, m_inc[m_cnt] + m_off);
|
||||||
|
m_cnt = (m_cnt + 1) % m_size;
|
||||||
|
m_off = netlist_time::zero;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------------------
|
||||||
|
@ -56,6 +56,7 @@ namespace netlist
|
|||||||
ATTR_HOT friend bool operator>=(const netlist_time &left, const netlist_time &right);
|
ATTR_HOT friend bool operator>=(const netlist_time &left, const netlist_time &right);
|
||||||
ATTR_HOT friend bool operator<=(const netlist_time &left, const netlist_time &right);
|
ATTR_HOT friend bool operator<=(const netlist_time &left, const netlist_time &right);
|
||||||
ATTR_HOT friend bool operator!=(const netlist_time &left, const netlist_time &right);
|
ATTR_HOT friend bool operator!=(const netlist_time &left, const netlist_time &right);
|
||||||
|
ATTR_HOT friend bool operator==(const netlist_time &left, const netlist_time &right);
|
||||||
|
|
||||||
ATTR_HOT const netlist_time &operator=(const netlist_time &right) { m_time = right.m_time; return *this; }
|
ATTR_HOT const netlist_time &operator=(const netlist_time &right) { m_time = right.m_time; return *this; }
|
||||||
|
|
||||||
@ -129,6 +130,11 @@ namespace netlist
|
|||||||
return (left.m_time != right.m_time);
|
return (left.m_time != right.m_time);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ATTR_HOT inline bool operator==(const netlist_time &left, const netlist_time &right)
|
||||||
|
{
|
||||||
|
return (left.m_time == right.m_time);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template<> ATTR_COLD inline void pstate_manager_t::save_item(netlist::netlist_time &nlt, const void *owner, const pstring &stname)
|
template<> ATTR_COLD inline void pstate_manager_t::save_item(netlist::netlist_time &nlt, const void *owner, const pstring &stname)
|
||||||
|
Loading…
Reference in New Issue
Block a user