Ejemplo n.º 1
0
        /// <summary>
        /// Create a MOS2 transistor
        /// </summary>
        /// <param name="name">Name</param>
        /// <param name="d">Drain</param>
        /// <param name="g">Gate</param>
        /// <param name="s">Source</param>
        /// <param name="b">Bulk</param>
        /// <param name="modelname">Model name</param>
        /// <param name="modelparams">Model parameters</param>
        /// <returns></returns>
        protected Mosfet2 CreateMOS2(Identifier name, Identifier d, Identifier g, Identifier s, Identifier b,
                                     Identifier modelname, string modelparams)
        {
            // Create model
            Mosfet2Model model = new Mosfet2Model(modelname);

            ApplyParameters(model, modelparams);

            // Create transistor
            Mosfet2 mos = new Mosfet2(name);

            mos.Connect(d, g, s, b);
            mos.SetModel(model);
            return(mos);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create a MOS2 transistor
        /// </summary>
        /// <param name="name">Name</param>
        /// <param name="d">Drain</param>
        /// <param name="g">Gate</param>
        /// <param name="s">Source</param>
        /// <param name="b">Bulk</param>
        /// <param name="modelname">Model name</param>
        /// <param name="modelparams">Model parameters</param>
        /// <returns></returns>
        protected Mosfet2 CreateMOS2(string name, string d, string g, string s, string b,
                                     string modelname, string modelparams)
        {
            // Create model
            var model = new Mosfet2Model(modelname);

            ApplyParameters(model, modelparams);

            // Create transistor
            var mos = new Mosfet2(name);

            mos.Connect(d, g, s, b);
            mos.SetModel(model);
            return(mos);
        }