Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 1 | ### |
| 2 | ### Source file sky130_setup.tcl |
| 3 | ### Process this file with the preproc.py processor |
| 4 | ### |
| 5 | #--------------------------------------------------------------- |
| 6 | # Setup file for netgen LVS |
| 7 | # SkyWater TECHNAME |
| 8 | #--------------------------------------------------------------- |
| 9 | permute default |
| 10 | property default |
| 11 | property parallel none |
| 12 | |
Tim Edwards | 828a78d | 2021-01-11 09:42:49 -0500 | [diff] [blame] | 13 | # Allow override of default #columns in the output format. |
| 14 | catch {format $env(NETGEN_COLUMNS)} |
| 15 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 16 | #--------------------------------------------------------------- |
| 17 | # For the following, get the cell lists from |
| 18 | # circuit1 and circuit2. |
| 19 | #--------------------------------------------------------------- |
| 20 | |
| 21 | set cells1 [cells list -all -circuit1] |
| 22 | set cells2 [cells list -all -circuit2] |
| 23 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 24 | #------------------------------------------- |
| 25 | # Resistors (except metal) |
| 26 | #------------------------------------------- |
| 27 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 28 | set devices {} |
| 29 | lappend devices sky130_fd_pr__res_iso_pw |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 30 | lappend devices sky130_fd_pr__res_high_po_0p35 |
| 31 | lappend devices sky130_fd_pr__res_high_po_0p69 |
| 32 | lappend devices sky130_fd_pr__res_high_po_1p41 |
| 33 | lappend devices sky130_fd_pr__res_high_po_2p85 |
| 34 | lappend devices sky130_fd_pr__res_high_po_5p73 |
| 35 | lappend devices sky130_fd_pr__res_high_po |
| 36 | lappend devices sky130_fd_pr__res_xhigh_po_0p35 |
| 37 | lappend devices sky130_fd_pr__res_xhigh_po_0p69 |
| 38 | lappend devices sky130_fd_pr__res_xhigh_po_1p41 |
| 39 | lappend devices sky130_fd_pr__res_xhigh_po_2p85 |
| 40 | lappend devices sky130_fd_pr__res_xhigh_po_5p73 |
| 41 | lappend devices sky130_fd_pr__res_xhigh_po |
| 42 | lappend devices sky130_fd_pr__res_generic_nd |
| 43 | lappend devices sky130_fd_pr__res_generic_pd |
Tim Edwards | 6ead3cf | 2020-12-20 12:07:20 -0500 | [diff] [blame] | 44 | lappend devices sky130_fd_pr__res_generic_nd__hv |
| 45 | lappend devices sky130_fd_pr__res_generic_pd__hv |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 46 | lappend devices mrdn_hv mrdp_hv |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 47 | |
| 48 | foreach dev $devices { |
| 49 | if {[lsearch $cells1 $dev] >= 0} { |
| 50 | permute "-circuit1 $dev" 1 2 |
| 51 | property "-circuit1 $dev" series enable |
| 52 | property "-circuit1 $dev" series {w critical} |
| 53 | property "-circuit1 $dev" series {l add} |
| 54 | property "-circuit1 $dev" parallel enable |
| 55 | property "-circuit1 $dev" parallel {l critical} |
| 56 | property "-circuit1 $dev" parallel {w add} |
| 57 | property "-circuit1 $dev" parallel {value par} |
| 58 | property "-circuit1 $dev" tolerance {l 0.01} {w 0.01} |
| 59 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 60 | property "-circuit1 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 61 | } |
| 62 | if {[lsearch $cells2 $dev] >= 0} { |
| 63 | permute "-circuit2 $dev" 1 2 |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 64 | property "-circuit2 $dev" series enable |
| 65 | property "-circuit2 $dev" series {w critical} |
| 66 | property "-circuit2 $dev" series {l add} |
| 67 | property "-circuit2 $dev" parallel enable |
| 68 | property "-circuit2 $dev" parallel {l critical} |
| 69 | property "-circuit2 $dev" parallel {w add} |
| 70 | property "-circuit2 $dev" parallel {value par} |
| 71 | property "-circuit2 $dev" tolerance {l 0.01} {w 0.01} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 72 | # Ignore these properties |
Tim Edwards | 23c9766 | 2020-08-09 11:57:32 -0400 | [diff] [blame] | 73 | property "-circuit2 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 74 | } |
| 75 | } |
| 76 | |
Tim Edwards | 13a8c5d | 2024-05-24 21:34:28 -0400 | [diff] [blame^] | 77 | #---------------------------------------------- |
| 78 | # poly resistor (changed from R type to X type) |
| 79 | #---------------------------------------------- |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 80 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 81 | set devices {} |
Tim Edwards | c686c10 | 2021-02-19 12:16:05 -0500 | [diff] [blame] | 82 | lappend devices sky130_fd_pr__res_generic_po |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 83 | |
| 84 | foreach dev $devices { |
| 85 | if {[lsearch $cells1 $dev] >= 0} { |
Tim Edwards | 13a8c5d | 2024-05-24 21:34:28 -0400 | [diff] [blame^] | 86 | permute "-circuit1 $dev" 1 2 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 87 | property "-circuit1 $dev" series enable |
| 88 | property "-circuit1 $dev" series {w critical} |
| 89 | property "-circuit1 $dev" series {l add} |
| 90 | property "-circuit1 $dev" parallel enable |
| 91 | property "-circuit1 $dev" parallel {l critical} |
| 92 | property "-circuit1 $dev" parallel {w add} |
| 93 | property "-circuit1 $dev" parallel {value par} |
| 94 | property "-circuit1 $dev" tolerance {l 0.01} {w 0.01} |
| 95 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 96 | property "-circuit1 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 97 | } |
| 98 | if {[lsearch $cells2 $dev] >= 0} { |
Tim Edwards | 13a8c5d | 2024-05-24 21:34:28 -0400 | [diff] [blame^] | 99 | permute "-circuit2 $dev" 1 2 |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 100 | property "-circuit2 $dev" series enable |
| 101 | property "-circuit2 $dev" series {w critical} |
| 102 | property "-circuit2 $dev" series {l add} |
| 103 | property "-circuit2 $dev" parallel enable |
| 104 | property "-circuit2 $dev" parallel {l critical} |
| 105 | property "-circuit2 $dev" parallel {w add} |
| 106 | property "-circuit2 $dev" parallel {value par} |
| 107 | property "-circuit2 $dev" tolerance {l 0.01} {w 0.01} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 108 | # Ignore these properties |
Tim Edwards | 23c9766 | 2020-08-09 11:57:32 -0400 | [diff] [blame] | 109 | property "-circuit2 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 110 | } |
| 111 | } |
| 112 | |
| 113 | #------------------------------------------- |
Tim Edwards | 11af192 | 2022-10-27 14:58:52 -0400 | [diff] [blame] | 114 | # MRM (metal) resistors |
| 115 | #------------------------------------------- |
| 116 | |
| 117 | set devices {} |
| 118 | lappend devices sky130_fd_pr__res_generic_l1 |
| 119 | lappend devices sky130_fd_pr__res_generic_m1 |
| 120 | lappend devices sky130_fd_pr__res_generic_m2 |
| 121 | lappend devices sky130_fd_pr__res_generic_m3 |
| 122 | #ifdef METAL5 |
| 123 | lappend devices sky130_fd_pr__res_generic_m4 |
| 124 | lappend devices sky130_fd_pr__res_generic_m5 |
| 125 | #endif (METAL5) |
| 126 | |
| 127 | foreach dev $devices { |
| 128 | if {[lsearch $cells1 $dev] >= 0} { |
| 129 | permute "-circuit1 $dev" end_a end_b |
| 130 | property "-circuit1 $dev" series enable |
| 131 | property "-circuit1 $dev" series {w critical} |
| 132 | property "-circuit1 $dev" series {l add} |
| 133 | property "-circuit1 $dev" parallel enable |
| 134 | property "-circuit1 $dev" parallel {l critical} |
| 135 | property "-circuit1 $dev" parallel {w add} |
| 136 | property "-circuit1 $dev" parallel {value par} |
| 137 | property "-circuit1 $dev" tolerance {l 10.0} {w 10.0} |
| 138 | # Ignore these properties |
| 139 | property "-circuit1 $dev" delete mult |
| 140 | } |
| 141 | if {[lsearch $cells2 $dev] >= 0} { |
| 142 | permute "-circuit2 $dev" end_a end_b |
| 143 | property "-circuit2 $dev" series enable |
| 144 | property "-circuit2 $dev" series {w critical} |
| 145 | property "-circuit2 $dev" series {l add} |
| 146 | property "-circuit2 $dev" parallel enable |
| 147 | property "-circuit2 $dev" parallel {l critical} |
| 148 | property "-circuit2 $dev" parallel {w add} |
| 149 | property "-circuit2 $dev" parallel {value par} |
| 150 | property "-circuit2 $dev" tolerance {l 10.0} {w 10.0} |
| 151 | # Ignore these properties |
| 152 | property "-circuit2 $dev" delete mult |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | #------------------------------------------- |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 157 | # (MOS) transistors |
| 158 | #------------------------------------------- |
| 159 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 160 | set devices {} |
| 161 | lappend devices sky130_fd_pr__nfet_01v8 |
| 162 | lappend devices sky130_fd_pr__nfet_01v8_lvt |
| 163 | lappend devices sky130_fd_bs_flash__special_sonosfet_star |
Tim Edwards | d53c800 | 2020-11-22 15:07:06 -0500 | [diff] [blame] | 164 | lappend devices sky130_fd_pr__nfet_g5v0d10v5 |
Tim Edwards | 5ed94ff | 2022-06-16 15:07:53 -0400 | [diff] [blame] | 165 | lappend devices sky130_fd_pr__nfet_03v3_nvt |
Tim Edwards | 5dca478 | 2020-12-21 22:51:04 -0500 | [diff] [blame] | 166 | lappend devices sky130_fd_pr__nfet_05v0_nvt |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 167 | lappend devices sky130_fd_pr__pfet_01v8 |
| 168 | lappend devices sky130_fd_pr__pfet_01v8_lvt |
| 169 | lappend devices sky130_fd_pr__pfet_01v8_mvt |
| 170 | lappend devices sky130_fd_pr__pfet_01v8_hvt |
Tim Edwards | d53c800 | 2020-11-22 15:07:06 -0500 | [diff] [blame] | 171 | lappend devices sky130_fd_pr__pfet_g5v0d10v5 |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 172 | lappend devices sky130_fd_pr__special_nfet_latch |
Tim Edwards | e53f641 | 2023-07-19 17:18:56 -0400 | [diff] [blame] | 173 | lappend devices sky130_fd_pr__special_nfet_pass |
| 174 | lappend devices sky130_fd_pr__special_pfet_latch |
Tim Edwards | 9a21159 | 2024-04-02 13:23:22 -0400 | [diff] [blame] | 175 | # special_pfet_pass retained for backwards compatibility. |
| 176 | lappend devices sky130_fd_pr__special_pfet_pass |
Tim Edwards | 5cb6c43 | 2024-02-11 13:10:06 -0500 | [diff] [blame] | 177 | lappend devices sky130_fd_pr__special_nfet_01v8 |
| 178 | lappend devices sky130_fd_pr__special_pfet_01v8_hvt |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 179 | lappend devices sky130_fd_pr__cap_var_lvt |
| 180 | lappend devices sky130_fd_pr__cap_var_hvt |
| 181 | lappend devices sky130_fd_pr__cap_var |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 182 | |
| 183 | foreach dev $devices { |
| 184 | if {[lsearch $cells1 $dev] >= 0} { |
| 185 | permute "-circuit1 $dev" 1 3 |
| 186 | property "-circuit1 $dev" parallel enable |
| 187 | property "-circuit1 $dev" parallel {l critical} |
| 188 | property "-circuit1 $dev" parallel {w add} |
| 189 | property "-circuit1 $dev" tolerance {w 0.01} {l 0.01} |
| 190 | # Ignore these properties |
Tim Edwards | b6909b8 | 2021-12-30 11:07:48 -0500 | [diff] [blame] | 191 | property "-circuit1 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 192 | } |
| 193 | if {[lsearch $cells2 $dev] >= 0} { |
| 194 | permute "-circuit2 $dev" 1 3 |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 195 | property "-circuit2 $dev" parallel enable |
| 196 | property "-circuit2 $dev" parallel {l critical} |
| 197 | property "-circuit2 $dev" parallel {w add} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 198 | property "-circuit2 $dev" tolerance {w 0.01} {l 0.01} |
| 199 | # Ignore these properties |
Tim Edwards | b6909b8 | 2021-12-30 11:07:48 -0500 | [diff] [blame] | 200 | property "-circuit2 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 201 | } |
| 202 | } |
| 203 | |
Tim Edwards | e4b4535 | 2022-01-01 11:53:31 -0500 | [diff] [blame] | 204 | #--------------------------------------------------------------------- |
Tim Edwards | 335882b | 2022-07-28 19:54:43 -0400 | [diff] [blame] | 205 | # Extended drain MOSFET devices. These have asymmetric source and |
| 206 | # drain, and so the source and drain are not permutable. |
| 207 | #--------------------------------------------------------------------- |
| 208 | |
| 209 | set devices {} |
| 210 | lappend devices sky130_fd_pr__nfet_20v0_zvt |
| 211 | lappend devices sky130_fd_pr__nfet_20v0_nvt |
| 212 | lappend devices sky130_fd_pr__nfet_20v0_iso |
| 213 | lappend devices sky130_fd_pr__nfet_20v0 |
| 214 | lappend devices sky130_fd_pr__pfet_20v0 |
| 215 | lappend devices sky130_fd_pr__nfet_g5v0d16v0 |
| 216 | lappend devices sky130_fd_pr__pfet_g5v0d16v0 |
| 217 | |
| 218 | foreach dev $devices { |
| 219 | if {[lsearch $cells1 $dev] >= 0} { |
| 220 | property "-circuit1 $dev" parallel enable |
| 221 | property "-circuit1 $dev" parallel {l critical} |
| 222 | property "-circuit1 $dev" parallel {w add} |
Tim Edwards | fb6f374 | 2022-07-29 09:55:29 -0400 | [diff] [blame] | 223 | property "-circuit1 $dev" tolerance {w 0.01} {l 0.01} |
Tim Edwards | 335882b | 2022-07-28 19:54:43 -0400 | [diff] [blame] | 224 | # Ignore these properties |
| 225 | property "-circuit1 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
| 226 | } |
| 227 | if {[lsearch $cells2 $dev] >= 0} { |
| 228 | property "-circuit2 $dev" parallel enable |
| 229 | property "-circuit2 $dev" parallel {l critical} |
| 230 | property "-circuit2 $dev" parallel {w add} |
Tim Edwards | fb6f374 | 2022-07-29 09:55:29 -0400 | [diff] [blame] | 231 | property "-circuit2 $dev" tolerance {w 0.01} {l 0.01} |
Tim Edwards | 335882b | 2022-07-28 19:54:43 -0400 | [diff] [blame] | 232 | # Ignore these properties |
| 233 | property "-circuit2 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | #--------------------------------------------------------------------- |
Tim Edwards | e4b4535 | 2022-01-01 11:53:31 -0500 | [diff] [blame] | 238 | # (MOS) ESD transistors. Note that the ESD transistors have a flanged |
| 239 | # gate. Magic disagrees slightly on how to interpret the width of the |
| 240 | # devices, so the tolerance is increased to 7% to cover the difference |
| 241 | #--------------------------------------------------------------------- |
| 242 | |
Tim Edwards | 088cb73 | 2022-07-25 10:07:27 -0400 | [diff] [blame] | 243 | set devices {} |
Tim Edwards | e4b4535 | 2022-01-01 11:53:31 -0500 | [diff] [blame] | 244 | lappend devices sky130_fd_pr__esd_nfet_g5v0d10v5 |
| 245 | lappend devices sky130_fd_pr__esd_pfet_g5v0d10v5 |
| 246 | |
| 247 | foreach dev $devices { |
| 248 | if {[lsearch $cells1 $dev] >= 0} { |
| 249 | permute "-circuit1 $dev" 1 3 |
| 250 | property "-circuit1 $dev" parallel enable |
| 251 | property "-circuit1 $dev" parallel {l critical} |
| 252 | property "-circuit1 $dev" parallel {w add} |
| 253 | property "-circuit1 $dev" tolerance {w 0.07} {l 0.01} |
| 254 | # Ignore these properties |
| 255 | property "-circuit1 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
| 256 | } |
| 257 | if {[lsearch $cells2 $dev] >= 0} { |
| 258 | permute "-circuit2 $dev" 1 3 |
| 259 | property "-circuit2 $dev" parallel enable |
| 260 | property "-circuit2 $dev" parallel {l critical} |
| 261 | property "-circuit2 $dev" parallel {w add} |
| 262 | property "-circuit2 $dev" tolerance {w 0.07} {l 0.01} |
| 263 | # Ignore these properties |
| 264 | property "-circuit2 $dev" delete as ad ps pd mult sa sb sd nf nrd nrs area perim topography |
| 265 | } |
| 266 | } |
| 267 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 268 | #------------------------------------------- |
| 269 | # diodes |
| 270 | #------------------------------------------- |
| 271 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 272 | set devices {} |
| 273 | lappend devices sky130_fd_pr__diode_pw2nd_05v5 |
| 274 | lappend devices sky130_fd_pr__diode_pw2nd_05v5_lvt |
| 275 | lappend devices sky130_fd_pr__diode_pw2nd_05v5_nvt |
| 276 | lappend devices sky130_fd_pr__diode_pd2nw_05v5 |
| 277 | lappend devices sky130_fd_pr__diode_pd2nw_05v5_lvt |
| 278 | lappend devices sky130_fd_pr__diode_pd2nw_05v5_hvt |
| 279 | lappend devices sky130_fd_pr__diode_pw2nd_11v0 |
| 280 | lappend devices sky130_fd_pr__diode_pd2nw_11v0 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 281 | |
| 282 | foreach dev $devices { |
| 283 | if {[lsearch $cells1 $dev] >= 0} { |
| 284 | property "-circuit1 $dev" parallel enable |
| 285 | property "-circuit1 $dev" parallel {area add} |
Tim Edwards | 3cd6082 | 2024-05-07 09:06:15 -0400 | [diff] [blame] | 286 | property "-circuit1 $dev" parallel {perim add} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 287 | property "-circuit1 $dev" parallel {value add} |
Tim Edwards | 3cd6082 | 2024-05-07 09:06:15 -0400 | [diff] [blame] | 288 | property "-circuit1 $dev" tolerance {area 0.02} {perim 0.02} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 289 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 290 | property "-circuit1 $dev" delete mult perim |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 291 | } |
| 292 | if {[lsearch $cells2 $dev] >= 0} { |
| 293 | property "-circuit2 $dev" parallel enable |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 294 | property "-circuit2 $dev" parallel {area add} |
Tim Edwards | 3cd6082 | 2024-05-07 09:06:15 -0400 | [diff] [blame] | 295 | property "-circuit2 $dev" parallel {perim add} |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 296 | property "-circuit2 $dev" parallel {value add} |
Tim Edwards | 3cd6082 | 2024-05-07 09:06:15 -0400 | [diff] [blame] | 297 | property "-circuit2 $dev" tolerance {area 0.02} {perim 0.02} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 298 | # Ignore these properties |
Tim Edwards | 23c9766 | 2020-08-09 11:57:32 -0400 | [diff] [blame] | 299 | property "-circuit2 $dev" delete mult perim |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 300 | } |
| 301 | } |
| 302 | |
| 303 | #------------------------------------------- |
| 304 | # capacitors |
| 305 | # MiM capacitors |
| 306 | #------------------------------------------- |
| 307 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 308 | set devices {} |
| 309 | lappend devices sky130_fd_pr__cap_mim_m3_1 |
| 310 | lappend devices sky130_fd_pr__cap_mim_m3_2 |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 311 | |
| 312 | foreach dev $devices { |
| 313 | if {[lsearch $cells1 $dev] >= 0} { |
| 314 | property "-circuit1 $dev" parallel enable |
| 315 | property "-circuit1 $dev" parallel {area add} |
| 316 | property "-circuit1 $dev" parallel {value add} |
| 317 | property "-circuit1 $dev" tolerance {l 0.01} {w 0.01} |
| 318 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 319 | property "-circuit1 $dev" delete mult perim mf |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 320 | } |
| 321 | if {[lsearch $cells2 $dev] >= 0} { |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 322 | property "-circuit2 $dev" parallel enable |
| 323 | property "-circuit2 $dev" parallel {area add} |
| 324 | property "-circuit2 $dev" parallel {value add} |
| 325 | property "-circuit2 $dev" tolerance {l 0.01} {w 0.01} |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 326 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 327 | property "-circuit2 $dev" delete mult perim mf |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 328 | } |
| 329 | } |
| 330 | |
| 331 | #------------------------------------------- |
| 332 | # Fixed-layout devices |
| 333 | # bipolar transistors, |
| 334 | # VPP capacitors |
| 335 | #------------------------------------------- |
| 336 | |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 337 | set devices {} |
| 338 | lappend devices sky130_fd_pr__npn_05v5_W1p00L1p00 |
| 339 | lappend devices sky130_fd_pr__npn_05v5_W1p00L2p00 |
Tim Edwards | 6547ee3 | 2020-11-25 17:17:01 -0500 | [diff] [blame] | 340 | lappend devices sky130_fd_pr__pnp_05v5_W0p68L0p68 |
| 341 | lappend devices sky130_fd_pr__pnp_05v5_W3p40L3p40 |
Tim Edwards | 3af1337 | 2022-11-08 15:59:23 -0500 | [diff] [blame] | 342 | lappend devices sky130_fd_pr__rf_npn_05v5_W1p00L1p00 |
| 343 | lappend devices sky130_fd_pr__rf_npn_05v5_W1p00L2p00 |
| 344 | lappend devices sky130_fd_pr__rf_pnp_05v5_W0p68L0p68 |
| 345 | lappend devices sky130_fd_pr__rf_pnp_05v5_W3p40L3p40 |
Tim Edwards | 6ead3cf | 2020-12-20 12:07:20 -0500 | [diff] [blame] | 346 | lappend devices sky130_fd_pr__npn_05v5 |
| 347 | lappend devices sky130_fd_pr__pnp_05v5 |
| 348 | lappend devices sky130_fd_pr__npn_11v0 |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 349 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 350 | #ifdef METAL5 |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 351 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_lim5_shield |
| 352 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_m3_lim5_shield |
| 353 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_m4_shield |
| 354 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_pom4_shield |
| 355 | lappend devices sky130_fd_pr__cap_vpp_4p4x4p6_m3_lim5_shield |
| 356 | lappend devices sky130_fd_pr__cap_vpp_6p8x6p1_lim4_shield |
| 357 | lappend devices sky130_fd_pr__cap_vpp_6p8x6p1_polym4_shield |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 358 | #endif (METAL5) |
Tim Edwards | d7289eb | 2020-09-10 21:48:31 -0400 | [diff] [blame] | 359 | lappend devices sky130_fd_pr__cap_vpp_8p6x7p9_m3_lim5_shield |
| 360 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_m3_li_shield |
| 361 | lappend devices sky130_fd_pr__cap_vpp_11p5x11p7_m3_shield |
| 362 | lappend devices sky130_fd_pr__cap_vpp_1p8x1p8_li_shield |
| 363 | lappend devices sky130_fd_pr__cap_vpp_1p8x1p8_m3_shield |
| 364 | lappend devices sky130_fd_pr__cap_vpp_4p4x4p6_m3_li_shield |
| 365 | lappend devices sky130_fd_pr__cap_vpp_4p4x4p6_m3_shield |
| 366 | lappend devices sky130_fd_pr__cap_vpp_8p6x7p9_m3_li_shield |
| 367 | lappend devices sky130_fd_pr__cap_vpp_8p6x7p9_m3_shield |
| 368 | #ifdef REDISTRIBUTION |
| 369 | lappend devices sky130_fd_pr__ind_04_01 |
| 370 | lappend devices sky130_fd_pr__ind_04_02 |
| 371 | #endif (REDISTRIBUTION) |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 372 | |
| 373 | foreach dev $devices { |
| 374 | if {[lsearch $cells1 $dev] >= 0} { |
| 375 | property "-circuit1 $dev" parallel enable |
| 376 | # Ignore these properties |
Tim Edwards | 2d61360 | 2020-10-02 09:03:27 -0400 | [diff] [blame] | 377 | property "-circuit1 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 378 | } |
| 379 | if {[lsearch $cells2 $dev] >= 0} { |
| 380 | property "-circuit2 $dev" parallel enable |
| 381 | # Ignore these properties |
Tim Edwards | 23c9766 | 2020-08-09 11:57:32 -0400 | [diff] [blame] | 382 | property "-circuit2 $dev" delete mult |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 383 | } |
| 384 | } |
| 385 | |
Tim Edwards | 326f640 | 2023-10-25 15:19:47 -0400 | [diff] [blame] | 386 | #ifdef RERAM |
| 387 | #--------------------------------------------------------------- |
| 388 | # ReRAM |
| 389 | #--------------------------------------------------------------- |
| 390 | |
| 391 | set devices {sky130_fd_pr_reram__reram_cell} |
| 392 | |
| 393 | foreach dev $devices { |
| 394 | if {[lsearch $cells1 $dev] >= 0} { |
| 395 | property "-circuit1 $dev" delete Tfilament_0 |
| 396 | } |
| 397 | if {[lsearch $cells2 $dev] >= 0} { |
| 398 | property "-circuit2 $dev" delete Tfilament_0 |
| 399 | } |
| 400 | } |
| 401 | #endif (RERAM) |
| 402 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 403 | #--------------------------------------------------------------- |
Tim Edwards | 5dca478 | 2020-12-21 22:51:04 -0500 | [diff] [blame] | 404 | # Schematic cells which are not extractable |
| 405 | #--------------------------------------------------------------- |
| 406 | |
Tim Edwards | 2548294 | 2020-12-24 11:01:14 -0500 | [diff] [blame] | 407 | set devices {sky130_fd_io__condiode sky130_fd_io__tap_1} |
Tim Edwards | 5dca478 | 2020-12-21 22:51:04 -0500 | [diff] [blame] | 408 | |
| 409 | foreach dev $devices { |
| 410 | if {[lsearch $cells1 $dev] >= 0} { |
| 411 | ignore class "-circuit1 $dev" |
| 412 | } |
| 413 | if {[lsearch $cells2 $dev] >= 0} { |
| 414 | ignore class "-circuit2 $dev" |
| 415 | } |
| 416 | } |
| 417 | |
| 418 | #--------------------------------------------------------------- |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 419 | # Digital cells (ignore decap, fill, and tap cells) |
| 420 | # Make a separate list for each supported library |
| 421 | #--------------------------------------------------------------- |
Tim Edwards | 320242b | 2020-10-21 10:11:37 -0400 | [diff] [blame] | 422 | # e.g., ignore class "-circuit2 sky130_fc_sc_hd__decap_3" |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 423 | #--------------------------------------------------------------- |
| 424 | |
Mitch Bailey | 44b715a | 2020-12-19 21:48:18 +0900 | [diff] [blame] | 425 | if { [info exist ::env(MAGIC_EXT_USE_GDS)] && $::env(MAGIC_EXT_USE_GDS) } { |
| 426 | foreach cell $cells1 { |
| 427 | # if {[regexp {sky130_fd_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 428 | # ignore class "-circuit1 $cell" |
| 429 | # } |
| 430 | if {[regexp {sky130_fd_sc_[^_]+__fill_[[:digit:]]+} $cell match]} { |
| 431 | ignore class "-circuit1 $cell" |
| 432 | } |
| 433 | if {[regexp {sky130_fd_sc_[^_]+__tapvpwrvgnd_[[:digit:]]+} $cell match]} { |
| 434 | ignore class "-circuit1 $cell" |
| 435 | } |
Tim Edwards | a6180a9 | 2021-06-14 12:07:33 -0400 | [diff] [blame] | 436 | if {[regexp {sky130_ef_sc_[^_]+__fakediode_[[:digit:]]+} $cell match]} { |
| 437 | ignore class "-circuit1 $cell" |
| 438 | } |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 439 | } |
Mitch Bailey | 44b715a | 2020-12-19 21:48:18 +0900 | [diff] [blame] | 440 | foreach cell $cells2 { |
| 441 | # if {[regexp {sky130_fd_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 442 | # ignore class "-circuit2 $cell" |
| 443 | # } |
| 444 | if {[regexp {sky130_fd_sc_[^_]+__fill_[[:digit:]]+} $cell match]} { |
| 445 | ignore class "-circuit2 $cell" |
| 446 | } |
| 447 | if {[regexp {sky130_fd_sc_[^_]+__tapvpwrvgnd_[[:digit:]]+} $cell match]} { |
| 448 | ignore class "-circuit2 $cell" |
| 449 | } |
Tim Edwards | a6180a9 | 2021-06-14 12:07:33 -0400 | [diff] [blame] | 450 | if {[regexp {sky130_ef_sc_[^_]+__fakediode_[[:digit:]]+} $cell match]} { |
| 451 | ignore class "-circuit2 $cell" |
| 452 | } |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 453 | } |
| 454 | } |
| 455 | |
| 456 | #--------------------------------------------------------------- |
Tim Edwards | 2e6d629 | 2021-03-01 16:03:39 -0500 | [diff] [blame] | 457 | # Allow the fill, decap, etc., cells to be parallelized |
| 458 | #--------------------------------------------------------------- |
| 459 | |
| 460 | foreach cell $cells1 { |
Anton Blanchard | 52c2f5d | 2022-03-22 04:59:11 +1100 | [diff] [blame] | 461 | if {[regexp {sky130_ef_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 462 | property "-circuit1 $cell" parallel enable |
| 463 | } |
Tim Edwards | 2e6d629 | 2021-03-01 16:03:39 -0500 | [diff] [blame] | 464 | if {[regexp {sky130_fd_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 465 | property "-circuit1 $cell" parallel enable |
| 466 | } |
| 467 | if {[regexp {sky130_fd_sc_[^_]+__fill_[[:digit:]]+} $cell match]} { |
| 468 | property "-circuit1 $cell" parallel enable |
| 469 | } |
| 470 | if {[regexp {sky130_fd_sc_[^_]+__tapvpwrvgnd_[[:digit:]]+} $cell match]} { |
| 471 | property "-circuit1 $cell" parallel enable |
| 472 | } |
| 473 | if {[regexp {sky130_fd_sc_[^_]+__diode_[[:digit:]]+} $cell match]} { |
| 474 | property "-circuit1 $cell" parallel enable |
| 475 | } |
| 476 | if {[regexp {sky130_fd_sc_[^_]+__fill_diode_[[:digit:]]+} $cell match]} { |
| 477 | property "-circuit1 $cell" parallel enable |
| 478 | } |
Ahmed Ghazy | cfd5844 | 2021-03-02 11:05:11 +0200 | [diff] [blame] | 479 | if {[regexp {sky130_ef_sc_[^_]+__fakediode_[[:digit:]]+} $cell match]} { |
| 480 | property "-circuit1 $cell" parallel enable |
| 481 | } |
Tim Edwards | 2e6d629 | 2021-03-01 16:03:39 -0500 | [diff] [blame] | 482 | } |
| 483 | foreach cell $cells2 { |
Anton Blanchard | 52c2f5d | 2022-03-22 04:59:11 +1100 | [diff] [blame] | 484 | if {[regexp {sky130_ef_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 485 | property "-circuit2 $cell" parallel enable |
| 486 | } |
Tim Edwards | 2e6d629 | 2021-03-01 16:03:39 -0500 | [diff] [blame] | 487 | if {[regexp {sky130_fd_sc_[^_]+__decap_[[:digit:]]+} $cell match]} { |
| 488 | property "-circuit2 $cell" parallel enable |
| 489 | } |
| 490 | if {[regexp {sky130_fd_sc_[^_]+__fill_[[:digit:]]+} $cell match]} { |
| 491 | property "-circuit2 $cell" parallel enable |
| 492 | } |
| 493 | if {[regexp {sky130_fd_sc_[^_]+__tapvpwrvgnd_[[:digit:]]+} $cell match]} { |
| 494 | property "-circuit2 $cell" parallel enable |
| 495 | } |
| 496 | if {[regexp {sky130_fd_sc_[^_]+__diode_[[:digit:]]+} $cell match]} { |
| 497 | property "-circuit2 $cell" parallel enable |
| 498 | } |
| 499 | if {[regexp {sky130_fd_sc_[^_]+__fill_diode_[[:digit:]]+} $cell match]} { |
| 500 | property "-circuit2 $cell" parallel enable |
| 501 | } |
Ahmed Ghazy | cfd5844 | 2021-03-02 11:05:11 +0200 | [diff] [blame] | 502 | if {[regexp {sky130_ef_sc_[^_]+__fakediode_[[:digit:]]+} $cell match]} { |
| 503 | property "-circuit2 $cell" parallel enable |
| 504 | } |
Tim Edwards | 2e6d629 | 2021-03-01 16:03:39 -0500 | [diff] [blame] | 505 | } |
| 506 | |
| 507 | #--------------------------------------------------------------- |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 508 | # Handle cells captured from Electric |
| 509 | # |
| 510 | # Find cells of the form "<library>__<cellname>" in the netlist |
| 511 | # from Electric where the extracted layout netlist has only |
| 512 | # "<cellname>". Cross-check by ensuring that the full name |
| 513 | # "<library>__<cellname>" does not exist in both cells, and that |
| 514 | # the truncated name "<cellname>" does not exist in both cells. |
| 515 | #--------------------------------------------------------------- |
| 516 | # e.g., hydra_spi_controller__hydra_spi_controller |
| 517 | #--------------------------------------------------------------- |
Ahmed Ghazy | 32982b7 | 2020-07-27 14:46:07 +0200 | [diff] [blame] | 518 | |
Tim Edwards | 55f4d0e | 2020-07-05 15:41:02 -0400 | [diff] [blame] | 519 | foreach cell $cells1 { |
| 520 | if {[regexp "(.+)__(.+)" $cell match library cellname]} { |
| 521 | if {([lsearch $cells2 $cell] < 0) && \ |
| 522 | ([lsearch $cells2 $cellname] >= 0) && \ |
| 523 | ([lsearch $cells1 $cellname] < 0)} { |
| 524 | equate classes "-circuit1 $cell" "-circuit2 $cellname" |
| 525 | puts stdout "Matching pins of $cell in circuit 1 and $cellname in circuit 2" |
| 526 | equate pins "-circuit1 $cell" "-circuit2 $cellname" |
| 527 | } |
| 528 | } |
| 529 | } |
| 530 | |
| 531 | foreach cell $cells2 { |
| 532 | if {[regexp "(.+)__(.+)" $cell match library cellname]} { |
| 533 | if {([lsearch $cells1 $cell] < 0) && \ |
| 534 | ([lsearch $cells1 $cellname] >= 0) && \ |
| 535 | ([lsearch $cells2 $cellname] < 0)} { |
| 536 | equate classes "-circuit1 $cellname" "-circuit2 $cell" |
| 537 | puts stdout "Matching pins of $cellname in circuit 1 and $cell in circuit 2" |
| 538 | equate pins "-circuit1 $cellname" "-circuit2 $cell" |
| 539 | } |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | # Match pins on black-box cells if LVS is called with "-blackbox" |
| 544 | if {[model blackbox]} { |
| 545 | foreach cell $cells1 { |
| 546 | if {[model "-circuit1 $cell"] == "blackbox"} { |
| 547 | if {[lsearch $cells2 $cell] >= 0} { |
| 548 | puts stdout "Matching pins of $cell in circuits 1 and 2" |
| 549 | equate pins "-circuit1 $cell" "-circuit2 $cell" |
| 550 | } |
| 551 | } |
| 552 | } |
| 553 | } |
| 554 | |
| 555 | #--------------------------------------------------------------- |