Skip to content

Commit 040dd7a

Browse files
committed
vpr: Skip zero CPDs when reporting geomean CPD
1 parent 5b0ff1e commit 040dd7a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

vpr/src/timing/timing_util.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,21 @@ void print_setup_timing_summary(const tatum::TimingConstraints& constraints, con
266266

267267
//Calculate the intra-domain (i.e. same launch and capture domain) non-virtual geomean, and fanout-weighted periods
268268
if (crit_paths.size() >= 1) {
269+
VTR_LOG("\n");
269270
std::vector<double> intra_domain_cpds;
270271
std::vector<double> fanout_weighted_intra_domain_cpds;
271272
double total_intra_domain_fanout = 0.;
272273
auto clock_fanouts = count_clock_fanouts(*timing_ctx.graph, setup_analyzer);
273274
for (const auto& path : crit_paths) {
274275
if (path.launch_domain() == path.capture_domain() && !constraints.is_virtual_clock(path.launch_domain())) {
276+
if (path.delay() == 0.) {
277+
VTR_LOG_WARN("%s to %s CPD is %g, skipping in geomean and fanout-weighted CPDs\n",
278+
constraints.clock_domain_name(path.launch_domain()).c_str(),
279+
constraints.clock_domain_name(path.capture_domain()).c_str(),
280+
sec_to_nanosec(path.delay()));
281+
continue;
282+
}
283+
275284
intra_domain_cpds.push_back(path.delay());
276285

277286
auto iter = clock_fanouts.find(path.launch_domain());
@@ -285,7 +294,7 @@ void print_setup_timing_summary(const tatum::TimingConstraints& constraints, con
285294

286295
//Print multi-clock geomeans
287296
if (intra_domain_cpds.size() > 0) {
288-
VTR_LOG("\n");
297+
289298
double geomean_intra_domain_cpd = vtr::geomean(intra_domain_cpds.begin(), intra_domain_cpds.end());
290299
VTR_LOG("Geometric mean non-virtual intra-domain period: %g ns (%g MHz)\n",
291300
sec_to_nanosec(geomean_intra_domain_cpd),

0 commit comments

Comments
 (0)