Skip to content

Commit

Permalink
feat: DRT layout and DRC snapshots (#628)
Browse files Browse the repository at this point in the history
## Steps

* `OpenROAD.DetailedRouting`
* Added `DRT_SAVE_SNAPSHOTS` which enables saving snapshots of the
layout each detalied routing iteration.
  * Added `DRT_SAVE_DRC_REPORT_ITERS`

Signed-off-by: Kareem Farid <kareefardi@users.noreply.github.com>
  • Loading branch information
kareefardi authored Jan 2, 2025
1 parent 318b684 commit 39a17eb
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
* Added flags `CTS_OBSTRUCTION_AWARE` and `CTS_BALANCE_LEVELS`
* Added `CTS_SINK_BUFFER_MAX_CAP_DERATE_PCT`
* Added `CTS_DELAY_BUFFER_DERATE_PCT`

* `OpenROAD.DetailedRouting`
* Added `DRT_SAVE_SNAPSHOTS` which enables saving snapshots of the layout each detalied routing iteration.
* Added `DRT_SAVE_DRC_REPORT_ITERS`


## Tool Updates

Expand Down
17 changes: 14 additions & 3 deletions openlane/scripts/openroad/drt.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,24 @@ set max_layer $::env(RT_MAX_LAYER)
if { [info exists ::env(DRT_MAX_LAYER)] } {
set max_layer $::env(DRT_MAX_LAYER)
}

if { $::env(DRT_SAVE_SNAPSHOTS) } {
set_debug_level DRT snapshot 1
}
set drc_report_iter_step_arg ""
if { $::env(DRT_SAVE_SNAPSHOTS) } {
set_debug_level DRT snapshot 1
set drc_report_iter_step_arg "-drc_report_iter_step 1"
}
if { [info exists ::env(DRT_SAVE_DRC_REPORT_ITERS)] } {
set drc_report_iter_step_arg "-drc_report_iter_step $::env(DRT_SAVE_DRC_REPORT_ITERS)"
}
detailed_route\
-bottom_routing_layer $min_layer\
-top_routing_layer $max_layer\
-output_drc $::env(STEP_DIR)/$::env(DESIGN_NAME).drc\
-droute_end_iter $::env(DRT_OPT_ITERS)\
-or_seed 42\
-verbose 1
-verbose 1\
{*}$drc_report_iter_step_arg

write_views
write_views
12 changes: 12 additions & 0 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ def run(self, state_in, **kwargs) -> Tuple[ViewsUpdate, MetricsUpdate]:
command,
env=env,
check=check,
cwd=self.step_dir,
**kwargs,
)

Expand Down Expand Up @@ -1630,6 +1631,17 @@ class DetailedRouting(OpenROADStep):
"Specifies the maximum number of optimization iterations during Detailed Routing in TritonRoute.",
default=64,
),
Variable(
"DRT_SAVE_SNAPSHOTS",
bool,
"This is an experimental variable. Saves an odb snapshot of the layout each routing iteration. This generates multiple odb files increasing disk usage.",
default=False,
),
Variable(
"DRT_SAVE_DRC_REPORT_ITERS",
Optional[int],
"Report DRC on each specified iteration. Set to 1 when DRT_SAVE_DRC_REPORT_ITERS in enabled",
),
]

def get_script_path(self):
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "openlane"
version = "3.0.0.dev5"
version = "3.0.0.dev6"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <donn@efabless.com>"]
readme = "Readme.md"
Expand Down

0 comments on commit 39a17eb

Please sign in to comment.