//NETLIB_CONSTRUCTOR(NE555) public nld_NE555(object owner, string name) : base(owner, name) { m_R1 = new analog.nld_R_base(this, "R1"); m_R2 = new analog.nld_R_base(this, "R2"); m_R3 = new analog.nld_R_base(this, "R3"); m_ROUT = new analog.nld_R_base(this, "ROUT"); m_RDIS = new analog.nld_R_base(this, "RDIS"); m_RESET = new logic_input_t(this, "RESET", inputs); // Pin 4 m_THRES = new analog_input_t(this, "THRESH", inputs); // Pin 6 m_TRIG = new analog_input_t(this, "TRIG", inputs); // Pin 2 m_OUT = new analog_output_t(this, "_OUT"); // to Pin 3 via ROUT m_last_out = new state_var <bool>(this, "m_last_out", false); m_ff = new state_var <bool>(this, "m_ff", false); m_last_reset = new state_var <bool>(this, "m_last_reset", false); m_overshoot = new state_var <nl_fptype>(this, "m_overshoot", 0.0); m_undershoot = new state_var <nl_fptype>(this, "m_undershoot", 0.0); m_ovlimit = 0.0; register_subalias("GND", "R3.2"); // Pin 1 register_subalias("CONT", "R1.2"); // Pin 5 register_subalias("DISCH", "RDIS.1"); // Pin 7 register_subalias("VCC", "R1.1"); // Pin 8 register_subalias("OUT", "ROUT.1"); // Pin 3 connect("R1.2", "R2.1"); connect("R2.2", "R3.1"); connect("RDIS.2", "R3.2"); connect("_OUT", "ROUT.2"); }
public nld_a_to_d_proxy(netlist_base_t anetlist, string name, logic_input_t in_proxied) : base(anetlist, name, in_proxied, null)// m_I) { m_I = new analog_input_t(this, "I"); // set proxy_term after variable is initialized proxy_term_prop = m_I; }
//NETLIB_CONSTRUCTOR_EX(analog_callback, nl_fptype threshold, FUNC &&func) public nld_analog_callback(object owner, string name, nl_fptype threshold, FUNC func) : base(owner, name) { m_in = new analog_input_t(this, "IN", in_); m_threshold = threshold; m_last = new state_var <nl_fptype>(this, "m_last", 0); m_func = func; }
//NETLIB_CONSTRUCTOR_MODEL(CD4066_GATE, "CD4XXX") public nld_CD4066_GATE(object owner, string name) : base(owner, name, "CD4XXX") { m_R = new analog.nld_R_base(this, "R"); m_control = new analog_input_t(this, "CTL", control); m_base_r = new param_fp_t(this, "BASER", nlconst.magic(270.0)); m_last = new state_var <bool>(this, "m_last", false); m_supply = new nld_power_pins(this); }
//NETLIB_CONSTRUCTOR(frontier) //detail.family_setter_t m_famsetter; //template <class CLASS> public nld_frontier(object owner, string name) : base(owner, name) { m_RIN = new analog.nld_twoterm(this, "m_RIN", input); // FIXME: does not look right m_ROUT = new analog.nld_twoterm(this, "m_ROUT", input); // FIXME: does not look right m_I = new analog_input_t(this, "_I", input); m_Q = new analog_output_t(this, "_Q"); m_p_RIN = new param_fp_t(this, "RIN", nlconst.magic(1.0e6)); m_p_ROUT = new param_fp_t(this, "ROUT", nlconst.magic(50.0)); register_subalias("I", "m_RIN.1"); register_subalias("G", "m_RIN.2"); connect("_I", "m_RIN.1"); register_subalias("_OP", "m_ROUT.1"); register_subalias("Q", "m_ROUT.2"); connect("_Q", "m_ROUT.1"); }
// Some devices like the 74LS629 have two pairs of supply pins. nld_power_pins(device_t owner, string vcc, string gnd, nldelegate delegate_) { m_VCC = new analog_input_t(owner, vcc, delegate_); m_GND = new analog_input_t(owner, gnd, delegate_); }
// Some devices like the 74LS629 have two pairs of supply pins. public nld_power_pins(device_t owner, string vcc, string gnd) { m_VCC = new analog_input_t(owner, vcc, noop); //: m_VCC(owner, vcc, NETLIB_DELEGATE(noop)) m_GND = new analog_input_t(owner, gnd, noop); //, m_GND(owner, gnd, NETLIB_DELEGATE(noop)) }
nld_power_pins(device_t owner, nldelegate delegate_) { m_VCC = new analog_input_t(owner, owner.logic_family().vcc_pin(), delegate_); m_GND = new analog_input_t(owner, owner.logic_family().gnd_pin(), delegate_); }
public nld_power_pins(device_t owner) { m_VCC = new analog_input_t(owner, owner.logic_family().vcc_pin(), noop); //m_VCC(owner, owner.logic_family()->vcc_pin(), NETLIB_DELEGATE(noop)) m_GND = new analog_input_t(owner, owner.logic_family().gnd_pin(), noop); //m_GND(owner, owner.logic_family()->gnd_pin(), NETLIB_DELEGATE(noop)) }
//NETLIB_CONSTRUCTOR(nc_pin) nld_nc_pin(object owner, string name) : base(owner, name) { m_I = new analog_input_t(this, "I", handler_noop); //m_I(*this, "I", NETLIB_DELEGATE_NOOP()) }
public nld_a_to_d_proxy(netlist_state_t anetlist, string name, logic_input_t in_proxied) : base(anetlist, name, in_proxied) { m_Q = new logic_output_t(this, "Q"); m_I = new analog_input_t(this, "I", input); }