Skip to content

Commit

Permalink
Allow manual placement script.
Browse files Browse the repository at this point in the history
  • Loading branch information
mithro committed Jan 1, 2024
1 parent f36439b commit 155cea0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion place_and_route/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ place_and_route = rule(
),
"sdc": attr.label(allow_single_file = True),
"pin_placement_script": attr.label(allow_single_file = [".tcl"], doc = "See https://openroad.readthedocs.io/en/latest/main/src/ppl/README.html for syntax"),
"manual_placement_script": attr.label(allow_single_file = [".tcl"], doc = "TCL script which performs placement of certain cells."),
"manual_placement_script": attr.label(allow_single_file = [".tcl"], doc = "TCL script which performs placement of certain cells."),
"clocks": attr.string_dict(),
"die_width_microns": attr.int(),
"die_height_microns": attr.int(),
Expand Down
7 changes: 7 additions & 0 deletions place_and_route/private/global_placement.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ def global_placement(ctx, open_road_info):
),
)

# Manual placement
if ctx.file.manual_placement_script:
inputs.append(ctx.file.manual_placement_script)
open_road_commands.append(
"source {}".format(ctx.file.manual_placement_script.path),
)

command_output = openroad_command(
ctx,
commands = open_road_commands,
Expand Down
12 changes: 7 additions & 5 deletions place_and_route/private/place_pins.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,19 @@ def place_pins(ctx, open_road_info):
),
)

# Tap cell configuration
# Tap cell configuration
if open_road_configuration.tapcell_tcl:
inputs.append(open_road_configuration.tapcell_tcl)
open_road_commands.append(
"source {}".format(open_road_configuration.tapcell_tcl.path),
)
else:
tapcell_command = "tapcell -distance {tapcell_distance} -tapcell_master {tapcell}".format(
tapcell = open_road_configuration.tap_cell,
tapcell_distance = open_road_configuration.tapcell_distance,
endcap = open_road_configuration.endcap_cell,
open_road_commands.append(
"tapcell -distance {tapcell_distance} -tapcell_master {tapcell}".format(
tapcell = open_road_configuration.tap_cell,
tapcell_distance = open_road_configuration.tapcell_distance,
endcap = open_road_configuration.endcap_cell,
),
)

command_output = openroad_command(
Expand Down

0 comments on commit 155cea0

Please sign in to comment.