summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-08-23 15:55:17 +0200
committer couriersud <couriersud@gmx.org>2020-08-23 17:24:24 +0200
commitd1c74db66641fcfd54f0482ee9f9f650bf53a8f2 (patch)
treeed4d7b8a7e3c72d8f1b86f8eac6287ef4a4318c5
parent113de382376420b6032c36a0a329dfabc003cdbf (diff)
netlist: Fix visibility in some devices.
* private rules.
-rw-r--r--src/lib/netlist/devices/nld_4017.cpp2
-rw-r--r--src/lib/netlist/devices/nld_74113.cpp6
-rw-r--r--src/lib/netlist/devices/nld_74153.cpp2
-rw-r--r--src/lib/netlist/devices/nld_7450.cpp4
-rw-r--r--src/lib/netlist/devices/nld_7473.cpp4
-rw-r--r--src/lib/netlist/devices/nld_74ls629.cpp3
-rw-r--r--src/lib/netlist/devices/nld_9321.cpp2
-rw-r--r--src/lib/netlist/devices/nlid_system.h10
8 files changed, 14 insertions, 19 deletions
diff --git a/src/lib/netlist/devices/nld_4017.cpp b/src/lib/netlist/devices/nld_4017.cpp
index d680eaa4829..c8bd465089c 100644
--- a/src/lib/netlist/devices/nld_4017.cpp
+++ b/src/lib/netlist/devices/nld_4017.cpp
@@ -60,6 +60,7 @@ namespace netlist
{
}
+ private:
NETLIB_RESETI()
{
m_CLK.set_state(logic_t::STATE_INP_LH);
@@ -90,7 +91,6 @@ namespace netlist
}
}
- public:
void update_outputs(const unsigned cnt) noexcept
{
for (std::size_t i = 0; i < _MaxCount; i++)
diff --git a/src/lib/netlist/devices/nld_74113.cpp b/src/lib/netlist/devices/nld_74113.cpp
index 1198771695e..fe8e6054d71 100644
--- a/src/lib/netlist/devices/nld_74113.cpp
+++ b/src/lib/netlist/devices/nld_74113.cpp
@@ -60,7 +60,8 @@
#include "nld_74113.h"
#include "netlist/nl_base.h"
-// Note: this can probably be merged with nld_7473.cpp
+// FIXME: this can probably be merged with nld_7473.cpp
+// FIXME: timing, see 74107 for example, use template
namespace netlist
{
@@ -81,6 +82,7 @@ namespace netlist
{
}
+ private:
NETLIB_RESETI()
{
m_last_CLK = 0;
@@ -122,7 +124,6 @@ namespace netlist
m_QQ.push(m_q ^ 1, NLTIME_FROM_NS(20)); // FIXME: timing
}
- public:
logic_input_t m_CLK;
logic_input_t m_J;
logic_input_t m_K;
@@ -138,7 +139,6 @@ namespace netlist
NETLIB_OBJECT_DERIVED(74113A, 74113)
{
- public:
NETLIB_CONSTRUCTOR(74113A) { }
};
diff --git a/src/lib/netlist/devices/nld_74153.cpp b/src/lib/netlist/devices/nld_74153.cpp
index 6fea1a711d3..d26de50819e 100644
--- a/src/lib/netlist/devices/nld_74153.cpp
+++ b/src/lib/netlist/devices/nld_74153.cpp
@@ -67,6 +67,7 @@ namespace devices
{
}
+ private:
NETLIB_RESETI()
{
m_chan = 0;
@@ -92,7 +93,6 @@ namespace devices
}
}
- public:
object_array_t<logic_input_t, 4> m_C;
logic_input_t m_G;
diff --git a/src/lib/netlist/devices/nld_7450.cpp b/src/lib/netlist/devices/nld_7450.cpp
index 1c997d466df..429958d02d5 100644
--- a/src/lib/netlist/devices/nld_7450.cpp
+++ b/src/lib/netlist/devices/nld_7450.cpp
@@ -31,6 +31,8 @@ namespace netlist
static constexpr const std::array<netlist_time, 2> times = { NLTIME_FROM_NS(15), NLTIME_FROM_NS(22) };
+ // FIXME: timing, see 74107 for example, use template
+
NETLIB_OBJECT(7450)
{
NETLIB_CONSTRUCTOR(7450)
@@ -45,7 +47,7 @@ namespace netlist
//NETLIB_RESETI();
- public:
+ private:
NETLIB_HANDLERI(inputs)
{
m_A.activate();
diff --git a/src/lib/netlist/devices/nld_7473.cpp b/src/lib/netlist/devices/nld_7473.cpp
index 4a9d1ac27b3..805321e997e 100644
--- a/src/lib/netlist/devices/nld_7473.cpp
+++ b/src/lib/netlist/devices/nld_7473.cpp
@@ -79,12 +79,12 @@ namespace netlist
{
}
+ private:
NETLIB_RESETI()
{
m_last_CLK = 0;
}
- public:
NETLIB_HANDLERI(inputs)
{
const auto JK = (m_J() << 1) | m_K();
@@ -132,9 +132,7 @@ namespace netlist
NETLIB_OBJECT_DERIVED(7473A, 7473)
{
- public:
NETLIB_CONSTRUCTOR(7473A) { }
-
};
NETLIB_DEVICE_IMPL(7473, "TTL_7473", "+CLK,+J,+K,+CLRQ,@VCC,@GND")
diff --git a/src/lib/netlist/devices/nld_74ls629.cpp b/src/lib/netlist/devices/nld_74ls629.cpp
index 669c57912e3..05bc66a60d8 100644
--- a/src/lib/netlist/devices/nld_74ls629.cpp
+++ b/src/lib/netlist/devices/nld_74ls629.cpp
@@ -125,6 +125,7 @@ namespace netlist
register_subalias("Y", m_clock.m_Y);
}
+ private:
NETLIB_RESETI()
{
m_R_FC.set_R( nlconst::magic(90000.0));
@@ -136,7 +137,6 @@ namespace netlist
/* update param may be called from anywhere, update_dev(time) is not a good idea */
}
- public:
SN74LS629clk m_clock;
analog::NETLIB_SUB(R_base) m_R_FC;
analog::NETLIB_SUB(R_base) m_R_RNG;
@@ -149,7 +149,6 @@ namespace netlist
nld_power_pins m_power_pins;
nld_power_pins m_power_pins_osc;
- private:
NETLIB_HANDLERI(inputs)
{
{
diff --git a/src/lib/netlist/devices/nld_9321.cpp b/src/lib/netlist/devices/nld_9321.cpp
index f4ae55154ef..1634e4f13f0 100644
--- a/src/lib/netlist/devices/nld_9321.cpp
+++ b/src/lib/netlist/devices/nld_9321.cpp
@@ -40,6 +40,7 @@ namespace netlist
{
}
+ private:
NETLIB_HANDLERI(in)
{
m_enable = m_E() ? 0 : 1;
@@ -56,7 +57,6 @@ namespace netlist
m_D[i].push((i == m_o && m_enable) ? 0 : 1, NLTIME_FROM_NS(18));
}
- public:
state_var<bool> m_enable;
state_var<uint32_t> m_o;
object_array_t<logic_input_t, 2> m_A;
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index ddf99f98b67..b0e2529db74 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -337,7 +337,6 @@ namespace devices
NETLIB_OBJECT(frontier)
{
- public:
NETLIB_CONSTRUCTOR(frontier)
, m_RIN(*this, "m_RIN", NETLIB_DELEGATE(input))
, m_ROUT(*this, "m_ROUT", NETLIB_DELEGATE(input))
@@ -356,13 +355,13 @@ namespace devices
connect(m_Q, m_ROUT.P());
}
+ private:
NETLIB_RESETI()
{
m_RIN.set_G_V_I(plib::reciprocal(m_p_RIN()),0,0);
m_ROUT.set_G_V_I(plib::reciprocal(m_p_ROUT()),0,0);
}
- private:
NETLIB_HANDLERI(input)
{
m_Q.push(m_I());
@@ -442,7 +441,6 @@ namespace devices
NETLIB_OBJECT(sys_dsw1)
{
- public:
NETLIB_CONSTRUCTOR(sys_dsw1)
, m_RON(*this, "RON", nlconst::one())
, m_ROFF(*this, "ROFF", nlconst::magic(1.0E20))
@@ -499,7 +497,6 @@ namespace devices
NETLIB_OBJECT(sys_dsw2)
{
- public:
NETLIB_CONSTRUCTOR(sys_dsw2)
, m_R1(*this, "_R1")
, m_R2(*this, "_R2")
@@ -515,6 +512,7 @@ namespace devices
connect(m_R1.N(), m_R2.P());
}
+ private:
NETLIB_RESETI()
{
m_R1.set_G(m_GOFF());
@@ -523,7 +521,6 @@ namespace devices
//NETLIB_UPDATE_PARAMI();
- private:
NETLIB_HANDLERI(input)
{
const netlist_sig_t state = m_I();
@@ -568,7 +565,6 @@ namespace devices
NETLIB_OBJECT(sys_compd)
{
- public:
NETLIB_CONSTRUCTOR(sys_compd)
, m_IP(*this, "IP", NETLIB_DELEGATE(inputs))
, m_IN(*this, "IN", NETLIB_DELEGATE(inputs))
@@ -579,6 +575,7 @@ namespace devices
{
}
+ private:
NETLIB_RESETI()
{
m_last_state = 0;
@@ -586,7 +583,6 @@ namespace devices
//NETLIB_UPDATE_PARAMI();
- private:
NETLIB_HANDLERI(inputs)
{
const netlist_sig_t state = (m_IP() > m_IN());