@@ -247,6 +247,12 @@ void PrintPlacementReport(PARGraph* netlist, Greenpak4Device* /*device*/)
247
247
*/
248
248
void PrintTimingReport (Greenpak4Netlist* netlist, Greenpak4Device* device)
249
249
{
250
+ if (!device->HasTimingData ())
251
+ {
252
+ LogWarning (" No timing data for target device, not running timing analysis\n " );
253
+ return ;
254
+ }
255
+
250
256
LogNotice (" \n Timing report:\n " );
251
257
LogIndenter li;
252
258
@@ -287,6 +293,7 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
287
293
288
294
// DEBUG: print all paths
289
295
int i=0 ;
296
+ bool incomplete = false ;
290
297
for (auto path : paths)
291
298
{
292
299
LogVerbose (" Path %d\n " , i++);
@@ -330,8 +337,9 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
330
337
auto rscell = device->GetIOB (3 );
331
338
if (!rscell->GetCombinatorialDelay (previous_port, edge->m_sourceport , corner, delay))
332
339
{
333
- LogWarning (" Couldn't get timing data even from fallback pin\n " );
334
- delay = CombinatorialDelay (0 , 0 );
340
+ // LogWarning("Couldn't get timing data even from fallback pin\n");
341
+ incomplete = true ;
342
+ continue ;
335
343
}
336
344
}
337
345
@@ -356,8 +364,9 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
356
364
CombinatorialDelay delay;
357
365
if (!srccell->GetCombinatorialDelay (previous_port, edge->m_sourceport , corner, delay))
358
366
{
359
- LogWarning (" Couldn't get timing data\n " );
360
- delay = CombinatorialDelay (0 , 0 );
367
+ // LogWarning("Couldn't get timing data\n");
368
+ incomplete = true ;
369
+ continue ;
361
370
}
362
371
float worst = delay.GetWorst ();
363
372
cdelay += worst;
@@ -381,8 +390,9 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
381
390
{
382
391
if (!xc->GetCombinatorialDelay (" I" , " O" , corner, delay))
383
392
{
384
- LogWarning (" Couldn't get timing data\n " );
385
- delay = CombinatorialDelay (0 , 0 );
393
+ // LogWarning("Couldn't get timing data\n");
394
+ incomplete = true ;
395
+ continue ;
386
396
}
387
397
float worst = delay.GetWorst ();
388
398
cdelay += worst;
@@ -410,8 +420,9 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
410
420
auto rscell = device->GetIOB (3 );
411
421
if (!rscell->GetCombinatorialDelay (edge->m_destport , " IO" , corner, delay))
412
422
{
413
- LogWarning (" Couldn't get timing data even from fallback pin\n " );
414
- delay = CombinatorialDelay (0 , 0 );
423
+ // LogWarning("Couldn't get timing data even from fallback pin\n");
424
+ incomplete = true ;
425
+ continue ;
415
426
}
416
427
}
417
428
@@ -432,6 +443,8 @@ void PrintTimingReport(Greenpak4Netlist* netlist, Greenpak4Device* device)
432
443
" +--------------------------------------------------------------+------------+-----------"
433
444
" +------------+------------+------------+\n " );
434
445
}
446
+ if (incomplete)
447
+ LogWarning (" Timing data doesn't have info for all primitives, report is incomplete\n " );
435
448
}
436
449
437
450
/* *
@@ -495,6 +508,34 @@ void FindCombinatorialPaths(
495
508
{
496
509
auto edge = destnode->GetEdgeByIndex (i);
497
510
511
+ // Verify that this edge is not already in the netlist. If it is, complain and stop
512
+ bool loop = false ;
513
+ for (auto tedge : basepath)
514
+ {
515
+ if (edge == tedge)
516
+ {
517
+ loop = true ;
518
+
519
+ LogWarning (" Found combinatorial loop, not following it for static timing\n " );
520
+ LogIndenter li;
521
+
522
+ for (auto eedge : basepath)
523
+ {
524
+ auto snode = static_cast <Greenpak4NetlistEntity*>(eedge->m_sourcenode ->GetData ());
525
+ auto dnode = static_cast <Greenpak4NetlistEntity*>(eedge->m_destnode ->GetData ());
526
+ LogWarning (" From cell %50s port %15s to %50s port %15s\n " ,
527
+ snode->m_name .c_str (),
528
+ eedge->m_sourceport .c_str (),
529
+ dnode->m_name .c_str (),
530
+ eedge->m_destport .c_str ());
531
+ }
532
+
533
+ break ;
534
+ }
535
+ }
536
+ if (loop)
537
+ continue ;
538
+
498
539
// Find all paths that begin with the new, longer path
499
540
CombinatorialPath npath = basepath;
500
541
npath.push_back (edge);
0 commit comments