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

feat: post-drt antenna repair #573

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions openlane/flows/classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class Classic(SequentialFlow):
OpenROAD.ResizerTimingPostGRT,
OpenROAD.STAMidPNR,
OpenROAD.DetailedRouting,
OpenROAD.RepairAntennasPostDRT,
Odb.RemoveRoutingObstructions,
OpenROAD.CheckAntennas,
Checker.TrDRC,
Expand Down Expand Up @@ -176,6 +177,12 @@ class Classic(SequentialFlow):
default=True,
deprecated_names=["GRT_REPAIR_ANTENNAS"],
),
Variable(
"RUN_POST_DRT_ANTENNA_REPAIR",
bool,
"Enables the OpenROAD.RepairAntennasPostDRT step.",
default=False,
),
Variable(
"RUN_DRT",
bool,
Expand Down Expand Up @@ -277,6 +284,7 @@ class Classic(SequentialFlow):
"OpenROAD.TapEndcapInsertion": ["RUN_TAP_ENDCAP_INSERTION"],
"Odb.HeuristicDiodeInsertion": ["RUN_HEURISTIC_DIODE_INSERTION"],
"OpenROAD.RepairAntennas": ["RUN_ANTENNA_REPAIR"],
"OpenROAD.RepairAntennasPostDRT": ["RUN_POST_DRT_ANTENNA_REPAIR"],
"OpenROAD.DetailedRouting": ["RUN_DRT"],
"OpenROAD.FillInsertion": ["RUN_FILL_INSERTION"],
"OpenROAD.STAPostPNR": ["RUN_MCSTA"],
Expand Down
24 changes: 24 additions & 0 deletions openlane/scripts/openroad/antenna_repair_post_drt.tcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright 2020-2024 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

source $::env(SCRIPTS_DIR)/openroad/common/set_routing_layers.tcl
source $::env(SCRIPTS_DIR)/openroad/common/set_layer_adjustments.tcl

set diode_split [split $::env(DIODE_CELL) "/"]
repair_antennas "[lindex $diode_split 0]" -ratio_margin $::env(DRT_ANTENNA_MARGIN)

write_views
history
34 changes: 34 additions & 0 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,40 @@ def run(self, state_in: State, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
return super().run(state_in, env=env, **kwargs)


class _DiodeInsertionPostDRT(OpenROADStep):
id = "DiodeInsertion"

config_vars = (
OpenROADStep.config_vars
+ dpl_variables
+ grt_variables
+ [
Variable(
"DRT_ANTENNA_MARGIN",
int,
"The margin to over fix antenna violations.",
default=10,
units="%",
),
]
)

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


@Step.factory.register()
class RepairAntennasPostDRT(CompositeStep):
"""
Similar to `OpenROAD.RepairAntennas`, but runs after detailed routing.
"""

id = "OpenROAD.RepairAntennasPostDRT"
name = "Antenna Repair Post Detailed Routing"

Steps = [_DiodeInsertionPostDRT, DetailedRouting, CheckAntennas]


@Step.factory.register()
class LayoutSTA(OpenROADStep):
"""
Expand Down
2 changes: 1 addition & 1 deletion test/designs
Submodule designs updated 1 files
+2 −1 picorv32a/config.json
Loading