C4 updates
diff --git a/mag/sky130_fd_pr__cap_mim_m3_1_5NP42Z.mag b/mag/sky130_fd_pr__cap_mim_m3_1_5NP42Z.mag
index ddf5487..1c90ba6 100644
--- a/mag/sky130_fd_pr__cap_mim_m3_1_5NP42Z.mag
+++ b/mag/sky130_fd_pr__cap_mim_m3_1_5NP42Z.mag
@@ -1,58 +1,57 @@
magic
tech sky130B
-magscale 1 2
timestamp 1654287887
<< error_p >>
-rect 703 72 709 78
-rect 761 72 767 78
-rect 697 66 773 72
-rect 703 12 767 66
-rect 697 6 773 12
-rect 703 0 709 6
-rect 761 0 767 6
+rect 351 36 354 39
+rect 380 36 383 39
+rect 348 33 386 36
+rect 351 6 383 33
+rect 348 3 386 6
+rect 351 0 354 3
+rect 380 0 383 3
<< metal2 >>
-rect -309 23 -235 32
-rect -309 -33 -300 23
-rect -244 -33 -235 23
-rect -309 -42 -235 -33
+rect -154 11 -117 16
+rect -154 -16 -150 11
+rect -122 -16 -117 11
+rect -154 -21 -117 -16
<< via2 >>
-rect -300 -33 -244 23
+rect -150 -16 -122 11
<< metal3 >>
-rect -309 372 590 400
-rect -309 23 506 372
-rect -309 -33 -300 23
-rect -244 -33 506 23
-rect -309 -372 506 -33
-rect 570 -372 590 372
-rect -309 -400 590 -372
+rect -154 186 295 200
+rect -154 11 253 186
+rect -154 -16 -150 11
+rect -122 -16 253 11
+rect -154 -186 253 -16
+rect 285 -186 295 186
+rect -154 -200 295 -186
<< via3 >>
-rect 506 -372 570 372
-rect 703 6 767 72
+rect 253 -186 285 186
+rect 351 3 383 36
<< mimcap >>
-rect -209 260 391 300
-rect -209 -260 -169 260
-rect 351 -260 391 260
-rect -209 -300 391 -260
+rect -104 130 195 150
+rect -104 -130 -84 130
+rect 175 -130 195 130
+rect -104 -150 195 -130
<< mimcapcontact >>
-rect -169 -260 351 260
+rect -84 -130 175 130
<< metal4 >>
-rect 490 372 586 388
-rect -170 260 352 261
-rect -170 -260 -169 260
-rect 351 -260 352 260
-rect 490 100 506 372
-rect 489 -27 506 100
-rect -170 -261 352 -260
-rect 490 -372 506 -27
-rect 570 100 586 372
-rect 570 72 794 100
-rect 570 6 703 72
-rect 767 6 794 72
-rect 570 -27 794 6
-rect 570 -372 586 -27
-rect 490 -388 586 -372
+rect 245 186 293 194
+rect -85 130 176 130
+rect -85 -130 -84 130
+rect 175 -130 176 130
+rect 245 50 253 186
+rect 244 -13 253 50
+rect -85 -130 176 -130
+rect 245 -186 253 -13
+rect 285 50 293 186
+rect 285 36 397 50
+rect 285 3 351 36
+rect 383 3 397 36
+rect 285 -13 397 3
+rect 285 -186 293 -13
+rect 245 -194 293 -186
<< properties >>
-string FIXED_BBOX -450 -400 350 400
+string FIXED_BBOX -225 -200 175 200
string gencell sky130_fd_pr__cap_mim_m3_1
string library sky130
string parameters w 3.00 l 3.00 val 20.28 carea 2.00 cperi 0.19 nx 1 ny 1 dummy 0 square 0 lmin 2.00 wmin 2.00 lmax 30.0 wmax 30.0 dc 0 bconnect 1 tconnect 1 ccov 100
diff --git a/mag/user_analog_project_wrapper.mag b/mag/user_analog_project_wrapper.mag
index 728709c..415da9a 100644
--- a/mag/user_analog_project_wrapper.mag
+++ b/mag/user_analog_project_wrapper.mag
@@ -2,6 +2,8 @@
tech sky130B
magscale 1 2
timestamp 1654288977
+<< checkpaint >>
+rect 48490 659324 54963 662484
<< locali >>
rect 256417 656497 256484 656565
<< metal1 >>
@@ -1077,7 +1079,7 @@
transform 1 0 562058 0 1 685450
box 0 0 864 800
use FG_pfet FG_pfet_0
-timestamp 1654006311
+timestamp 1647612247
transform 1 0 52313 0 1 660624
box -2563 -40 1390 600
use c4_1 c4_1_1
diff --git a/xschem/C4.sch b/xschem/C4.sch
index d1a1ca1..6e52013 100644
--- a/xschem/C4.sch
+++ b/xschem/C4.sch
@@ -17,43 +17,41 @@
N 250 -200 250 -150 {
lab=#net1}
N 250 -90 250 -50 {
-lab=#net2}
+lab=vssa}
N 250 -380 250 -360 {
-lab=#net3}
+lab=vdda}
N 430 -160 430 -120 {
-lab=#net2}
+lab=vssa}
N 250 -190 390 -190 {
lab=#net1}
N 430 -190 450 -190 {
-lab=#net2}
+lab=vssa}
N 450 -190 450 -150 {
-lab=#net2}
+lab=vssa}
N 430 -150 450 -150 {
-lab=#net2}
+lab=vssa}
N 230 -120 250 -120 {
-lab=#net2}
+lab=vssa}
N 230 -120 230 -80 {
-lab=#net2}
+lab=vssa}
N 230 -80 250 -80 {
-lab=#net2}
+lab=vssa}
N 220 -330 250 -330 {
-lab=GND}
+lab=vssa}
N 430 -360 430 -220 {
-lab=vout}
+lab=#net2}
N 430 -460 430 -420 {
-lab=#net3}
+lab=vdda}
N 430 -390 460 -390 {
-lab=#net3}
+lab=vdda}
N 460 -440 460 -390 {
-lab=#net3}
+lab=vdda}
N 430 -440 460 -440 {
-lab=#net3}
+lab=vdda}
N 290 -330 430 -330 {
-lab=vout}
+lab=#net2}
N 370 -390 390 -390 {
lab=vth}
-N 430 -330 640 -330 {
-lab=vout}
N 290 -120 320 -120 {
lab=vtl}
N -20 -190 20 -190 {
@@ -69,15 +67,27 @@
N -120 -450 -100 -450 {
lab=vout}
N 430 -120 430 -50 {
-lab=#net2}
+lab=vssa}
N 250 -50 430 -50 {
-lab=#net2}
-N 340 -50 340 -10 {
-lab=#net2}
-N 250 -530 250 -380 {
-lab=#net3}
+lab=vssa}
N 250 -460 430 -460 {
-lab=#net3}
+lab=vdda}
+N 810 -310 1030 -310 {
+lab=vout}
+N 430 -330 650 -330 {
+lab=#net2}
+N -160 -410 -110 -410 {
+lab=vdda}
+N -160 -380 -110 -380 {
+lab=vssa}
+N 250 -460 250 -380 {
+lab=vdda}
+N 340 -500 340 -460 {
+lab=vdda}
+N 340 -50 340 -0 {
+lab=vssa}
+N 650 -330 810 -330 {}
+N 810 -330 810 -310 {}
C {sky130_fd_pr/nfet_01v8.sym} 270 -120 0 1 {name=M3
L=0.15
W=1
@@ -106,11 +116,10 @@
model=pfet_01v8
spiceprefix=X
}
-C {devices/lab_pin.sym} 220 -330 0 0 {name=l7 sig_type=std_logic lab=GND}
C {devices/lab_pin.sym} 370 -390 0 0 {name=l10 sig_type=std_logic lab=vth}
C {devices/lab_pin.sym} 320 -120 0 1 {name=l11 sig_type=std_logic lab=vtl}
C {devices/lab_pin.sym} -20 -190 0 0 {name=l12 sig_type=std_logic lab=vin}
-C {devices/lab_pin.sym} 640 -330 0 1 {name=l13 sig_type=std_logic lab=vout}
+C {devices/lab_pin.sym} 1030 -310 0 1 {name=l13 sig_type=std_logic lab=vout}
C {devices/ipin.sym} -100 -540 0 0 {name=p1 lab=vth}
C {devices/ipin.sym} -100 -510 0 0 {name=p2 lab=vtl}
C {devices/ipin.sym} -100 -480 0 0 {name=p3 lab=vin}
@@ -119,6 +128,11 @@
C {devices/lab_pin.sym} -90 -510 0 1 {name=l9 sig_type=std_logic lab=vtl}
C {devices/lab_pin.sym} -90 -480 0 1 {name=l14 sig_type=std_logic lab=vin}
C {devices/lab_pin.sym} -120 -450 0 0 {name=l15 sig_type=std_logic lab=vout}
-C {devices/iopin.sym} 330 -10 0 0 {name=p5 lab=vss}
-C {devices/iopin.sym} 240 -530 0 0 {name=p6 lab=vdda}
+C {devices/iopin.sym} -120 -380 0 0 {name=p5 lab=vssa}
+C {devices/iopin.sym} -120 -410 0 0 {name=p6 lab=vdda}
C {sky130_fd_pr/cap_mim_m3_1.sym} 50 -190 1 0 {name=C2 model=cap_mim_m3_1 W=1 L=1 MF=100 spiceprefix=X}
+C {devices/lab_pin.sym} -160 -410 0 0 {name=l1 sig_type=std_logic lab=vdda}
+C {devices/lab_pin.sym} -160 -380 0 0 {name=l2 sig_type=std_logic lab=vssa}
+C {devices/lab_pin.sym} 340 -500 0 0 {name=l3 sig_type=std_logic lab=vdda}
+C {devices/lab_pin.sym} 340 0 0 0 {name=l6 sig_type=std_logic lab=vssa}
+C {devices/lab_pin.sym} 220 -330 0 0 {name=l7 sig_type=std_logic lab=vssa}
diff --git a/xschem/C4.sym b/xschem/C4.sym
index 6e000c9..1eb4b9f 100644
--- a/xschem/C4.sym
+++ b/xschem/C4.sym
@@ -1,33 +1,31 @@
-v {xschem version=3.0.0 file_version=1.2 }
+v {xschem version=3.0.0 file_version=1.2}
G {}
K {type=subcircuit
format="@name @pinlist @symname"
template="name=x1"
}
-V {}
-S {}
-E {}
+
+T {@symname} -27 -6 0 0 0.3 0.3 {}
+T {@name} 135 -42 0 0 0.2 0.2 {}
L 4 -130 -30 130 -30 {}
L 4 -130 30 130 30 {}
L 4 -130 -30 -130 30 {}
L 4 130 -30 130 30 {}
-L 4 -150 -20 -130 -20 {}
-L 4 -150 0 -130 0 {}
-L 4 -150 20 -130 20 {}
-L 4 130 0 150 0 {}
-L 7 0 -50 0 -30 {}
-L 7 0 30 0 50 {}
B 5 -152.5 -22.5 -147.5 -17.5 {name=vth dir=in }
-B 5 -2.5 -52.5 2.5 -47.5 {name=vdda dir=inout }
-B 5 -152.5 -2.5 -147.5 2.5 {name=vtl dir=in }
-B 5 -152.5 17.5 -147.5 22.5 {name=vin dir=in }
-B 5 147.5 -2.5 152.5 2.5 {name=vout dir=out }
-B 5 -2.5 47.5 2.5 52.5 {name=vss dir=inout }
-T {@symname} -27 -6 0 0 0.3 0.3 {}
-T {@name} 135 -42 0 0 0.2 0.2 {}
+L 4 -150 -20 -130 -20 {}
T {vth} -125 -24 0 0 0.2 0.2 {}
-T {vdda} 15 -24 0 1 0.2 0.2 {}
+B 5 -152.5 -2.5 -147.5 2.5 {name=vtl dir=in }
+L 4 -150 0 -130 0 {}
T {vtl} -125 -4 0 0 0.2 0.2 {}
+B 5 -152.5 17.5 -147.5 22.5 {name=vin dir=in }
+L 4 -150 20 -130 20 {}
T {vin} -125 16 0 0 0.2 0.2 {}
-T {vout} 125 -4 0 1 0.2 0.2 {}
-T {vss} 5 16 0 1 0.2 0.2 {}
+B 5 147.5 -22.5 152.5 -17.5 {name=vout dir=out }
+L 4 130 -20 150 -20 {}
+T {vout} 125 -24 0 1 0.2 0.2 {}
+B 5 147.5 -2.5 152.5 2.5 {name=vdda dir=inout }
+L 7 130 0 150 0 {}
+T {vdda} 125 -4 0 1 0.2 0.2 {}
+B 5 147.5 17.5 152.5 22.5 {name=vssa dir=inout }
+L 7 130 20 150 20 {}
+T {vssa} 125 16 0 1 0.2 0.2 {}
diff --git a/xschem/user_analog_project_wrapper.sch b/xschem/user_analog_project_wrapper.sch
index 71d7a6d..556ed8e 100644
--- a/xschem/user_analog_project_wrapper.sch
+++ b/xschem/user_analog_project_wrapper.sch
@@ -19,12 +19,18 @@
N -430 -940 -380 -940 { lab=io_analog[9]}
N -610 -990 -560 -990 { lab=io_analog[8]}
N -480 -1080 -480 -1040 { lab=io_analog[10]}
-N 290 -1080 290 -1050 {}
-N 290 -950 290 -920 {}
-N 120 -1020 140 -1020 {}
-N 120 -1000 140 -1000 {}
-N 120 -980 140 -980 {}
-N 440 -1000 480 -1000 {}
+N 120 -1020 140 -1020 {
+lab=gpio_analog[7]}
+N 120 -1000 140 -1000 {
+lab=gpio_analog[8]}
+N 120 -980 140 -980 {
+lab=io_analog[6]}
+N 440 -1020 480 -1020 {
+lab=gpio_noesd[0]}
+N 440 -1000 480 -1000 {
+lab=vdda1}
+N 440 -980 480 -980 {
+lab=vssa1}
C {devices/lab_pin.sym} -430 -540 2 0 {name=l1 lab=io_analog[1]}
C {devices/lab_pin.sym} -510 -540 0 0 {name=l2 lab=io_analog[0]}
C {devices/lab_pin.sym} -580 -380 0 0 {name=l3 lab=io_analog[4]}
@@ -71,8 +77,8 @@
C {devices/lab_pin.sym} -610 -990 0 0 {name=l21 lab=io_analog[8]}
C {devices/lab_pin.sym} -480 -1080 1 0 {name=l22 lab=io_analog[10]}
C {C4.sym} 290 -1000 0 0 {name=x5}
-C {devices/lab_pin.sym} 290 -1080 0 0 {name=l23 sig_type=std_logic lab=vdda1}
-C {devices/lab_pin.sym} 290 -920 0 0 {name=l24 sig_type=std_logic lab=vssa1
+C {devices/lab_pin.sym} 480 -1000 0 1 {name=l23 sig_type=std_logic lab=vdda1}
+C {devices/lab_pin.sym} 480 -980 0 1 {name=l24 sig_type=std_logic lab=vssa1
}
C {devices/lab_pin.sym} 120 -980 0 0 {name=l26 sig_type=std_logic lab=io_analog[6]
}
@@ -80,4 +86,4 @@
}
C {devices/lab_pin.sym} 120 -1000 0 0 {name=l25 sig_type=std_logic lab=gpio_analog[8]
}
-C {devices/lab_pin.sym} 480 -1000 2 0 {name=l28 sig_type=std_logic lab=gpio_analog[6]}
+C {devices/lab_pin.sym} 480 -1020 2 0 {name=l28 sig_type=std_logic lab=gpio_noesd[0]}