From 18943f64621c66307e9d285d4d5efa1ecda47c84 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Thu, 18 Oct 2018 17:09:23 +0700 Subject: Skip cells in Liberty files which have dont_use attribute. --- src/map/amap/amapLiberty.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'src/map/amap') diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c index 13b18df5..d5d2d72a 100644 --- a/src/map/amap/amapLiberty.c +++ b/src/map/amap/amapLiberty.c @@ -207,6 +207,26 @@ int Amap_LibertyCellIsFlop( Amap_Tree_t * p, Amap_Item_t * pCell ) return 0; } +/**Function************************************************************* + + Synopsis [Returns cell's function.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +int Amap_LibertyCellIsDontUse( Amap_Tree_t * p, Amap_Item_t * pCell ) +{ + Amap_Item_t * pAttr; + Amap_ItemForEachChild( p, pCell, pAttr ) + if ( !Amap_LibertyCompare(p, pAttr->Key, "dont_use") ) + return 1; + return 0; +} + /**Function************************************************************* Synopsis [Returns pin's function.] @@ -414,6 +434,12 @@ int Amap_LibertyPrintGenlib( Amap_Tree_t * p, char * pFileName, int fVerbose ) printf( "Amap_LibertyPrintGenlib() skipped sequential cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) ); continue; } + if ( Amap_LibertyCellIsDontUse(p, pCell) ) + { + if ( fVerbose ) + printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" due to dont_use attribute.\n", Amap_LibertyGetString(p, pCell->Head) ); + continue; + } Counter = Amap_LibertyCellCountOutputs( p, pCell ); if ( Counter == 0 ) { @@ -498,6 +524,12 @@ Vec_Str_t * Amap_LibertyPrintGenlibStr( Amap_Tree_t * p, int fVerbose ) printf( "Amap_LibertyPrintGenlib() skipped sequential cell \"%s\".\n", Amap_LibertyGetString(p, pCell->Head) ); continue; } + if ( Amap_LibertyCellIsDontUse(p, pCell) ) + { + if ( fVerbose ) + printf( "Amap_LibertyPrintGenlib() skipped cell \"%s\" due to dont_use attribute.\n", Amap_LibertyGetString(p, pCell->Head) ); + continue; + } Counter = Amap_LibertyCellCountOutputs( p, pCell ); if ( Counter == 0 ) { -- cgit v1.2.3