summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_base.h
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2016-12-28 02:15:34 +0100
committer couriersud <couriersud@arcor.de>2016-12-28 13:48:49 +0100
commit1983580e26fa905db9cbb12e809fa12e112132fd (patch)
treeb2369b3f8f0ea62b196e3afab674e78375cb9224 /src/lib/netlist/nl_base.h
parent63f4e52dae7933b6acc4d5c7473a2b90ed1d2155 (diff)
Some preparation for future changes on proxies and chip families. (nw)
Diffstat (limited to 'src/lib/netlist/nl_base.h')
-rw-r--r--src/lib/netlist/nl_base.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/src/lib/netlist/nl_base.h b/src/lib/netlist/nl_base.h
index 01b3875d7a6..f72665c62bc 100644
--- a/src/lib/netlist/nl_base.h
+++ b/src/lib/netlist/nl_base.h
@@ -228,12 +228,21 @@ namespace netlist
virtual plib::owned_ptr<devices::nld_base_d_to_a_proxy> create_d_a_proxy(netlist_t &anetlist, const pstring &name,
logic_output_t *proxied) const = 0;
- nl_double m_low_thresh_V; //!< low input threshhold. If the input voltage is below this value, a "0" input is signalled
- nl_double m_high_thresh_V; //!< high input threshhold. If the input voltage is above this value, a "0" input is signalled
- nl_double m_low_V; //!< low output voltage. This voltage is output if the ouput is "0"
- nl_double m_high_V; //!< high output voltage. This voltage is output if the ouput is "1"
- nl_double m_R_low; //!< low output resistance. Value of series resistor used for low output
- nl_double m_R_high; //!< high output resistance. Value of series resistor used for high output
+ double fixed_V() const { return m_fixed_V; }
+ double low_thresh_V(const double VN, const double VP) const { return VN + (VP - VN) * m_low_thresh_PCNT; }
+ double high_thresh_V(const double VN, const double VP) const { return VN + (VP - VN) * m_high_thresh_PCNT; }
+ double low_V(const double VN, const double VP) const { return VN + m_low_VO; }
+ double high_V(const double VN, const double VP) const { return VP - m_high_VO; }
+ double R_low() const { return m_R_low; }
+ double R_high() const { return m_R_high; }
+
+ double m_fixed_V; //!< For variable voltage families, specify 0. For TTL this would be 5. */
+ double m_low_thresh_PCNT; //!< low input threshhold offset. If the input voltage is below this value times supply voltage, a "0" input is signalled
+ double m_high_thresh_PCNT; //!< high input threshhold offset. If the input voltage is above the value times supply voltage, a "0" input is signalled
+ double m_low_VO; //!< low output voltage offset. This voltage is output if the ouput is "0"
+ double m_high_VO; //!< high output voltage offset. The supply voltage minus this offset is output if the ouput is "1"
+ double m_R_low; //!< low output resistance. Value of series resistor used for low output
+ double m_R_high; //!< high output resistance. Value of series resistor used for high output
};
/*! Base class for devices, terminals, outputs and inputs which support