Revised the code that generates MiM caps in the PDK Tcl scripts,
because the DRC rules specifically prevent cap2m overlapping via3; so
to make an actual stacked capacitor, the contacts for the lower cap
cannot be directly under the first. So the options have been enhanced
to allow the contact to the MiM caps to only partially cover the
capacitor plate area. Also decreased the spacing from cap plate to
contact to the minimum required, and added code to increase that
distance as necessary to enforce the minimum metal spacing rule on
the capacitor top. Also updated the extraction rule for the
diffusion resistor types to match the added subcircuit definitions
for both.
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech
index afd368b..8c68327 100644
--- a/sky130/magic/sky130.tech
+++ b/sky130/magic/sky130.tech
@@ -6320,11 +6320,13 @@
*pdiff nwell error l=l w=w
device rsubcircuit sky130_fd_pr__res_iso_pw rpw \
pwell dnwell error l=l w=w
+ device rsubcircuit sky130_fd_pr__res_generic_nd__hv mvndiffres \
+ *mvndiff pwell,space/w error l=l w=w
+ device rsubcircuit sky130_fd_pr__res_generic_pd__hv mvpdiffres \
+ *mvpdiff nwell error l=l w=w
device resistor sky130_fd_pr__res_generic_po rmp *poly
device resistor sky130_fd_pr__res_generic_po mrp1 *poly
- device resistor sky130_fd_pr__res_generic_nd__hv mvndiffres *mvndiff
- device resistor sky130_fd_pr__res_generic_pd__hv mvpdiffres *mvpdiff
device subcircuit sky130_fd_pr__diode_pd2nw_05v5 *pdiode \
nwell a=area