* SPICE netlist
VDD VDD 0 5
VB B 0 PULSE(5 0 100n 20n 20n 480n 1u 10)
C1 N013 0 10p
R1 N013 0 200k
VA A 0 PULSE(5 0 100n 20n 20n 230n 500n 10)
Rcout Cout N013 {Rcout}
XX1 N003 A VDD VDD pmos_t1 ;pnba D)G)S)B
XX3 N001 Cin N003 VDD pmos_t1 ;pnba D)G)S)B
XX2 N003 B VDD VDD pmos_t1 ;pnba D)G)S)B
XX7 N005 B VDD VDD pmos_t1 ;pnba D)G)S)B
XX8 N001 A N005 VDD pmos_t1 ;pnba D)G)S)B
XX4 N001 Cin N009 0 nmos_t1 ;pnba D)G)S)B
XX5 N009 A 0 0 nmos_t1 ;pnba D)G)S)B
XX6 N009 B 0 0 nmos_t1 ;pnba D)G)S)B
XX9 N001 A N011 0 nmos_t1 ;pnba D)G)S)B
XX10 N011 B 0 0 nmos_t1 ;pnba D)G)S)B
XX11 Cout N001 VDD VDD pmos_t1 ;pnba D)G)S)B
XX12 Cout N001 0 0 nmos_t1 ;pnba D)G)S)B
XX13 N004 A VDD VDD pmos_t1 ;pnba D)G)S)B
XX16 N007 N001 N004 VDD pmos_t1 ;pnba D)G)S)B
XX15 N004 Cin VDD VDD pmos_t1 ;pnba D)G)S)B
XX17 N007 N001 N010 0 nmos_t1 ;pnba D)G)S)B
XX18 N010 A 0 0 nmos_t1 ;pnba D)G)S)B
XX20 N010 Cin 0 0 nmos_t1 ;pnba D)G)S)B
XX14 N004 B VDD VDD pmos_t1 ;pnba D)G)S)B
XX19 N010 B 0 0 nmos_t1 ;pnba D)G)S)B
XX21 N002 Cin VDD VDD pmos_t1 ;pnba D)G)S)B
XX22 N006 B N002 VDD pmos_t1 ;pnba D)G)S)B
XX23 N007 A N006 VDD pmos_t1 ;pnba D)G)S)B
XX26 N012 Cin 0 0 nmos_t1 ;pnba D)G)S)B
XX25 N008 B N012 0 nmos_t1 ;pnba D)G)S)B
XX24 N007 A N008 0 nmos_t1 ;pnba D)G)S)B
XX27 S N007 VDD VDD pmos_t1 ;pnba D)G)S)B
XX28 S N007 0 0 nmos_t1 ;pnba D)G)S)B
C2 N014 0 10p
R2 N014 0 200k
Rsum S N014 {Rsum}
VCin Cin 0 PULSE(5 0 100n 20n 20n 980n 2u 10)
.tran 4u
.param Rcout = 1m, Rsum = 1m
.meas RMS-p-current RMS (Ix(X2:G)+Ix(X2:D)+Ix(X2:S)+Ix(X2:B))
.meas RMS-n-current RMS (Ix(X9:G)+Ix(X9:D)+Ix(X9:S)+Ix(X9:B))
.meas AVG-total power AVG(-V(vdd)*I(vdd))

