Esempio n. 1
0
            analog.nld_C m_CJC;  //NETLIB_SUB_UPTR(analog, C) m_CJC;


            //NETLIB_CONSTRUCTOR(QBJT_EB)
            public nld_QBJT_EB(object owner, string name)
                : base(owner, name)
            {
                m_modacc  = new bjt_model_t(m_model);
                m_gD_BC   = new generic_diode(diode_e.BIPOLAR, this, "m_D_BC");
                m_gD_BE   = new generic_diode(diode_e.BIPOLAR, this, "m_D_BE");
                m_D_CB    = new nld_twoterm(this, "m_D_CB", termhandler);
                m_D_EB    = new nld_twoterm(this, "m_D_EB", termhandler);
                m_D_EC    = new nld_twoterm(this, "m_D_EC", termhandler);
                m_alpha_f = 0;
                m_alpha_r = 0;


                register_subalias("E", m_D_EB.P());   // Cathode
                register_subalias("B", m_D_EB.N());   // Anode

                register_subalias("C", m_D_CB.P());   // Cathode

                connect(m_D_EB.P(), m_D_EC.P());
                connect(m_D_EB.N(), m_D_CB.N());
                connect(m_D_CB.P(), m_D_EC.N());

                if (m_modacc.m_CJE.op() > nlconst.zero())
                {
                    create_and_register_subdevice(this, "m_CJE", out m_CJE);
                    connect("B", "m_CJE.1");
                    connect("E", "m_CJE.2");
                }
                if (m_modacc.m_CJC.op() > nlconst.zero())
                {
                    create_and_register_subdevice(this, "m_CJC", out m_CJC);
                    connect("B", "m_CJC.1");
                    connect("C", "m_CJC.2");
                }
            }
Esempio n. 2
0
            generic_diode m_D;  //generic_diode<diode_e::BIPOLAR> m_D;


            //NETLIB_CONSTRUCTOR_EX(D, const pstring &model = "D")
            public nld_D(object owner, string name, string model = "D")
                : base(owner, name)
            {
                m_model  = new param_model_t(this, "MODEL", model);
                m_modacc = new diode_model_t(m_model);
                m_D      = new generic_diode(diode_e.BIPOLAR, this, "m_D");


                register_subalias("A", P());
                register_subalias("K", N());
            }