* Z:\home\khalils\Downloads\files\data\raw_asc\745c37849ff6_inverter180.asc
* Generated by LTspice 26.0.1 for Windows.
* .measure TRAN Trise TRIG V(q) val =0.1 rise =1 TARG V(q) val =0.9 rise =1\n.measure TRAN Tfall TRIG V(q) val =0.9 fall = last TARG V(q) val = 0.1 fall = last
* .measure TRAN THL TRIG V(clk) val ={vin/2} rise =3 TARG V(q) val ={vin/2} fall =1\n.measure TRAN TLH TRIG V(clk) val ={vin/2} rise =2 TARG V(q) val = {vin/2} rise=1
* .meas iavg param Id(M1)+Id(M2)
* .dc V2 0 1 0.01
* .step param vin 0.5 1.2 0.1
V1 Vdd 0 {vin}
M1 out in 0 0 CMOSN l={L} w={WN}
V2 in 0 PULSE(0 {vin} 2n 0.001n 0.001n 3n 6n)
M2 Vdd in out Vdd CMOSP l={L} w={WP}
.model NMOS NMOS
.model PMOS PMOS
.lib C:\users\khalils\AppData\Local\LTspice\lib\cmp\standard.mos
.meas t0 FIND time WHEN V(in) = {vin/2} RISE=2
.meas t1 FIND time WHEN V(out) = {vin/2} Fall =2
.meas tPHL PARAM t1-t0
.meas t2 FIND time WHEN V(in) = {vin/2} FALL=2
.meas t3 FIND time WHEN V(out) = {vin/2} RISE =3
.meas tPLH PARAM t3-t2
.meas t_delay PARAM (tPLH+tPHL)/2
.meas power AVG V(vdd)*I(V1)
.include tsmc018.lib
.param L=180n WN=450n WP=1200n
.param vin=1V
.tran 50n
.backanno
.end

* LTspice schematic (.asc):
Version 4
SHEET 1 2140 680
WIRE 208 0 208 -32
WIRE 224 0 208 0
WIRE 224 48 224 0
WIRE 224 48 208 48
WIRE 160 80 112 80
WIRE 208 144 208 96
WIRE 304 144 208 144
WIRE 112 160 112 80
WIRE 112 160 64 160
WIRE 208 192 208 144
WIRE -224 208 -224 192
WIRE 240 240 208 240
WIRE 112 272 112 160
WIRE 160 272 112 272
WIRE 208 304 208 288
WIRE 240 304 240 240
WIRE 240 304 208 304
WIRE 208 320 208 304
WIRE -224 384 -224 368
IOPIN -224 112 Out
IOPIN 208 -32 In
IOPIN -224 288 Out
IOPIN 64 160 In
IOPIN 304 144 Out
SYMBOL voltage -224 272 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V2
SYMATTR Value PULSE(0 {vin} 2n 0.001n 0.001n 3n 6n)
SYMBOL voltage -224 96 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value {vin}
SYMBOL nmos4 160 192 R0
SYMATTR InstName M1
SYMATTR Value2 l={L} w={WN}
SYMATTR Value CMOSN
SYMBOL pmos4 160 0 R0
SYMATTR InstName M2
SYMATTR Value2 l={L} w={WP}
SYMATTR Value CMOSP
FLAG 208 320 0
FLAG -224 208 0
FLAG -224 384 0
FLAG -224 112 Vdd
FLAG 208 -32 Vdd
FLAG -224 288 in
FLAG 64 160 in
FLAG 304 144 out
TEXT 584 -160 Left 2 !.meas t0 FIND time WHEN V(in) = {vin/2} RISE=2\n.meas t1 FIND time WHEN V(out) = {vin/2} Fall =2\n.meas tPHL PARAM t1-t0\n \n.meas t2 FIND time WHEN V(in) = {vin/2} FALL=2\n.meas t3 FIND time WHEN V(out) = {vin/2} RISE =3\n.meas tPLH PARAM t3-t2\n \n.meas t_delay PARAM (tPLH+tPHL)/2
TEXT 608 -264 Left 2 !.meas power AVG V(vdd)*I(V1)
TEXT 600 200 Left 2 ;.measure TRAN Trise TRIG V(q) val =0.1 rise =1 TARG V(q) val =0.9 rise =1\n.measure TRAN Tfall TRIG V(q) val =0.9 fall = last TARG V(q) val = 0.1 fall = last
TEXT 576 112 Left 2 ;.measure TRAN THL TRIG V(clk) val ={vin/2} rise =3 TARG V(q) val ={vin/2} fall =1\n.measure TRAN TLH TRIG V(clk) val ={vin/2} rise =2 TARG V(q) val = {vin/2} rise=1
TEXT 592 -560 Left 2 ;.meas iavg param Id(M1)+Id(M2)
TEXT -728 -104 Left 2 !.include tsmc018.lib
TEXT -736 248 Left 2 !.param L=180n WN=450n WP=1200n
TEXT -744 112 Left 2 ;.dc V2 0 1 0.01
TEXT -744 80 Left 2 ;.step param vin 0.5 1.2 0.1
TEXT -736 280 Left 2 !.param vin=1V
TEXT -720 -32 Left 2 !.tran 50n