summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nld_dm9334.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nld_dm9334.cpp')
-rw-r--r--src/lib/netlist/devices/nld_dm9334.cpp47
1 files changed, 22 insertions, 25 deletions
diff --git a/src/lib/netlist/devices/nld_dm9334.cpp b/src/lib/netlist/devices/nld_dm9334.cpp
index 028a9485dc2..ef2579c5b90 100644
--- a/src/lib/netlist/devices/nld_dm9334.cpp
+++ b/src/lib/netlist/devices/nld_dm9334.cpp
@@ -14,13 +14,13 @@ namespace netlist
NETLIB_OBJECT(DM9334)
{
NETLIB_CONSTRUCTOR(DM9334)
- , m_C(*this, "C")
- , m_E(*this, "E")
+ , m_CQ(*this, "CQ")
+ , m_EQ(*this, "EQ")
, m_D(*this, "D")
, m_A(*this, {{"A0", "A1", "A2"}})
, m_Q(*this, {{"Q0", "Q1", "Q2", "Q3", "Q4", "Q5", "Q6", "Q7"}})
- , m_last_C(*this, "m_last_C", 0)
- , m_last_E(*this, "m_last_E", 0)
+ , m_last_CQ(*this, "m_last_CQ", 0)
+ , m_last_EQ(*this, "m_last_EQ", 0)
, m_last_D(*this, "m_last_D", 0)
, m_last_A(*this, "m_last_A", 0)
, m_last_Q(*this, "m_last_Q", 0)
@@ -31,14 +31,14 @@ namespace netlist
NETLIB_UPDATEI();
protected:
- logic_input_t m_C;
- logic_input_t m_E;
+ logic_input_t m_CQ;
+ logic_input_t m_EQ;
logic_input_t m_D;
object_array_t<logic_input_t, 3> m_A;
object_array_t<logic_output_t, 8> m_Q;
- state_var<unsigned> m_last_C;
- state_var<unsigned> m_last_E;
+ state_var<unsigned> m_last_CQ;
+ state_var<unsigned> m_last_EQ;
state_var<unsigned> m_last_D;
state_var<unsigned> m_last_A;
state_var<unsigned> m_last_Q;
@@ -61,16 +61,16 @@ namespace netlist
register_subalias("11", m_Q[6]);
register_subalias("12", m_Q[7]);
register_subalias("13", m_D);
- register_subalias("14", m_E);
- register_subalias("15", m_C);
+ register_subalias("14", m_EQ);
+ register_subalias("15", m_CQ);
}
};
NETLIB_RESET(DM9334)
{
- m_last_C = 0;
- m_last_E = 0;
+ m_last_CQ = 0;
+ m_last_EQ = 0;
m_last_D = 0;
m_last_A = 0;
m_last_Q = 0;
@@ -101,9 +101,9 @@ namespace netlist
delay = NLTIME_FROM_NS(35);
}
}
- else if (m_E() != m_last_E)
+ else if (m_EQ() != m_last_EQ)
{
- if (m_last_E)
+ if (m_last_EQ)
{
delay = NLTIME_FROM_NS(27);
}
@@ -115,9 +115,9 @@ namespace netlist
uint_fast8_t q = m_last_Q;
- if (!m_C())
+ if (!m_CQ())
{
- if (m_E())
+ if (m_EQ())
{
q = 0;
}
@@ -126,23 +126,20 @@ namespace netlist
q = m_D() << a;
}
}
- else if(!m_E())
+ else if(!m_EQ())
{
q &= ~(1 << a);
q |= (m_D() << a);
}
- m_last_C = m_C();
- m_last_E = m_E();
+ m_last_CQ = m_CQ();
+ m_last_EQ = m_EQ();
m_last_D = m_D();
m_last_A = a;
+ m_last_Q = q;
- if (q != m_last_Q)
- {
- m_last_Q = q;
- for (std::size_t i=0; i<8; i++)
- m_Q[i].push((q >> i) & 1, delay);
- }
+ for (std::size_t i=0; i<8; i++)
+ m_Q[i].push((q >> i) & 1, delay);
}
NETLIB_DEVICE_IMPL(DM9334)