From 3f08b3789ff47fc02ca3e00fdf2ddbdc4e36c78e Mon Sep 17 00:00:00 2001 From: gatecat Date: Fri, 10 Dec 2021 19:17:03 +0000 Subject: [PATCH] blif: Improve detection of zero/one net by requiring it to be external Signed-off-by: gatecat --- crlcore/src/ccore/blif/BlifParser.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crlcore/src/ccore/blif/BlifParser.cpp b/crlcore/src/ccore/blif/BlifParser.cpp index df9e5cff..c5d90b5d 100644 --- a/crlcore/src/ccore/blif/BlifParser.cpp +++ b/crlcore/src/ccore/blif/BlifParser.cpp @@ -384,7 +384,8 @@ namespace { for ( Net* net : _zeroCell->getNets() ) { if ( not net->isSupply () and not net->isAutomatic() - and not net->isBlockage () ) { + and not net->isBlockage () + and net->isExternal() ) { if (getString(net->getName()).find(_powerName) != string::npos) { cerr << Error( "BlifParser::Model::staticInit(): Output \"%s\" of zero (tie low) cell \"%s\" match power supply name." , getString(net->getName()).c_str(), zeroName.c_str() ) << endl; @@ -405,7 +406,8 @@ namespace { for ( Net* net : _oneCell->getNets() ) if ( not net->isSupply () and not net->isAutomatic() - and not net->isBlockage () ) { + and not net->isBlockage () + and net->isExternal() ) { if (getString(net->getName()).find(_powerName) != string::npos) { cerr << Error( "BlifParser::Model::staticInit(): Output \"%s\" of one (tie high) cell \"%s\" match power supply name." , getString(net->getName()).c_str(), zeroName.c_str() ) << endl;