Exemplo n.º 1
0
        //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");
        }
Exemplo n.º 2
0
 //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);
 }
Exemplo n.º 3
0
        //NETLIB_CONSTRUCTOR(sys_dsw1)
        //detail.family_setter_t m_famsetter;
        //template <class CLASS>
        public nld_sys_dsw1(object owner, string name)
            : base(owner, name)
        {
            m_RON        = new param_fp_t(this, "RON", nlconst.one());
            m_ROFF       = new param_fp_t(this, "ROFF", nlconst.magic(1.0E20));
            m_R          = new analog.nld_R_base(this, "_R");
            m_I          = new logic_input_t(this, "I", input);
            m_last_state = new state_var <netlist_sig_t>(this, "m_last_state", 0);


            register_subalias("1", "_R.1");
            register_subalias("2", "_R.2");
        }