Skip to content

Commit

Permalink
Merge pull request #6029 from gadfort/report-sites
Browse files Browse the repository at this point in the history
ord: add site and row information to report_design_area_metrics
  • Loading branch information
maliberty authored Oct 27, 2024
2 parents dba3d34 + 5c1dd2d commit cd519bb
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/Metrics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,22 @@ proc report_design_area_metrics { args } {
set stdcell_util -1.0
}

set std_rows 0
set std_sites 0
set rows [dict create]
set sites [dict create]
foreach row [$block getRows] {
set site [$row getSite]

if { [$site getClass] == "NONE" || [$site getClass] == "CORE" } {
incr std_rows
set std_sites [expr { $std_sites + [$row getSiteCount] }]
}

dict incr rows [$site getName] 1
dict incr sites [$site getName] [$row getSiteCount]
}

utl::metric_int "design__io" $num_ios
utl::metric_float "design__die__area" $die_area
utl::metric_float "design__core__area" $core_area
Expand All @@ -250,6 +266,16 @@ proc report_design_area_metrics { args } {
utl::metric_float "design__instance__area__macros" $macro_area
utl::metric_float "design__instance__utilization" $core_util
utl::metric_float "design__instance__utilization__stdcell" $stdcell_util

utl::metric_int "design__rows" $std_rows
dict for {site_name count} $rows {
utl::metric_int "design__rows:$site_name" $count
}

utl::metric_int "design__sites" $std_sites
dict for {site_name count} $sites {
utl::metric_int "design__sites:$site_name" $count
}
}

# namespace
Expand Down

0 comments on commit cd519bb

Please sign in to comment.