@@ -1343,30 +1343,33 @@ bool BLIF_file::linkNodes() noexcept {
1343
1343
}
1344
1344
}
1345
1345
}
1346
- // 1b. output ports should not contact fabric inputs
1347
- if (not topOutputs_.empty ()) {
1348
- for (Node* out_nd : topOutputs_) {
1349
- Node& nd = *out_nd;
1350
- assert (!nd.out_ .empty ());
1351
- int pinIndex = -1 ;
1352
- Node* par = findFabricParent (nd.id_ , nd.out_ , pinIndex);
1353
- if (par) {
1354
- assert (pinIndex >= 0 );
1355
- assert (uint (pinIndex) < par->data_ .size ());
1356
- const string& pinToken = par->data_ [pinIndex];
1357
- if (trace_ >= 20 )
1358
- lout () << pinToken << endl;
1359
- if (not par->isLatch ()) {
1360
- // skipping latches for now
1361
- err_msg_.reserve (224 );
1362
- err_msg_ = " output port contacts fabric input: port= " ,
1363
- err_msg_ += nd.out_ ;
1364
- err_msg_ += " fab-input= " ;
1365
- err_msg_ += par->cPrimType ();
1366
- err_msg_ += " @ line " ;
1367
- err_msg_ += std::to_string (par->lnum_ );
1368
- err_lnum_ = nd.lnum_ ;
1369
- return false ;
1346
+
1347
+ if (::getenv (" pln_check_output_port_loopback" )) {
1348
+ // 1b. output ports should not contact fabric inputs
1349
+ if (not topOutputs_.empty ()) {
1350
+ for (Node* out_nd : topOutputs_) {
1351
+ Node& nd = *out_nd;
1352
+ assert (!nd.out_ .empty ());
1353
+ int pinIndex = -1 ;
1354
+ Node* par = findFabricParent (nd.id_ , nd.out_ , pinIndex);
1355
+ if (par) {
1356
+ assert (pinIndex >= 0 );
1357
+ assert (uint (pinIndex) < par->data_ .size ());
1358
+ const string& pinToken = par->data_ [pinIndex];
1359
+ if (trace_ >= 20 )
1360
+ lout () << pinToken << endl;
1361
+ if (not par->isLatch ()) {
1362
+ // skipping latches for now
1363
+ err_msg_.reserve (224 );
1364
+ err_msg_ = " output port contacts fabric input: port= " ,
1365
+ err_msg_ += nd.out_ ;
1366
+ err_msg_ += " fab-input= " ;
1367
+ err_msg_ += par->cPrimType ();
1368
+ err_msg_ += " @ line " ;
1369
+ err_msg_ += std::to_string (par->lnum_ );
1370
+ err_lnum_ = nd.lnum_ ;
1371
+ return false ;
1372
+ }
1370
1373
}
1371
1374
}
1372
1375
}
0 commit comments