summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_mm5837.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_mm5837.cpp')
-rw-r--r--src/lib/netlist/devices/nld_mm5837.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/netlist/devices/nld_mm5837.cpp b/src/lib/netlist/devices/nld_mm5837.cpp
index 5d32c8ff8cd..21b7e7d17ab 100644
--- a/src/lib/netlist/devices/nld_mm5837.cpp
+++ b/src/lib/netlist/devices/nld_mm5837.cpp
@@ -69,9 +69,11 @@ namespace netlist
{
//m_V0.initial(0.0);
//m_RV.do_reset();
- m_RV.set_G_V_I(plib::constants<nl_fptype>::one() / R_LOW, 0.0, 0.0);
+ m_RV.set_G_V_I(plib::constants<nl_fptype>::one() / plib::constants<nl_fptype>::cast(R_LOW),
+ plib::constants<nl_fptype>::zero(),
+ plib::constants<nl_fptype>::zero());
m_inc = netlist_time::from_fp(plib::reciprocal(m_FREQ()));
- if (m_FREQ() < 24000 || m_FREQ() > 56000)
+ if (m_FREQ() < plib::constants<nl_fptype>::cast(24000) || m_FREQ() > plib::constants<nl_fptype>::cast(56000))
log().warning(MW_FREQUENCY_OUTSIDE_OF_SPECS_1(m_FREQ()));
m_shift = 0x1ffff;
@@ -81,7 +83,7 @@ namespace netlist
NETLIB_UPDATE_PARAM(MM5837_dip)
{
m_inc = netlist_time::from_fp(plib::reciprocal(m_FREQ()));
- if (m_FREQ() < 24000 || m_FREQ() > 56000)
+ if (m_FREQ() < plib::constants<nl_fptype>::cast(24000) || m_FREQ() > plib::constants<nl_fptype>::cast(56000))
log().warning(MW_FREQUENCY_OUTSIDE_OF_SPECS_1(m_FREQ()));
}
@@ -102,7 +104,7 @@ namespace netlist
if (state != last_state)
{
- const nl_fptype R = state ? R_HIGH : R_LOW;
+ const nl_fptype R = plib::constants<nl_fptype>::cast(state ? R_HIGH : R_LOW);
const nl_fptype V = state ? m_VDD() : m_VSS();
// We only need to update the net first if this is a time stepping net