added a test resistor to help determin what the fabbed value will be
diff --git a/mag/cellA.mag b/mag/cellA.mag index 802fb36..c476bbe 100644 --- a/mag/cellA.mag +++ b/mag/cellA.mag
@@ -1,14 +1,20 @@ magic tech sky130A magscale 1 2 -timestamp 1621739545 +timestamp 1621807186 << locali >> rect -440 2012 -344 2402 rect -158 2258 -42 2402 rect -158 2148 478 2258 rect -158 2002 -42 2148 +rect 600 2096 1052 2558 rect 2216 2134 2330 2272 +rect 2430 2076 2890 2570 rect -330 1878 -170 1958 +use sky130_fd_pr__res_high_po_0p35_L6NJBM sky130_fd_pr__res_high_po_0p35_L6NJBM_1 +timestamp 1621480569 +transform 0 1 1742 -1 0 2517 +box -37 -1132 37 1132 use sky130_fd_pr__res_high_po_0p35_L6NJBM sky130_fd_pr__res_high_po_0p35_L6NJBM_0 timestamp 1621480569 transform 0 1 1168 -1 0 2199 @@ -26,4 +32,8 @@ port 3 n rlabel locali -250 1902 -250 1902 1 in port 0 n +rlabel locali 2672 2090 2672 2090 1 r1 +port 4 n +rlabel locali 830 2120 830 2120 1 r2 +port 5 n << end >>
diff --git a/mag/cellA.spice b/mag/cellA.spice index c9e3d28..d799003 100644 --- a/mag/cellA.spice +++ b/mag/cellA.spice
@@ -2,7 +2,8 @@ .option scale=5000u -.subckt cellA in vdd out vss +.subckt cellA in vdd out vss r1 r2 X0 out in vss VSUBS sky130_fd_pr__nfet_g5v0d10v5 ad=23200 pd=916 as=23200 ps=916 w=400 l=160 X1 out vdd VSUBS sky130_fd_pr__res_high_po_0p35 l=1400 +X2 r2 r1 VSUBS sky130_fd_pr__res_high_po_0p35 l=1400 .ends
diff --git a/xschem/cellA.sch b/xschem/cellA.sch index 547f6a3..8130596 100644 --- a/xschem/cellA.sch +++ b/xschem/cellA.sch
@@ -7,6 +7,8 @@ B 5 1677.5 -292.5 1682.5 -287.5 {name=XXX dir=inout} T {9084ohm} 1760 -410 0 0 0.4 0.4 {} +T {Test resistor} 2070 -400 0 0 0.4 0.4 {} +T {9084ohm} 2070 -370 0 0 0.4 0.4 {} N 1670 -390 1670 -350 { lab=out} N 1630 -420 1650 -420 { lab=GND} N 1600 -320 1630 -320 { lab=in} @@ -17,6 +19,11 @@ N 1670 -290 1680 -290 { lab=VSS} N 1670 -290 1670 -250 { lab=VSS} N 1670 -250 1690 -250 { lab=VSS} +N 1940 -420 1960 -420 { lab=GND} +N 1980 -390 1980 -360 { lab=R2} +N 1980 -360 2000 -360 { lab=R2} +N 1980 -480 1980 -450 { lab=R1} +N 1980 -480 2000 -480 { lab=R1} C {sky130_fd_pr/nfet3_g5v0d10v5.sym} 1650 -320 0 0 {name=M3 L=0.8 W=2 @@ -43,3 +50,12 @@ C {devices/iopin.sym} 1690 -480 0 0 {name=p2 lab=VDD} C {devices/opin.sym} 1700 -370 0 0 {name=p3 lab=out} C {devices/iopin.sym} 1690 -250 0 0 {name=p4 lab=VSS} +C {sky130_fd_pr/res_high_po_0p35.sym} 1980 -420 0 0 {name=R2 +W=0.35 +L=20 +model=res_high_po_0p35 +spiceprefix=X +mult=1} +C {devices/gnd.sym} 1940 -420 0 0 {name=l1 lab=GND} +C {devices/iopin.sym} 2000 -480 0 0 {name=p5 lab=R1} +C {devices/iopin.sym} 2000 -360 0 0 {name=p6 lab=R2}
diff --git a/xschem/cellA.spice b/xschem/cellA.spice index 2e6ccd9..865de3e 100644 --- a/xschem/cellA.spice +++ b/xschem/cellA.spice
@@ -1,12 +1,15 @@ -**.subckt cellA in VDD out VSS +**.subckt cellA in VDD out VSS R1 R2 *.ipin in *.iopin VDD *.opin out *.iopin VSS +*.iopin R1 +*.iopin R2 XM3 out in VSS GND sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' + pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' + sa=0 sb=0 sd=0 mult=1 m=1 XR1 out VDD GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 +XR2 R2 R1 GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 **.ends .GLOBAL GND ** flattened .save nodes
diff --git a/xschem/cellA.sym b/xschem/cellA.sym index 5a0d1f4..f2c9570 100644 --- a/xschem/cellA.sym +++ b/xschem/cellA.sym
@@ -1,24 +1,33 @@ -v {xschem version=2.9.9 file_version=1.2} +v {xschem version=2.9.9 file_version=1.2 } +G {} K {type=subcircuit format="@name @pinlist @symname" template="name=x1" } - -T {@symname} -40.5 -6 0 0 0.3 0.3 {} -T {@name} 135 -42 0 0 0.2 0.2 {} +V {} +S {} +E {} L 4 -130 -30 130 -30 {} L 4 -130 30 130 30 {} L 4 -130 -30 -130 30 {} L 4 130 -30 130 30 {} -B 5 147.5 -22.5 152.5 -17.5 {name=VDD dir=inout } -L 7 130 -20 150 -20 {} -T {VDD} 125 -24 0 1 0.2 0.2 {} -B 5 147.5 -2.5 152.5 2.5 {name=out dir=out } L 4 130 0 150 0 {} -T {out} 125 -4 0 1 0.2 0.2 {} -B 5 -152.5 -22.5 -147.5 -17.5 {name=in dir=in } L 4 -150 -20 -130 -20 {} -T {in} -125 -24 0 0 0.2 0.2 {} -B 5 147.5 17.5 152.5 22.5 {name=VSS dir=inout } +L 7 130 -20 150 -20 {} L 7 130 20 150 20 {} +L 7 70 30 70 50 {} +L 7 50 30 50 50 {} +B 5 147.5 -22.5 152.5 -17.5 {name=VDD dir=inout } +B 5 147.5 -2.5 152.5 2.5 {name=out dir=out } +B 5 -152.5 -22.5 -147.5 -17.5 {name=in dir=in } +B 5 147.5 17.5 152.5 22.5 {name=VSS dir=inout } +B 5 67.5 47.5 72.5 52.5 {name=R2 dir=inout } +B 5 47.5 47.5 52.5 52.5 {name=R1 dir=inout } +T {@symname} -40.5 -6 0 0 0.3 0.3 {} +T {@name} 135 -42 0 0 0.2 0.2 {} +T {VDD} 125 -24 0 1 0.2 0.2 {} +T {out} 125 -4 0 1 0.2 0.2 {} +T {in} -125 -24 0 0 0.2 0.2 {} T {VSS} 125 16 0 1 0.2 0.2 {} +T {R2} 85 16 0 1 0.2 0.2 {} +T {R1} 55 16 0 1 0.2 0.2 {}
diff --git a/xschem/cellA_tb.sch b/xschem/cellA_tb.sch index f0a56b9..0a78135 100644 --- a/xschem/cellA_tb.sch +++ b/xschem/cellA_tb.sch
@@ -20,7 +20,7 @@ N 1930 -390 1950 -390 { lab=#net1} N 1930 -350 1950 -350 { lab=GND} N 1950 -350 1950 -340 { lab=GND} -N 1930 -370 1960 -370 { lab=vin} +N 1930 -370 1960 -370 { lab=vout} C {devices/gnd.sym} 1670 -270 0 0 {name=l1 lab=GND} C {devices/vsource.sym} 1550 -300 0 0 {name=V1 value="sin 2 .1 1000"} C {devices/vsource.sym} 1500 -370 0 0 {name=V2 value=7
diff --git a/xschem/cellA_tb.spice b/xschem/cellA_tb.spice index 968179a..04597c8 100644 --- a/xschem/cellA_tb.spice +++ b/xschem/cellA_tb.spice
@@ -1,7 +1,7 @@ **.subckt cellA_tb V1 vin GND sin 2 .1 1000 V2 net1 GND 7 -x1 net1 vout vin GND cellA +x1 net1 vout vin GND __UNCONNECTED_PIN__0 __UNCONNECTED_PIN__1 cellA **** begin user architecture code .param mc_mm_switch=0 @@ -17,18 +17,21 @@ **** end user architecture code **.ends -* expanding symbol: cellA.sym # of pins=4 +* expanding symbol: cellA.sym # of pins=6 * sym_path: /home/malvira/repos/asic/projects/vlsi-sky130-analog-caravel-test1/xschem/cellA.sym * sch_path: /home/malvira/repos/asic/projects/vlsi-sky130-analog-caravel-test1/xschem/cellA.sch -.subckt cellA VDD out in VSS +.subckt cellA VDD out in VSS R2 R1 *.ipin in *.iopin VDD *.opin out *.iopin VSS +*.iopin R1 +*.iopin R2 XM3 out in VSS GND sky130_fd_pr__nfet_g5v0d10v5 L=0.8 W=2 nf=1 ad='int((nf+1)/2) * W/nf * 0.29' as='int((nf+2)/2) * W/nf * 0.29' + pd='2*int((nf+1)/2) * (W/nf + 0.29)' ps='2*int((nf+2)/2) * (W/nf + 0.29)' nrd='0.29 / W' nrs='0.29 / W' + sa=0 sb=0 sd=0 mult=1 m=1 XR1 out VDD GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 +XR2 R2 R1 GND sky130_fd_pr__res_high_po_0p35 W=0.35 L=20 mult=1 m=1 .ends .GLOBAL GND