Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align log/benchmark power estimation assumptions and enable user-defi… #360

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions place_and_route/build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ place_and_route = rule(
default = "0.69",
doc = "When performing global placement this is how densely our cells should be packaged on the die parameter is (0-1]",
),
"power_switching_activity": attr.string(
doc = "Assumed input switching activity fraction [0.0-1.0] for probabistic power estimation.",
default = "0.5",
),
"qt_qpa_platform": attr.string(
default = "minimal",
doc = "The qt platform to use with OpenROAD.",
Expand Down
4 changes: 4 additions & 0 deletions place_and_route/private/benchmark.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def benchmark(ctx, open_road_info):

open_road_commands = [
est_parasitic_cmd,
"set_power_activity -input -activity {} -duty 0.5".format(ctx.attr.power_switching_activity),
"report_power",
"report_wns",
"report_tns",
Expand Down Expand Up @@ -85,6 +86,7 @@ def benchmark(ctx, open_road_info):
"cpl=$(cat {log} | awk '/period_min/ {{ cpl=$4; exit }} END {{ print cpl }}');",
"tot_pow=$(cat {log} | awk '/^Total / {{ total_power=$5 }} END {{ print total_power }}');",
"int_pow=$(cat {log} | awk '/^Total / {{ intern_power=$2 }} END {{ print intern_power }}');",
"leak_pow=$(cat {log} | awk '/^Total / {{ leak_power=$4 }} END {{ print leak_power }}');",
"swi_pow=$(cat {log} | awk '/^Total / {{ switch_power=$3 }} END {{ print switch_power }}');",
]
cmds.extend([cmd.format(log = command_output.log_file.path) for cmd in awk_cmds])
Expand Down Expand Up @@ -115,7 +117,9 @@ def benchmark(ctx, open_road_info):
total = struct(
internal_watts = "$int_pow",
switching_watts = "$swi_pow",
leakage_watts = "$leak_pow",
total_watts = "$tot_pow",
estimation_method = "{} probabilistic switching fraction".format(ctx.attr.power_switching_activity),
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion place_and_route/private/global_routing.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ foreach layer_adjustment {global_routing_layer_adjustments} {{
"report_check_types -max_slew -max_capacitance -max_fanout -violators",
"report_floating_nets -verbose",
"report_units",
"set_power_activity -input -activity 1 -duty 0.5",
"set_power_activity -input -activity {} -duty 0.5".format(ctx.attr.power_switching_activity),
]
open_road_commands.extend(generate_power_results(ctx, general_routing_power_results))
open_road_commands.extend(generate_area_results(general_routing_area_results))
Expand Down
4 changes: 4 additions & 0 deletions synthesis/power_performance_area.proto
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ message Power {

// Clock tree
optional PowerBreakdown clock = 6;

// Description of the method used to estimate power, e.g. probabilistic
// switching or a vector power analysis.
optional string estimation_method = 7;
}

message PowerBreakdown {
Expand Down
Loading