# -*- coding: utf-8 -*- """ Created on Fri Feb 06 22:27:47 2015 @author: mespence """ from numpy import logspace, array, tile, pi from pylab import semilogx, loglog, xlabel, ylabel, title, legend, figure, axis Cg = 1e-15 # F/um Cd = 1e-15 # F/um Vth = 0.4 # V Vdd = 1.0 # V Jcrit = 1e-4 # A/um Vgs = 0.8 # V R0n = 1e3 # Ohm*um # Amplifier BW = logspace(6,12) Av = array([[2],[3],[5],[10]]) Cl = 2e-14 W0 = 1 # in um # We need to find the real W iteratively def W(W0): C = Cl + Cd*W0 R = 1/BW/C gm = Av/R Id = gm/2*(Vgs-Vth) W = Id/Jcrit return W for x in range(3): W0 = W(W0) figure() semilogx(tile(BW,[len(Av),1]).T/2/pi, 1e6*(W0*Jcrit*Vdd).T) axis([10**6, 10**10, 1, 100]) xlabel("Bandwidth [Hz]") ylabel("Power [uW]") legend(["Av=2","Av=3","Av=5","Av=10"],loc='lower right') title("Bandwidth vs. Power in Common Source Amplifier") figure() loglog(1/tile(BW,[len(Av),1]).T, 1e6*(W0*Jcrit*Vdd).T) #axis([10**6, 10**10, 1, 100]) xlabel("Time Constant [s]") ylabel("Power [uW]") legend(["Av=2","Av=3","Av=5","Av=10"],loc='upper right') title("Time Constant vs. Power in Common Source Amplifier") ## Inverter Winv = logspace(-1.5,2.5,100) # in um Clinv = array([[12],[40],[200]])*1e-15 Ctot = tile(3*Cd*Winv,[len(Clinv),1]) + tile(Clinv,len(Winv)) Ron = R0n/Winv td = 1e12*Ron*Ctot E = 1e6*(Ctot+3*Winv*Cg)*Vdd**2 figure() loglog(td.T,E.T) ylabel("Energy/transition [uJ]") xlabel("Delay [ps]") legend(["Cl=12 fF","Cl=40 fF","Cl=200 fF"]) title("Energy vs. Delay in Inverter")