prt=outfile("/home/15vl21f/anil.csv" "w")
simulator( 'spectre )
design( "/home/15vl21f/simulation/diff_amp/spectre/schematic/netlist/netlist")
resultsDir( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
openResults( "/home/15vl21f/simulation/diff_amp/spectre/schematic" )
modelFile(
'("/opt/cad/cad/FOUNDRY/analog/180nm/models/spectre/gpdk.scs" "stat")
)
I_list = list(150u, 155u, 170u, 180u)
W_list = list(0.5u, 0.8u, 0.9u, 1u)
L_list = list(10u, 15u, 17u, 22u)
analysis('ac ?start "10" ?stop "100G" )
analysis('dc ?saveOppoint t )
fprintf(prt "I, W, L, Gain, Bandwidth, overdrive, tail_current\n")
n = length(I_list)
for(i, 0, n-1
I = nth(i, I_list)
W = nth(i, W_list)
L = nth(i, L_list)
desVar("I" I)
desVar("W" W)
desVar("L" L)
)
envOption(
'analysisOrder list("dc" "ac")
)
temp( 27 )
run()
x = ymax(db20(VF("/vout")))
y = bandwidth(VF("/vout") 3 "low")
vth = pv("NM0" "vth" ?result "dcOpInfo")
vgs = pv("NM0" "vgs" ?result "dcOpInfo")
overdrive = vgs - vth
tail_current = 2 * pv("NM0" "id" ?result "dcOpInfo")
Gain = x
Bandwidth = y
fprintf(prt "%d, %f m, %f m,%f dB, %f Hz, %f V, %f A\n", I, W, L, x, y, overdrive, tail_current)
close(prt);[CODE} [/QUOTE]
I don't know what else to do? Can you help me in this please.