lef: Fixing VNB/VPB properties in .magic.lef files.

Both the `PIN VNB` and `PIN VPB` are now marked with `DIRECTION INOUT`.
The `PIN VNB` is marked with `USE GROUND` and the `PIN VPB` is marked
with `USE POWER`.

This should fix the `.magic.lef` file usage with OpenROAD (and hopefully other
tools too).

Fixes https://github.com/google/skywater-pdk/issues/172

Signed-off-by: Tim 'mithro' Ansell <tansell@google.com>
diff --git a/cells/diode/sky130_fd_sc_ms__diode_2.magic.lef b/cells/diode/sky130_fd_sc_ms__diode_2.magic.lef
index 23c3116..e65eef4 100644
--- a/cells/diode/sky130_fd_sc_ms__diode_2.magic.lef
+++ b/cells/diode/sky130_fd_sc_ms__diode_2.magic.lef
@@ -26,24 +26,28 @@
   PIN DIODE
     ANTENNADIFFAREA  0.641700 ;
     ANTENNAGATEAREA  0.641700 ;
+    DIRECTION INPUT ;
     PORT
       LAYER li1 ;
         RECT 0.095000 0.265000 0.865000 3.065000 ;
     END
   END DIODE
   PIN VNB
+    DIRECTION INPUT ;
     PORT
       LAYER pwell ;
         RECT 0.000000 0.000000 0.960000 0.245000 ;
     END
   END VNB
   PIN VPB
+    DIRECTION INPUT ;
     PORT
       LAYER nwell ;
         RECT -0.190000 1.660000 1.150000 3.520000 ;
     END
   END VPB
   PIN VGND
+    DIRECTION INPUT ;
     USE GROUND ;
     PORT
       LAYER met1 ;
@@ -51,6 +55,7 @@
     END
   END VGND
   PIN VPWR
+    DIRECTION INPUT ;
     USE POWER ;
     PORT
       LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_2.magic.lef b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_2.magic.lef
index 806db9e..a7dbde3 100644
--- a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_2.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_2.magic.lef
@@ -24,18 +24,21 @@
   ORIGIN  0.000000  0.000000 ;
   SIZE  0.960000 BY  3.330000 ;
   PIN VNB
+    DIRECTION INPUT ;
     PORT
       LAYER pwell ;
         RECT 0.000000 0.000000 0.960000 0.245000 ;
     END
   END VNB
   PIN VPB
+    DIRECTION INPUT ;
     PORT
       LAYER nwell ;
         RECT -0.190000 1.660000 1.150000 3.520000 ;
     END
   END VPB
   PIN VGND
+    DIRECTION INPUT ;
     USE GROUND ;
     PORT
       LAYER met1 ;
@@ -43,6 +46,7 @@
     END
   END VGND
   PIN VPWR
+    DIRECTION INPUT ;
     USE POWER ;
     PORT
       LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_4.magic.lef b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_4.magic.lef
index 831a1b1..4fc71ef 100644
--- a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_4.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_4.magic.lef
@@ -24,18 +24,21 @@
   ORIGIN  0.000000  0.000000 ;
   SIZE  1.920000 BY  3.330000 ;
   PIN VNB
+    DIRECTION INPUT ;
     PORT
       LAYER pwell ;
         RECT 0.000000 0.000000 1.920000 0.245000 ;
     END
   END VNB
   PIN VPB
+    DIRECTION INPUT ;
     PORT
       LAYER nwell ;
         RECT -0.190000 1.660000 2.110000 3.520000 ;
     END
   END VPB
   PIN VGND
+    DIRECTION INPUT ;
     USE GROUND ;
     PORT
       LAYER met1 ;
@@ -43,6 +46,7 @@
     END
   END VGND
   PIN VPWR
+    DIRECTION INPUT ;
     USE POWER ;
     PORT
       LAYER met1 ;
diff --git a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_8.magic.lef b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_8.magic.lef
index 6c35549..2af700b 100644
--- a/cells/fill_diode/sky130_fd_sc_ms__fill_diode_8.magic.lef
+++ b/cells/fill_diode/sky130_fd_sc_ms__fill_diode_8.magic.lef
@@ -24,18 +24,21 @@
   ORIGIN  0.000000  0.000000 ;
   SIZE  3.840000 BY  3.330000 ;
   PIN VNB
