RTimothyEdwards / open_pdks

PDK installer for open-source EDA tools and toolchains. Distributed with setups for the SkyWater 130nm and Global Foundries 180nm open processes.
http://opencircuitdesign.com/open_pdks
Apache License 2.0
292 stars 86 forks source link

sky130_fd_io.gds and sky130_fd_io.lef not deterministic #182

Open mithro opened 3 years ago

mithro commented 3 years ago

It seems like the sky130_fd_io.gds and sky130_fd_io.lef files are not deterministic? See https://foss-eda-tools.googlesource.com/skywater-pdk/output/+/2f2e27cee9ff8d9efef4ec42ccef554706e14ae8 and builds at https://foss-eda-tools.googlesource.com/skywater-pdk/output/

RTimothyEdwards commented 3 years ago

GDS files are timestamped. Not sure what is non-deterministic about the LEF files (most likely cause is an address-based hash table enumeration).

mithro commented 3 years ago

The first issue seems to be the order of the cells in the lef file.

mithro commented 3 years ago
diff --git a/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/gds/sky130_fd_io.gds b/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/gds/sky130_fd_io.gds
index ee8f7fcd0..140985794 100644
Binary files a/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/gds/sky130_fd_io.gds and b/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/gds/sky130_fd_io.gds differ
diff --git a/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/lef/sky130_fd_io.lef b/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/lef/sky130_fd_io.lef
index 0984da7d2..3f56e18aa 100644
--- a/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/lef/sky130_fd_io.lef
+++ b/usr/local/share/pdk/sky130A/libs.ref/sky130_fd_io/lef/sky130_fd_io.lef
@@ -2,12 +2,20 @@ VERSION 5.7 ;
   NOWIREEXTENSIONATPIN ON ;
   DIVIDERCHAR "/" ;
   BUSBITCHARS "[]" ;
-MACRO sky130_fd_io__overlay_vssio_hvc
+MACRO sky130_fd_io__top_ground_hvc_wpad
   CLASS PAD ;
-  FOREIGN sky130_fd_io__overlay_vssio_hvc ;
+  FOREIGN sky130_fd_io__top_ground_hvc_wpad ;
   ORIGIN 0.000 0.000 ;
   SIZE 75.000 BY 200.000 ;
   SYMMETRY X Y R90 ;
+  PIN G_PAD
olofk commented 2 years ago

Is https://github.com/RTimothyEdwards/open_pdks/commit/4ea5904943f579b03fe1ed6be9427f2b04e9cc1a enough to cover the lef file determinism?

RTimothyEdwards commented 2 years ago

It appears so. I just did a build twice myself and got the same contents for the LEF libraries.

olofk commented 2 years ago

That's great. Do we want another data point or can we close right away?

mithro commented 2 years ago

Are the LEF files affected by the current non-determinism in the .mag files? #179