protected nld_base_proxy(netlist_base_t anetlist, string name, logic_t inout_proxied, detail.core_terminal_t proxy_inout) : base(anetlist, name) { m_logic_family = inout_proxied.logic_family(); m_term_proxied = inout_proxied; m_proxy_term = proxy_inout; }
protected nld_base_proxy(netlist_state_t anetlist, string name, logic_t inout_proxied) : base(anetlist, name, inout_proxied.logic_family()) { m_tp = null; m_tn = null; if (logic_family() == null) { throw new nl_exception(MF_NULLPTR_FAMILY_NP("nld_base_proxy")); } bool f = false; foreach (var pwr_sym in power_syms) { string devname = inout_proxied.device().name(); var tp_ct = anetlist.setup().find_terminal(devname + "." + pwr_sym.first, /*detail::terminal_type::INPUT,*/ false); var tp_cn = anetlist.setup().find_terminal(devname + "." + pwr_sym.second, /*detail::terminal_type::INPUT,*/ false); if (tp_ct != null && tp_cn != null) { if (!tp_ct.is_analog()) { throw new nl_exception(new plib.pfmt("Not an analog terminal: {0}").op(tp_ct.name())); } if (!tp_cn.is_analog()) { throw new nl_exception(new plib.pfmt("Not an analog terminal: {0}").op(tp_cn.name())); } var tp_t = (analog_t)tp_ct; var tn_t = (analog_t)tp_cn; if (f && (tp_t != null && tn_t != null)) { log().warning.op(MI_MULTIPLE_POWER_TERMINALS_ON_DEVICE(inout_proxied.device().name(), m_tp.name(), m_tn.name(), tp_t != null ? tp_t.name() : "", tn_t != null ? tn_t.name() : "")); } else if (tp_t != null && tn_t != null) { m_tp = tp_t; m_tn = tn_t; f = true; } } } if (!f) { throw new nl_exception(MF_NO_POWER_TERMINALS_ON_DEVICE_2(name, anetlist.setup().de_alias(inout_proxied.device().name()))); } log().verbose.op("D/A Proxy: Found power terminals on device {0}", inout_proxied.device().name()); }