Skip to content

Commit 3666586

Browse files
committed
change the IPIN base cost if spec is enabled
1 parent e97bb0b commit 3666586

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libs/librrgraph/src/utils/alloc_and_load_rr_indexed_data.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +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.
356+
#ifdef SPEC_CPU
357+
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.875 * delay_normalization_fac;
358+
#else
354359
rr_indexed_data[RRIndexedDataId(IPIN_COST_INDEX)].base_cost = 0.95 * delay_normalization_fac;
360+
#endif
355361

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

0 commit comments

Comments
 (0)