From 6a7c3a8079c8068978c0a1c3fcd73142d60ed3eb Mon Sep 17 00:00:00 2001 From: couriersud Date: Mon, 4 Feb 2019 23:17:18 +0100 Subject: netlist: align solver calls. (nw) --- src/lib/netlist/devices/nld_4066.cpp | 15 +++------------ src/lib/netlist/devices/nld_4316.cpp | 2 +- src/lib/netlist/devices/nld_mm5837.cpp | 4 ++-- src/lib/netlist/devices/nld_schmitt.cpp | 4 ++-- src/lib/netlist/devices/nld_system.cpp | 17 ++++------------- src/lib/netlist/devices/nlid_proxy.cpp | 2 +- 6 files changed, 13 insertions(+), 31 deletions(-) diff --git a/src/lib/netlist/devices/nld_4066.cpp b/src/lib/netlist/devices/nld_4066.cpp index 944f3f0f1c2..c4598f4fd1a 100644 --- a/src/lib/netlist/devices/nld_4066.cpp +++ b/src/lib/netlist/devices/nld_4066.cpp @@ -64,18 +64,9 @@ namespace netlist } if (R > NL_FCONST(0.0)) { - // We only need to update the net first if this is a time stepping net - if ((1)) // m_R.m_P.net().as_analog().solver().is_timestep()) - { - m_R.update(); - m_R.set_R(R); - m_R.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); - } - else - { - m_R.set_R(R); - m_R.update(); - } + m_R.update(); + m_R.set_R(R); + m_R.solve_later(); } } diff --git a/src/lib/netlist/devices/nld_4316.cpp b/src/lib/netlist/devices/nld_4316.cpp index b21ff8685f0..6774e1e1408 100644 --- a/src/lib/netlist/devices/nld_4316.cpp +++ b/src/lib/netlist/devices/nld_4316.cpp @@ -48,7 +48,7 @@ namespace netlist { namespace devices { m_R.set_R(m_base_r()); else m_R.set_R(NL_FCONST(1.0) / exec().gmin()); - m_R.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); + m_R.solve_later(NLTIME_FROM_NS(1)); } NETLIB_DEVICE_IMPL(CD4316_GATE, "CD4316_GATE", "") diff --git a/src/lib/netlist/devices/nld_mm5837.cpp b/src/lib/netlist/devices/nld_mm5837.cpp index 713c7288df1..eb2840d31fa 100644 --- a/src/lib/netlist/devices/nld_mm5837.cpp +++ b/src/lib/netlist/devices/nld_mm5837.cpp @@ -75,7 +75,7 @@ namespace netlist log().warning(MW_1_FREQUENCY_OUTSIDE_OF_SPECS_1, m_FREQ()); m_shift = 0x1ffff; - m_is_timestep = m_RV.m_P.net().solver()->is_timestep(); + m_is_timestep = m_RV.m_P.net().solver()->has_timestep_devices(); } NETLIB_UPDATE_PARAM(MM5837_dip) @@ -109,7 +109,7 @@ namespace netlist if (m_is_timestep) m_RV.update(); m_RV.set(NL_FCONST(1.0) / R, V, 0.0); - m_RV.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); + m_RV.solve_later(NLTIME_FROM_NS(1)); } } diff --git a/src/lib/netlist/devices/nld_schmitt.cpp b/src/lib/netlist/devices/nld_schmitt.cpp index 6f526ca7f42..a21f50c0681 100644 --- a/src/lib/netlist/devices/nld_schmitt.cpp +++ b/src/lib/netlist/devices/nld_schmitt.cpp @@ -99,7 +99,7 @@ namespace netlist if (m_is_timestep) m_RVO.update(); m_RVO.set(NL_FCONST(1.0) / m_model.m_ROH, m_model.m_VOH, 0.0); - m_RVO.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); + m_RVO.solve_later(); } } else @@ -110,7 +110,7 @@ namespace netlist if (m_is_timestep) m_RVO.update(); m_RVO.set(NL_FCONST(1.0) / m_model.m_ROL, m_model.m_VOL, 0.0); - m_RVO.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); + m_RVO.solve_later(); } } } diff --git a/src/lib/netlist/devices/nld_system.cpp b/src/lib/netlist/devices/nld_system.cpp index 134017d06b0..8613a1b2c5c 100644 --- a/src/lib/netlist/devices/nld_system.cpp +++ b/src/lib/netlist/devices/nld_system.cpp @@ -92,19 +92,10 @@ namespace netlist m_last_state = state; const nl_double R = state ? m_RON() : m_ROFF(); - // We only need to update the net first if this is a time stepping net - if ((0)) // m_R->m_P.net().as_analog().solver()->is_timestep()) - { - m_R.update(); - m_R.set_R(R); - m_R.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); - } - else - { - m_R.set_R(R); - m_R.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); - //m_R->update(); - } + // FIXME: We only need to update the net first if this is a time stepping net + m_R.update(); + m_R.set_R(R); + m_R.solve_later(); } } diff --git a/src/lib/netlist/devices/nlid_proxy.cpp b/src/lib/netlist/devices/nlid_proxy.cpp index 38a77c71423..741c864246d 100644 --- a/src/lib/netlist/devices/nlid_proxy.cpp +++ b/src/lib/netlist/devices/nlid_proxy.cpp @@ -161,7 +161,7 @@ namespace netlist m_RV.update(); } m_RV.set(NL_FCONST(1.0) / R, V, 0.0); - m_RV.m_P.schedule_solve_after(NLTIME_FROM_NS(1)); + m_RV.solve_later(); } } -- cgit v1.2.3