custom c4 layout
diff --git a/mag/c4_1.mag b/mag/c4_1.mag
index b218809..7ebdd00 100644
--- a/mag/c4_1.mag
+++ b/mag/c4_1.mag
@@ -1,30 +1,239 @@
magic
tech sky130B
magscale 1 2
-timestamp 1654006311
+timestamp 1654226434
+<< nwell >>
+rect 8 166 208 585
+<< nmos >>
+rect -144 400 -60 430
+rect -133 -27 -49 3
+rect 66 -27 150 3
+<< pmos >>
+rect 44 260 172 290
+<< ndiff >>
+rect -144 501 -60 513
+rect -144 442 -133 501
+rect -72 442 -60 501
+rect -144 430 -60 442
+rect -144 388 -60 400
+rect -144 329 -132 388
+rect -71 329 -60 388
+rect -144 317 -60 329
+rect -133 74 -49 86
+rect -133 15 -122 74
+rect -61 15 -49 74
+rect -133 3 -49 15
+rect 66 74 150 86
+rect 66 15 77 74
+rect 138 15 150 74
+rect 66 3 150 15
+rect -133 -39 -49 -27
+rect -133 -98 -121 -39
+rect -60 -98 -49 -39
+rect -133 -110 -49 -98
+rect 66 -39 150 -27
+rect 66 -98 78 -39
+rect 139 -98 150 -39
+rect 66 -110 150 -98
+<< pdiff >>
+rect 44 336 172 348
+rect 44 302 56 336
+rect 160 302 172 336
+rect 44 290 172 302
+rect 44 248 172 260
+rect 44 214 56 248
+rect 160 214 172 248
+rect 44 202 172 214
+<< ndiffc >>
+rect -133 442 -72 501
+rect -132 329 -71 388
+rect -122 15 -61 74
+rect 77 15 138 74
+rect -121 -98 -60 -39
+rect 78 -98 139 -39
+<< pdiffc >>
+rect 56 302 160 336
+rect 56 214 160 248
+<< psubdiff >>
+rect -145 228 -118 262
+rect -84 228 -60 262
+rect -134 -199 -107 -165
+rect -73 -199 -49 -165
+rect 66 -199 93 -165
+rect 127 -199 151 -165
+<< nsubdiff >>
+rect 56 499 162 535
+rect 56 465 92 499
+rect 126 465 162 499
+rect 56 429 162 465
+<< psubdiffcont >>
+rect -118 228 -84 262
+rect -107 -199 -73 -165
+rect 93 -199 127 -165
+<< nsubdiffcont >>
+rect 92 465 126 499
+<< poly >>
+rect -324 432 -258 448
+rect -324 398 -308 432
+rect -274 430 -258 432
+rect -274 400 -144 430
+rect -60 400 -34 430
+rect -274 398 -258 400
+rect -324 382 -258 398
+rect 210 292 276 308
+rect 210 290 226 292
+rect 18 260 44 290
+rect 172 260 226 290
+rect 210 258 226 260
+rect 260 258 276 292
+rect 210 242 276 258
+rect -124 161 -60 177
+rect -124 127 -108 161
+rect -74 153 -60 161
+rect -74 127 49 153
+rect -124 119 49 127
+rect -124 111 -60 119
+rect -263 5 -197 21
+rect -263 -29 -247 5
+rect -213 3 -197 5
+rect 19 3 49 119
+rect -213 -27 -133 3
+rect -49 -27 -23 3
+rect 19 -27 66 3
+rect 150 -27 176 3
+rect -213 -29 -197 -27
+rect -263 -45 -197 -29
+<< polycont >>
+rect -308 398 -274 432
+rect 226 258 260 292
+rect -108 127 -74 161
+rect -247 -29 -213 5
+<< locali >>
+rect -135 501 -71 513
+rect 76 501 142 515
+rect -324 433 -258 448
+rect -172 442 -133 501
+rect -72 499 142 501
+rect -72 465 92 499
+rect 126 465 142 499
+rect -72 442 142 465
+rect -324 397 -309 433
+rect -273 397 -258 433
+rect -324 382 -258 397
+rect -209 329 -132 388
+rect -71 329 -33 388
+rect 76 336 142 442
+rect -325 234 -255 247
+rect -209 234 -168 329
+rect 40 302 56 336
+rect 160 302 176 336
+rect 210 293 276 308
+rect -325 231 -168 234
+rect -325 197 -309 231
+rect -273 197 -168 231
+rect -134 262 -67 277
+rect -134 228 -119 262
+rect -84 228 -67 262
+rect 210 257 225 293
+rect 261 257 276 293
+rect -134 211 -67 228
+rect 40 214 56 248
+rect 160 214 176 248
+rect 210 242 276 257
+rect -325 193 -168 197
+rect -325 180 -255 193
+rect -209 177 -168 193
+rect -209 161 -60 177
+rect -209 127 -108 161
+rect -74 127 -60 161
+rect -209 111 -60 127
+rect -124 74 -60 111
+rect 77 148 138 214
+rect 211 148 277 152
+rect 77 137 277 148
+rect 77 101 226 137
+rect 262 101 277 137
+rect 77 89 277 101
+rect 77 74 177 89
+rect 211 86 277 89
+rect -263 6 -197 21
+rect -161 15 -122 74
+rect -61 15 -21 74
+rect 39 15 77 74
+rect 138 15 177 74
+rect -263 -30 -248 6
+rect -212 -30 -197 6
+rect -263 -45 -197 -30
+rect -160 -98 -121 -39
+rect -60 -98 -22 -39
+rect 39 -98 78 -39
+rect 139 -98 177 -39
+rect -123 -165 -57 -98
+rect -123 -199 -107 -165
+rect -73 -199 -57 -165
+rect -123 -216 -57 -199
+rect 77 -165 144 -98
+rect 77 -199 93 -165
+rect 127 -199 144 -165
+rect 77 -216 144 -199
+<< viali >>
+rect 92 465 126 499
+rect -309 432 -273 433
+rect -309 398 -308 432
+rect -308 398 -274 432
+rect -274 398 -273 432
+rect -309 397 -273 398
+rect -309 197 -273 231
+rect -119 228 -118 262
+rect -118 228 -84 262
+rect 225 292 261 293
+rect 225 258 226 292
+rect 226 258 260 292
+rect 260 258 261 292
+rect 225 257 261 258
+rect 226 101 262 137
+rect -248 5 -212 6
+rect -248 -29 -247 5
+rect -247 -29 -213 5
+rect -213 -29 -212 5
+rect -248 -30 -212 -29
+rect -107 -199 -73 -165
+rect 93 -199 127 -165
<< metal1 >>
-rect 235 316 301 382
-rect 164 240 204 284
-rect 50 239 204 240
-rect -52 126 -12 224
-rect 50 200 260 239
-rect 220 166 260 200
-rect 196 120 280 166
-rect -64 38 167 72
-use sky130_fd_pr__nfet_01v8_TJM8P4 M!
-timestamp 1653948865
-transform 1 0 -167 0 1 118
-box 65 -92 273 298
-use sky130_fd_pr__nfet_01v8_674BNL M2
-timestamp 1654002542
-transform 0 -1 -347 -1 0 101
-box -315 -649 133 25
-use sky130_fd_pr__pfet_01v8_DYVWKP M3
-timestamp 1653928262
-transform 0 1 156 -1 0 349
-box -109 -182 109 148
-use sky130_fd_pr__nfet_01v8_A64BNL M4
-timestamp 1653929519
-transform 1 0 71 0 1 99
-box 37 -73 235 73
+rect 80 499 138 511
+rect 80 465 92 499
+rect 126 465 138 499
+rect 80 453 138 465
+rect -15 448 51 449
+rect -325 433 51 448
+rect -325 397 -309 433
+rect -273 397 51 433
+rect -325 382 51 397
+rect -135 262 -67 277
+rect -325 231 -255 247
+rect -325 197 -309 231
+rect -273 197 -255 231
+rect -325 180 -255 197
+rect -135 228 -119 262
+rect -84 228 -67 262
+rect -260 6 -200 18
+rect -260 -30 -248 6
+rect -212 -30 -200 6
+rect -260 -33 -200 -30
+rect -260 -42 -203 -33
+rect -135 -151 -67 228
+rect -5 149 51 382
+rect 213 293 273 305
+rect 213 257 225 293
+rect 261 257 273 293
+rect 213 245 273 257
+rect -5 137 274 149
+rect -5 101 226 137
+rect 262 101 274 137
+rect -5 89 274 101
+rect -135 -165 139 -151
+rect -135 -199 -107 -165
+rect -73 -199 93 -165
+rect 127 -199 139 -165
+rect -135 -212 139 -199
<< end >>
diff --git a/mag/user_analog_project_wrapper.mag b/mag/user_analog_project_wrapper.mag
index 31f79f8..99610f0 100644
--- a/mag/user_analog_project_wrapper.mag
+++ b/mag/user_analog_project_wrapper.mag
@@ -1,7 +1,9 @@
magic
tech sky130B
magscale 1 2
-timestamp 1654184506
+timestamp 1654229515
+<< locali >>
+rect 256417 656497 256484 656565
<< metal1 >>
rect 561180 686400 561428 686442
rect 561180 686254 561216 686400
@@ -54,34 +56,32 @@
rect 51839 657502 51858 657600
rect 51982 657502 52002 657600
rect 51839 657487 52002 657502
-rect 227322 657034 256194 657078
+rect 255089 657078 256344 657079
+rect 227322 657034 256344 657078
rect 227322 581322 227510 657034
-rect 255950 656990 256022 656998
-rect 255950 656938 255958 656990
-rect 256014 656938 256022 656990
-rect 255950 656930 256022 656938
-rect 255966 656570 256006 656930
-rect 256154 656784 256194 657034
-rect 256441 656788 256513 656796
-rect 256441 656736 256449 656788
-rect 256505 656736 256513 656788
-rect 256441 656728 256513 656736
-rect 256677 656659 256750 656668
-rect 256677 656652 256685 656659
-rect 256373 656613 256685 656652
-rect 256677 656607 256685 656613
-rect 256741 656607 256750 656659
-rect 256677 656599 256750 656607
-rect 255826 656537 255903 656548
-rect 255826 656484 255839 656537
-rect 255895 656484 255903 656537
-rect 255826 656473 255903 656484
-rect 256854 656438 257128 656450
-rect 256854 656410 256870 656438
-rect 256116 656378 256870 656410
-rect 256854 656374 256870 656378
-rect 257106 656374 257128 656438
-rect 256854 656366 257128 656374
+rect 255089 657032 256344 657034
+rect 255645 656975 255726 656988
+rect 255645 656923 255660 656975
+rect 255712 656923 255726 656975
+rect 255645 656659 255726 656923
+rect 256286 656865 256344 657032
+rect 256416 656714 256482 656720
+rect 256416 656662 256424 656714
+rect 256476 656662 256482 656714
+rect 255645 656591 255951 656659
+rect 256416 656654 256482 656662
+rect 256417 656557 256484 656565
+rect 256417 656505 256424 656557
+rect 256476 656505 256484 656557
+rect 256417 656497 256484 656505
+rect 255943 656427 256009 656433
+rect 255943 656373 255950 656427
+rect 256002 656373 256009 656427
+rect 255943 656367 256009 656373
+rect 256221 656257 257128 656261
+rect 256221 656205 256860 656257
+rect 257122 656205 257128 656257
+rect 256221 656200 257128 656205
rect 227322 581188 227336 581322
rect 227494 581188 227510 581322
rect 227322 581174 227510 581188
@@ -94,11 +94,11 @@
rect 43042 663434 43190 663602
rect 56256 663434 56376 663594
rect 51858 657502 51982 657600
-rect 255958 656938 256014 656990
-rect 256449 656736 256505 656788
-rect 256685 656607 256741 656659
-rect 255839 656484 255895 656537
-rect 256870 656374 257106 656438
+rect 255660 656923 255712 656975
+rect 256424 656662 256476 656714
+rect 256424 656505 256476 656557
+rect 255950 656373 256002 656427
+rect 256860 656205 257122 656257
rect 227336 581188 227494 581322
<< metal2 >>
rect 512622 703358 513362 703376
@@ -207,34 +207,39 @@
rect 51838 657502 51856 657602
rect 51982 657502 52004 657602
rect 51838 657486 52004 657502
-rect 255950 656990 256024 680942
-rect 255950 656938 255958 656990
-rect 256014 656938 256024 656990
-rect 255950 656930 256024 656938
-rect 213547 656788 256515 656796
-rect 213547 656736 256449 656788
-rect 256505 656736 256515 656788
-rect 213547 656728 256515 656736
-rect 213547 656727 255447 656728
+rect 255950 657257 256024 680942
+rect 255646 657177 256025 657257
+rect 255646 656988 255725 657177
+rect 255645 656975 255726 656988
+rect 255645 656923 255660 656975
+rect 255712 656923 255726 656975
+rect 255645 656909 255726 656923
+rect 213547 656795 255948 656796
+rect 213547 656727 256482 656795
rect 213547 656306 213617 656727
-rect 256677 656659 256750 656668
-rect 256677 656639 256685 656659
-rect 256676 656607 256685 656639
-rect 256741 656639 256750 656659
-rect 256741 656607 256752 656639
-rect 213901 656537 255903 656548
-rect 213901 656484 255839 656537
-rect 255895 656484 255903 656537
-rect 213901 656473 255903 656484
+rect 256416 656714 256482 656727
+rect 256416 656662 256424 656714
+rect 256476 656662 256482 656714
+rect 256416 656654 256482 656662
+rect 256417 656557 256752 656566
+rect 213901 656473 255198 656548
+rect 256417 656505 256424 656557
+rect 256476 656505 256752 656557
+rect 256417 656497 256752 656505
rect 213901 656327 213984 656473
+rect 255134 656434 255198 656473
+rect 255134 656427 256009 656434
+rect 255134 656373 255950 656427
+rect 256002 656373 256009 656427
+rect 255134 656366 256009 656373
rect 4346 511652 4478 511670
rect 213548 511652 213616 656306
rect 340 511642 213616 511652
rect 480 511530 213616 511642
rect 340 511508 213616 511530
rect 213902 468414 213982 656327
-rect 256676 583670 256752 656607
-rect 256854 656438 257128 681536
+rect 256676 583670 256752 656497
+rect 256854 656257 257128 681536
rect 562127 681532 562489 685199
rect 582202 681532 583046 681536
rect 562127 681526 583046 681532
@@ -242,9 +247,9 @@
rect 583036 681176 583046 681526
rect 562127 681170 583046 681176
rect 582202 681166 583046 681170
-rect 256854 656374 256870 656438
-rect 257106 656374 257128 656438
-rect 256854 656354 257128 656374
+rect 256854 656205 256860 656257
+rect 257122 656205 257128 656257
+rect 256854 656200 257128 656205
rect 256676 583660 583636 583670
rect 256676 583576 583534 583660
rect 256676 583566 583636 583576
@@ -1073,9 +1078,9 @@
transform 1 0 52313 0 1 660624
box -2563 -40 1390 600
use c4_1 c4_1_1
-timestamp 1654184506
+timestamp 1654226434
transform 1 0 256206 0 1 656412
-box -372 -32 306 458
+box -325 -216 277 585
<< labels >>
flabel metal3 s 582300 677984 584800 682984 0 FreeSans 1120 0 0 0 io_analog[0]
port 36 nsew signal bidirectional