Skip to content

Commit

Permalink
place_and_route: Adds new pin placement options
Browse files Browse the repository at this point in the history
Adds the following place pins options from
https://openroad.readthedocs.io/en/latest/main/src/ppl/README.html#place-all-pins

* -min_distance_in_tracks
* -corner_avoidance

Signed-off-by: Ethan Mahintorabi <[email protected]>
  • Loading branch information
QuantamHD committed Oct 11, 2024
1 parent 252484f commit 246a31b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
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 @@ -111,7 +111,14 @@ 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.",
),
"corner_avoidance": attr.string(
doc = "The distance (in microns) from each corner within which pin placement should be avoided.",
),
"set_min_distance_in_tracks": attr.bool(
default = False,
doc = "Change the units of `min_pin_distance` in tracks instead of microns",
),
"pin_placement_script": attr.label(
allow_single_file = [".tcl"],
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

0 comments on commit 246a31b

Please sign in to comment.