summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/netlist/nl_base.c
diff options
context:
space:
mode:
author couriersud <couriersud@arcor.de>2015-05-05 00:55:06 +0200
committer couriersud <couriersud@arcor.de>2015-05-05 00:55:06 +0200
commit0bb61ddc436c574b2b60e6bd4494789828e0dd57 (patch)
treefee497d2c1537ebddcf338828a64789553f89aea /src/emu/netlist/nl_base.c
parent7e88b9666036773bfd91b31a33bdbca2344c2b8f (diff)
Some class structure cleanup. (nw)
Diffstat (limited to 'src/emu/netlist/nl_base.c')
-rw-r--r--src/emu/netlist/nl_base.c59
1 files changed, 40 insertions, 19 deletions
diff --git a/src/emu/netlist/nl_base.c b/src/emu/netlist/nl_base.c
index 96b3b3c9b31..32257559bc3 100644
--- a/src/emu/netlist/nl_base.c
+++ b/src/emu/netlist/nl_base.c
@@ -13,27 +13,48 @@
const netlist_time netlist_time::zero = netlist_time::from_raw(0);
-netlist_logic_family_desc_t netlist_family_TTL =
-{
- 0.8, // m_low_thresh_V
- 2.0, // m_high_thresh_V
- 0.3, // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
- 3.7, // m_high_V
- 1.0, // m_R_low;
- 130.0, // m_R_high;
+class netlist_logic_family_ttl_t : public netlist_logic_family_desc_t
+{
+public:
+ netlist_logic_family_ttl_t()
+ {
+ m_low_thresh_V = 0.8;
+ m_high_thresh_V = 2.0;
+ // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
+ m_low_V = 0.3;
+ m_high_V = 3.7;
+ m_R_low = 1.0;
+ m_R_high = 130.0;
+ }
+ virtual nld_base_d_to_a_proxy *create_d_a_proxy(netlist_logic_output_t &proxied) const
+ {
+ return nl_alloc(nld_d_to_a_proxy , proxied);
+ }
};
//FIXME: set to proper values
-netlist_logic_family_desc_t netlist_family_CD4000 =
-{
- 0.8, // m_low_thresh_V
- 2.0, // m_high_thresh_V
- 0.3, // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
- 3.7, // m_high_V
- 1.0, // m_R_low;
- 130.0, // m_R_high;
+class netlist_logic_family_cd4000_t : public netlist_logic_family_desc_t
+{
+public:
+ netlist_logic_family_cd4000_t()
+ {
+ m_low_thresh_V = 0.8;
+ m_high_thresh_V = 2.0;
+ // m_low_V - these depend on sinked/sourced current. Values should be suitable for typical applications.
+ m_low_V = 0.3;
+ m_high_V = 3.7;
+ m_R_low = 1.0;
+ m_R_high = 130.0;
+ }
+ virtual nld_base_d_to_a_proxy *create_d_a_proxy(netlist_logic_output_t &proxied) const
+ {
+ return nl_alloc(nld_d_to_a_proxy , proxied);
+ }
};
+const netlist_logic_family_desc_t &netlist_family_TTL = netlist_logic_family_ttl_t();
+const netlist_logic_family_desc_t &netlist_family_CD4000 = netlist_logic_family_cd4000_t();
+
// ----------------------------------------------------------------------------------------
// netlist_queue_t
// ----------------------------------------------------------------------------------------
@@ -434,13 +455,13 @@ ATTR_COLD void netlist_device_t::register_terminal(const pstring &name, netlist_
ATTR_COLD void netlist_device_t::register_output(const pstring &name, netlist_output_t &port)
{
- port.m_logic_family = this->logic_family();
+ port.set_logic_family(this->logic_family());
setup().register_object(*this, name, port);
}
ATTR_COLD void netlist_device_t::register_input(const pstring &name, netlist_input_t &inp)
{
- inp.m_logic_family = this->logic_family();
+ inp.set_logic_family(this->logic_family());
setup().register_object(*this, name, inp);
m_terminals.add(inp.name());
}
@@ -765,9 +786,9 @@ ATTR_COLD void netlist_analog_net_t::process_net(list_t *groups, int &cur_group)
ATTR_COLD netlist_core_terminal_t::netlist_core_terminal_t(const type_t atype, const family_t afamily)
: netlist_owned_object_t(atype, afamily)
, plinkedlist_element_t<netlist_core_terminal_t>()
-, m_logic_family(NULL)
, m_net(NULL)
, m_state(STATE_NONEX)
+, m_logic_family(NULL)
{
}