Beispiel #1
0
Datei: giaAig.c Projekt: mrkj/abc
ABC_NAMESPACE_IMPL_START


////////////////////////////////////////////////////////////////////////
///                        DECLARATIONS                              ///
////////////////////////////////////////////////////////////////////////

static inline int Gia_ObjChild0Copy( Aig_Obj_t * pObj )  { return Gia_LitNotCond( Aig_ObjFanin0(pObj)->iData, Aig_ObjFaninC0(pObj) ); }
Beispiel #2
0
/**Function*************************************************************

  Synopsis    [Duplicates the AIG while retiming the registers to the cut.]

  Description []
               
  SideEffects []

  SeeAlso     []

***********************************************************************/
Gia_Man_t * Gia_ManRetimeDupForward( Gia_Man_t * p, Vec_Ptr_t * vCut )
{
    Gia_Man_t * pNew, * pTemp;
    Gia_Obj_t * pObj, * pObjRi, * pObjRo;
    int i;
    // create the new manager
    pNew = Gia_ManStart( Gia_ManObjNum(p) );
    pNew->pName = Gia_UtilStrsav( p->pName );
    Gia_ManHashAlloc( pNew );
    // create the true PIs
    Gia_ManFillValue( p );
    Gia_ManSetPhase( p );
    Gia_ManConst0(p)->Value = 0;
    Gia_ManForEachPi( p, pObj, i )
        pObj->Value = Gia_ManAppendCi( pNew );
    // create the registers
    Vec_PtrForEachEntry( Gia_Obj_t *, vCut, pObj, i )
        pObj->Value = Gia_LitNotCond( Gia_ManAppendCi(pNew), pObj->fPhase );
    // duplicate logic above the cut
    Gia_ManForEachCo( p, pObj, i )
        Gia_ManRetimeDup_rec( pNew, Gia_ObjFanin0(pObj) );
    // create the true POs
    Gia_ManForEachPo( p, pObj, i )
        Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
    // remember value in LI
    Gia_ManForEachRi( p, pObj, i )
        pObj->Value = Gia_ObjFanin0Copy(pObj);
    // transfer values from the LIs to the LOs
    Gia_ManForEachRiRo( p, pObjRi, pObjRo, i )
        pObjRo->Value = pObjRi->Value;
    // erase the data values on the internal nodes of the cut
    Vec_PtrForEachEntry( Gia_Obj_t *, vCut, pObj, i )
        if ( Gia_ObjIsAnd(pObj) )
            pObj->Value = ~0;
    // duplicate logic below the cut
    Vec_PtrForEachEntry( Gia_Obj_t *, vCut, pObj, i )
    {
        Gia_ManRetimeDup_rec( pNew, pObj );
        Gia_ManAppendCo( pNew, Gia_LitNotCond( pObj->Value, pObj->fPhase ) );
    }
Beispiel #3
0
Datei: giaAig.c Projekt: mrkj/abc
static inline int Gia_ObjChild1Copy( Aig_Obj_t * pObj )  { return Gia_LitNotCond( Aig_ObjFanin1(pObj)->iData, Aig_ObjFaninC1(pObj) ); }