From bcc64d7ec3f429b148d9cddd2f69a347330b4b43 Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Thu, 6 Jun 2024 19:04:03 +0000 Subject: [PATCH 1/2] Add default input driver and output load cells to the SKY130 cell libraries Enables better synthesis handling, especially in high-fanout contexts --- .../com_google_skywater_pdk/build_defs.bzl | 10 ++++++++++ .../com_google_skywater_pdk/declare_cell_library.bzl | 8 +++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/dependency_support/com_google_skywater_pdk/build_defs.bzl b/dependency_support/com_google_skywater_pdk/build_defs.bzl index f89f04b0..2af8db40 100644 --- a/dependency_support/com_google_skywater_pdk/build_defs.bzl +++ b/dependency_support/com_google_skywater_pdk/build_defs.bzl @@ -103,6 +103,8 @@ def _skywater_cell_library_impl(ctx): tech_lef = tech_lef, cell_lef_definitions = cell_lef_files, platform_gds = platform_gds_files, + default_input_driver_cell = ctx.attr.default_input_driver_cell, + default_output_load = ctx.attr.default_output_load, ), ] @@ -125,6 +127,14 @@ skywater_cell_library = rule( allow_single_file = True, doc = "The tech lef file for these standard cells", ), + "default_input_driver_cell": attr.string( + default = "", + doc = "Cell to assume drives primary input nets", + ), + "default_output_load": attr.string( + default = "", + doc = "Cell to assume is being driven by each primary output", + ), }, ) diff --git a/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl b/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl index 0bb6f8c7..a2a79f63 100644 --- a/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl +++ b/dependency_support/com_google_skywater_pdk/declare_cell_library.bzl @@ -19,12 +19,14 @@ load("@rules_hdl//dependency_support/com_google_skywater_pdk:build_defs.bzl", "s load("@rules_hdl//dependency_support/com_google_skywater_pdk:cells_info.bzl", "sky130_cell_normalize") load(":cell_libraries.bzl", "CELL_LIBRARIES") -def declare_cell_library(workspace_name, name): +def declare_cell_library(workspace_name, name, default_input_driver_cell = "", default_output_load = ""): """This should be called from the BUILD file of a cell library workspace. It sets up the targets for the generated files of the given library. Args: workspace_name: The name of the skywater workspace name: The name of the top level standard cell library + default_input_driver_cell: Cell to assume drives primary input nets + default_output_load: Cell to assume is being driven by each primary output """ native.filegroup( name = "spice_models", @@ -86,6 +88,8 @@ def declare_cell_library(workspace_name, name): visibility = ["//visibility:public"], openroad_configuration = library.get("open_road_configuration", None), tech_lef = "tech/{}.tlef".format(name) if library.get("library_type", None) != "ip_library" else None, + default_input_driver_cell = default_input_driver_cell, + default_output_load = default_output_load, ) # Multi-corner library @@ -115,4 +119,6 @@ def declare_cell_library(workspace_name, name): visibility = ["//visibility:public"], openroad_configuration = library.get("open_road_configuration", None), tech_lef = "tech/{}.tlef".format(name) if library.get("library_type", None) != "ip_library" else None, + default_input_driver_cell = default_input_driver_cell, + default_output_load = default_output_load, ) From e38e93328282882a1f89bdd2ef304b290b097020 Mon Sep 17 00:00:00 2001 From: Eric Astor Date: Thu, 6 Jun 2024 19:08:54 +0000 Subject: [PATCH 2/2] Fix dictionary order --- .../com_google_skywater_pdk/build_defs.bzl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/dependency_support/com_google_skywater_pdk/build_defs.bzl b/dependency_support/com_google_skywater_pdk/build_defs.bzl index 2af8db40..75e6a749 100644 --- a/dependency_support/com_google_skywater_pdk/build_defs.bzl +++ b/dependency_support/com_google_skywater_pdk/build_defs.bzl @@ -114,6 +114,14 @@ skywater_cell_library = rule( "default_corner": attr.string( mandatory = True, ), + "default_input_driver_cell": attr.string( + default = "", + doc = "Cell to assume drives primary input nets", + ), + "default_output_load": attr.string( + default = "", + doc = "Cell to assume is being driven by each primary output", + ), "openroad_configuration": attr.label( providers = [OpenRoadPdkInfo], ), @@ -127,14 +135,6 @@ skywater_cell_library = rule( allow_single_file = True, doc = "The tech lef file for these standard cells", ), - "default_input_driver_cell": attr.string( - default = "", - doc = "Cell to assume drives primary input nets", - ), - "default_output_load": attr.string( - default = "", - doc = "Cell to assume is being driven by each primary output", - ), }, )