mirror of https://github.com/YosysHQ/abc.git
Adding new GIA duplication API.
This commit is contained in:
parent
d332e670a2
commit
ddda9320ac
|
|
@ -1133,6 +1133,7 @@ extern Gia_Man_t * Gia_ManDupTimes( Gia_Man_t * p, int nTimes );
|
|||
extern Gia_Man_t * Gia_ManDupDfs( Gia_Man_t * p );
|
||||
extern Gia_Man_t * Gia_ManDupCofactorVar( Gia_Man_t * p, int iVar, int Value );
|
||||
extern Gia_Man_t * Gia_ManDupCofactorObj( Gia_Man_t * p, int iObj, int Value );
|
||||
extern Gia_Man_t * Gia_ManDupBlock( Gia_Man_t * p, int nBlock );
|
||||
extern Gia_Man_t * Gia_ManDupExist( Gia_Man_t * p, int iVar );
|
||||
extern Gia_Man_t * Gia_ManDupDfsSkip( Gia_Man_t * p );
|
||||
extern Gia_Man_t * Gia_ManDupDfsCone( Gia_Man_t * p, Gia_Obj_t * pObj );
|
||||
|
|
|
|||
|
|
@ -1415,6 +1415,42 @@ Gia_Man_t * Gia_ManDupCofactorObj( Gia_Man_t * p, int iObj, int Value )
|
|||
return pNew;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Reduce bit-width of GIA assuming it is Boolean.]
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
Gia_Man_t * Gia_ManDupBlock( Gia_Man_t * p, int nBlock )
|
||||
{
|
||||
Gia_Man_t * pNew, * pTemp;
|
||||
Gia_Obj_t * pObj; int i;
|
||||
assert( Gia_ManCiNum(p) % nBlock == 0 );
|
||||
assert( Gia_ManCoNum(p) % nBlock == 0 );
|
||||
pNew = Gia_ManStart( Gia_ManObjNum(p) );
|
||||
pNew->pName = Abc_UtilStrsav( p->pName );
|
||||
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
|
||||
Gia_ManFillValue( p );
|
||||
Gia_ManConst0(p)->Value = 0;
|
||||
Gia_ManForEachCi( p, pObj, i )
|
||||
pObj->Value = (i % nBlock == 0) ? Gia_ManAppendCi(pNew) : 0;
|
||||
Gia_ManHashAlloc( pNew );
|
||||
Gia_ManForEachAnd( p, pObj, i )
|
||||
pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
|
||||
Gia_ManForEachCo( p, pObj, i )
|
||||
if ( i % nBlock == 0 )
|
||||
Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
|
||||
Gia_ManSetRegNum( pNew, Gia_ManRegNum(p)/nBlock );
|
||||
pNew = Gia_ManCleanup( pTemp = pNew );
|
||||
Gia_ManStop( pTemp );
|
||||
return pNew;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Existentially quantified given variable.]
|
||||
|
|
|
|||
|
|
@ -501,7 +501,7 @@ int Cba_CommandGet( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
return 0;
|
||||
usage:
|
||||
Abc_Print( -2, "usage: @get [-mvh]\n" );
|
||||
Abc_Print( -2, "\t extracts AIG or mapped network into the hierarchical design\n" );
|
||||
Abc_Print( -2, "\t inserts AIG or mapped network into the hierarchical design\n" );
|
||||
Abc_Print( -2, "\t-m : toggle using mapped network from main-space [default = %s]\n", fMapped? "yes": "no" );
|
||||
Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" );
|
||||
Abc_Print( -2, "\t-h : print the command usage\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue