diff options
author | 2020-05-22 12:26:56 +0200 | |
---|---|---|
committer | 2020-05-24 10:48:04 +0200 | |
commit | 80aeecc227454ee5e4205b1a700cbaa64db3d0bc (patch) | |
tree | cac1d1b169705ac22e59ec2fa4ceec30a6749da1 | |
parent | f88a576c54cdce0c085b83e19df5b5dedb7ac43f (diff) |
netlist: fix a memory issue. (nw)
+ cosmetic changes in nl_base.cpp and build/makefile
-rw-r--r-- | src/lib/netlist/build/makefile | 8 | ||||
-rw-r--r-- | src/lib/netlist/devices/nlid_truthtable.h | 10 | ||||
-rw-r--r-- | src/lib/netlist/nl_base.cpp | 4 |
3 files changed, 10 insertions, 12 deletions
diff --git a/src/lib/netlist/build/makefile b/src/lib/netlist/build/makefile index c84e54e3a5f..18653efee70 100644 --- a/src/lib/netlist/build/makefile +++ b/src/lib/netlist/build/makefile @@ -142,6 +142,10 @@ NLOBJS := \ $(NLOBJ)/analog/nld_switches.o \ $(NLOBJ)/analog/nlid_twoterm.o \ $(NLOBJ)/analog/nld_opamps.o \ + $(NLOBJ)/solver/nld_solver.o \ + $(NLOBJ)/solver/nld_matrix_solver.o \ + $(NLOBJ)/tools/nl_convert.o \ + $(NLOBJ)/generated/static_solvers.o \ $(NLOBJ)/devices/nld_2102A.o \ $(NLOBJ)/devices/nld_tms4800.o \ $(NLOBJ)/devices/nld_4006.o \ @@ -205,10 +209,6 @@ NLOBJS := \ $(NLOBJ)/macro/nlm_other.o \ $(NLOBJ)/macro/nlm_roms.o \ $(NLOBJ)/macro/nlm_ttl74xx.o \ - $(NLOBJ)/solver/nld_solver.o \ - $(NLOBJ)/solver/nld_matrix_solver.o \ - $(NLOBJ)/tools/nl_convert.o \ - $(NLOBJ)/generated/static_solvers.o \ VSBUILDS = \ $(VSBUILD/netlistlib.vcxproj) \ diff --git a/src/lib/netlist/devices/nlid_truthtable.h b/src/lib/netlist/devices/nlid_truthtable.h index 820ae091f70..fbb93d5b3ff 100644 --- a/src/lib/netlist/devices/nlid_truthtable.h +++ b/src/lib/netlist/devices/nlid_truthtable.h @@ -166,11 +166,11 @@ namespace devices const auto *tim = m_ttp.m_timing_nt.data(); if (doOUT) - for (std::size_t i = 0; i < m_NO; out >>= 1, ++i) - m_Q[i].push(out & 1, tim[t[i]]); + for (std::size_t i = 0; i < m_NO; ++i) + m_Q[i].push((out >> i) & 1, tim[t[i]]); else - for (std::size_t i = 0; i < m_NO; out >>= 1, ++i) - m_Q[i].set_Q_time(out & 1, mt + tim[t[i]]); + for (std::size_t i = 0; i < m_NO; ++i) + m_Q[i].set_Q_time((out >> i) & 1, mt + tim[t[i]]); ign = m_ign; for (auto I = m_I.begin(); ign != 0; ign >>= 1, ++I) @@ -188,7 +188,7 @@ namespace devices state_var<type_t> m_state; #endif state_var<type_t> m_ign; - const truthtable_t &m_ttp; + const truthtable_t m_ttp; /* FIXME: the family should provide the names of the power-terminals! */ nld_power_pins m_power_pins; }; diff --git a/src/lib/netlist/nl_base.cpp b/src/lib/netlist/nl_base.cpp index 8022ae7a3df..aa649aee2d8 100644 --- a/src/lib/netlist/nl_base.cpp +++ b/src/lib/netlist/nl_base.cpp @@ -280,7 +280,6 @@ namespace netlist void netlist_state_t::reset() { m_setup = nullptr; - // Reset all nets once ! log().verbose("Call reset on all nets:"); for (auto & n : nets()) @@ -360,10 +359,9 @@ namespace netlist break; } - #if 1 // the above may screw up m_active and the list rebuild_lists(); - #endif + } void netlist_t::print_stats() const |