skywater-pdk icon indicating copy to clipboard operation
skywater-pdk copied to clipboard

Modeling problems on sky130_fd_sc_hd liberty files

Open 20Mhz opened this issue 4 years ago • 9 comments

Documenting 4 issues noted on sky130_fd_sc_hd.

  1. Wrong pin used as related_groun_pin. Synopsys Library Compiler, complain: Error: Line 57389, Cell 'sky130_fd_sc_hd__dlclkp_1', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
        pin ("M0") {
            direction : "internal";
            internal_node : "M0";
            related_ground_pin : "VGND";  /* VNB is wrong*/
            related_power_pin : "VPWR";
        }
  1. Missing pg_pin on level shifter cell Synopsys Library Compiler, complain: Error: Line 82105, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
pg_pin ("VPWR") {
            pg_type : "primary_power";
            related_bias_pin : "VNB"; /* VNB pin is missing*/
            voltage_name : "VPWR";
}
  1. Missing Standard cell main rail attribute sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1 is missing std_cell_main_rail : true on pg_pin group for 'VPWR'. This is needed so implementation tools can insert legally without understanding physical view.

  2. CSS section showing up without table definition. Likely it shouldn't be on sky130_fd_sc_hd__ff_n40C_1v95.lib (may be on other opconds too) ccsn_dc table is missing:

 ccsn_first_stage () {
                    dc_current ("ccsn_dc") {

20Mhz avatar Oct 14 '20 23:10 20Mhz

FYI - The code which generates the liberty files can be found at https://github.com/google/skywater-pdk/blob/master/scripts/python-skywater-pdk/skywater_pdk/liberty.py

mithro avatar Oct 29 '20 15:10 mithro

Will need to do more investigation if this needs changes in the output generation or in the source json data.

mithro avatar Oct 29 '20 15:10 mithro

20Mhz avatar Nov 04 '20 21:11 20Mhz

As noted in #288 , the fix for 2 ( LS power pin) should actually be using the NWELL pin which is VPB, not VNB. This naming convention is awfully confusing.

20Mhz avatar Jan 05 '21 18:01 20Mhz

I encountered the same problem with issue 1 mentioned here and in #391. May I ask what is the solution for this issue?

glzhou97 avatar May 10 '23 19:05 glzhou97

I am also encountering this issue. Has anyone had success with using Synopsys tools with this PDK?

Example

I am trying to use sky130 with Design Compiler, but lc_shell can't load the "sky130_fd_sc_hd__tt_025C_1v80.lib" file.

lc_shell version T-2022.03-SP5
lc_shell
read_lib $SKYWATER_PDK/libraries/sky130_fd_sc_hd/latest/timing/sky130_fd_sc_hd__tt_025C_1v80.lib
write_lib sky130_fd_sc_hd__tt_025C_1v80 -format db -output library.db
Error: Line 57389, Cell 'sky130_fd_sc_hd__dlclkp_1', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
Error: Line 57628, Cell 'sky130_fd_sc_hd__dlclkp_2', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
Error: Line 57867, Cell 'sky130_fd_sc_hd__dlclkp_4', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
Error: Line 82105, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_1', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 82239, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_2', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 82373, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_hl_isowell_tap_4', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 82650, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_isowell_tap_1', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 82784, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_isowell_tap_2', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 82918, Cell 'sky130_fd_sc_hd__lpflow_lsbuf_lh_isowell_tap_4', pg_pin 'VPWR', An invalid attribute 'VNB' is found. (LBDB-27)
Error: Line 164125, Cell 'sky130_fd_sc_hd__sdlclkp_1', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
Error: Line 164449, Cell 'sky130_fd_sc_hd__sdlclkp_2', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)
Error: Line 164773, Cell 'sky130_fd_sc_hd__sdlclkp_4', pin 'M0', An invalid attribute 'related_ground_pin' is found. (LBDB-27)

sifferman avatar Dec 05 '23 22:12 sifferman

Yes, check the scripts below, we patched the .libs before compiling: https://github.com/20Mhz/skywater-pdk/tree/synopsys_pull/vendor/synopsys

Reach out on #vendor-synopsys or to me directly on slack if you still have issues

20Mhz avatar Dec 05 '23 22:12 20Mhz

You should be using the repository at https://github.com/efabless/skywater-pdk-libs-sky130_fd_sc_hd, which has been patched. However, while the incorrect pg_pin attributes have been fixed, it appears that the related_ground_pin errors are still in the .lib files; 84 instances throughout the .lib files (although fortunately they are restricted to the HD library). Since those are easy to detect and fix, I will do that now.

RTimothyEdwards avatar Dec 06 '23 02:12 RTimothyEdwards

This issue has now been corrected in the Efabless fork.

RTimothyEdwards avatar Dec 06 '23 02:12 RTimothyEdwards