Ejemplo 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");
        }
Ejemplo n.º 2
0
        //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");
        }
Ejemplo n.º 3
0
 //NETLIB_CONSTRUCTOR(gnd)
 public nld_gnd(object owner, string name)
     : base(owner, name)
 {
     m_Q = new analog_output_t(this, "Q");
 }
Ejemplo n.º 4
0
 //NETLIB_CONSTRUCTOR(analog_input)
 //detail.family_setter_t m_famsetter;
 //template <class CLASS>
 public nld_analog_input(object owner, string name)
     : base(owner, name)
 {
     m_Q  = new analog_output_t(this, "Q");
     m_IN = new param_double_t(this, "IN", 0.0);
 }
Ejemplo n.º 5
0
 //NETLIB_CONSTRUCTOR(analog_input)
 //detail.family_setter_t m_famsetter;
 //template <class CLASS>
 public nld_analog_input(object owner, string name)
     : base(owner, name)
 {
     m_Q  = new analog_output_t(this, "Q");
     m_IN = new param_fp_t(this, "IN", nlconst.zero());
 }