Skip to content

Commit

Permalink
Fix Table Being Printed to File With Wrong Width (#562)
Browse files Browse the repository at this point in the history
* `OpenROAD.CheckAntennas`
  * Fixed table being printed to file with wrong width
* `OpenROAD.STA*PnR`
  *  Fixed table being printed to file with wrong width

## Flows

* `SynthesisExploration`
  * Fixed table being printed to file with wrong width
  • Loading branch information
kareefardi authored Sep 26, 2024
1 parent 92c2a55 commit 8871ff3
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 11 deletions.
14 changes: 14 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@
## Documentation
-->

# 2.1.9

## Steps

* `OpenROAD.CheckAntennas`
* Fixed table being printed to file with wrong width
* `OpenROAD.STA*PnR`
* Fixed table being printed to file with wrong width

## Flows

* `SynthesisExploration`
* Fixed table being printed to file with wrong width

# 2.1.8

## Steps
Expand Down
8 changes: 5 additions & 3 deletions openlane/flows/synth_explore.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,11 @@ def run(

console.print(table)
assert self.run_dir is not None
with open(os.path.join(self.run_dir, "summary.rpt"), "w") as f:
table.width = 160
rich.print(table, file=f)
file_console = rich.console.Console(
file=open(os.path.join(self.run_dir, "summary.rpt"), "w", encoding="utf8"),
width=160,
)
file_console.print(table)

success("Flow complete.")
return (initial_state, step_list)
16 changes: 10 additions & 6 deletions openlane/steps/openroad.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
Union,
)


import yaml
import rich
import rich.table
Expand Down Expand Up @@ -686,9 +687,11 @@ def format_slack(slack: Optional[Union[int, float, Decimal]]) -> str:

if not options.get_condensed_mode():
console.print(table)
with open(os.path.join(self.step_dir, "summary.rpt"), "w") as f:
table.width = 160
rich.print(table, file=f)
file_console = rich.console.Console(
file=open(os.path.join(self.step_dir, "summary.rpt"), "w", encoding="utf8"),
width=160,
)
file_console.print(table)

return {}, metric_updates_with_aggregates

Expand Down Expand Up @@ -1482,9 +1485,10 @@ def __lt__(self, other):

if not options.get_condensed_mode() and len(violations):
console.print(table)
with open(output_file, "w") as f:
table.width = 80
rich.print(table, file=f)
file_console = rich.console.Console(
file=open(output_file, "w", encoding="utf8"), width=160
)
file_console.print(table)

def __get_antenna_nets(self, report: io.TextIOWrapper) -> int:
pattern = re.compile(r"Net:\s*(\w+)")
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 = "2.1.8"
version = "2.1.9"
description = "An infrastructure for implementing chip design flows"
authors = ["Efabless Corporation and Contributors <[email protected]>"]
readme = "Readme.md"
Expand Down

0 comments on commit 8871ff3

Please sign in to comment.