Skip to content

Change the base cost for IPIN for SPEC #2447

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

Merged
merged 4 commits into from
Nov 28, 2023
Merged
Changes from 2 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
6 changes: 6 additions & 0 deletions libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,13 @@ static void load_rr_indexed_data_base_costs(const RRGraphView& rr_graph,
rr_indexed_data[RRIndexedDataId(SOURCE_COST_INDEX)].base_cost = delay_normalization_fac;
rr_indexed_data[RRIndexedDataId(SINK_COST_INDEX)].base_cost = 0.;
rr_indexed_data[RRIndexedDataId(OPIN_COST_INDEX)].base_cost = delay_normalization_fac;
// IF the SPEC_CPU flag is set, we need to make sure that all floating point numbers are perfectly representable in
// binary format. Thus, we changed the IPIN_COST_INDEX base cost from 0.95 to 0.875.
#ifdef SPEC_CPU
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.875 * delay_normalization_fac;
#else
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.95 * delay_normalization_fac;
#endif

auto rr_segment_counts = count_rr_segment_types(rr_graph, rr_indexed_data);
size_t total_segments = std::accumulate(rr_segment_counts.begin(), rr_segment_counts.end(), 0u);
Expand Down