Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds improve_placement and balance_rows control at the PDK level #371

Merged
merged 2 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions pdk/open_road_configuration.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ OpenRoadPdkInfo = provider(
"density_fill_config": "optional path to file with metal fill configuration",
"detailed_routing_configuration": "optional detailed routing configuration",
"do_not_use_cell_list": "Do not use cells in timing repair. This supports wild card * cell names",
"enable_balance_row_usage": "Enable/Disable balance row usage pass.",
"enable_improve_placement": "Enable/Disable improve_placement pass.",
"endcap_cell": "The endcap cell to use in place and route",
"fill_cells": "Metal fill cells",
"global_placement_cell_pad": "Global placement cell padding to aide in routing",
Expand Down Expand Up @@ -86,6 +88,8 @@ def _open_road_pdk_configuration_impl(ctx):
detailed_routing_configuration = ctx.attr.detailed_routing_configuration,
density_fill_config = ctx.attr.density_fill_config,
klayout_tech_file = ctx.attr.klayout_tech_file,
enable_improve_placement = ctx.attr.enable_improve_placement,
enable_balance_row_usage = ctx.attr.enable_balance_row_usage,
),
]

Expand Down Expand Up @@ -117,6 +121,14 @@ open_road_pdk_configuration = rule(
mandatory = True,
doc = "This value can be an empty list if all cells should be used in P&R",
),
"enable_balance_row_usage": attr.bool(
default = False,
doc = "Enable/Disable balance row usage pass.",
),
"enable_improve_placement": attr.bool(
default = True,
doc = "Enable/Disable improve_placement pass.",
),
"endcap_cell": attr.string(
),
"fill_cells": attr.string_list(
Expand Down
6 changes: 5 additions & 1 deletion place_and_route/private/resize.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

"""Resize openROAD commands"""

load("//pdk:open_road_configuration.bzl", "get_open_road_configuration")
load("//place_and_route:open_road.bzl", "OpenRoadInfo", "merge_open_road_info", "openroad_command", "placement_padding_commands")
load("//synthesis:defs.bzl", "SynthesisInfo")

def resize(ctx, open_road_info):
"""Performs resizing operation of the standard cells.
Expand All @@ -28,12 +30,14 @@ def resize(ctx, open_road_info):

"""
placement_padding_struct = placement_padding_commands(ctx)
open_road_configuration = get_open_road_configuration(ctx.attr.synthesized_rtl[SynthesisInfo])

inputs = placement_padding_struct.inputs

open_road_commands = placement_padding_struct.commands + [
"balance_row_usage" if open_road_configuration.enable_balance_row_usage else "",
"detailed_placement",
"improve_placement" if ctx.attr.enable_improve_placement else "",
"improve_placement" if ctx.attr.enable_improve_placement and open_road_configuration.enable_improve_placement else "",
"optimize_mirroring",
"check_placement -verbose",
"report_checks -path_delay min_max -format full_clock_expanded -fields {input_pin slew capacitance} -digits 3",
Expand Down