netlist: Fix CD4053 device

* also fix signedness warning (clang) in CD4020
This commit is contained in:
couriersud 2020-08-01 18:24:40 +02:00
parent 47f2b1b161
commit bcfc49f5b8
2 changed files with 3 additions and 3 deletions

View File

@ -49,7 +49,7 @@ namespace netlist
m_cnt = 0;
m_IP.inactivate();
/* static */ const netlist_time reset_time = netlist_time::from_nsec(140);
for (int i = 0; i < MAX_BITS; i++)
for (unsigned i = 0; i < MAX_BITS; i++)
if (((_LiveBitmask >> i) & 1) != 0)
m_Q[i].push(0, reset_time);
}
@ -70,7 +70,7 @@ namespace netlist
NLTIME_FROM_NS(1380), NLTIME_FROM_NS(1480),
};
for (int i = 0; i < MAX_BITS; i++)
for (unsigned i = 0; i < MAX_BITS; i++)
if (((_LiveBitmask >> i) & 1) != 0)
m_Q[i].push(cnt & 1, out_delayQn[i]);
}

View File

@ -96,7 +96,7 @@ namespace netlist
nl_fptype sup = (m_supply.VCC().Q_Analog() - m_supply.GND().Q_Analog());
Rval = m_base_r() * nlconst::magic(5.0) / sup;
}
R.change_state([this, Rval]() -> void { this->m_RX.set_R(Rval);});
R.change_state([&R, Rval]() -> void { R.set_R(Rval);});
}
analog::NETLIB_SUB(R_base) m_RX;