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

place_and_route: Adds new pin placement options #359

Merged
merged 2 commits into from
Oct 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
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def com_google_skywater_pdk():
new_git_repository,
name = workspace_name,
commit = library["commit"],
remote = "https://foss-eda-tools.googlesource.com/skywater-pdk/libs/%s.git" % library_name,
remote = "https://github.com/google/skywater-pdk-libs-%s.git" % library_name,
shallow_since = library["shallow_since"],
build_file_content = _build_file(workspace_name, library_name),
patches = library.get("patches", []),
Expand Down
9 changes: 8 additions & 1 deletion place_and_route/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ place_and_route = rule(
"core_padding_microns": attr.int(
mandatory = True,
),
"corner_avoidance": attr.string(
doc = "The distance (in microns) from each corner within which pin placement should be avoided.",
),
"create_die_shot": attr.bool(
default = False,
doc = "Exports a die shot image of the design. This requires qt support.",
Expand All @@ -111,7 +114,7 @@ place_and_route = rule(
doc = "Whether to run detailed routing on a remote executor. If the detailed routing exceeds 15 minutes flip this setting.",
),
"min_pin_distance": attr.string(
doc = "The minimum distance in microns between pins around the outside of the block.",
doc = "The minimum distance in microns, or tracks if `set_min_distance_in_tracks` is true, between pins around the outside of the block.",
),
"pin_placement_script": attr.label(
allow_single_file = [".tcl"],
Expand All @@ -128,6 +131,10 @@ place_and_route = rule(
"sdc": attr.label(
allow_single_file = True,
),
"set_min_distance_in_tracks": attr.bool(
default = False,
doc = "Change the units of `min_pin_distance` in tracks instead of microns",
),
"sink_clustering_max_diameter": attr.int(
doc = "Clock tree synthesis sink group desired diamater in microns",
),
Expand Down
4 changes: 3 additions & 1 deletion place_and_route/private/place_pins.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,12 @@ def place_pins(ctx, open_road_info):

open_road_commands = [
"source {}".format(ctx.file.pin_placement_script.path) if ctx.file.pin_placement_script else "",
"place_pins -hor_layers {hor_layers} -ver_layers {ver_layers} {min_pin_distance}".format(
"place_pins -hor_layers {hor_layers} -ver_layers {ver_layers} {min_pin_distance} {set_min_distance_in_tracks} {corner_avoidance}".format(
hor_layers = open_road_configuration.pin_horizontal_metal_layer,
ver_layers = open_road_configuration.pin_vertical_metal_layer,
min_pin_distance = "-min_distance {}".format(ctx.attr.min_pin_distance) if ctx.attr.min_pin_distance else "",
set_min_distance_in_tracks = "-min_distance_in_tracks" if ctx.attr.set_min_distance_in_tracks else "",
corner_avoidance = "-corner_avoidance {}".format(ctx.attr.corner_avoidance) if ctx.attr.corner_avoidance else "",
),
tapcell_command,
]
Expand Down
Loading