Improve diode LEF files.
* Add `USE` and `SHAPE` properties.
* Remove `CORE` class.
* Fix layer for power pins.
Fixes https://github.com/google/skywater-pdk/issues/141.
Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/cells/diode/sky130_fd_sc_hs__diode_2.lef b/cells/diode/sky130_fd_sc_hs__diode_2.lef
index ab8596f..d136835 100644
--- a/cells/diode/sky130_fd_sc_hs__diode_2.lef
+++ b/cells/diode/sky130_fd_sc_hs__diode_2.lef
@@ -14,20 +14,22 @@
#
# SPDX-License-Identifier: Apache-2.0
-VERSION 5.5 ;
-NAMESCASESENSITIVE ON ;
-BUSBITCHARS "[]" ;
-DIVIDERCHAR "/" ;
+VERSION 5.7 ;
+ NOWIREEXTENSIONATPIN ON ;
+ DIVIDERCHAR "/" ;
+ BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__diode_2
CLASS CORE ANTENNACELL ;
- SOURCE USER ;
+ FOREIGN scs8hs_diode_2 ;
ORIGIN 0.000000 0.000000 ;
SIZE 0.960000 BY 3.330000 ;
SYMMETRY X Y ;
SITE unit ;
PIN DIODE
ANTENNADIFFAREA 0.641700 ;
+ ANTENNAGATEAREA 0.641700 ;
DIRECTION INPUT ;
+ USE SIGNAL ;
PORT
LAYER li1 ;
RECT 0.095000 0.265000 0.865000 3.065000 ;
@@ -35,6 +37,7 @@
END DIODE
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -45,20 +48,21 @@
DIRECTION INOUT ;
USE GROUND ;
PORT
- LAYER met1 ;
- RECT 0.000000 0.000000 0.250000 0.250000 ;
+ LAYER pwell ;
+ RECT 0.000000 0.000000 0.960000 0.245000 ;
END
END VNB
PIN VPB
DIRECTION INOUT ;
USE POWER ;
PORT
- LAYER met1 ;
- RECT 0.000000 3.080000 0.250000 3.330000 ;
+ LAYER nwell ;
+ RECT -0.190000 1.660000 1.150000 3.520000 ;
END
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/diode/sky130_fd_sc_hs__diode_2.magic.lef b/cells/diode/sky130_fd_sc_hs__diode_2.magic.lef
index f86560e..84b360f 100644
--- a/cells/diode/sky130_fd_sc_hs__diode_2.magic.lef
+++ b/cells/diode/sky130_fd_sc_hs__diode_2.magic.lef
@@ -29,6 +29,7 @@
ANTENNADIFFAREA 0.641700 ;
ANTENNAGATEAREA 0.641700 ;
DIRECTION INPUT ;
+ USE SIGNAL ;
PORT
LAYER li1 ;
RECT 0.095000 0.265000 0.865000 3.065000 ;
@@ -36,6 +37,7 @@
END DIODE
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -60,6 +62,7 @@
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.lef
index c534395..6342a0f 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.lef
@@ -14,19 +14,20 @@
#
# SPDX-License-Identifier: Apache-2.0
-VERSION 5.5 ;
-NAMESCASESENSITIVE ON ;
-BUSBITCHARS "[]" ;
-DIVIDERCHAR "/" ;
+VERSION 5.7 ;
+ NOWIREEXTENSIONATPIN ON ;
+ DIVIDERCHAR "/" ;
+ BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_2
- CLASS CORE SPACER ;
- SOURCE USER ;
+ CLASS SPACER ;
+ FOREIGN scs8hs_fill_diode_2 ;
ORIGIN 0.000000 0.000000 ;
SIZE 0.960000 BY 3.330000 ;
SYMMETRY X Y ;
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -37,20 +38,21 @@
DIRECTION INOUT ;
USE GROUND ;
PORT
- LAYER met1 ;
- RECT 0.000000 0.000000 0.250000 0.250000 ;
+ LAYER pwell ;
+ RECT 0.000000 0.000000 0.960000 0.245000 ;
END
END VNB
PIN VPB
DIRECTION INOUT ;
USE POWER ;
PORT
- LAYER met1 ;
- RECT 0.000000 3.080000 0.250000 3.330000 ;
+ LAYER nwell ;
+ RECT -0.190000 1.660000 1.150000 3.520000 ;
END
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.magic.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.magic.lef
index 745bafb..e3942da 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_2.magic.lef
@@ -19,7 +19,7 @@
DIVIDERCHAR "/" ;
BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_2
- CLASS CORE SPACER ;
+ CLASS SPACER ;
FOREIGN sky130_fd_sc_hs__fill_diode_2 ;
ORIGIN 0.000000 0.000000 ;
SIZE 0.960000 BY 3.330000 ;
@@ -27,6 +27,7 @@
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -51,6 +52,7 @@
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.lef
index 29a3430..a88155a 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.lef
@@ -14,19 +14,20 @@
#
# SPDX-License-Identifier: Apache-2.0
-VERSION 5.5 ;
-NAMESCASESENSITIVE ON ;
-BUSBITCHARS "[]" ;
-DIVIDERCHAR "/" ;
+VERSION 5.7 ;
+ NOWIREEXTENSIONATPIN ON ;
+ DIVIDERCHAR "/" ;
+ BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_4
- CLASS CORE SPACER ;
- SOURCE USER ;
+ CLASS SPACER ;
+ FOREIGN scs8hs_fill_diode_4 ;
ORIGIN 0.000000 0.000000 ;
SIZE 1.920000 BY 3.330000 ;
SYMMETRY X Y ;
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -37,20 +38,21 @@
DIRECTION INOUT ;
USE GROUND ;
PORT
- LAYER met1 ;
- RECT 0.000000 0.000000 0.250000 0.250000 ;
+ LAYER pwell ;
+ RECT 0.000000 0.000000 1.920000 0.245000 ;
END
END VNB
PIN VPB
DIRECTION INOUT ;
USE POWER ;
PORT
- LAYER met1 ;
- RECT 0.000000 3.080000 0.250000 3.330000 ;
+ LAYER nwell ;
+ RECT -0.190000 1.660000 2.110000 3.520000 ;
END
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.magic.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.magic.lef
index 66a8412..817e8c0 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_4.magic.lef
@@ -19,7 +19,7 @@
DIVIDERCHAR "/" ;
BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_4
- CLASS CORE SPACER ;
+ CLASS SPACER ;
FOREIGN sky130_fd_sc_hs__fill_diode_4 ;
ORIGIN 0.000000 0.000000 ;
SIZE 1.920000 BY 3.330000 ;
@@ -27,6 +27,7 @@
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -51,6 +52,7 @@
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.lef
index aca7bde..3aa025c 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.lef
@@ -14,19 +14,20 @@
#
# SPDX-License-Identifier: Apache-2.0
-VERSION 5.5 ;
-NAMESCASESENSITIVE ON ;
-BUSBITCHARS "[]" ;
-DIVIDERCHAR "/" ;
+VERSION 5.7 ;
+ NOWIREEXTENSIONATPIN ON ;
+ DIVIDERCHAR "/" ;
+ BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_8
- CLASS CORE SPACER ;
- SOURCE USER ;
+ CLASS SPACER ;
+ FOREIGN scs8hs_fill_diode_8 ;
ORIGIN 0.000000 0.000000 ;
SIZE 3.840000 BY 3.330000 ;
SYMMETRY X Y ;
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -37,20 +38,21 @@
DIRECTION INOUT ;
USE GROUND ;
PORT
- LAYER met1 ;
- RECT 0.000000 0.000000 0.250000 0.250000 ;
+ LAYER pwell ;
+ RECT 0.000000 0.000000 3.840000 0.245000 ;
END
END VNB
PIN VPB
DIRECTION INOUT ;
USE POWER ;
PORT
- LAYER met1 ;
- RECT 0.000000 3.080000 0.250000 3.330000 ;
+ LAYER nwell ;
+ RECT -0.190000 1.660000 4.030000 3.520000 ;
END
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.magic.lef b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.magic.lef
index 68c63f0..8069a3a 100644
--- a/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_hs__fill_diode_8.magic.lef
@@ -19,7 +19,7 @@
DIVIDERCHAR "/" ;
BUSBITCHARS "[]" ;
MACRO sky130_fd_sc_hs__fill_diode_8
- CLASS CORE SPACER ;
+ CLASS SPACER ;
FOREIGN sky130_fd_sc_hs__fill_diode_8 ;
ORIGIN 0.000000 0.000000 ;
SIZE 3.840000 BY 3.330000 ;
@@ -27,6 +27,7 @@
SITE unit ;
PIN VGND
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE GROUND ;
PORT
LAYER met1 ;
@@ -51,6 +52,7 @@
END VPB
PIN VPWR
DIRECTION INOUT ;
+ SHAPE ABUTMENT ;
USE POWER ;
PORT
LAYER met1 ;