Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- kon = .0008 * 10 ** 6
- w = 2 * 10 ** -6
- #ion = kon * w * (vdd - vt) ** 2
- #ron = vdd / ion
- cin = 0.2*5.52 * 10 ** -15
- cout = cin / 4
- cwire = .15 * 10 ** -15 * 60 * 100
- rwire = 60 * 20 * 100
- koff = 1 * 10 ** 6
- #ioff = koff * w * math.exp(-vt/ (25 * 10 ** -3) )
- #tclk = 18 / 2 * math.log(2) * (ron * (cout + cwire + 2 * cin) + rwire * (cwire / 2 + 2 * cin))
- #etot = ( (vdd * ioff) * tclk + 1/2*(cout + cwire + 2 *cin) * vdd**2 * .1 ) * 10**9 * 262143 * 5
- #edp= tclk * etot
- #print(tclk)
- #print(etot)
- #print(edp)
- listdd = []
- listvt = []
- for i in range(0,71):
- listdd.append(0.3 + i / 100)
- for j in range(0,81):
- listvt.append(0.1 + j / 100)
- print(listdd)
- print(listvt)
- temp1 = 100000
- temp2 = 0
- blah = []
- smallestind = 0
- for k in range(len(listdd)):
- for m in range(len(listvt)):
- if listvt[m] > listdd[k] - 0.1:
- continue
- ion_v = kon * w * (listdd[k] - listvt[m]) ** 2
- ron_v = listdd[k] / ion_v
- ioff_v = koff * w * math.exp(-listvt[m] / (25 * 10 ** -3))
- tclk_v = 18 / 2 * math.log(2) * (ron_v * (cout + cwire + 2 * cin) + rwire * (cwire / 2 + 2 * cin))
- etot_v = ((listdd[k] * ioff_v) * tclk_v + 1 / 2 * (cout + cwire + 2 * cin) * listdd[k] ** 2 * .1) * 10 ** 9 * 262143 * 5
- temp2 = (tclk_v) * (etot_v)
- blah.append(temp2)
- if(temp1 >= temp2):
- temp1 = temp2
- smallestind = (k,m)
- print(temp1)
- print(tclk_v)
- print(etot_v)
- print(smallestind)
- print(listdd[smallestind[0]])
- print(listvt[smallestind[1]])
- print(min(blah))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement