summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/analog/nlid_twoterm.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-05-14 11:58:42 +0200
committer couriersud <couriersud@gmx.org>2020-05-15 13:09:22 +0200
commit88edd7c665358de5c23d42637e4c17f878c1e275 (patch)
tree836d3f2d3c71850019522f98341948e8de43e7f5 /src/lib/netlist/analog/nlid_twoterm.cpp
parentd01c23cdc8f0291d7f65ca9f55c927d80836b313 (diff)
netlist: code cleanup and development stage tristate [Couriersud]
Code cleanup to better separate the following stages: - parsing - setup - run In addition preliminary native tristate support was added. Not yet production ready, please don't use it.
Diffstat (limited to 'src/lib/netlist/analog/nlid_twoterm.cpp')
-rw-r--r--src/lib/netlist/analog/nlid_twoterm.cpp24
1 files changed, 10 insertions, 14 deletions
diff --git a/src/lib/netlist/analog/nlid_twoterm.cpp b/src/lib/netlist/analog/nlid_twoterm.cpp
index 1981b1c6e12..a449e19b078 100644
--- a/src/lib/netlist/analog/nlid_twoterm.cpp
+++ b/src/lib/netlist/analog/nlid_twoterm.cpp
@@ -145,9 +145,8 @@ namespace analog
NETLIB_RESET(D)
{
- diode_model_t modacc(m_model);
- nl_fptype Is = modacc.m_IS;
- nl_fptype n = modacc.m_N;
+ nl_fptype Is = m_modacc.m_IS;
+ nl_fptype n = m_modacc.m_N;
m_D.set_param(Is, n, exec().gmin(), nlconst::T0());
set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq());
@@ -155,9 +154,8 @@ namespace analog
NETLIB_UPDATE_PARAM(D)
{
- diode_model_t modacc(m_model);
- nl_fptype Is = modacc.m_IS;
- nl_fptype n = modacc.m_N;
+ nl_fptype Is = m_modacc.m_IS;
+ nl_fptype n = m_modacc.m_N;
m_D.set_param(Is, n, exec().gmin(), nlconst::T0());
}
@@ -178,21 +176,19 @@ namespace analog
NETLIB_RESET(Z)
{
- zdiode_model_t modacc(m_model);
- nl_fptype IsBV = modacc.m_IBV / (plib::exp(modacc.m_BV / nlconst::np_VT(modacc.m_NBV)) - nlconst::one());
+ nl_fptype IsBV = m_modacc.m_IBV / (plib::exp(m_modacc.m_BV / nlconst::np_VT(m_modacc.m_NBV)) - nlconst::one());
- m_D.set_param(modacc.m_IS, modacc.m_N, exec().gmin(), nlconst::T0());
- m_R.set_param(IsBV, modacc.m_NBV, exec().gmin(), nlconst::T0());
+ m_D.set_param(m_modacc.m_IS, m_modacc.m_N, exec().gmin(), nlconst::T0());
+ m_R.set_param(IsBV, m_modacc.m_NBV, exec().gmin(), nlconst::T0());
set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq());
}
NETLIB_UPDATE_PARAM(Z)
{
- zdiode_model_t modacc(m_model);
- nl_fptype IsBV = modacc.m_IBV / (plib::exp(modacc.m_BV / nlconst::np_VT(modacc.m_NBV)) - nlconst::one());
+ nl_fptype IsBV = m_modacc.m_IBV / (plib::exp(m_modacc.m_BV / nlconst::np_VT(m_modacc.m_NBV)) - nlconst::one());
- m_D.set_param(modacc.m_IS, modacc.m_N, exec().gmin(), nlconst::T0());
- m_R.set_param(IsBV, modacc.m_NBV, exec().gmin(), nlconst::T0());
+ m_D.set_param(m_modacc.m_IS, m_modacc.m_N, exec().gmin(), nlconst::T0());
+ m_R.set_param(IsBV, m_modacc.m_NBV, exec().gmin(), nlconst::T0());
set_G_V_I(m_D.G(), nlconst::zero(), m_D.Ieq());
}