summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2020-07-12 21:36:22 +0200
committer couriersud <couriersud@gmx.org>2020-07-12 21:48:50 +0200
commit8cf1c1feca742994337ab803fc37f79987f02244 (patch)
treebe55c9d6755efba6b489d2ba4c606922fba7b042 /src
parent6328b0e9952dfe2b44d59be271fe159c7b335f25 (diff)
netlist: Always take power pin names from logic family.
* Default nmos power pins to VCC and GND. * MOS uses VDD/VSS - update gamemachine netlist.
Diffstat (limited to 'src')
-rw-r--r--src/lib/netlist/devices/nld_4006.cpp2
-rw-r--r--src/lib/netlist/devices/nld_4020.cpp2
-rw-r--r--src/lib/netlist/devices/nld_4066.cpp8
-rw-r--r--src/lib/netlist/devices/nld_4316.cpp4
-rw-r--r--src/lib/netlist/devices/nld_am2847.cpp4
-rw-r--r--src/lib/netlist/devices/nlid_truthtable.cpp2
-rw-r--r--src/lib/netlist/nl_base.h13
-rw-r--r--src/lib/netlist/nl_setup.cpp2
-rw-r--r--src/mame/audio/nl_gamemachine.cpp4
9 files changed, 24 insertions, 17 deletions
diff --git a/src/lib/netlist/devices/nld_4006.cpp b/src/lib/netlist/devices/nld_4006.cpp
index fe8db86092f..86c0dac98bb 100644
--- a/src/lib/netlist/devices/nld_4006.cpp
+++ b/src/lib/netlist/devices/nld_4006.cpp
@@ -23,7 +23,7 @@ namespace netlist
, m_Q(*this, {"D1P4", "D1P4S", "D2P4", "D2P5", "D3P4", "D4P4", "D3P5"})
, m_d(*this, "m_d", 0)
, m_last_clock(*this, "m_last_clock", 0)
- , m_supply(*this, "VDD", "VSS")
+ , m_supply(*this)
{
}
diff --git a/src/lib/netlist/devices/nld_4020.cpp b/src/lib/netlist/devices/nld_4020.cpp
index 2188cf81c52..2ca7c03b554 100644
--- a/src/lib/netlist/devices/nld_4020.cpp
+++ b/src/lib/netlist/devices/nld_4020.cpp
@@ -20,7 +20,7 @@ namespace netlist
, m_Q(*this, {"Q1", "_Q2", "_Q3", "Q4", "Q5", "Q6", "Q7", "Q8", "Q9",
"Q10", "Q11", "Q12", "Q13", "Q14"})
, m_cnt(*this, "m_cnt", 0)
- , m_supply(*this, "VDD", "VSS")
+ , m_supply(*this)
{
}
diff --git a/src/lib/netlist/devices/nld_4066.cpp b/src/lib/netlist/devices/nld_4066.cpp
index 8fe67600b14..6d8d16f32dd 100644
--- a/src/lib/netlist/devices/nld_4066.cpp
+++ b/src/lib/netlist/devices/nld_4066.cpp
@@ -31,11 +31,11 @@ namespace netlist
NETLIB_OBJECT(CD4066_GATE)
{
NETLIB_CONSTRUCTOR_MODEL(CD4066_GATE, "CD4XXX")
- , m_supply(*this, "VDD", "VSS")
, m_R(*this, "R")
, m_control(*this, "CTL", NETLIB_DELEGATE(control))
, m_base_r(*this, "BASER", nlconst::magic(270.0))
, m_last(*this, "m_last", false)
+ , m_supply(*this)
{
}
@@ -77,23 +77,23 @@ namespace netlist
}
}
- nld_power_pins m_supply;
analog::NETLIB_SUB(R_base) m_R;
analog_input_t m_control;
param_fp_t m_base_r;
state_var<bool> m_last;
+ nld_power_pins m_supply;
};
NETLIB_OBJECT(CD4066_GATE_DYNAMIC)
{
NETLIB_CONSTRUCTOR_MODEL(CD4066_GATE_DYNAMIC, "CD4XXX")
- , m_supply(*this, "VDD", "VSS")
, m_R(*this, "R", true)
, m_DUM1(*this, "_DUM1", true)
, m_DUM2(*this, "_DUM2", true)
, m_base_r(*this, "BASER", nlconst::magic(270.0))
, m_last(*this, "m_last", false)
+ , m_supply(*this)
{
register_subalias("CTL", m_DUM1.P()); // Cathode
@@ -134,12 +134,12 @@ namespace netlist
NETLIB_IS_DYNAMIC(true)
private:
- nld_power_pins m_supply;
analog::nld_twoterm m_R;
analog::nld_twoterm m_DUM1;
analog::nld_twoterm m_DUM2;
param_fp_t m_base_r;
state_var<bool> m_last;
+ nld_power_pins m_supply;
};
#if !USE_DYNAMIC_APPROACH
diff --git a/src/lib/netlist/devices/nld_4316.cpp b/src/lib/netlist/devices/nld_4316.cpp
index 2458ee09892..63aba880355 100644
--- a/src/lib/netlist/devices/nld_4316.cpp
+++ b/src/lib/netlist/devices/nld_4316.cpp
@@ -16,11 +16,11 @@ namespace netlist { namespace devices {
NETLIB_OBJECT(CD4316_GATE)
{
NETLIB_CONSTRUCTOR_MODEL(CD4316_GATE, "CD4XXX")
- , m_supply(*this, "VDD", "VSS")
, m_R(*this, "_R")
, m_S(*this, "S", NETLIB_DELEGATE(inputs))
, m_E(*this, "E", NETLIB_DELEGATE(inputs))
, m_base_r(*this, "BASER", nlconst::magic(45.0))
+ , m_supply(*this)
{
}
@@ -47,12 +47,12 @@ namespace netlist { namespace devices {
}
private:
- nld_power_pins m_supply;
analog::NETLIB_SUB(R_base) m_R;
logic_input_t m_S;
logic_input_t m_E;
param_fp_t m_base_r;
+ nld_power_pins m_supply;
};
NETLIB_DEVICE_IMPL(CD4316_GATE, "CD4316_GATE", "")
diff --git a/src/lib/netlist/devices/nld_am2847.cpp b/src/lib/netlist/devices/nld_am2847.cpp
index 874ff784f89..ecd41c3197b 100644
--- a/src/lib/netlist/devices/nld_am2847.cpp
+++ b/src/lib/netlist/devices/nld_am2847.cpp
@@ -14,12 +14,12 @@ namespace netlist
{
NETLIB_OBJECT(Am2847_shifter)
{
- NETLIB_CONSTRUCTOR(Am2847_shifter)
+ NETLIB_CONSTRUCTOR_MODEL(Am2847_shifter, "CD4XXX")
, m_RC(*this, "RC", NETLIB_DELEGATE(inputs))
, m_IN(*this, "IN", NETLIB_DELEGATE(inputs))
, m_buffer(*this, "m_buffer", 0)
, m_OUT(*this, "OUT")
- , m_power_pins(*this, "VSS", "VDD")
+ , m_power_pins(*this)
{
}
diff --git a/src/lib/netlist/devices/nlid_truthtable.cpp b/src/lib/netlist/devices/nlid_truthtable.cpp
index 91f50c898dc..9569cba465e 100644
--- a/src/lib/netlist/devices/nlid_truthtable.cpp
+++ b/src/lib/netlist/devices/nlid_truthtable.cpp
@@ -50,7 +50,7 @@ namespace devices
, m_ign(*this, "m_ign", 0)
, m_ttp(ttp)
/* FIXME: the family should provide the names of the power-terminals! */
- , m_power_pins(*this, logic_family()->vcc_pin(), logic_family()->gnd_pin())
+ , m_power_pins(*this)
{
init(desc);
}
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 3d1a739b429..03e314f611c 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -2140,13 +2140,20 @@ namespace netlist
public:
using this_type = nld_power_pins;
- explicit nld_power_pins(device_t &owner, const pstring &sVCC = sPowerVCC,
- const pstring &sGND = sPowerGND)
+ explicit nld_power_pins(device_t &owner)
+ : m_VCC(owner, owner.logic_family()->vcc_pin(), NETLIB_DELEGATE(noop))
+ , m_GND(owner, owner.logic_family()->gnd_pin(), NETLIB_DELEGATE(noop))
+ {
+ }
+
+#if 0
+ explicit nld_power_pins(device_t &owner, const pstring &sVCC,
+ const pstring &sGND)
: m_VCC(owner, sVCC, NETLIB_DELEGATE(noop))
, m_GND(owner, sGND, NETLIB_DELEGATE(noop))
{
}
-
+#endif
const analog_input_t &VCC() const noexcept
{
return m_VCC;
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index ae158c90136..fd1c1e50b84 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -1455,12 +1455,12 @@ const logic_family_desc_t *setup_t::family_from_model(const pstring &model)
{
case family_type::CUSTOM:
case family_type::TTL:
+ case family_type::NMOS:
ret->m_vcc = "VCC";
ret->m_gnd = "GND";
break;
case family_type::MOS:
case family_type::CMOS:
- case family_type::NMOS:
case family_type::PMOS:
ret->m_vcc = "VDD";
ret->m_gnd = "VSS";
diff --git a/src/mame/audio/nl_gamemachine.cpp b/src/mame/audio/nl_gamemachine.cpp
index 422881a2e1a..bbacb9e6adf 100644
--- a/src/mame/audio/nl_gamemachine.cpp
+++ b/src/mame/audio/nl_gamemachine.cpp
@@ -40,8 +40,8 @@ NETLIST_START(gamemachine)
LOGIC_INPUT(P14, 1, "OPENDRAIN")
LOGIC_INPUT(P15, 1, "OPENDRAIN")
- NET_C(V5, P08.VCC, P09.VCC, P10.VCC, P11.VCC, P12.VCC, P13.VCC, P14.VCC, P15.VCC)
- NET_C(GND, P08.GND, P09.GND, P10.GND, P11.GND, P12.GND, P13.GND, P14.GND, P15.GND)
+ NET_C(V5, P08.VDD, P09.VDD, P10.VDD, P11.VDD, P12.VDD, P13.VDD, P14.VDD, P15.VDD)
+ NET_C(GND, P08.VSS, P09.VSS, P10.VSS, P11.VSS, P12.VSS, P13.VSS, P14.VSS, P15.VSS)
RES(R1, RES_K(2.4))
RES(R2, RES_K(10))