Skip to content

Commit

Permalink
Fix extraction of Final_Util metric (#2055)
Browse files Browse the repository at this point in the history
  • Loading branch information
donn authored Nov 21, 2023
1 parent c6f02be commit d241d11
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 2 additions & 0 deletions scripts/openroad/droute.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ detailed_route\
-verbose 1

write

report_design_area_metrics
12 changes: 5 additions & 7 deletions scripts/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
# 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.

from collections import defaultdict
import os
import re
import sys
import json
import yaml
import fnmatch
from collections import defaultdict
from typing import Iterable, Optional, Dict

sys.path.append(os.path.dirname(os.path.dirname(__file__)))
Expand Down Expand Up @@ -415,15 +415,13 @@ def re_get_last_capture(rx, string):
hpwl = float(match)

final_utilization = -1
# ./reports/signoff/26-rcx_sta.area.rpt
final_utilization_report = Artifact(
rp, "reports", "signoff", "rcx_sta.area.rpt"
rp, "reports", "routing", "drt_metrics.json"
)
final_utilization_content = final_utilization_report.get_content()
if final_utilization_content is not None:
match = re.search(r"\s+([\d]+\.*[\d]*)%", final_utilization_content)
if match is not None:
final_utilization = float(match[1])
metrics = json.loads(final_utilization_content)
final_utilization = metrics["design__instance__utilization"] * 100

# TritonRoute Logged Info Extraction
tr_log = Artifact(rp, "logs", "routing", "detailed.log")
Expand Down
4 changes: 2 additions & 2 deletions scripts/tcl_commands/routing.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ proc global_routing_fastroute {args} {
set log [index_file $::env(routing_logs)/antenna_route_$iter.log]
run_openroad_script $::env(SCRIPTS_DIR)/openroad/repair_antennas.tcl\
-indexed_log $log\
-save "to=$::env(routing_tmpfiles),name=global_$iter,def,guide,odb"\
-save "to=$::env(routing_tmpfiles),name=global_$iter,def,guide,odb"

set antennae [groute_antenna_extract -from_log $log]

Expand Down Expand Up @@ -137,7 +137,7 @@ proc detailed_routing_tritonroute {args} {
set ::env(_tmp_drt_rpt_prefix) $::env(routing_reports)/drt
run_openroad_script $::env(SCRIPTS_DIR)/openroad/droute.tcl\
-indexed_log $log\
-save "to=$::env(routing_results),noindex,def,odb,netlist,powered_netlist"
-save "to=$::env(routing_results),metrics=[index_file $::env(routing_reports)/drt_metrics.json],noindex,def,odb,netlist,powered_netlist"

try_exec python3 $::env(SCRIPTS_DIR)/drc_rosetta.py tr to_klayout \
-o $::env(routing_reports)/drt.klayout.xml \
Expand Down

0 comments on commit d241d11

Please sign in to comment.