Maintenance and updates.

This commit is contained in:
Alan Mishchenko
2017-09-24 23:38:01 -07:00
parent 287f9efcce
commit c696ae95d0
9 changed files with 77 additions and 12 deletions
+1 -1
View File
@@ -752,7 +752,7 @@ void If_CutSort( If_Man_t * p, If_Set_t * pCutSet, If_Cut_t * pCut )
}
if ( !pCut->fUseless &&
(p->pPars->fUseDsd || p->pPars->fUseBat ||
(p->pPars->fUseDsd || p->pPars->pFuncCell2 || p->pPars->fUseBat ||
p->pPars->pLutStruct || p->pPars->fUserRecLib || p->pPars->fUserSesLib ||
p->pPars->fEnableCheck07 || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->fUse34Spec ||
p->pPars->fUseDsdTune || p->pPars->fEnableCheck75 || p->pPars->fEnableCheck75u) )
+2 -2
View File
@@ -167,7 +167,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
int fFunc0R, fFunc1R;
int i, k, v, iCutDsd, fChange;
int fSave0 = p->pPars->fDelayOpt || p->pPars->fDelayOptLut || p->pPars->fDsdBalance || p->pPars->fUserRecLib || p->pPars->fUserSesLib ||
p->pPars->fUseDsdTune || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->fUse34Spec || p->pPars->pLutStruct != NULL;
p->pPars->fUseDsdTune || p->pPars->fUseCofVars || p->pPars->fUseAndVars || p->pPars->fUse34Spec || p->pPars->pLutStruct || p->pPars->pFuncCell2;
int fUseAndCut = (p->pPars->nAndDelay > 0) || (p->pPars->nAndArea > 0);
assert( !If_ObjIsAnd(pObj->pFanin0) || pObj->pFanin0->pCutSet->nCuts > 0 );
assert( !If_ObjIsAnd(pObj->pFanin1) || pObj->pFanin1->pCutSet->nCuts > 0 );
@@ -319,7 +319,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
if ( p->pPars->fUseDsd )
pCut->fUseless = If_DsdManCheckDec( p->pIfDsdMan, If_CutDsdLit(p, pCut) );
else if ( p->pPars->pFuncCell2 )
pCut->fUseless = !p->pPars->pFuncCell2( p, (word *)If_CutTruth(p, pCut), pCut->nLeaves, NULL, NULL );
pCut->fUseless = !p->pPars->pFuncCell2( p, (word *)If_CutTruthW(p, pCut), pCut->nLeaves, NULL, NULL );
else
pCut->fUseless = !p->pPars->pFuncCell( p, If_CutTruth(p, pCut), Abc_MaxInt(6, pCut->nLeaves), pCut->nLeaves, p->pPars->pLutStruct );
p->nCutsUselessAll += pCut->fUseless;
+4
View File
@@ -222,6 +222,10 @@ extern void Mio_LibraryMatchesStop( Mio_Library_t * pLib );
extern void Mio_LibraryMatchesStart( Mio_Library_t * pLib, int fPinFilter, int fPinPerm, int fPinQuick );
extern void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_Wec_t ** pvTt2Match, Mio_Cell2_t ** ppCells, int * pnCells, int fPinFilter, int fPinPerm, int fPinQuick );
extern void Mio_LibraryMatches2Stop( Mio_Library_t * pLib );
extern void Mio_LibraryMatches2Start( Mio_Library_t * pLib );
extern void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs );
/*=== sclUtil.c =========================================================*/
extern Mio_Library_t * Abc_SclDeriveGenlibSimple( void * pScl );
extern Mio_Library_t * Abc_SclDeriveGenlib( void * pScl, void * pMio, float Slew, float Gain, int nGatesMin, int fVerbose );
+6
View File
@@ -84,6 +84,12 @@ struct Mio_LibraryStruct_t_
Vec_Wec_t * vTt2Match; // matches for truth tables
Mio_Cell2_t * pCells; // library gates
int nCells; // library gate count
Vec_Ptr_t * vNames;
Vec_Wrd_t * vTruths;
Vec_Mem_t * vTtMem_;
Vec_Int_t * vTt2Match_;
Vec_Int_t * vTt2Match4;
Vec_Int_t * vConfigs;
};
struct Mio_GateStruct_t_
+44
View File
@@ -54,6 +54,7 @@ void Mio_LibraryDelete( Mio_Library_t * pLib )
if ( pLib == NULL )
return;
Mio_LibraryMatchesStop( pLib );
Mio_LibraryMatches2Stop( pLib );
// free the bindings of nodes to gates from this library for all networks
Abc_FrameUnmapAllNetworks( Abc_FrameGetGlobalFrame() );
// free the library
@@ -1691,6 +1692,49 @@ void Mio_LibraryMatchesFetch( Mio_Library_t * pLib, Vec_Mem_t ** pvTtMem, Vec_We
*pnCells = pLib->nCells; // library gate count
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Mio_LibraryMatches2Stop( Mio_Library_t * pLib )
{
if ( !pLib->vNames )
return;
Vec_PtrFree( pLib->vNames );
Vec_WrdFree( pLib->vTruths );
Vec_MemHashFree( pLib->vTtMem_ );
Vec_MemFree( pLib->vTtMem_ );
Vec_IntFree( pLib->vTt2Match_ );
Vec_IntFree( pLib->vTt2Match4 );
Vec_IntFree( pLib->vConfigs );
}
void Mio_LibraryMatches2Start( Mio_Library_t * pLib )
{
extern int Gia_ManDeriveMatches( Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs );
if ( pLib->vNames )
return;
if ( pLib->vTtMem )
Mio_LibraryMatches2Stop( pLib );
Gia_ManDeriveMatches( &pLib->vNames, &pLib->vTruths, &pLib->vTtMem_, &pLib->vTt2Match_, &pLib->vTt2Match4, &pLib->vConfigs );
}
void Mio_LibraryMatches2Fetch( Mio_Library_t * pLib, Vec_Ptr_t ** pvNames, Vec_Wrd_t ** pvTruths, Vec_Mem_t ** pvTtMem, Vec_Int_t ** pvTt2Match, Vec_Int_t ** pvTt2Match4, Vec_Int_t ** pvConfigs )
{
Mio_LibraryMatches2Start( pLib );
*pvNames = pLib->vNames;
*pvTruths = pLib->vTruths;
*pvTtMem = pLib->vTtMem_;
*pvTt2Match = pLib->vTt2Match_;
*pvTt2Match4 = pLib->vTt2Match4;
*pvConfigs = pLib->vConfigs;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////