@@ -501,8 +501,33 @@ static int comp_max_number_of_traversed_links(NocTrafficFlowId traffic_flow_id)
501
501
502
502
const auto & traffic_flow = traffic_flow_storage.get_single_noc_traffic_flow (traffic_flow_id);
503
503
504
+ const auto & noc_links = noc_model.get_noc_links ();
505
+ const auto & noc_routers = noc_model.get_noc_routers ();
504
506
const double noc_link_latency = noc_model.get_noc_link_latency ();
505
507
const double noc_router_latency = noc_model.get_noc_router_latency ();
508
+
509
+ auto router_it = std::find_if (noc_routers.begin (), noc_routers.end (), [noc_router_latency](const NocRouter& r) {
510
+ return (noc_router_latency != r.get_latency ());
511
+ });
512
+
513
+ if (router_it != noc_routers.end ()) {
514
+ VTR_LOG_ERROR (
515
+ " SAT router assumes all NoC routers have the same latency. "
516
+ " NoC router with the user if %d has a different latency (%g) than the NoC-wide router latency (%g).\n " ,
517
+ router_it->get_router_user_id (), router_it->get_latency ());
518
+ }
519
+
520
+ auto link_it = std::find_if (noc_links.begin (), noc_links.end (), [noc_link_latency](const NocLink& l) {
521
+ return (noc_link_latency != l.get_latency ());
522
+ });
523
+
524
+ if (link_it != noc_links.end ()) {
525
+ VTR_LOG_ERROR (
526
+ " SAT router assumes all NoC links have the same latency. "
527
+ " NoC link %d has a different latency (%g) than the NoC-wide link latency (%g).\n " ,
528
+ (size_t )link_it->get_link_id (), link_it->get_latency ());
529
+ }
530
+
506
531
const double traffic_flow_latency_constraint = traffic_flow.max_traffic_flow_latency ;
507
532
508
533
VTR_ASSERT (traffic_flow_latency_constraint < 0.1 );
0 commit comments