Skip to content

Commit

Permalink
Add default input driver and output load cells to the SKY130 cell lib…
Browse files Browse the repository at this point in the history
…raries

Enables better synthesis handling, especially in high-fanout contexts
  • Loading branch information
ericastor committed Jun 6, 2024
1 parent 7a6dbc1 commit bcc64d7
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dependency_support/com_google_skywater_pdk/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
]

Expand All @@ -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",
),
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
)

0 comments on commit bcc64d7

Please sign in to comment.