+    DIRECTION INPUT ;
     PORT
       LAYER pwell ;
         RECT 0.000000 0.000000 3.840000 0.245000 ;
     END
   END VNB
   PIN VPB
+    DIRECTION INPUT ;
     PORT
       LAYER nwell ;
         RECT -0.190000 1.660000 4.030000 3.520000 ;
     END
   END VPB
   PIN VGND
+    DIRECTION INPUT ;
     USE GROUND ;
     PORT
       LAYER met1 ;
@@ -43,6 +46,7 @@
     END
   END VGND
   PIN VPWR
+    DIRECTION INPUT ;
     USE POWER ;
     PORT
       LAYER met1 ;
diff --git a/cells/latchupcell/sky130_fd_sc_ms__latchupcell.magic.lef b/cells/latchupcell/sky130_fd_sc_ms__latchupcell.magic.lef
index 0925448..90d988f 100644
--- a/cells/latchupcell/sky130_fd_sc_ms__latchupcell.magic.lef
+++ b/cells/latchupcell/sky130_fd_sc_ms__latchupcell.magic.lef
@@ -28,6 +28,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 -0.245000 0.480000 0.245000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.325000 1.145000 ;
     END
   END VGND
   PIN VPWR
@@ -35,6 +37,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 3.085000 0.480000 3.575000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 0.670000 3.520000 ;
     END
   END VPWR
   OBS
diff --git a/cells/tap/sky130_fd_sc_ms__tap_1.magic.lef b/cells/tap/sky130_fd_sc_ms__tap_1.magic.lef
index 9f4a363..168bbc6 100644
--- a/cells/tap/sky130_fd_sc_ms__tap_1.magic.lef
+++ b/cells/tap/sky130_fd_sc_ms__tap_1.magic.lef
@@ -39,6 +39,8 @@
     PORT
       LAYER li1 ;
         RECT 0.090000 0.265000 0.390000 1.440000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.325000 1.145000 ;
     END
     PORT
       LAYER pwell ;
@@ -51,6 +53,8 @@
     PORT
       LAYER li1 ;
         RECT 0.090000 1.890000 0.390000 3.065000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 0.670000 3.520000 ;
     END
   END VPB
   PIN VPWR
@@ -68,8 +72,6 @@
     LAYER mcon ;
       RECT 0.155000 -0.085000 0.325000 0.085000 ;
       RECT 0.155000  3.245000 0.325000 3.415000 ;
-    LAYER nwell ;
-      RECT -0.190000 1.660000 0.670000 3.520000 ;
   END
 END sky130_fd_sc_ms__tap_1
 END LIBRARY
diff --git a/cells/tap/sky130_fd_sc_ms__tap_2.magic.lef b/cells/tap/sky130_fd_sc_ms__tap_2.magic.lef
index d5174f4..85a8edc 100644
--- a/cells/tap/sky130_fd_sc_ms__tap_2.magic.lef
+++ b/cells/tap/sky130_fd_sc_ms__tap_2.magic.lef
@@ -39,6 +39,8 @@
     PORT
       LAYER li1 ;
         RECT 0.090000 0.265000 0.870000 1.440000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.805000 1.145000 ;
     END
     PORT
       LAYER pwell ;
@@ -51,6 +53,8 @@
     PORT
       LAYER li1 ;
         RECT 0.090000 1.890000 0.870000 3.065000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 1.150000 3.520000 ;
     END
   END VPB
   PIN VPWR
@@ -70,8 +74,6 @@
       RECT 0.155000  3.245000 0.325000 3.415000 ;
       RECT 0.635000 -0.085000 0.805000 0.085000 ;
       RECT 0.635000  3.245000 0.805000 3.415000 ;
-    LAYER nwell ;
-      RECT -0.190000 1.660000 1.150000 3.520000 ;
   END
 END sky130_fd_sc_ms__tap_2
 END LIBRARY