* LTspice schematic (.asc)
Version 4
SHEET 1 3440 1488
WIRE -1064 -696 -1112 -696
WIRE -824 -696 -824 -744
WIRE -824 -696 -1064 -696
WIRE -776 -696 -824 -696
WIRE -600 -696 -776 -696
WIRE -552 -696 -600 -696
WIRE -136 -696 -136 -744
WIRE -136 -696 -552 -696
WIRE 232 -696 -136 -696
WIRE 280 -696 232 -696
WIRE 536 -696 536 -744
WIRE 536 -696 280 -696
WIRE 584 -696 536 -696
WIRE 840 -696 584 -696
WIRE 888 -696 840 -696
WIRE 1080 -696 888 -696
WIRE 1128 -696 1080 -696
WIRE -136 -648 -136 -696
WIRE -88 -648 -136 -648
WIRE 1128 -648 1128 -696
WIRE -136 -632 -136 -648
WIRE 1224 -632 1176 -632
WIRE -1112 -616 -1112 -696
WIRE -824 -616 -824 -696
WIRE -552 -616 -552 -696
WIRE -184 -616 -216 -616
WIRE 232 -616 232 -696
WIRE 536 -616 536 -696
WIRE 840 -616 840 -696
WIRE -1160 -600 -1192 -600
WIRE -872 -600 -904 -600
WIRE -456 -600 -504 -600
WIRE 184 -600 152 -600
WIRE 488 -600 456 -600
WIRE 792 -600 760 -600
WIRE 1080 -600 1080 -696
WIRE 1128 -600 1080 -600
WIRE -1720 -584 -1720 -632
WIRE -88 -584 -88 -648
WIRE -88 -584 -136 -584
WIRE -1064 -568 -1064 -696
WIRE -1064 -568 -1112 -568
WIRE -776 -568 -776 -696
WIRE -776 -568 -824 -568
WIRE -600 -568 -600 -696
WIRE -552 -568 -600 -568
WIRE 280 -568 280 -696
WIRE 280 -568 232 -568
WIRE 584 -568 584 -696
WIRE 584 -568 536 -568
WIRE 888 -568 888 -696
WIRE 888 -568 840 -568
WIRE 1128 -520 1128 -552
WIRE 1224 -504 1176 -504
WIRE -216 -488 -216 -616
WIRE -216 -488 -296 -488
WIRE -136 -488 -136 -536
WIRE -88 -488 -136 -488
WIRE -1112 -472 -1112 -520
WIRE -968 -472 -1112 -472
WIRE -824 -472 -824 -520
WIRE -824 -472 -968 -472
WIRE 232 -472 232 -520
WIRE 536 -472 536 -520
WIRE 536 -472 232 -472
WIRE 840 -472 840 -520
WIRE 840 -472 536 -472
WIRE 1080 -472 1080 -600
WIRE 1128 -472 1080 -472
WIRE -1720 -456 -1720 -504
WIRE -136 -440 -136 -488
WIRE 1448 -408 1448 -456
WIRE 1496 -408 1448 -408
WIRE -968 -392 -968 -472
WIRE -552 -392 -552 -520
WIRE -88 -392 -136 -392
WIRE 536 -392 536 -472
WIRE 1128 -392 1128 -424
WIRE 1448 -392 1448 -408
WIRE -1016 -376 -1048 -376
WIRE -456 -376 -504 -376
WIRE 488 -376 456 -376
WIRE 1224 -376 1176 -376
WIRE 1400 -376 1368 -376
WIRE -216 -360 -216 -488
WIRE -184 -360 -216 -360
WIRE -888 -344 -888 -376
WIRE -888 -344 -968 -344
WIRE -632 -344 -632 -376
WIRE -552 -344 -632 -344
WIRE 600 -344 600 -376
WIRE 600 -344 536 -344
WIRE 1080 -344 1080 -472
WIRE 1128 -344 1080 -344
WIRE 1496 -344 1496 -408
WIRE 1496 -344 1448 -344
WIRE -136 -328 -136 -344
WIRE -88 -328 -88 -392
WIRE -88 -328 -136 -328
WIRE -1720 -296 -1720 -328
WIRE -136 -280 -136 -328
WIRE -968 -248 -968 -296
WIRE -552 -248 -552 -296
WIRE -552 -248 -968 -248
WIRE -296 -248 -296 -488
WIRE -296 -248 -552 -248
WIRE 456 -248 456 -376
WIRE 456 -248 -296 -248
WIRE 536 -248 536 -296
WIRE 1128 -248 1128 -296
WIRE 1128 -248 536 -248
WIRE 1368 -248 1368 -376
WIRE 1368 -248 1128 -248
WIRE 1448 -248 1448 -296
WIRE 1720 -248 1448 -248
WIRE -968 -200 -968 -248
WIRE -552 -200 -552 -248
WIRE 536 -200 536 -248
WIRE 1128 -200 1128 -248
WIRE 1448 -200 1448 -248
WIRE -1720 -168 -1720 -216
WIRE -888 -152 -968 -152
WIRE -552 -152 -632 -152
WIRE 600 -152 536 -152
WIRE 1128 -152 1080 -152
WIRE 1496 -152 1448 -152
WIRE -1016 -120 -1048 -120
WIRE -456 -120 -504 -120
WIRE 456 -120 456 -248
WIRE 488 -120 456 -120
WIRE 1224 -120 1176 -120
WIRE 1368 -120 1368 -248
WIRE 1400 -120 1368 -120
WIRE -888 -88 -888 -152
WIRE -632 -88 -632 -152
WIRE 600 -88 600 -152
WIRE 1448 -88 1448 -104
WIRE 1496 -88 1496 -152
WIRE 1496 -88 1448 -88
WIRE 1128 -72 1128 -104
WIRE -1720 -40 -1720 -72
WIRE 1448 -40 1448 -88
WIRE -968 -24 -968 -104
WIRE -968 -24 -1112 -24
WIRE -824 -24 -968 -24
WIRE 536 -24 536 -104
WIRE 536 -24 232 -24
WIRE 840 -24 536 -24
WIRE 1080 -24 1080 -152
WIRE 1128 -24 1080 -24
WIRE 1224 8 1176 8
WIRE -1112 24 -1112 -24
WIRE -824 24 -824 -24
WIRE -552 24 -552 -104
WIRE 232 24 232 -24
WIRE 536 24 536 -24
WIRE 840 24 840 -24
WIRE 1128 56 1128 24
WIRE -1064 72 -1112 72
WIRE -776 72 -824 72
WIRE -552 72 -600 72
WIRE 280 72 232 72
WIRE 584 72 536 72
WIRE 888 72 840 72
WIRE -1720 88 -1720 40
WIRE -1160 104 -1192 104
WIRE -872 104 -904 104
WIRE -456 104 -504 104
WIRE 184 104 152 104
WIRE 488 104 456 104
WIRE 792 104 760 104
WIRE 1080 104 1080 -24
WIRE 1128 104 1080 104
WIRE 1224 136 1176 136
WIRE -1112 200 -1112 120
WIRE -1064 200 -1064 72
WIRE -1064 200 -1112 200
WIRE -824 200 -824 120
WIRE -824 200 -1064 200
WIRE -776 200 -776 72
WIRE -776 200 -824 200
WIRE -600 200 -600 72
WIRE -600 200 -776 200
WIRE -552 200 -552 120
WIRE -552 200 -600 200
WIRE 232 200 232 120
WIRE 232 200 -552 200
WIRE 280 200 280 72
WIRE 280 200 232 200
WIRE 536 200 536 120
WIRE 536 200 280 200
WIRE 584 200 584 72
WIRE 584 200 536 200
WIRE 840 200 840 120
WIRE 840 200 584 200
WIRE 888 200 888 72
WIRE 888 200 840 200
WIRE 1080 200 1080 104
WIRE 1080 200 888 200
WIRE 1128 200 1128 152
WIRE 1128 200 1080 200
WIRE -1720 216 -1720 184
WIRE -824 248 -824 200
WIRE 536 248 536 200
WIRE -1720 344 -1720 296
WIRE -104 440 -104 408
WIRE 136 440 136 408
WIRE -104 552 -104 520
WIRE -104 552 -152 552
WIRE -56 552 -104 552
WIRE 136 552 136 520
WIRE 136 552 88 552
WIRE 184 552 136 552
WIRE -56 584 -56 552
WIRE 184 584 184 552
WIRE -152 600 -152 552
WIRE 88 600 88 552
WIRE -152 696 -152 664
WIRE -104 696 -152 696
WIRE -56 696 -56 664
WIRE -56 696 -104 696
WIRE 88 696 88 664
WIRE 136 696 88 696
WIRE 184 696 184 664
WIRE 184 696 136 696
WIRE -104 744 -104 696
WIRE 136 744 136 696
FLAG -1720 -456 0
FLAG -104 408 Cout
IOPIN 752 768 In
FLAG -1720 -632 VDD
IOPIN -864 -272 Out
FLAG -1720 -72 B
IOPIN -864 288 Out
FLAG -1720 88 0
FLAG -1720 -328 A
IOPIN -864 32 Out
FLAG -1720 -168 0
FLAG -1192 -600 A
IOPIN -336 -240 In
FLAG -1048 -376 Cin
IOPIN -192 -16 In
FLAG -904 -600 B
IOPIN -48 -240 In
FLAG -456 -600 B
IOPIN 400 -240 In
FLAG -456 -376 A
IOPIN 400 -16 In
FLAG -1048 -120 Cin
IOPIN -192 240 In
FLAG -1192 104 A
IOPIN -336 464 In
FLAG -904 104 B
IOPIN -48 464 In
FLAG -824 248 0
FLAG -456 -120 A
IOPIN 400 240 In
FLAG -456 104 B
IOPIN 400 464 In
FLAG -88 -488 Cout
IOPIN 768 -128 Out
FLAG -136 -280 0
FLAG 152 -600 A
IOPIN 1008 -240 In
FLAG 760 -600 Cin
IOPIN 1616 -240 In
FLAG 152 104 A
IOPIN 1008 464 In
FLAG 760 104 Cin
IOPIN 1616 464 In
FLAG 456 -600 B
IOPIN 1312 -240 In
FLAG 456 104 B
IOPIN 1312 464 In
FLAG 1224 -632 Cin
IOPIN 2080 -272 In
FLAG 1224 -504 B
IOPIN 2080 -144 In
FLAG 1224 -376 A
IOPIN 2080 -16 In
FLAG 1224 136 Cin
IOPIN 2080 496 In
FLAG 1224 8 B
IOPIN 2080 368 In
FLAG 1224 -120 A
IOPIN 2080 240 In
FLAG 1720 -248 S
IOPIN 2576 112 Out
FLAG 536 248 0
FLAG -824 -744 VDD
IOPIN 32 -384 Out
FLAG 536 -744 VDD
IOPIN 1392 -384 Out
FLAG 1448 -456 VDD
IOPIN 2304 -96 Out
FLAG 1448 -40 0
FLAG -136 -744 VDD
IOPIN 720 -384 Out
FLAG -104 744 0
FLAG 136 408 S
IOPIN 992 768 In
FLAG 136 744 0
FLAG -1720 184 Cin
IOPIN -864 544 Out
FLAG -1720 344 0
FLAG -888 -88 0
FLAG -632 -88 0
FLAG -888 -376 VDD
IOPIN -32 -16 Out
FLAG -632 -376 VDD
IOPIN 224 -16 Out
FLAG 600 -376 VDD
IOPIN 1456 -16 Out
FLAG 600 -88 0
SYMBOL voltage -1720 -600 R0
SYMATTR InstName VDD
SYMATTR Value 5
SYMBOL voltage -1720 -56 R0
SYMATTR InstName VB
SYMATTR Value PULSE(5 0 100n 20n 20n 480n 1u 10)
SYMBOL cap -168 600 R0
SYMATTR InstName C1
SYMATTR Value 10p
SYMBOL res -72 568 R0
SYMATTR InstName R1
SYMATTR Value 200k
SYMBOL voltage -1720 -312 R0
SYMATTR InstName VA
SYMATTR Value PULSE(5 0 100n 20n 20n 230n 500n 10)
SYMBOL res -120 424 R0
SYMATTR InstName Rcout
SYMATTR Value {Rcout}
SYMBOL pmos4 -1160 -520 M180
SYMATTR InstName X1
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 -1016 -296 M180
SYMATTR InstName X3
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 -872 -520 M180
SYMATTR InstName X2
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 -504 -520 R180
SYMATTR InstName X7
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 -504 -296 R180
SYMATTR InstName X8
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -1016 -200 R0
SYMATTR InstName X4
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -1160 24 R0
SYMATTR InstName X5
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -872 24 R0
SYMATTR InstName X6
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -504 -200 M0
SYMATTR InstName X9
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -504 24 M0
SYMATTR InstName X10
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL pmos4 -184 -536 M180
SYMATTR InstName X11
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 -184 -440 R0
SYMATTR InstName X12
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL pmos4 184 -520 M180
SYMATTR InstName X13
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 488 -296 M180
SYMATTR InstName X16
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 792 -520 M180
SYMATTR InstName X15
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 488 -200 R0
SYMATTR InstName X17
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 184 24 R0
SYMATTR InstName X18
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 792 24 R0
SYMATTR InstName X20
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL pmos4 488 -520 M180
SYMATTR InstName X14
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 488 24 R0
SYMATTR InstName X19
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL pmos4 1176 -552 R180
SYMATTR InstName X21
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 1176 -424 R180
SYMATTR InstName X22
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL pmos4 1176 -296 R180
SYMATTR InstName X23
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 1176 56 M0
SYMATTR InstName X26
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 1176 -72 M0
SYMATTR InstName X25
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL nmos4 1176 -200 M0
SYMATTR InstName X24
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL pmos4 1400 -296 M180
SYMATTR InstName X27
SYMATTR Value pmos_t1
SYMATTR Prefix X
SYMBOL nmos4 1400 -200 R0
SYMATTR InstName X28
SYMATTR Value nmos_t1
SYMATTR Prefix X
SYMBOL cap 72 600 R0
SYMATTR InstName C2
SYMATTR Value 10p
SYMBOL res 168 568 R0
SYMATTR InstName R2
SYMATTR Value 200k
SYMBOL res 120 424 R0
SYMATTR InstName Rsum
SYMATTR Value {Rsum}
SYMBOL voltage -1720 200 R0
SYMATTR InstName VCin
SYMATTR Value PULSE(5 0 100n 20n 20n 980n 2u 10)