diff options
Diffstat (limited to 'src/lib/netlist/devices/nld_74107.cpp')
-rw-r--r-- | src/lib/netlist/devices/nld_74107.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/lib/netlist/devices/nld_74107.cpp b/src/lib/netlist/devices/nld_74107.cpp index f49ed439d1e..1501be4763e 100644 --- a/src/lib/netlist/devices/nld_74107.cpp +++ b/src/lib/netlist/devices/nld_74107.cpp @@ -1,4 +1,4 @@ -// license:GPL-2.0+ +// license:BSD-3-Clause // copyright-holders:Couriersud /* * nld_74107.cpp @@ -63,10 +63,7 @@ #include "nl_base.h" -namespace netlist -{ - namespace devices - { +namespace netlist::devices { template <typename D> NETLIB_OBJECT(74107_base) @@ -103,6 +100,8 @@ namespace netlist NETLIB_HANDLERI(clk) { + const netlist_sig_t J(m_J()); + const netlist_sig_t K(m_K()); const netlist_sig_t t(m_Q.net().Q()); /* * J K Q1 Q2 F t Q @@ -115,12 +114,12 @@ namespace netlist * 1 0 0 0 1 1 1 * 1 1 1 0 0 1 0 */ - if ((m_J() & m_K()) ^ 1) + if ((J & K) ^ 1) m_clk.inactivate(); - newstate(((t ^ 1) & m_J()) | (t & (m_K() ^ 1))); + newstate(((t ^ 1) & J) | (t & (K ^ 1))); } - void newstate(const netlist_sig_t state) + void newstate(const netlist_sig_t state) noexcept { m_Q.push(state, D::delay::value(state)); m_QQ.push(state ^ 1, D::delay::value(state ^ 1)); @@ -153,5 +152,4 @@ namespace netlist NETLIB_DEVICE_IMPL(74107, "TTL_74107", "+CLK,+J,+K,+CLRQ,@VCC,@GND") NETLIB_DEVICE_IMPL(74107A, "TTL_74107A", "+CLK,+J,+K,+CLRQ,@VCC,@GND") - } //namespace devices -} // namespace netlist +} // namespace netlist::devices |