summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/amap/amapLib.c3
-rw-r--r--src/map/amap/amapLiberty.c32
-rw-r--r--src/map/if/ifTune.c4
-rw-r--r--src/map/scl/sclLiberty.c27
4 files changed, 61 insertions, 5 deletions
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index b6350fe..26ef639 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -242,8 +242,11 @@ Amap_Gat_t * Amap_LibFindGate( Amap_Lib_t * p, unsigned uTruth )
Amap_Gat_t * pGate;
int i;
Vec_PtrForEachEntry( Amap_Gat_t *, p->vSorted, pGate, i )
+ {
+ if (( pGate == NULL ) || ( pGate->pFunc == NULL )) continue;
if ( pGate->nPins <= 5 && pGate->pFunc[0] == uTruth )
return pGate;
+ }
return NULL;
}
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index 13b18df..d5d2d72 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -209,6 +209,26 @@ int Amap_LibertyCellIsFlop( Amap_Tree_t * p, Amap_Item_t * pCell )
/**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.]
Description []
@@ -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 )
{
diff --git a/src/map/if/ifTune.c b/src/map/if/ifTune.c
index d1ed7ab..13e45f4 100644
--- a/src/map/if/ifTune.c
+++ b/src/map/if/ifTune.c
@@ -622,10 +622,10 @@ sat_solver * Ifn_ManSatBuild( Ifn_Ntk_t * p, Vec_Int_t ** pvPiVars, Vec_Int_t **
sat_solver * pSat = NULL;
*pvPiVars = *pvPoVars = NULL;
p1 = Ifn_ManStrFindModel( p );
-// Gia_AigerWrite( p1, "satbuild.aig", 0, 0 );
+// Gia_AigerWrite( p1, "satbuild.aig", 0, 0, 0 );
p2 = Ifn_ManStrFindCofactors( p->nInps, p1 );
Gia_ManStop( p1 );
-// Gia_AigerWrite( p2, "satbuild2.aig", 0, 0 );
+// Gia_AigerWrite( p2, "satbuild2.aig", 0, 0, 0 );
pSat = Ifn_ManStrFindSolver( p2, pvPiVars, pvPoVars );
Gia_ManStop( p2 );
return pSat;
diff --git a/src/map/scl/sclLiberty.c b/src/map/scl/sclLiberty.c
index fc06bc4..cd28a60 100644
--- a/src/map/scl/sclLiberty.c
+++ b/src/map/scl/sclLiberty.c
@@ -629,6 +629,14 @@ int Scl_LibertyReadCellIsFlop( Scl_Tree_t * p, Scl_Item_t * pCell )
return 1;
return 0;
}
+int Scl_LibertyReadCellIsDontUse( Scl_Tree_t * p, Scl_Item_t * pCell )
+{
+ Scl_Item_t * pAttr;
+ Scl_ItemForEachChild( p, pCell, pAttr )
+ if ( !Scl_LibertyCompare(p, pAttr->Key, "dont_use") )
+ return 1;
+ return 0;
+}
char * Scl_LibertyReadCellArea( Scl_Tree_t * p, Scl_Item_t * pCell )
{
Scl_Item_t * pArea;
@@ -704,6 +712,11 @@ Vec_Str_t * Scl_LibertyReadGenlibStr( Scl_Tree_t * p, int fVerbose )
if ( fVerbose ) printf( "Scl_LibertyReadGenlib() skipped sequential cell \"%s\".\n", Scl_LibertyReadString(p, pCell->Head) );
continue;
}
+ if ( Scl_LibertyReadCellIsDontUse(p, pCell) )
+ {
+ if ( fVerbose ) printf( "Scl_LibertyReadGenlib() skipped cell \"%s\" due to dont_use attribute.\n", Scl_LibertyReadString(p, pCell->Head) );
+ continue;
+ }
if ( Scl_LibertyReadCellIsThreeState(p, pCell) )
{
if ( fVerbose ) printf( "Scl_LibertyReadGenlib() skipped three-state cell \"%s\".\n", Scl_LibertyReadString(p, pCell->Head) );
@@ -1417,7 +1430,7 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
Vec_Wrd_t * vTruth;
char * pFormula, * pName;
int i, k, Counter, nOutputs, nCells;
- int nSkipped[3] = {0};
+ int nSkipped[4] = {0};
// read delay-table templates
vTemples = Scl_LibertyReadTemplates( p );
@@ -1451,6 +1464,12 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
nSkipped[0]++;
continue;
}
+ if ( Scl_LibertyReadCellIsDontUse(p, pCell) )
+ {
+ if ( fVeryVerbose ) printf( "Scl_LibertyReadGenlib() skipped cell \"%s\" due to dont_use attribute.\n", Scl_LibertyReadString(p, pCell->Head) );
+ nSkipped[3]++;
+ continue;
+ }
if ( Scl_LibertyReadCellIsThreeState(p, pCell) )
{
if ( fVeryVerbose ) printf( "Scl_LibertyReadGenlib() skipped three-state cell \"%s\".\n", Scl_LibertyReadString(p, pCell->Head) );
@@ -1473,6 +1492,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
{
if ( Scl_LibertyReadCellIsFlop(p, pCell) )
continue;
+ if ( Scl_LibertyReadCellIsDontUse(p, pCell) )
+ continue;
if ( Scl_LibertyReadCellIsThreeState(p, pCell) )
continue;
if ( (Counter = Scl_LibertyReadCellOutputNum(p, pCell)) == 0 )
@@ -1640,8 +1661,8 @@ Vec_Str_t * Scl_LibertyReadSclStr( Scl_Tree_t * p, int fVerbose, int fVeryVerbos
{
printf( "Library \"%s\" from \"%s\" has %d cells ",
Scl_LibertyReadString(p, Scl_LibertyRoot(p)->Head), p->pFileName, nCells );
- printf( "(%d skipped: %d seq; %d tri-state; %d no func). ",
- nSkipped[0]+nSkipped[1]+nSkipped[2], nSkipped[0], nSkipped[1], nSkipped[2] );
+ printf( "(%d skipped: %d seq; %d tri-state; %d no func; %d dont_use). ",
+ nSkipped[0]+nSkipped[1]+nSkipped[2], nSkipped[0], nSkipped[1], nSkipped[2], nSkipped[3] );
Abc_PrintTime( 1, "Time", Abc_Clock() - p->clkStart );
}
return vOut;