diff --git a/openlane/flows/classic.py b/openlane/flows/classic.py index 2639b80ea..18cb5b067 100644 --- a/openlane/flows/classic.py +++ b/openlane/flows/classic.py @@ -281,6 +281,7 @@ class Classic(SequentialFlow): OpenROAD.Floorplan, Odb.SetPowerConnections, Odb.ManualMacroPlacement, + OpenROAD.CutRows, OpenROAD.TapEndcapInsertion, OpenROAD.GlobalPlacementSkipIO, OpenROAD.IOPlacement, diff --git a/openlane/scripts/openroad/cut_rows.tcl b/openlane/scripts/openroad/cut_rows.tcl new file mode 100644 index 000000000..8f92870bb --- /dev/null +++ b/openlane/scripts/openroad/cut_rows.tcl @@ -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 diff --git a/openlane/scripts/openroad/tapcell.tcl b/openlane/scripts/openroad/tapcell.tcl index 49c981227..ff63503c0 100755 --- a/openlane/scripts/openroad/tapcell.tcl +++ b/openlane/scripts/openroad/tapcell.tcl @@ -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 diff --git a/openlane/steps/openroad.py b/openlane/steps/openroad.py index daa304cb4..a8f361832 100644 --- a/openlane/steps/openroad.py +++ b/openlane/steps/openroad.py @@ -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"], ), ] @@ -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