saeedgreat
Newbie level 4

hi. i created a 3 stage ring oscillator using 180 nm technology.my problem is when i try to compute the tphl from formula it doesn't match with what i got from analyses.
this is my code and this is required formula also i have problem calculating the cload and c wire in it.
***ring oscillator***
.param Supply=2.5
.temp 70
.param WP=780nm fal=1 ris=1
.GLOBAL vdd
Vdd vdd 0 DC='Supply'
.ic v(in1)='Supply'
**tp1**
.measure tran tphl1 trig v(in1) val='Supply/2' rise='ris'
+ targ v(in2) val='Supply/2' fall='fal'
.measure tran tplh1 trig v(in1) val='Supply/2' fall='fal'
+ targ v(in2) val='Supply/2' rise='ris'
.measure tp1 param = '0.5*(tphl1+tplh1)' $calculate freq
.measure freq1 param = '1/tp1' $calculate freq
**tp2**
.measure tran tphl2 trig v(in2) val='Supply/2' rise='ris'
+ targ v(in3) val='Supply/2' fall='fal'
.measure tran tplh2 trig v(in2) val='Supply/2' fall='1'
+ targ v(in3) val='Supply/2' rise='2'
.measure tp2 param = '0.5*(tphl2+tplh2)' $calculate freq
.measure freq2 param = '1/tp2' $calculate freq
**tp3**
.measure tran tphl3 trig v(in3) val='Supply/2' rise='1'
+ targ v(in1) val='Supply/2' fall='1'
.measure tran tplh3 trig v(in3) val='Supply/2' fall='ris'
+ targ v(in1) val='Supply/2' rise='fal'
.measure tp3 param = '0.5*(tphl3+tplh3)' $calculate freq
.measure freq3 param = '1/tp3' $calculate freq
.measure tp param = 'tp1+tp2+tp3' $calculate freq
.measure freq param = '1/6*tp' $calculate freq
.subckt inverter in out WidthP=WP
Mn0 out in 0 0 NMOS W=300nm L=250nm
Mn1 out in vdd vdd PMOS W=WidthP L=250nm
Cload out 0 1.5f
.ends inverter
x1 in1 in2 inverter
x2 in2 in3 inverter
x3 in3 in1 inverter
.tran step=0.5p stop=4ns uic
.lib "cmos250.lib" TT
.op
.END
this is my code and this is required formula also i have problem calculating the cload and c wire in it.