Skip to content

Commit

Permalink
Add OpenROAD.CutRows after OpenROAD.ManualMacroPlacement (#280)
Browse files Browse the repository at this point in the history
* Created new step `OpenROAD.CutRows 
  * Placed in `Classic` Flow after `OpenROAD.ManualMacroPlacement`
* Renamed `FP_TAP_VERTICAL_HALO` to `FP_MACRO_VERTICAL_HALO`, `FP_TAP_HORIZONTAL_HALO` to `FP_MACRO_HORIZONTAL_HALO`
  * Reason for the above renames is that the halo doesn't only affect tap insertion, it also affects cut rows generated in the floorplan. This affects cell insertion and power rails and anything related to floorplan and std cell placement.
  • Loading branch information
kareefardi committed Nov 28, 2023
1 parent f876189 commit 08da726
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 6 deletions.
1 change: 1 addition & 0 deletions openlane/flows/classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ class Classic(SequentialFlow):
OpenROAD.Floorplan,
Odb.SetPowerConnections,
Odb.ManualMacroPlacement,
OpenROAD.CutRows,
OpenROAD.TapEndcapInsertion,
OpenROAD.GlobalPlacementSkipIO,
OpenROAD.IOPlacement,
Expand Down
24 changes: 24 additions & 0 deletions openlane/scripts/openroad/cut_rows.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2023 Efabless Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
source $::env(SCRIPTS_DIR)/openroad/common/io.tcl
read_current_odb

cut_rows\
-endcap_master $::env(FP_ENDCAP_CELL)\
-halo_width_x $::env(FP_MACRO_HORIZONTAL_HALO)\
-halo_width_y $::env(FP_MACRO_VERTICAL_HALO)

write_views

report_design_area_metrics
4 changes: 2 additions & 2 deletions openlane/scripts/openroad/tapcell.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ tapcell\
-distance $::env(FP_TAPCELL_DIST)\
-tapcell_master "$::env(FP_WELLTAP_CELL)"\
-endcap_master "$::env(FP_ENDCAP_CELL)"\
-halo_width_x $::env(FP_TAP_HORIZONTAL_HALO)\
-halo_width_y $::env(FP_TAP_VERTICAL_HALO)
-halo_width_x $::env(FP_MACRO_HORIZONTAL_HALO)\
-halo_width_y $::env(FP_MACRO_VERTICAL_HALO)

write_views

Expand Down
47 changes: 43 additions & 4 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -804,18 +804,20 @@ class TapEndcapInsertion(OpenROADStep):

config_vars = OpenROADStep.config_vars + [
Variable(
"FP_TAP_HORIZONTAL_HALO",
"FP_MACRO_HORIZONTAL_HALO",
Decimal,
"Specify the horizontal halo size around macros during tap insertion.",
"Specify the horizontal halo size around macros while cutting rows.",
default=10,
units="µm",
deprecated_names=["FP_TAP_HORIZONTAL_HALO"],
),
Variable(
"FP_TAP_VERTICAL_HALO",
"FP_MACRO_VERTICAL_HALO",
Decimal,
"Specify the vertical halo size around macros during tap insertion.",
"Specify the vertical halo size around macros while cutting rows.",
default=10,
units="µm",
deprecated_names=["FP_TAP_VERTICAL_HALO"],
),
]

Expand Down Expand Up @@ -1395,6 +1397,43 @@ def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:


@Step.factory.register()
class CutRows(OpenROADStep):
"""
Cut floorplan rows with respect to placed macros.
"""

id = "OpenROAD.CutRows"
name = "CutRows"

inputs = [DesignFormat.ODB]
outputs = [
DesignFormat.ODB,
DesignFormat.DEF,
]

config_vars = OpenROADStep.config_vars + [
Variable(
"FP_MACRO_HORIZONTAL_HALO",
Decimal,
"Specify the horizontal halo size around macros while cutting rows.",
default=10,
units="µm",
deprecated_names=["FP_TAP_HORIZONTAL_HALO"],
),
Variable(
"FP_MACRO_VERTICAL_HALO",
Decimal,
"Specify the vertical halo size around macros while cutting rows.",
default=10,
units="µm",
deprecated_names=["FP_TAP_VERTICAL_HALO"],
),
]

def get_script_path(self):
return os.path.join(get_script_dir(), "openroad", "cut_rows.tcl")


class WriteViews(OpenROADStep):
"""
Write various layout views of an ODB design
Expand Down

0 comments on commit 08da726

Please sign in to comment.