Skip to content

Commit e49ddc4

Browse files
authored
Merge pull request #2843 from verilog-to-routing/ipin_cost
IPIN Cost Multiplier
2 parents 1ef86ca + af02c3e commit e49ddc4

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,18 +351,13 @@ static void load_rr_indexed_data_base_costs(const RRGraphView& rr_graph,
351351
rr_indexed_data[RRIndexedDataId(SOURCE_COST_INDEX)].base_cost = delay_normalization_fac;
352352
rr_indexed_data[RRIndexedDataId(SINK_COST_INDEX)].base_cost = 0.;
353353
rr_indexed_data[RRIndexedDataId(OPIN_COST_INDEX)].base_cost = delay_normalization_fac;
354-
// If the SPEC_CPU flag is set, we need to make sure that all floating point numbers are perfectly representable in
355-
// binary format. Thus, we changed the IPIN_COST_INDEX base cost from 0.95 to 0.875.
354+
// The IPIN_COST_INDEX base cost is changed from 0.95 to 0.875 so it is perfectly representable in binary format (this change is made for SPEC benchmark).
356355
// This number is perfectly representable in a binary mantissa (without round-off) so we can get the same routing result on different platforms.
357356
// Since the router cost calculations and heap use floating point numbers, normally we get slightly different round off with different compiler settings,
358357
// leading to different heap sorts and hence different routings.
359358
// To make result validation for SPEC easier, we choose all router parameters to result in calculations that fit perfectly in a 24-bit binary mantissa.
360359
// .875 = 1/2 + 1/4 + 1/8 can be perfectly represented in a binary mantissa with only the first 3 bits set.
361-
#ifdef SPEC_CPU
362360
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.875 * delay_normalization_fac;
363-
#else
364-
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.95 * delay_normalization_fac;
365-
#endif
366361

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

0 commit comments

Comments
 (0)