summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_74ls629.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_74ls629.cpp')
-rw-r--r--src/lib/netlist/devices/nld_74ls629.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/lib/netlist/devices/nld_74ls629.cpp b/src/lib/netlist/devices/nld_74ls629.cpp
index fd8f424fa32..0f1c64fc74a 100644
--- a/src/lib/netlist/devices/nld_74ls629.cpp
+++ b/src/lib/netlist/devices/nld_74ls629.cpp
@@ -118,7 +118,7 @@ namespace netlist
analog_input_t m_RNG;
analog_input_t m_FC;
- param_double_t m_CAP;
+ param_fp_t m_CAP;
};
NETLIB_OBJECT(SN74LS629_dip)
@@ -175,29 +175,29 @@ namespace netlist
{
{
// recompute
- nl_double v_freq = m_FC();
- nl_double v_rng = m_RNG();
+ nl_fptype v_freq = m_FC();
+ nl_fptype v_rng = m_RNG();
/* coefficients */
- const nl_double k1 = 1.9904769024796283E+03;
- const nl_double k2 = 1.2070059213983407E+03;
- const nl_double k3 = 1.3266985579561108E+03;
- const nl_double k4 = -1.5500979825922698E+02;
- const nl_double k5 = 2.8184536266938172E+00;
- const nl_double k6 = -2.3503421582744556E+02;
- const nl_double k7 = -3.3836786704527788E+02;
- const nl_double k8 = -1.3569136703258670E+02;
- const nl_double k9 = 2.9914575453819188E+00;
- const nl_double k10 = 1.6855569086173170E+00;
+ const nl_fptype k1 = 1.9904769024796283E+03;
+ const nl_fptype k2 = 1.2070059213983407E+03;
+ const nl_fptype k3 = 1.3266985579561108E+03;
+ const nl_fptype k4 = -1.5500979825922698E+02;
+ const nl_fptype k5 = 2.8184536266938172E+00;
+ const nl_fptype k6 = -2.3503421582744556E+02;
+ const nl_fptype k7 = -3.3836786704527788E+02;
+ const nl_fptype k8 = -1.3569136703258670E+02;
+ const nl_fptype k9 = 2.9914575453819188E+00;
+ const nl_fptype k10 = 1.6855569086173170E+00;
/* scale due to input resistance */
/* Polyfunctional3D_model created by zunzun.com using sum of squared absolute error */
- nl_double v_freq_2 = v_freq * v_freq;
- nl_double v_freq_3 = v_freq_2 * v_freq;
- nl_double v_freq_4 = v_freq_3 * v_freq;
- nl_double freq = k1;
+ nl_fptype v_freq_2 = v_freq * v_freq;
+ nl_fptype v_freq_3 = v_freq_2 * v_freq;
+ nl_fptype v_freq_4 = v_freq_3 * v_freq;
+ nl_fptype freq = k1;
freq += k2 * v_freq;
freq += k3 * v_freq_2;
freq += k4 * v_freq_3;
@@ -208,7 +208,7 @@ namespace netlist
freq += k9 * v_rng * v_freq_3;
freq += k10 * v_rng * v_freq_4;
- freq *= plib::constants<nl_double>::cast(0.1e-6) / m_CAP();
+ freq *= plib::constants<nl_fptype>::cast(0.1e-6) / m_CAP();
// FIXME: we need a possibility to remove entries from queue ...
// or an exact model ...