Skip to content

Commit 5223ac6

Browse files
authored
Merge pull request #417 from ericastor/suppress_warnings
Add support for suppressing OpenROAD warnings in `place_and_route`
2 parents 56da46a + 74f48ae commit 5223ac6

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

place_and_route/build_defs.bzl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,9 @@ place_and_route = rule(
155155
""",
156156
values = [step[0] for step in PLACE_AND_ROUTE_STEPS],
157157
),
158+
"suppress_warnings": attr.string_list(
159+
doc = "A list of OpenROAD warnings to suppress, e.g., [\"STA-1212\", \"PDR-0020\"].",
160+
),
158161
"synthesized_rtl": attr.label(
159162
mandatory = True,
160163
providers = [SynthesisInfo],

place_and_route/open_road.bzl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,16 @@ def openroad_command(ctx, commands, input_db = None, step_name = None, inputs =
211211

212212
real_commands = []
213213

214+
if hasattr(ctx.attr, "suppress_warnings") and ctx.attr.suppress_warnings:
215+
for warning in ctx.attr.suppress_warnings:
216+
parts = warning.split("-")
217+
if len(parts) != 2:
218+
fail(
219+
"Invalid format in suppress_warnings: {}. ".format(warning) +
220+
"Expected format: MODULE-NUMBER",
221+
)
222+
real_commands.append('::utl::suppress_message "{}" "{}"'.format(parts[0], parts[1]))
223+
214224
# Liberty Setup
215225
stdcell_info = ctx.attr.synthesized_rtl[SynthesisInfo].standard_cell_info
216226
liberty = stdcell_info.default_corner.liberty

0 commit comments

Comments
 (0)