summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/devices/nlid_system.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/netlist/devices/nlid_system.h')
-rw-r--r--src/lib/netlist/devices/nlid_system.h42
1 files changed, 16 insertions, 26 deletions
diff --git a/src/lib/netlist/devices/nlid_system.h b/src/lib/netlist/devices/nlid_system.h
index a59a5ca5adf..fcba83f3a2e 100644
--- a/src/lib/netlist/devices/nlid_system.h
+++ b/src/lib/netlist/devices/nlid_system.h
@@ -48,40 +48,30 @@ namespace devices
///
/// Power Pins are passive inputs. Delegate noop will silently ignore any
/// updates.
+
class nld_power_pins
{
public:
explicit nld_power_pins(device_t &owner, const pstring &sVCC = sPowerVCC,
- const pstring &sGND = sPowerGND, bool force_analog_input = true)
+ const pstring &sGND = sPowerGND)
+ : m_VCC(owner, sVCC, NETLIB_DELEGATE(power_pins, noop))
+ , m_GND(owner, sGND, NETLIB_DELEGATE(power_pins, noop))
{
- if (owner.state().setup().is_extended_validation() || force_analog_input)
- {
- m_GND = owner.state().make_object<analog_input_t>(owner, sGND, NETLIB_DELEGATE(power_pins, noop));
- m_VCC = owner.state().make_object<analog_input_t>(owner, sVCC, NETLIB_DELEGATE(power_pins, noop));
- }
- else
- {
- owner.create_and_register_subdevice(sPowerDevRes, m_RVG);
- owner.register_subalias(sVCC, pstring(sPowerDevRes) + ".1");
- owner.register_subalias(sGND, pstring(sPowerDevRes) + ".2");
- }
}
- nl_fptype VCC() const noexcept
+ const analog_input_t &VCC() const noexcept
{
- return (m_VCC ? m_VCC->Q_Analog() : m_RVG->V1P());
+ return m_VCC;
}
- nl_fptype GND() const noexcept
+ const analog_input_t &GND() const noexcept
{
- return (m_GND ? m_GND->Q_Analog() : m_RVG->V2N());
+ return m_GND;
}
private:
void noop() { }
- unique_pool_ptr<analog_input_t> m_VCC; // only used during validation or force_analog_input
- unique_pool_ptr<analog_input_t> m_GND; // only used during validation or force_analog_input
-
- NETLIB_SUB_UPTR(analog, R) m_RVG; // dummy resistor between VCC and GND
+ analog_input_t m_VCC;
+ analog_input_t m_GND;
};
// -----------------------------------------------------------------------------
@@ -287,19 +277,18 @@ namespace devices
};
// -----------------------------------------------------------------------------
- // nld_dummy_input
+ // nld_nc_pin
// -----------------------------------------------------------------------------
- NETLIB_OBJECT(dummy_input)
+ NETLIB_OBJECT(nc_pin)
{
public:
- NETLIB_CONSTRUCTOR(dummy_input)
+ NETLIB_CONSTRUCTOR(nc_pin)
, m_I(*this, "I")
{
}
protected:
-
NETLIB_RESETI() { }
NETLIB_UPDATEI() { }
@@ -381,7 +370,6 @@ namespace devices
}
protected:
-
NETLIB_RESETI()
{
//m_Q.initial(0.0);
@@ -395,8 +383,8 @@ namespace devices
}
m_Q.push(m_compiled.evaluate(m_vals));
}
- private:
+ private:
param_int_t m_N;
param_str_t m_func;
analog_output_t m_Q;
@@ -404,6 +392,7 @@ namespace devices
std::vector<nl_fptype> m_vals;
plib::pfunction<nl_fptype> m_compiled;
+
};
// -----------------------------------------------------------------------------
@@ -447,6 +436,7 @@ namespace devices
//NETLIB_UPDATE_PARAMI();
+ // used by 74123
analog::NETLIB_SUB(R_base) m_R;
logic_input_t m_I;
param_fp_t m_RON;