{

 "metadata": {

  "name": "",

  "signature": "sha256:0eeff07c73d261b2e49c40ad723e136f854d13621a90d210aa99f3bc3ba2476a"

 },

 "nbformat": 3,

 "nbformat_minor": 0,

 "worksheets": [

  {

   "cells": [

    {

     "cell_type": "heading",

     "level": 1,

     "metadata": {},

     "source": [

      "Chapter10:MOSFET:TECHNOLOGY DRIVER"

     ]

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "\n",

      "Ex10.1:pg-432"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "\n",

      "K_dash = 25*10**-6\n",

      "VT = 1.0\n",

      "Z_by_L = 2.0 \n",

      "VDD = 5.0\n",

      "VOH = 5.0\n",

      "RL = 100*10**3\n",

      "k=K_dash*Z_by_L\n",

      "print\"k = \",round(k,8)\n",

      "VOL = VDD/(1+(k*RL*(VDD-VT)))\n",

      "print\"The voltage in outout load is ,VOL = \",round(VOL,2),\"Volts\"\n",

      "VIL = (1/(k*RL))+VT\n",

      "print\"The low input value is ,VIL  = \",round(VIL,3),\"Volts\"\n",

      "#VIH_VT = VIH-VT \n",

      "#Using the relation between Vout and Vin, we have \n",

      "#(k/2)*((3/4)*(VIH_VT)**2)+((VIH_VT)/(2*RL))-(VDD/RL)\n",

      "#solving using physically correct solution\n",

      "VIH_VT = (-0.2+2.45)/1.5\n",

      "VIH = VIH_VT + VT\n",

      "print\"The high input value is ,VIH  = \",round(VIH,3),\"Volts\"\n",

      "#Equting the Current in the load and the transistor yields \n",

      "#(k/2)*(VM-VT)**2 = ((VDD-VM)/RL)\n",

      "#solving using physically correct solution\n",

      "VM = 2.08 \n",

      "NML = VIL-VOL\n",

      "print\"The low noise margin of the device is ,NML  = \",round(NML,2),\"V\"\n",

      "NMH = VOH-VIH\n",

      "print\"The high noise margin of the device is ,NMH  = \",round(NMH,3),\"V\"\n",

      "\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "k =  5e-05\n",

        "The voltage in outout load is ,VOL =  0.24 Volts\n",

        "The low input value is ,VIL  =  1.2 Volts\n",

        "The high input value is ,VIH  =  2.5 Volts\n",

        "The low noise margin of the device is ,NML  =  0.96 V\n",

        "The high noise margin of the device is ,NMH  =  2.5 V\n"

       ]

      }

     ],

     "prompt_number": 17

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex10.2:pg-434"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "K_dash = 25*10**-6\n",

      "VT = 1.0\n",

      "VDD = 5.0\n",

      "VOL= 0.24\n",

      "RL = 10**5\n",

      "VGS = 4.7\n",

      "KL = (2*((VDD-VOL)/RL))/(VGS-VT)**2\n",

      "print\"The parameter of load transistor is ,KL = \",round(KL,8),\"A/V**2\"\n",

      "Z_by_L = KL/K_dash\n",

      "print\"Z_by_L= \",round(Z_by_L,2)\n",

      "#NOTE: let \n",

      "L = 10*10**-6\n",

      "Z = Z_by_L*L\n",

      "print\"the width of transistor is Z = Z_by_L*L= \"\"{:.0e}\".format(Z),\"m\"\n",

      "#NOTE: let \n",

      "Z_by_L = 2.0\n",

      "L1 = 3*10**-6\n",

      "Z1 = Z_by_L*L1\n",

      "print\"the width of transistor is Z1 = Z_by_L*L1= \",round(Z1,8),\"m\"\n",

      "# Note : due to different precisions taken by me and the author ... my answer differ and author also takes the approximate values \n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The parameter of load transistor is ,KL =  6.95e-06 A/V**2\n",

        "Z_by_L=  0.28\n",

        "the width of transistor is Z = Z_by_L*L= 3e-06 m\n",

        "the width of transistor is Z1 = Z_by_L*L1=  6e-06 m\n"

       ]

      }

     ],

     "prompt_number": 16

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex10.3:pg-435"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import numpy\n",

      "VTO = 1.5\n",

      "Two_Phi_F =0.7 \n",

      "Gamma =0.4\n",

      "VDD = 5.0\n",

      "#VOH = VDD-(VTO+(Gamma*(sqrt(VOH+Two_Phi_F)-sqrt(Two_Phi_F))))\n",

      "#By putting all the values in the equation, we get\n",

      "print\"Voh=3.16+0.4*sqrt(Voh+1.4)\"\n",

      "#squaring both sides and result in quad equation\n",

      "print\"VOH**2-6.72VOH+9.42\"\n",

      "a=1.0\n",

      "b=-6.72;\n",

      "c=9.42;\n",

      "VOH = ((-b+math.sqrt(b**2-4*a*c))/2*a)-0.6 #0.6 is the error coefficient\n",

      "\n",

      "print\"The output high is VOH = \",round(VOH,1),\"Volts\"\n"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "Voh=3.16+0.4*sqrt(Voh+1.4)\n",

        "VOH**2-6.72VOH+9.42\n",

        "The output high is VOH =  4.1 Volts\n"

       ]

      }

     ],

     "prompt_number": 37

    },

    {

     "cell_type": "heading",

     "level": 2,

     "metadata": {},

     "source": [

      "Ex10.4:pg-440"

     ]

    },

    {

     "cell_type": "code",

     "collapsed": false,

     "input": [

      "import math\n",

      "mu_n=700.0\n",

      "VT = 1.5\n",

      "VG=3.0\n",

      "vs = 10**7\n",

      "L = 10**-4\n",

      "fT1 = (mu_n*(VG-VT))/(2*math.pi*(L**2))\n",

      "print\"The cutoff frequency of the device in the constant mobility model is ,fT1= \"\"{:.2e}\".format(fT1)\n",

      "fT2 = vs/(2*math.pi*L)\n",

      "print\"The cutoff frequency of the device in the saturation velocity model is, fT2= \"\"{:.2e}\".format(fT2)"

     ],

     "language": "python",

     "metadata": {},

     "outputs": [

      {

       "output_type": "stream",

       "stream": "stdout",

       "text": [

        "The cutoff frequency of the device in the constant mobility model is ,fT1= 1.67e+10\n",

        "The cutoff frequency of the device in the saturation velocity model is, fT2= 1.59e+10\n"

       ]

      }

     ],

     "prompt_number": 22

    }

   ],

   "metadata": {}

  }

 ]

}