diff options
Diffstat (limited to 'src/lib/netlist/devices/nld_7490.cpp')
-rw-r--r-- | src/lib/netlist/devices/nld_7490.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/netlist/devices/nld_7490.cpp b/src/lib/netlist/devices/nld_7490.cpp index f2dd6ff5455..e395c64120e 100644 --- a/src/lib/netlist/devices/nld_7490.cpp +++ b/src/lib/netlist/devices/nld_7490.cpp @@ -41,8 +41,8 @@ namespace netlist logic_input_t m_R92; state_var_u8 m_cnt; - state_var_u8 m_last_A; - state_var_u8 m_last_B; + state_var<netlist_sig_t> m_last_A; + state_var<netlist_sig_t> m_last_B; object_array_t<logic_output_t, 4> m_Q; }; @@ -86,15 +86,15 @@ namespace netlist NETLIB_UPDATE(7490) { - const netlist_sig_t new_A = INPLOGIC(m_A); - const netlist_sig_t new_B = INPLOGIC(m_B); + const netlist_sig_t new_A = m_A(); + const netlist_sig_t new_B = m_B(); - if (INPLOGIC(m_R91) & INPLOGIC(m_R92)) + if (m_R91() & m_R92()) { m_cnt = 9; update_outputs(); } - else if (INPLOGIC(m_R1) & INPLOGIC(m_R2)) + else if (m_R1() & m_R2()) { m_cnt = 0; update_outputs(); @@ -104,7 +104,7 @@ namespace netlist if (m_last_A && !new_A) // High - Low { m_cnt ^= 1; - OUTLOGIC(m_Q[0], m_cnt & 1, delay[0]); + m_Q[0].push(m_cnt & 1, delay[0]); } if (m_last_B && !new_B) // High - Low { @@ -120,8 +120,8 @@ namespace netlist NETLIB_FUNC_VOID(7490, update_outputs, (void)) { - for (int i=0; i<4; i++) - OUTLOGIC(m_Q[i], (m_cnt >> i) & 1, delay[i]); + for (std::size_t i=0; i<4; i++) + m_Q[i].push((m_cnt >> i) & 1, delay[i]); } NETLIB_DEVICE_IMPL(7490) |