.subckt celem<2> GND Vdd a[0] a[1] o
M0_ GND a[0] #0 GND nch W=5u L=2u
M1_ #0 a[1] o GND nch W=5u L=2u
M2_ Vdd a[0] #1 Vdd pch W=5u L=2u
M3_ #1 a[1] o Vdd pch W=5u L=2u
.ends

.subckt ctree<2,2> GND Vdd x[0][0] x[0][1] x[1][0] x[1][1] y
xc2 GND Vdd q[0] q[1] y celem<2>
xc1[0] GND Vdd x[0][0] x[0][1] q[0] celem<2>
xc1[1] GND Vdd x[1][0] x[1][1] q[1] celem<2>
.ends

xfoo GND Vdd foo.x[0][0] foo.x[0][1] foo.x[1][0] foo.x[1][1] foo.y ctree<2,2>

