Exemplo 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");
                }
            }
Exemplo n.º 2
0
            //NETLIB_CONSTRUCTOR(QBJT_switch)
            public nld_QBJT_switch(object owner, string name)
                : base(owner, name)
            {
                m_modacc   = new bjt_model_t(m_model);
                m_RB       = new nld_twoterm(this, "m_RB", termhandler);
                m_RC       = new nld_twoterm(this, "m_RC", termhandler);
                m_BC       = new nld_twoterm(this, "m_BC", termhandler);
                m_gB       = nlconst.cgmin();
                m_gC       = nlconst.cgmin();
                m_V        = nlconst.zero();
                m_state_on = new state_var <unsigned>(this, "m_state_on", 0U);


                register_subalias("B", m_RB.P());
                register_subalias("E", m_RB.N());
                register_subalias("C", m_RC.P());

                connect(m_RB.N(), m_RC.N());
                connect(m_RB.P(), m_BC.P());
                connect(m_RC.P(), m_BC.N());
            }