diff --git a/cells/tapmet1/sky130_fd_sc_ms__tapmet1_2.magic.lef b/cells/tapmet1/sky130_fd_sc_ms__tapmet1_2.magic.lef
index 8c263fb..6c74978 100644
--- a/cells/tapmet1/sky130_fd_sc_ms__tapmet1_2.magic.lef
+++ b/cells/tapmet1/sky130_fd_sc_ms__tapmet1_2.magic.lef
@@ -39,6 +39,8 @@
     PORT
       LAYER met1 ;
         RECT 0.080000 0.425000 0.400000 0.685000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.805000 1.145000 ;
     END
     PORT
       LAYER pwell ;
@@ -57,6 +59,8 @@
     PORT
       LAYER met1 ;
         RECT 0.560000 2.645000 0.880000 2.905000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 1.150000 3.520000 ;
     END
   END VPB
   PIN VPWR
@@ -78,8 +82,6 @@
       RECT 0.155000  3.245000 0.325000 3.415000 ;
       RECT 0.635000 -0.085000 0.805000 0.085000 ;
       RECT 0.635000  3.245000 0.805000 3.415000 ;
-    LAYER nwell ;
-      RECT -0.190000 1.660000 1.150000 3.520000 ;
   END
 END sky130_fd_sc_ms__tapmet1_2
 END LIBRARY
diff --git a/cells/tapvgnd/sky130_fd_sc_ms__tapvgnd_1.magic.lef b/cells/tapvgnd/sky130_fd_sc_ms__tapvgnd_1.magic.lef
index 5340f07..e19338e 100644
--- a/cells/tapvgnd/sky130_fd_sc_ms__tapvgnd_1.magic.lef
+++ b/cells/tapvgnd/sky130_fd_sc_ms__tapvgnd_1.magic.lef
@@ -31,6 +31,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 -0.245000 0.480000 0.245000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.325000 1.145000 ;
     END
   END VGND
   PIN VPB
@@ -39,6 +41,8 @@
     PORT
       LAYER met1 ;
         RECT 0.080000 2.645000 0.400000 2.905000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 0.670000 3.520000 ;
     END
   END VPB
   PIN VPWR
diff --git a/cells/tapvgnd2/sky130_fd_sc_ms__tapvgnd2_1.magic.lef b/cells/tapvgnd2/sky130_fd_sc_ms__tapvgnd2_1.magic.lef
index 5f954cc..6b8fdbb 100644
--- a/cells/tapvgnd2/sky130_fd_sc_ms__tapvgnd2_1.magic.lef
+++ b/cells/tapvgnd2/sky130_fd_sc_ms__tapvgnd2_1.magic.lef
@@ -31,6 +31,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 -0.245000 0.480000 0.245000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.325000 1.145000 ;
     END
   END VGND
   PIN VPB
@@ -39,6 +41,8 @@
     PORT
       LAYER met1 ;
         RECT 0.080000 2.275000 0.400000 2.535000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 0.670000 3.520000 ;
     END
   END VPB
   PIN VPWR
diff --git a/cells/tapvpwrvgnd/sky130_fd_sc_ms__tapvpwrvgnd_1.magic.lef b/cells/tapvpwrvgnd/sky130_fd_sc_ms__tapvpwrvgnd_1.magic.lef
index 3ee6be0..033e31c 100644
--- a/cells/tapvpwrvgnd/sky130_fd_sc_ms__tapvpwrvgnd_1.magic.lef
+++ b/cells/tapvpwrvgnd/sky130_fd_sc_ms__tapvpwrvgnd_1.magic.lef
@@ -31,6 +31,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 -0.245000 0.480000 0.245000 ;
+      LAYER pwell ;
+        RECT 0.155000 0.320000 0.325000 1.145000 ;
     END
   END VGND
   PIN VPWR
@@ -39,6 +41,8 @@
     PORT
       LAYER met1 ;
         RECT 0.000000 3.085000 0.480000 3.575000 ;
+      LAYER nwell ;
+        RECT -0.190000 1.660000 0.670000 3.520000 ;
     END
   END VPWR
   OBS