lvs and routing of new blocks
diff --git a/gds/user_analog_project_wrapper.gds b/gds/user_analog_project_wrapper.gds
index 99a7c69..135f315 100644
--- a/gds/user_analog_project_wrapper.gds
+++ b/gds/user_analog_project_wrapper.gds
Binary files differ
diff --git a/mag/analog_mux.mag b/mag/analog_mux.mag
index 19fb302..ae779f7 100644
--- a/mag/analog_mux.mag
+++ b/mag/analog_mux.mag
@@ -1,6 +1,6 @@
magic
tech sky130A
-timestamp 1636413257
+timestamp 1636416019
<< nwell >>
rect 1400 1950 2150 2700
rect 1350 -2650 2150 -2000
@@ -431,14 +431,14 @@
rect 2150 -2540 2160 -2160
rect 2340 -2540 2650 -2160
rect 2150 -2700 2650 -2540
-use analog_switch analog_switch_0
-timestamp 1636413257
-transform 1 0 500 0 1 750
-box -500 -750 2250 1100
use analog_switch analog_switch_1
timestamp 1636413257
transform 1 0 500 0 1 -1150
box -500 -750 2250 1100
+use analog_switch analog_switch_0
+timestamp 1636413257
+transform 1 0 500 0 1 750
+box -500 -750 2250 1100
<< labels >>
rlabel locali 990 -2040 1040 -1990 1 EN0
rlabel locali 1450 -2010 1490 -1980 1 ENB0
@@ -446,8 +446,6 @@
rlabel locali 1510 1910 1540 1960 1 ENB1
rlabel metal2 100 2700 600 2750 1 VGND
port 1 n
-rlabel metal2 2150 2700 2650 2750 1 VPWR
-port 2 n
rlabel metal1 -50 350 -20 750 1 VIN1
port 3 n
rlabel metal1 -50 -1550 -20 -1150 1 VIN0
@@ -467,4 +465,6 @@
port 1 n
rlabel metal2 2150 -2700 2650 -2650 1 VPWR
port 2 n
+rlabel metal2 2150 2700 2650 2750 1 VPWR
+port 2 n
<< end >>
diff --git a/mag/user_analog_project_wrapper.mag b/mag/user_analog_project_wrapper.mag
index c2f8cc4..caa3b79 100644
--- a/mag/user_analog_project_wrapper.mag
+++ b/mag/user_analog_project_wrapper.mag
@@ -1,7 +1,7 @@
magic
tech sky130A
magscale 1 2
-timestamp 1636413257
+timestamp 1636500831
<< locali >>
rect 6700 106200 7700 106500
rect 7300 106140 7700 106200
@@ -44,9 +44,25 @@
rect 419500 332800 425320 333500
rect 419500 332300 419600 332800
rect 418000 332200 419600 332300
-rect 40840 297220 41260 298040
-rect 47960 296920 48300 297740
-rect 40840 293420 41260 294240
+rect 30600 298300 41000 298400
+rect 30600 296900 30700 298300
+rect 32100 298040 41000 298300
+rect 48200 298100 50400 298200
+rect 32100 297220 41260 298040
+rect 48200 297740 48900 298100
+rect 32100 296900 41000 297220
+rect 47960 296920 48900 297740
+rect 30600 296800 41000 296900
+rect 48200 296700 48900 296920
+rect 50300 296700 50400 298100
+rect 48200 296600 50400 296700
+rect 30600 294240 41000 294600
+rect 30600 293420 41260 294240
+rect 30600 293000 41000 293420
+rect 30600 291500 32200 293000
+rect 30600 290100 30700 291500
+rect 32100 290100 32200 291500
+rect 30600 290000 32200 290100
rect 7200 108200 8800 108400
rect 2200 107600 3400 107800
rect 2200 106800 2400 107600
@@ -98,6 +114,9 @@
rect 469500 338300 470500 339300
rect 421220 334420 421780 334980
rect 418100 332300 419500 333500
+rect 30700 296900 32100 298300
+rect 48900 296700 50300 298100
+rect 30700 290100 32100 291500
rect 2400 106800 3200 107600
rect 7400 107000 8600 108200
rect 9400 107000 10600 108200
@@ -130,21 +149,55 @@
rect 10600 107000 10800 108200
rect 9200 106800 10800 107000
rect 11200 108200 12800 634000
+rect 44400 422980 45000 423000
+rect 44400 422420 44420 422980
+rect 44980 422420 45000 422980
+rect 42800 379780 43400 379800
+rect 42800 379220 42820 379780
+rect 43380 379220 43400 379780
+rect 42800 303200 43400 379220
+rect 44400 303200 45000 422420
+rect 469400 405700 470600 405800
+rect 469400 404800 469500 405700
+rect 470500 404800 470600 405700
rect 414800 341900 416400 342000
rect 414800 340700 414900 341900
rect 416300 340700 416400 341900
-rect 43660 302020 43860 302100
-rect 43960 302020 44160 302100
+rect 42800 302600 43860 303200
+rect 43660 302020 43860 302600
+rect 43960 302600 45000 303200
+rect 48800 339500 50400 339600
+rect 48800 338100 48900 339500
+rect 50300 338100 50400 339500
+rect 43960 302020 44160 302600
+rect 30600 298300 32200 298400
+rect 30600 296900 30700 298300
+rect 32100 296900 32200 298300
+rect 30600 296300 32200 296900
+rect 48800 298100 50400 338100
+rect 48800 296700 48900 298100
+rect 50300 296700 50400 298100
+rect 48800 296600 50400 296700
+rect 30600 294900 30700 296300
+rect 32100 294900 32200 296300
+rect 30600 294800 32200 294900
+rect 30600 291500 32200 291600
+rect 30600 290100 30700 291500
+rect 32100 290100 32200 291500
rect 41560 290600 42560 291140
rect 45660 290600 46660 291160
+rect 30600 253300 32200 290100
+rect 30600 251900 30700 253300
+rect 32100 251900 32200 253300
+rect 30600 251800 32200 251900
rect 41000 167600 42600 290600
rect 45600 209600 47200 290600
rect 414800 239800 416400 340700
-rect 469400 339300 470600 403000
+rect 469400 339300 470600 404800
rect 469400 338300 469500 339300
rect 470500 338300 470600 339300
rect 469400 338200 470600 338300
-rect 424400 335800 425320 336200
+rect 424200 335800 425320 336200
rect 468360 335800 471800 336200
rect 421200 334980 421800 335000
rect 421200 334420 421220 334980
@@ -162,10 +215,20 @@
rect 42400 163200 42600 167600
rect 41000 163000 42600 163200
rect 418000 151400 419600 332300
-rect 421200 275600 421800 334420
-rect 424400 331600 424800 335800
-rect 469600 335400 471800 335800
-rect 424400 330800 471800 331600
+rect 421200 269800 421800 334420
+rect 424200 331600 424800 335800
+rect 469600 335500 471800 335800
+rect 469600 334700 470900 335500
+rect 471700 334700 471800 335500
+rect 469600 334600 471800 334700
+rect 424200 331500 471800 331600
+rect 424200 330700 470900 331500
+rect 471700 330700 471800 331500
+rect 424200 330600 471800 330700
+rect 421200 269700 422200 269800
+rect 421200 268900 421300 269700
+rect 422100 268900 422200 269700
+rect 421200 268800 422200 268900
rect 418000 147200 418200 151400
rect 419400 147200 419600 151400
rect 418000 147000 419600 147200
@@ -700,9 +763,18 @@
rect 9400 205200 10600 209200
rect 7400 163200 8600 167200
rect 2400 124400 3200 125200
+rect 44420 422420 44980 422980
+rect 42820 379220 43380 379780
+rect 469500 404800 470500 405700
+rect 48900 338100 50300 339500
+rect 30700 294900 32100 296300
+rect 30700 251900 32100 253300
rect 415000 235600 416200 239800
rect 45800 205200 47000 209600
rect 41200 163200 42400 167600
+rect 470900 334700 471700 335500
+rect 470900 330700 471700 331500
+rect 421300 268900 422100 269700
rect 418200 147200 419400 151400
rect 2400 81200 3200 82000
rect 4800 38000 5600 38800
@@ -776,7 +848,14 @@
rect 583520 449718 584800 449830
rect -800 425086 480 425198
rect -800 423904 480 424016
-rect -800 422722 480 422834
+rect 600 422980 45000 423000
+rect 600 422880 44420 422980
+rect 480 422834 44420 422880
+rect -800 422722 44420 422834
+rect 480 422680 44420 422722
+rect 600 422420 44420 422680
+rect 44980 422420 45000 422980
+rect 600 422400 45000 422420
rect -800 421540 480 421652
rect -800 420358 480 420470
rect -800 419176 480 419288
@@ -785,10 +864,24 @@
rect 583520 408842 584800 408954
rect 583520 407660 584800 407772
rect 583520 406478 584800 406590
-rect 583520 405296 584800 405408
+rect 469400 405700 583400 405800
+rect 469400 404800 469500 405700
+rect 470500 405440 583400 405700
+rect 470500 405408 583520 405440
+rect 470500 405296 584800 405408
+rect 470500 405240 583520 405296
+rect 470500 404800 583400 405240
+rect 469400 404700 583400 404800
rect -800 381864 480 381976
rect -800 380682 480 380794
-rect -800 379500 480 379612
+rect 600 379780 43400 379800
+rect 600 379660 42820 379780
+rect 480 379612 42820 379660
+rect -800 379500 42820 379612
+rect 480 379460 42820 379500
+rect 600 379220 42820 379460
+rect 43380 379220 43400 379780
+rect 600 379200 43400 379220
rect -800 378318 480 378430
rect -800 377136 480 377248
rect -800 375954 480 376066
@@ -797,20 +890,52 @@
rect 583520 362420 584800 362532
rect 583520 361238 584800 361350
rect 583520 360056 584800 360168
-rect 583520 358874 584800 358986
-rect -800 338642 480 338754
+rect 577800 359020 583400 359400
+rect 577800 358986 583520 359020
+rect 577800 358874 584800 358986
+rect 577800 358820 583520 358874
+rect 577800 358400 583400 358820
+rect 600 339500 50400 339600
+rect 600 338800 48900 339500
+rect 480 338754 48900 338800
+rect -800 338642 48900 338754
+rect 480 338600 48900 338642
+rect 600 338100 48900 338600
+rect 50300 338100 50400 339500
+rect 600 338000 50400 338100
rect -800 337460 480 337572
rect -800 336278 480 336390
+rect 577800 335600 578800 358400
+rect 470800 335500 578800 335600
rect -800 335096 480 335208
+rect 470800 334700 470900 335500
+rect 471700 334700 578800 335500
+rect 470800 334600 578800 334700
rect -800 333914 480 334026
rect -800 332732 480 332844
+rect 470800 331500 578800 331600
+rect 470800 330700 470900 331500
+rect 471700 330700 578800 331500
+rect 470800 330600 578800 330700
+rect 577800 314200 578800 330600
rect 583520 319562 584800 319674
rect 583520 318380 584800 318492
rect 583520 317198 584800 317310
rect 583520 316016 584800 316128
rect 583520 314834 584800 314946
-rect 583520 313652 584800 313764
-rect -800 295420 480 295532
+rect 577800 313800 583400 314200
+rect 577800 313764 583520 313800
+rect 577800 313652 584800 313764
+rect 577800 313600 583520 313652
+rect 577800 313200 583400 313600
+rect 600 296300 32200 296400
+rect 600 295560 30700 296300
+rect 480 295532 30700 295560
+rect -800 295420 30700 295532
+rect 480 295360 30700 295420
+rect 600 294900 30700 295360
+rect 32100 294900 32200 296300
+rect 600 294800 32200 294900
rect -800 294238 480 294350
rect -800 293056 480 293168
rect -800 291874 480 291986
@@ -821,17 +946,31 @@
rect 583520 272776 584800 272888
rect 583520 271594 584800 271706
rect 583520 270412 584800 270524
-rect 583520 269230 584800 269342
-rect -800 252398 480 252510
+rect 421200 269700 583400 269800
+rect 421200 268900 421300 269700
+rect 422100 269380 583400 269700
+rect 422100 269342 583520 269380
+rect 422100 269230 584800 269342
+rect 422100 269180 583520 269230
+rect 422100 268900 583400 269180
+rect 421200 268800 583400 268900
+rect 600 253300 32200 253400
+rect 600 252560 30700 253300
+rect 480 252510 30700 252560
+rect -800 252398 30700 252510
+rect 480 252360 30700 252398
+rect 600 251900 30700 252360
+rect 32100 251900 32200 253300
+rect 600 251800 32200 251900
rect -800 251216 480 251328
rect -800 250034 480 250146
rect -800 248852 480 248964
rect -800 247670 480 247782
rect -800 246488 480 246600
-rect 396600 239800 584800 240030
-rect 396600 235600 415000 239800
+rect 408000 239800 584800 240030
+rect 408000 235600 415000 239800
rect 416200 235600 584800 239800
-rect 396600 235230 584800 235600
+rect 408000 235230 584800 235600
rect 582340 225230 584800 230030
rect -800 214888 1660 219688
rect -800 209600 52600 209688
@@ -849,10 +988,10 @@
rect 8600 163200 41200 167200
rect 42400 163200 49400 167600
rect -800 162888 49400 163200
-rect 400400 151400 584800 151630
-rect 400400 147200 418200 151400
+rect 408000 151400 584800 151630
+rect 408000 147200 418200 151400
rect 419400 147200 584800 151400
-rect 400400 146830 584800 147200
+rect 408000 146830 584800 147200
rect 582340 136830 584800 141630
rect 2200 125200 3400 125400
rect 2200 125000 2400 125200
@@ -968,18 +1107,18 @@
rect -100 0 0 704000
rect 584000 0 584100 704000
rect -100 -100 584100 0
-use myopamp_flat myopamp_flat_0 zeroToASIC_integration
-timestamp 1636387338
-transform 1 0 434519 0 1 332532
-box -9200 490 33850 17218
use analog_mux analog_mux_0
-timestamp 1636413257
+timestamp 1636416019
transform 1 0 41360 0 1 296524
box -100 -5400 6600 5500
use comparator comparator_0 comparator
timestamp 1633173780
transform 1 0 8860 0 1 105800
box -860 -2200 2900 600
+use myopamp_flat myopamp_flat_0 zeroToASIC_integration
+timestamp 1636387338
+transform 1 0 434519 0 1 332532
+box -9200 490 33850 17218
<< labels >>
flabel metal3 s 583520 269230 584800 269342 0 FreeSans 1120 0 0 0 gpio_analog[0]
port 0 nsew signal bidirectional
diff --git a/mag/user_analog_project_wrapper.spice b/mag/user_analog_project_wrapper.spice
new file mode 100644
index 0000000..a4c1d8a
--- /dev/null
+++ b/mag/user_analog_project_wrapper.spice
@@ -0,0 +1,154 @@
+* SPICE3 file created from user_analog_project_wrapper.ext - technology: sky130A
+
+.subckt user_analog_project_wrapper gpio_analog[0] gpio_analog[10] gpio_analog[11]
++ gpio_analog[12] gpio_analog[13] gpio_analog[14] gpio_analog[15] gpio_analog[16]
++ gpio_analog[17] gpio_analog[1] gpio_analog[2] gpio_analog[3] gpio_analog[4] gpio_analog[5]
++ gpio_analog[6] gpio_analog[7] gpio_analog[8] gpio_analog[9] gpio_noesd[0] gpio_noesd[10]
++ gpio_noesd[11] gpio_noesd[12] gpio_noesd[13] gpio_noesd[14] gpio_noesd[15] gpio_noesd[16]
++ gpio_noesd[17] gpio_noesd[1] gpio_noesd[2] gpio_noesd[3] gpio_noesd[4] gpio_noesd[5]
++ gpio_noesd[6] gpio_noesd[7] gpio_noesd[8] gpio_noesd[9] io_analog[0] io_analog[10]
++ io_analog[1] io_analog[2] io_analog[3] io_analog[7] io_analog[8] io_analog[9] io_analog[4]
++ io_analog[5] io_analog[6] io_clamp_high[0] io_clamp_high[1] io_clamp_high[2] io_clamp_low[0]
++ io_clamp_low[1] io_clamp_low[2] io_in[0] io_in[10] io_in[11] io_in[12] io_in[13]
++ io_in[14] io_in[15] io_in[16] io_in[17] io_in[18] io_in[19] io_in[1] io_in[20] io_in[21]
++ io_in[22] io_in[23] io_in[24] io_in[25] io_in[26] io_in[2] io_in[3] io_in[4] io_in[5]
++ io_in[6] io_in[7] io_in[8] io_in[9] io_in_3v3[0] io_in_3v3[10] io_in_3v3[11] io_in_3v3[12]
++ io_in_3v3[13] io_in_3v3[14] io_in_3v3[15] io_in_3v3[16] io_in_3v3[17] io_in_3v3[18]
++ io_in_3v3[19] io_in_3v3[1] io_in_3v3[20] io_in_3v3[21] io_in_3v3[22] io_in_3v3[23]
++ io_in_3v3[24] io_in_3v3[25] io_in_3v3[26] io_in_3v3[2] io_in_3v3[3] io_in_3v3[4]
++ io_in_3v3[5] io_in_3v3[6] io_in_3v3[7] io_in_3v3[8] io_in_3v3[9] io_oeb[0] io_oeb[10]
++ io_oeb[11] io_oeb[12] io_oeb[13] io_oeb[14] io_oeb[15] io_oeb[16] io_oeb[17] io_oeb[18]
++ io_oeb[19] io_oeb[1] io_oeb[20] io_oeb[21] io_oeb[22] io_oeb[23] io_oeb[24] io_oeb[25]
++ io_oeb[26] io_oeb[2] io_oeb[3] io_oeb[4] io_oeb[5] io_oeb[6] io_oeb[7] io_oeb[8]
++ io_oeb[9] io_out[0] io_out[10] io_out[11] io_out[12] io_out[13] io_out[14] io_out[15]
++ io_out[16] io_out[17] io_out[18] io_out[19] io_out[1] io_out[20] io_out[21] io_out[22]
++ io_out[23] io_out[24] io_out[25] io_out[26] io_out[2] io_out[3] io_out[4] io_out[5]
++ io_out[6] io_out[7] io_out[8] io_out[9] la_data_in[0] la_data_in[100] la_data_in[101]
++ la_data_in[102] la_data_in[103] la_data_in[104] la_data_in[105] la_data_in[106]
++ la_data_in[107] la_data_in[108] la_data_in[109] la_data_in[10] la_data_in[110] la_data_in[111]
++ la_data_in[112] la_data_in[113] la_data_in[114] la_data_in[115] la_data_in[116]
++ la_data_in[117] la_data_in[118] la_data_in[119] la_data_in[11] la_data_in[120] la_data_in[121]
++ la_data_in[122] la_data_in[123] la_data_in[124] la_data_in[125] la_data_in[126]
++ la_data_in[127] la_data_in[12] la_data_in[13] la_data_in[14] la_data_in[15] la_data_in[16]
++ la_data_in[17] la_data_in[18] la_data_in[19] la_data_in[1] la_data_in[20] la_data_in[21]
++ la_data_in[22] la_data_in[23] la_data_in[24] la_data_in[25] la_data_in[26] la_data_in[27]
++ la_data_in[28] la_data_in[29] la_data_in[2] la_data_in[30] la_data_in[31] la_data_in[32]
++ la_data_in[33] la_data_in[34] la_data_in[35] la_data_in[36] la_data_in[37] la_data_in[38]
++ la_data_in[39] la_data_in[3] la_data_in[40] la_data_in[41] la_data_in[42] la_data_in[43]
++ la_data_in[44] la_data_in[45] la_data_in[46] la_data_in[47] la_data_in[48] la_data_in[49]
++ la_data_in[4] la_data_in[50] la_data_in[51] la_data_in[52] la_data_in[53] la_data_in[54]
++ la_data_in[55] la_data_in[56] la_data_in[57] la_data_in[58] la_data_in[59] la_data_in[5]
++ la_data_in[60] la_data_in[61] la_data_in[62] la_data_in[63] la_data_in[64] la_data_in[65]
++ la_data_in[66] la_data_in[67] la_data_in[68] la_data_in[69] la_data_in[6] la_data_in[70]
++ la_data_in[71] la_data_in[72] la_data_in[73] la_data_in[74] la_data_in[75] la_data_in[76]
++ la_data_in[77] la_data_in[78] la_data_in[79] la_data_in[7] la_data_in[80] la_data_in[81]
++ la_data_in[82] la_data_in[83] la_data_in[84] la_data_in[85] la_data_in[86] la_data_in[87]
++ la_data_in[88] la_data_in[89] la_data_in[8] la_data_in[90] la_data_in[91] la_data_in[92]
++ la_data_in[93] la_data_in[94] la_data_in[95] la_data_in[96] la_data_in[97] la_data_in[98]
++ la_data_in[99] la_data_in[9] la_data_out[0] la_data_out[100] la_data_out[101] la_data_out[102]
++ la_data_out[103] la_data_out[104] la_data_out[105] la_data_out[106] la_data_out[107]
++ la_data_out[108] la_data_out[109] la_data_out[10] la_data_out[110] la_data_out[111]
++ la_data_out[112] la_data_out[113] la_data_out[114] la_data_out[115] la_data_out[116]
++ la_data_out[117] la_data_out[118] la_data_out[119] la_data_out[11] la_data_out[120]
++ la_data_out[121] la_data_out[122] la_data_out[123] la_data_out[124] la_data_out[125]
++ la_data_out[126] la_data_out[127] la_data_out[12] la_data_out[13] la_data_out[14]
++ la_data_out[15] la_data_out[16] la_data_out[17] la_data_out[18] la_data_out[19]
++ la_data_out[1] la_data_out[20] la_data_out[21] la_data_out[22] la_data_out[23] la_data_out[24]
++ la_data_out[25] la_data_out[26] la_data_out[27] la_data_out[28] la_data_out[29]
++ la_data_out[2] la_data_out[30] la_data_out[31] la_data_out[32] la_data_out[33] la_data_out[34]
++ la_data_out[35] la_data_out[36] la_data_out[37] la_data_out[38] la_data_out[39]
++ la_data_out[3] la_data_out[40] la_data_out[41] la_data_out[42] la_data_out[43] la_data_out[44]
++ la_data_out[45] la_data_out[46] la_data_out[47] la_data_out[48] la_data_out[49]
++ la_data_out[4] la_data_out[50] la_data_out[51] la_data_out[52] la_data_out[53] la_data_out[54]
++ la_data_out[55] la_data_out[56] la_data_out[57] la_data_out[58] la_data_out[59]
++ la_data_out[5] la_data_out[60] la_data_out[61] la_data_out[62] la_data_out[63] la_data_out[64]
++ la_data_out[65] la_data_out[66] la_data_out[67] la_data_out[68] la_data_out[69]
++ la_data_out[6] la_data_out[70] la_data_out[71] la_data_out[72] la_data_out[73] la_data_out[74]
++ la_data_out[75] la_data_out[76] la_data_out[77] la_data_out[78] la_data_out[79]
++ la_data_out[7] la_data_out[80] la_data_out[81] la_data_out[82] la_data_out[83] la_data_out[84]
++ la_data_out[85] la_data_out[86] la_data_out[87] la_data_out[88] la_data_out[89]
++ la_data_out[8] la_data_out[90] la_data_out[91] la_data_out[92] la_data_out[93] la_data_out[94]
++ la_data_out[95] la_data_out[96] la_data_out[97] la_data_out[98] la_data_out[99]
++ la_data_out[9] la_oenb[0] la_oenb[100] la_oenb[101] la_oenb[102] la_oenb[103] la_oenb[104]
++ la_oenb[105] la_oenb[106] la_oenb[107] la_oenb[108] la_oenb[109] la_oenb[10] la_oenb[110]
++ la_oenb[111] la_oenb[112] la_oenb[113] la_oenb[114] la_oenb[115] la_oenb[116] la_oenb[117]
++ la_oenb[118] la_oenb[119] la_oenb[11] la_oenb[120] la_oenb[121] la_oenb[122] la_oenb[123]
++ la_oenb[124] la_oenb[125] la_oenb[126] la_oenb[127] la_oenb[12] la_oenb[13] la_oenb[14]
++ la_oenb[15] la_oenb[16] la_oenb[17] la_oenb[18] la_oenb[19] la_oenb[1] la_oenb[20]
++ la_oenb[21] la_oenb[22] la_oenb[23] la_oenb[24] la_oenb[25] la_oenb[26] la_oenb[27]
++ la_oenb[28] la_oenb[29] la_oenb[2] la_oenb[30] la_oenb[31] la_oenb[32] la_oenb[33]
++ la_oenb[34] la_oenb[35] la_oenb[36] la_oenb[37] la_oenb[38] la_oenb[39] la_oenb[3]
++ la_oenb[40] la_oenb[41] la_oenb[42] la_oenb[43] la_oenb[44] la_oenb[45] la_oenb[46]
++ la_oenb[47] la_oenb[48] la_oenb[49] la_oenb[4] la_oenb[50] la_oenb[51] la_oenb[52]
++ la_oenb[53] la_oenb[54] la_oenb[55] la_oenb[56] la_oenb[57] la_oenb[58] la_oenb[59]
++ la_oenb[5] la_oenb[60] la_oenb[61] la_oenb[62] la_oenb[63] la_oenb[64] la_oenb[65]
++ la_oenb[66] la_oenb[67] la_oenb[68] la_oenb[69] la_oenb[6] la_oenb[70] la_oenb[71]
++ la_oenb[72] la_oenb[73] la_oenb[74] la_oenb[75] la_oenb[76] la_oenb[77] la_oenb[78]
++ la_oenb[79] la_oenb[7] la_oenb[80] la_oenb[81] la_oenb[82] la_oenb[83] la_oenb[84]
++ la_oenb[85] la_oenb[86] la_oenb[87] la_oenb[88] la_oenb[89] la_oenb[8] la_oenb[90]
++ la_oenb[91] la_oenb[92] la_oenb[93] la_oenb[94] la_oenb[95] la_oenb[96] la_oenb[97]
++ la_oenb[98] la_oenb[99] la_oenb[9] user_clock2 user_irq[0] user_irq[1] user_irq[2]
++ vccd1 vccd2 vdda1 vdda2 vssd2 vssa2 vssd1 wb_clk_i wb_rst_i wbs_ack_o wbs_adr_i[0]
++ wbs_adr_i[10] wbs_adr_i[11] wbs_adr_i[12] wbs_adr_i[13] wbs_adr_i[14] wbs_adr_i[15]
++ wbs_adr_i[16] wbs_adr_i[17] wbs_adr_i[18] wbs_adr_i[19] wbs_adr_i[1] wbs_adr_i[20]
++ wbs_adr_i[21] wbs_adr_i[22] wbs_adr_i[23] wbs_adr_i[24] wbs_adr_i[25] wbs_adr_i[26]
++ wbs_adr_i[27] wbs_adr_i[28] wbs_adr_i[29] wbs_adr_i[2] wbs_adr_i[30] wbs_adr_i[31]
++ wbs_adr_i[3] wbs_adr_i[4] wbs_adr_i[5] wbs_adr_i[6] wbs_adr_i[7] wbs_adr_i[8] wbs_adr_i[9]
++ wbs_cyc_i wbs_dat_i[0] wbs_dat_i[10] wbs_dat_i[11] wbs_dat_i[12] wbs_dat_i[13] wbs_dat_i[14]
++ wbs_dat_i[15] wbs_dat_i[16] wbs_dat_i[17] wbs_dat_i[18] wbs_dat_i[19] wbs_dat_i[1]
++ wbs_dat_i[20] wbs_dat_i[21] wbs_dat_i[22] wbs_dat_i[23] wbs_dat_i[24] wbs_dat_i[25]
++ wbs_dat_i[26] wbs_dat_i[27] wbs_dat_i[28] wbs_dat_i[29] wbs_dat_i[2] wbs_dat_i[30]
++ wbs_dat_i[31] wbs_dat_i[3] wbs_dat_i[4] wbs_dat_i[5] wbs_dat_i[6] wbs_dat_i[7] wbs_dat_i[8]
++ wbs_dat_i[9] wbs_dat_o[0] wbs_dat_o[10] wbs_dat_o[11] wbs_dat_o[12] wbs_dat_o[13]
++ wbs_dat_o[14] wbs_dat_o[15] wbs_dat_o[16] wbs_dat_o[17] wbs_dat_o[18] wbs_dat_o[19]
++ wbs_dat_o[1] wbs_dat_o[20] wbs_dat_o[21] wbs_dat_o[22] wbs_dat_o[23] wbs_dat_o[24]
++ wbs_dat_o[25] wbs_dat_o[26] wbs_dat_o[27] wbs_dat_o[28] wbs_dat_o[29] wbs_dat_o[2]
++ wbs_dat_o[30] wbs_dat_o[31] wbs_dat_o[3] wbs_dat_o[4] wbs_dat_o[5] wbs_dat_o[6]
++ wbs_dat_o[7] wbs_dat_o[8] wbs_dat_o[9] wbs_sel_i[0] wbs_sel_i[1] wbs_sel_i[2] wbs_sel_i[3]
++ wbs_stb_i wbs_we_i
+R0 io_out[25] gpio_analog[17] sky130_fd_pr__res_generic_m2 w=6e+06u l=6e+06u
+C0 myopamp_flat_0/a_3424_7369# gpio_analog[3] 4.20fF
+C1 io_in_3v3[16] gpio_analog[11] 6.69fF
+C2 vccd2 gpio_analog[11] 7.33fF
+C3 myopamp_flat_0/a_n4266_3630# myopamp_flat_0/a_n4008_3630# 13.74fF
+C4 gpio_analog[0] gpio_analog[3] 3.22fF
+C5 vccd2 vdda2 19.74fF
+C6 gpio_analog[12] vccd2 7.33fF
+C7 myopamp_flat_0/a_3424_7369# vdda1 8.96fF
+C8 myopamp_flat_0/a_21439_8488# myopamp_flat_0/a_3424_7369# 513.13fF
+C9 io_in_3v3[16] io_in_3v3[17] 6.66fF
+C10 gpio_analog[1] myopamp_flat_0/a_n4008_3630# 4.06fF
+C11 gpio_analog[11] analog_mux_0/EN1 2.87fF
+C12 vdda2 gpio_analog[11] 12.34fF
+C13 gpio_analog[12] gpio_analog[11] 4.85fF
+C14 vccd2 io_in_3v3[17] 3.45fF
+C15 gpio_analog[2] myopamp_flat_0/a_n4008_3630# 4.26fF
+C16 analog_mux_0/ENB0 gpio_analog[11] 2.43fF
+C17 io_in_3v3[17] gpio_analog[11] 9.03fF
+C18 myopamp_flat_0/a_3424_7369# myopamp_flat_0/a_n4008_3630# 13.74fF
+C19 vccd2 gpio_analog[13] 7.33fF
+C20 vdda1 gpio_analog[3] 6.05fF
+C21 io_in_3v3[16] vccd2 3.45fF
+C22 myopamp_flat_0/a_n4266_3630# vdda1 2.09fF
+C23 gpio_analog[11] gpio_analog[13] 4.85fF
+C24 vssa2 vccd2 19.74fF
+Xanalog_mux_0 vssd2 vdda2 gpio_analog[12] gpio_analog[13] gpio_analog[11] io_in_3v3[17]
++ io_in_3v3[16] analog_mux
+Xmyopamp_flat_0 gpio_analog[1] gpio_analog[2] vdda1 gpio_analog[0] gpio_analog[3]
++ vssd2 myopamp_flat
+Xcomparator_0 vssd2 vdda2 vccd2 gpio_analog[17] gpio_analog[16] gpio_analog[15] gpio_analog[14]
++ comparator
+C25 vccd2 vssd2 20.99fF
+C26 comparator_0/VOPAMP vssd2 2.89fF **FLOATING
+C27 comparator_0/VON vssd2 2.03fF **FLOATING
+C28 gpio_analog[0] vssd2 2.97fF
+C29 gpio_analog[1] vssd2 2.95fF
+C30 myopamp_flat_0/a_n4008_3630# vssd2 26.41fF **FLOATING
+C31 myopamp_flat_0/a_21439_8488# vssd2 111.08fF **FLOATING
+C32 myopamp_flat_0/a_3424_7369# vssd2 50.37fF **FLOATING
+C33 myopamp_flat_0/a_n4266_3630# vssd2 17.96fF **FLOATING
+C34 analog_mux_0/ENB0 vssd2 2.84fF
+C35 gpio_analog[11] vssd2 2.62fF
+C36 gpio_analog[13] vssd2 2.11fF
+C37 gpio_analog[12] vssd2 2.11fF
+.ends
diff --git a/netgen/user_analog_project_wrapper.spice b/netgen/user_analog_project_wrapper.spice
index 721dbb7..a4c1d8a 100644
--- a/netgen/user_analog_project_wrapper.spice
+++ b/netgen/user_analog_project_wrapper.spice
@@ -88,7 +88,7 @@
+ la_oenb[85] la_oenb[86] la_oenb[87] la_oenb[88] la_oenb[89] la_oenb[8] la_oenb[90]
+ la_oenb[91] la_oenb[92] la_oenb[93] la_oenb[94] la_oenb[95] la_oenb[96] la_oenb[97]
+ la_oenb[98] la_oenb[99] la_oenb[9] user_clock2 user_irq[0] user_irq[1] user_irq[2]
-+ vccd1 vccd2 vdda1 vdda2 vssa1 vssa2 vssd1 vssd2 wb_clk_i wb_rst_i wbs_ack_o wbs_adr_i[0]
++ vccd1 vccd2 vdda1 vdda2 vssd2 vssa2 vssd1 wb_clk_i wb_rst_i wbs_ack_o wbs_adr_i[0]
+ wbs_adr_i[10] wbs_adr_i[11] wbs_adr_i[12] wbs_adr_i[13] wbs_adr_i[14] wbs_adr_i[15]
+ wbs_adr_i[16] wbs_adr_i[17] wbs_adr_i[18] wbs_adr_i[19] wbs_adr_i[1] wbs_adr_i[20]
+ wbs_adr_i[21] wbs_adr_i[22] wbs_adr_i[23] wbs_adr_i[24] wbs_adr_i[25] wbs_adr_i[26]
@@ -107,43 +107,48 @@
+ wbs_dat_o[7] wbs_dat_o[8] wbs_dat_o[9] wbs_sel_i[0] wbs_sel_i[1] wbs_sel_i[2] wbs_sel_i[3]
+ wbs_stb_i wbs_we_i
R0 io_out[25] gpio_analog[17] sky130_fd_pr__res_generic_m2 w=6e+06u l=6e+06u
-C0 myopamp_flat_0/a_3424_7369# myopamp_flat_0/vdd 8.96fF
-C1 vccd2 vdda2 19.74fF
-C2 myopamp_flat_0/a_n4008_3630# myopamp_flat_0/in_p 4.26fF
-C3 myopamp_flat_0/out myopamp_flat_0/vdd 6.05fF
-C4 myopamp_flat_0/a_3424_7369# myopamp_flat_0/a_21439_8488# 513.13fF
-C5 myopamp_flat_0/a_n4008_3630# myopamp_flat_0/a_3424_7369# 13.74fF
-C6 analog_mux_0/VOUT analog_mux_0/EN 5.84fF
-C7 analog_mux_0/SELECT analog_mux_0/EN 6.07fF
-C8 myopamp_flat_0/a_3424_7369# myopamp_flat_0/out 4.20fF
-C9 vssa2 vccd2 19.74fF
-C10 analog_mux_0/VOUT analog_mux_0/ENB0 2.43fF
-C11 myopamp_flat_0/a_n4266_3630# myopamp_flat_0/vdd 2.09fF
-C12 analog_mux_0/VOUT analog_mux_0/VIN1 4.85fF
-C13 myopamp_flat_0/out myopamp_flat_0/bias 3.22fF
-C14 analog_mux_0/VOUT analog_mux_0/EN1 2.87fF
-C15 myopamp_flat_0/a_n4008_3630# myopamp_flat_0/in_n 4.06fF
-C16 myopamp_flat_0/a_n4008_3630# myopamp_flat_0/a_n4266_3630# 13.74fF
-C17 analog_mux_0/VOUT analog_mux_0/SELECT 3.50fF
-C18 analog_mux_0/VPWR analog_mux_0/VOUT 12.34fF
-C19 analog_mux_0/VOUT analog_mux_0/VIN0 4.85fF
-Xanalog_mux_0 vssd2 analog_mux_0/VPWR analog_mux_0/VIN1 analog_mux_0/VIN0 analog_mux_0/VOUT
-+ analog_mux_0/EN analog_mux_0/SELECT analog_mux
-Xmyopamp_flat_0 vssd2 myopamp_flat_0/bias myopamp_flat_0/vdd myopamp_flat_0/out myopamp_flat_0/in_n
-+ myopamp_flat_0/in_p myopamp_flat
+C0 myopamp_flat_0/a_3424_7369# gpio_analog[3] 4.20fF
+C1 io_in_3v3[16] gpio_analog[11] 6.69fF
+C2 vccd2 gpio_analog[11] 7.33fF
+C3 myopamp_flat_0/a_n4266_3630# myopamp_flat_0/a_n4008_3630# 13.74fF
+C4 gpio_analog[0] gpio_analog[3] 3.22fF
+C5 vccd2 vdda2 19.74fF
+C6 gpio_analog[12] vccd2 7.33fF
+C7 myopamp_flat_0/a_3424_7369# vdda1 8.96fF
+C8 myopamp_flat_0/a_21439_8488# myopamp_flat_0/a_3424_7369# 513.13fF
+C9 io_in_3v3[16] io_in_3v3[17] 6.66fF
+C10 gpio_analog[1] myopamp_flat_0/a_n4008_3630# 4.06fF
+C11 gpio_analog[11] analog_mux_0/EN1 2.87fF
+C12 vdda2 gpio_analog[11] 12.34fF
+C13 gpio_analog[12] gpio_analog[11] 4.85fF
+C14 vccd2 io_in_3v3[17] 3.45fF
+C15 gpio_analog[2] myopamp_flat_0/a_n4008_3630# 4.26fF
+C16 analog_mux_0/ENB0 gpio_analog[11] 2.43fF
+C17 io_in_3v3[17] gpio_analog[11] 9.03fF
+C18 myopamp_flat_0/a_3424_7369# myopamp_flat_0/a_n4008_3630# 13.74fF
+C19 vccd2 gpio_analog[13] 7.33fF
+C20 vdda1 gpio_analog[3] 6.05fF
+C21 io_in_3v3[16] vccd2 3.45fF
+C22 myopamp_flat_0/a_n4266_3630# vdda1 2.09fF
+C23 gpio_analog[11] gpio_analog[13] 4.85fF
+C24 vssa2 vccd2 19.74fF
+Xanalog_mux_0 vssd2 vdda2 gpio_analog[12] gpio_analog[13] gpio_analog[11] io_in_3v3[17]
++ io_in_3v3[16] analog_mux
+Xmyopamp_flat_0 gpio_analog[1] gpio_analog[2] vdda1 gpio_analog[0] gpio_analog[3]
++ vssd2 myopamp_flat
Xcomparator_0 vssd2 vdda2 vccd2 gpio_analog[17] gpio_analog[16] gpio_analog[15] gpio_analog[14]
+ comparator
-C20 vssa1 vssd2 2.35fF
-C21 vccd2 vssd2 20.99fF
-C22 comparator_0/VOPAMP vssd2 2.89fF **FLOATING
-C23 comparator_0/VON vssd2 2.03fF **FLOATING
-C24 myopamp_flat_0/bias vssd2 26.76fF
-C25 myopamp_flat_0/out vssd2 38.52fF
-C26 myopamp_flat_0/vdd vssd2 74.61fF
-C27 myopamp_flat_0/a_n4008_3630# vssd2 26.41fF **FLOATING
-C28 myopamp_flat_0/a_21439_8488# vssd2 111.08fF **FLOATING
-C29 myopamp_flat_0/a_3424_7369# vssd2 50.37fF **FLOATING
-C30 myopamp_flat_0/a_n4266_3630# vssd2 17.96fF **FLOATING
-C31 analog_mux_0/ENB0 vssd2 2.84fF
-C32 analog_mux_0/VOUT vssd2 2.00fF
+C25 vccd2 vssd2 20.99fF
+C26 comparator_0/VOPAMP vssd2 2.89fF **FLOATING
+C27 comparator_0/VON vssd2 2.03fF **FLOATING
+C28 gpio_analog[0] vssd2 2.97fF
+C29 gpio_analog[1] vssd2 2.95fF
+C30 myopamp_flat_0/a_n4008_3630# vssd2 26.41fF **FLOATING
+C31 myopamp_flat_0/a_21439_8488# vssd2 111.08fF **FLOATING
+C32 myopamp_flat_0/a_3424_7369# vssd2 50.37fF **FLOATING
+C33 myopamp_flat_0/a_n4266_3630# vssd2 17.96fF **FLOATING
+C34 analog_mux_0/ENB0 vssd2 2.84fF
+C35 gpio_analog[11] vssd2 2.62fF
+C36 gpio_analog[13] vssd2 2.11fF
+C37 gpio_analog[12] vssd2 2.11fF
.ends
diff --git a/xschem/analog_mux_lvs.spice b/xschem/analog_mux_lvs.spice
new file mode 100644
index 0000000..13c8ed0
--- /dev/null
+++ b/xschem/analog_mux_lvs.spice
@@ -0,0 +1,30 @@
+** NGSPICE file created from analog_mux.ext - technology: sky130A
+
+.subckt analog_switch VOUT VIN EN ENB VDD3v3 VGND
+X0 VIN ENB VOUT VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=7e+06u l=500000u
+X1 VOUT EN VIN VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=1e+07u l=500000u
+X2 VOUT ENB VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=7e+06u l=500000u
+.ends
+
+.subckt analog_mux VGND VPWR VIN1 VIN0 VOUT EN SELECT
+Xanalog_switch_0 VOUT VIN1 EN1 EN1 VPWR VGND analog_switch
+Xanalog_switch_1 VOUT VIN0 EN0 ENB0 VPWR VGND analog_switch
+X0 EN0 ENB0 VGND VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X1 EN1 EN VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=-0p pd=0u as=0p ps=0u w=1e+06u l=500000u
+X2 VPWR EN ENB0 VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=1e+06u l=500000u
+X3 a_980_2320# EN EN1 VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X4 VPWR EN1 EN1 VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=-0p ps=0u w=1e+06u l=500000u
+X5 EN0 ENB0 VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=1e+06u l=500000u
+X6 EN1 EN1 VGND VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X7 SELECT SELECT VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=1e+06u l=500000u
+X8 SELECT SELECT VGND VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X9 a_980_n2420# SELECT ENB0 VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X10 VPWR SELECT EN1 VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=-0p ps=0u w=1e+06u l=500000u
+X11 ENB0 SELECT VPWR VPWR sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=1e+06u l=500000u
+X12 VGND SELECT a_980_2320# VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+X13 VGND EN a_980_n2420# VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=700000u l=500000u
+.ends
+
+Xanalog_mux VGND VPWR VIN1 VIN0 VOUT EN SELECT analog_mux
+
+.end
diff --git a/xschem/analog_switch_lvs.spice b/xschem/analog_switch_lvs.spice
new file mode 100644
index 0000000..23e8d19
--- /dev/null
+++ b/xschem/analog_switch_lvs.spice
@@ -0,0 +1,8 @@
+* NGSPICE file created from analog_switch.ext - technology: sky130A
+
+.subckt analog_switch VOUT VIN EN ENB VDD3v3 VGND
+X0 VIN ENB VOUT VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=7e+06u l=500000u
+X1 VOUT EN VIN VGND sky130_fd_pr__nfet_03v3_nvt ad=0p pd=0u as=0p ps=0u w=1e+07u l=500000u
+X2 VOUT ENB VIN VDD3v3 sky130_fd_pr__pfet_g5v0d10v5 ad=0p pd=0u as=0p ps=0u w=7e+06u l=500000u
+.ends
+