Improving integration of the 'if' mapper with GIA.

This commit is contained in:
Alan Mishchenko 2013-06-25 19:46:07 -07:00
parent ed319531be
commit 0985491dce
3 changed files with 16 additions and 13 deletions

View File

@ -1010,7 +1010,7 @@ extern int Gia_ManLutNum( Gia_Man_t * p );
extern int Gia_ManLutLevel( Gia_Man_t * p );
extern void Gia_ManSetRefsMapped( Gia_Man_t * p );
extern void Gia_ManSetIfParsDefault( void * pIfPars );
extern Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pIfPars );
extern Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pIfPars, int fNormalized );
/*=== giaIso.c ===========================================================*/
extern Gia_Man_t * Gia_ManIsoCanonicize( Gia_Man_t * p, int fVerbose );
extern Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * p, Vec_Ptr_t ** pvPosEquivs, Vec_Ptr_t ** pvPiPerms, int fEstimate, int fDualOut, int fVerbose, int fVeryVerbose );

View File

@ -1107,7 +1107,7 @@ void Gia_ManTransferPacking( Gia_Man_t * pGia, Gia_Man_t * p )
SeeAlso []
***********************************************************************/
Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp )
Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp, int fNormalized )
{
Gia_Man_t * pNew;
If_Man_t * pIfMan;
@ -1120,16 +1120,19 @@ Gia_Man_t * Gia_ManPerformMapping( Gia_Man_t * p, void * pp )
assert( pPars->pTimesReq == NULL );
if ( p->pManTime )
{
pNew = Gia_ManDupUnnormalize( p );
if ( pNew == NULL )
return NULL;
pNew->pManTime = p->pManTime; p->pManTime = NULL;
pNew->pAigExtra = p->pAigExtra; p->pAigExtra = NULL;
pNew->nAnd2Delay = p->nAnd2Delay; p->nAnd2Delay = 0;
p = pNew;
// set arrival and required times
pPars->pTimesArr = Tim_ManGetArrTimes( (Tim_Man_t *)p->pManTime );
pPars->pTimesReq = Tim_ManGetReqTimes( (Tim_Man_t *)p->pManTime );
if ( fNormalized )
{
pNew = Gia_ManDupUnnormalize( p );
if ( pNew == NULL )
return NULL;
pNew->pManTime = p->pManTime; p->pManTime = NULL;
pNew->pAigExtra = p->pAigExtra; p->pAigExtra = NULL;
pNew->nAnd2Delay = p->nAnd2Delay; p->nAnd2Delay = 0;
p = pNew;
// set arrival and required times
pPars->pTimesArr = Tim_ManGetArrTimes( (Tim_Man_t *)p->pManTime );
pPars->pTimesReq = Tim_ManGetReqTimes( (Tim_Man_t *)p->pManTime );
}
}
else
p = Gia_ManDup( p );

View File

@ -29160,7 +29160,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
}
// perform mapping
pNew = Gia_ManPerformMapping( pAbc->pGia, pPars );
pNew = Gia_ManPerformMapping( pAbc->pGia, pPars, 1 );
if ( pNew == NULL )
{
Abc_Print( -1, "Abc_CommandAbc9If(): Mapping of the AIG has failed.\n" );