Narakiran
Junior Member level 2
Hi,
I'm writing Ocean Script for Differential amplifier(single ended).
I have to give 3-variables point (I,W,L) as input.
Suppose my points are (150u, 0.5u, 10u), (155u, 0.8u, 15u), (170u, 0.9, 17u), (180u, 1u, 22u )
can anyone help how i should give 4 different points as inputs?
My Ocean Code for which i have to give different inputs.
--------------------------------------------------------------------------
I'm writing Ocean Script for Differential amplifier(single ended).
I have to give 3-variables point (I,W,L) as input.
Suppose my points are (150u, 0.5u, 10u), (155u, 0.8u, 15u), (170u, 0.9, 17u), (180u, 1u, 22u )
can anyone help how i should give 4 different points as inputs?
My Ocean Code for which i have to give different inputs.
--------------------------------------------------------------------------
Code dot - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 prt=outfile("/home/15vl21f/current_bias.csv" "w") simulator( 'spectre ) design( "/home/15vl21f/simulation/Current_bias/spectre/schematic/netlist/netlist") resultsDir( "/home/15vl21f/simulation/Current_bias/spectre/schematic" ) openResults( "/home/15vl21f/simulation/Current_bias/spectre/schematic" ) modelFile( '("/opt/cad/cad/FOUNDRY/analog/180nm/models/spectre/gpdk.scs" "stat") ) analysis('dc ?saveOppoint t ) analysis('ac ?start "10" ?stop "100G" ) fprintf(prt "I, W, L, Gain, Bandwidth, overdrive, tail_current\n") desVar( "I" ) desVar( "W" ) desVar( "L" ) envOption( 'analysisOrder list("dc" "ac") ) temp( 27 ) run() reg_0=pv("NM0" "region" ?result "dcOpInfo") reg_1=pv("NM2" "region" ?result "dcOpInfo") reg_2=pv("PM0" "region" ?result "dcOpInfo") when(((reg_0==2) && (reg_1==2) && (reg_2==2)) 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);
Last edited by a moderator: