-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
wns_report: include stats from on instances
- Loading branch information
Showing
5 changed files
with
108 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[pytest] | ||
norecursedirs = bazel-bin/ bazel-megaboom/ bazel-out/ bazel-testlogs/ build/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,12 @@ | ||
# Test this on some simple design in ORFS: | ||
# | ||
# ODB_FILE=results/asap7/base/2_floorplan.odb OUTFILE=blah.txt make run RUN_SCRIPT=~/megaboom/report-wns.tcl | ||
# make floorplan | ||
# ODB_FILE=results/nangate45/gcd/base/2_floorplan.odb make run RUN_SCRIPT=~/megaboom/report-wns.tcl | ||
source $::env(SCRIPTS_DIR)/open.tcl | ||
|
||
set paths [find_timing_paths -path_group reg2reg -sort_by_slack -group_count 1] | ||
set path [lindex $paths 0] | ||
set slack [get_property $path slack] | ||
|
||
report_clock_skew >reports.txt | ||
report_tns >>reports.txt | ||
set fp [open reports.txt r] | ||
set crpr "" | ||
set skew "" | ||
set tns "" | ||
while {[gets $fp line] != -1} { | ||
if {[regexp {([0-9.]+)\s+CRPR} $line match crpr_value]} { | ||
set crpr $crpr_value | ||
} | ||
if {[regexp {([0-9.]+)\s+setup\s+skew} $line match skew_value]} { | ||
set skew $skew_value | ||
} | ||
if {[regexp {tns (.*)} $line match tns_value]} { | ||
set tns $tns_value | ||
} | ||
} | ||
close $fp | ||
|
||
set fp [open $::env(OUTFILE) w] | ||
puts $fp "slack: $slack" | ||
puts $fp "crpr: $crpr" | ||
puts $fp "skew: $skew" | ||
puts $fp "tns: $tns" | ||
close $fp | ||
|
||
puts "slack: $slack" | ||
report_tns | ||
report_cell_usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env python3 | ||
import wns_report | ||
|
||
|
||
def test_parse_stats(): | ||
report = """ | ||
slack: 0.039060 | ||
Clock core_clock | ||
0.00 source latency ctrl.state.out[0]$_DFF_P_/CK ^ | ||
0.00 target latency ctrl.state.out[0]$_DFF_P_/CK ^ | ||
0.00 CRPR | ||
-------------- | ||
0.00 setup skew | ||
tns 0.00 | ||
Cell type report: Count Area | ||
Tap cell 48 12.77 | ||
Buffer 14 19.95 | ||
Inverter 85 51.34 | ||
Sequential cell 35 158.27 | ||
Multi-Input combinational cell 369 420.55 | ||
Total 551 662.87 | ||
""" | ||
expected_stats = { | ||
"slack": 0.03906, | ||
"skew": "0.00", | ||
"Tap cell": 48, | ||
"Inverter": 85, | ||
"Buffer": 14, | ||
"Sequential cell": 35, | ||
"Multi-Input combinational cell": 369, | ||
"Total": 551, | ||
} | ||
|
||
assert wns_report.parse_stats(report) == expected_stats |