ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
acb.h File Reference
#include "aig/gia/gia.h"
#include "misc/extra/extra.h"
#include "misc/util/utilNam.h"
#include "misc/vec/vecHash.h"
#include "aig/miniaig/abcOper.h"
#include "misc/vec/vecQue.h"
Include dependency graph for acb.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Acb_Ntk_t_
 
struct  Acb_Man_t_
 

Macros

#define Acb_ManForEachNtk(p, pNtk, i)
 ITERATORS ///.
 
#define Acb_NtkForEachPi(p, iObj, i)
 
#define Acb_NtkForEachPo(p, iObj, i)
 
#define Acb_NtkForEachCi(p, iObj, i)
 
#define Acb_NtkForEachCo(p, iObj, i)
 
#define Acb_NtkForEachCoDriver(p, iObj, i)
 
#define Acb_NtkForEachCoAndDriver(p, iObj, iDriver, i)
 
#define Acb_NtkForEachCiVec(vVec, p, iObj, i)
 
#define Acb_NtkForEachCoVec(vVec, p, iObj, i)
 
#define Acb_NtkForEachCoDriverVec(vVec, p, iObj, i)
 
#define Acb_NtkForEachBoxSeq(p, iObj, i)
 
#define Acb_NtkForEachCioOrder(p, iObj, i)
 
#define Acb_NtkForEachObj(p, i)
 
#define Acb_NtkForEachObjReverse(p, i)
 
#define Acb_NtkForEachNode(p, i)
 
#define Acb_NtkForEachNodeSupp(p, i, nSuppSize)
 
#define Acb_NtkForEachNodeReverse(p, i)
 
#define Acb_NtkForEachObjType(p, Type, i)
 
#define Acb_NtkForEachBox(p, i)
 
#define Acb_ObjForEachFanin(p, iObj, iFanin, k)
 
#define Acb_ObjForEachFaninFast(p, iObj, pFanins, iFanin, k)
 
#define Acb_ObjForEachFanout(p, iObj, iFanout, k)
 
#define Acb_ObjForEachFon(p, iObj, iFon)
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct Acb_Aig_t_ Acb_Aig_t
 INCLUDES ///.
 
typedef struct Acb_Ntk_t_ Acb_Ntk_t
 
typedef struct Acb_Man_t_ Acb_Man_t
 

Functions

Vec_Int_tAcb_ObjCollectTfi (Acb_Ntk_t *p, int iObj, int fTerm)
 
Vec_Int_tAcb_ObjCollectTfo (Acb_Ntk_t *p, int iObj, int fTerm)
 
Vec_Int_tAcb_ObjCollectTfiVec (Acb_Ntk_t *p, Vec_Int_t *vObjs)
 
Vec_Int_tAcb_ObjCollectTfoVec (Acb_Ntk_t *p, Vec_Int_t *vObjs)
 
int Acb_NtkCountPiBuffers (Acb_Ntk_t *p, Vec_Int_t *vObjs)
 
int Acb_NtkCountPoDrivers (Acb_Ntk_t *p, Vec_Int_t *vObjs)
 
int Acb_NtkFindMffcSize (Acb_Ntk_t *p, Vec_Int_t *vObjsRefed, Vec_Int_t *vObjsDerefed, int nGates[5])
 
int Acb_ObjComputeLevelD (Acb_Ntk_t *p, int iObj)
 
int Acb_NtkComputeLevelD (Acb_Ntk_t *p, Vec_Int_t *vTfo)
 
void Acb_NtkUpdateLevelD (Acb_Ntk_t *p, int iObj)
 
void Acb_NtkUpdateTiming (Acb_Ntk_t *p, int iObj)
 
void Acb_NtkPrintNode (Acb_Ntk_t *p, int iObj)
 
int Acb_NtkCreateNode (Acb_Ntk_t *p, word uTruth, Vec_Int_t *vSupp)
 
void Acb_NtkUpdateNode (Acb_Ntk_t *p, int Pivot, word uTruth, Vec_Int_t *vSupp)
 
Acb_Ntk_tAcb_VerilogSimpleRead (char *pFileName, char *pFileNameW)
 

Macro Definition Documentation

◆ Acb_ManForEachNtk

#define Acb_ManForEachNtk ( p,
pNtk,
i )
Value:
for ( i = 1; (i <= Acb_ManNtkNum(p)) && (((pNtk) = Acb_ManNtk(p, i)), 1); i++ )
Cube * p
Definition exorList.c:222

ITERATORS ///.

Definition at line 328 of file acb.h.

328#define Acb_ManForEachNtk( p, pNtk, i ) \
329 for ( i = 1; (i <= Acb_ManNtkNum(p)) && (((pNtk) = Acb_ManNtk(p, i)), 1); i++ )

◆ Acb_NtkForEachBox

#define Acb_NtkForEachBox ( p,
i )
Value:
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjIsBox(p, i) ) {} else

Definition at line 370 of file acb.h.

370#define Acb_NtkForEachBox( p, i ) \
371 for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjIsBox(p, i) ) {} else

◆ Acb_NtkForEachBoxSeq

#define Acb_NtkForEachBoxSeq ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkSeqNum(p)) && (((iObj) = Acb_NtkBoxSeq(p, i)), 1); i++ )

Definition at line 352 of file acb.h.

352#define Acb_NtkForEachBoxSeq( p, iObj, i ) \
353 for ( i = 0; (i < Acb_NtkSeqNum(p)) && (((iObj) = Acb_NtkBoxSeq(p, i)), 1); i++ )

◆ Acb_NtkForEachCi

#define Acb_NtkForEachCi ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkCiNum(p)) && (((iObj) = Acb_NtkCi(p, i)), 1); i++ )

Definition at line 336 of file acb.h.

336#define Acb_NtkForEachCi( p, iObj, i ) \
337 for ( i = 0; (i < Acb_NtkCiNum(p)) && (((iObj) = Acb_NtkCi(p, i)), 1); i++ )

◆ Acb_NtkForEachCioOrder

#define Acb_NtkForEachCioOrder ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkCioOrderNum(p)) && (((iObj) = Acb_NtkCioOrder(p, i)), 1); i++ )

Definition at line 354 of file acb.h.

354#define Acb_NtkForEachCioOrder( p, iObj, i ) \
355 for ( i = 0; (i < Acb_NtkCioOrderNum(p)) && (((iObj) = Acb_NtkCioOrder(p, i)), 1); i++ )

◆ Acb_NtkForEachCiVec

#define Acb_NtkForEachCiVec ( vVec,
p,
iObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCi(p, Vec_IntEntry(vVec,i))), 1); i++ )

Definition at line 345 of file acb.h.

345#define Acb_NtkForEachCiVec( vVec, p, iObj, i ) \
346 for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCi(p, Vec_IntEntry(vVec,i))), 1); i++ )

◆ Acb_NtkForEachCo

#define Acb_NtkForEachCo ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1); i++ )

Definition at line 338 of file acb.h.

338#define Acb_NtkForEachCo( p, iObj, i ) \
339 for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1); i++ )

◆ Acb_NtkForEachCoAndDriver

#define Acb_NtkForEachCoAndDriver ( p,
iObj,
iDriver,
i )
Value:
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1) && (((iDriver) = Acb_ObjFanin(p, iObj, 0)), 1); i++ )

Definition at line 342 of file acb.h.

342#define Acb_NtkForEachCoAndDriver( p, iObj, iDriver, i ) \
343 for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1) && (((iDriver) = Acb_ObjFanin(p, iObj, 0)), 1); i++ )

◆ Acb_NtkForEachCoDriver

#define Acb_NtkForEachCoDriver ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, i), 0)), 1); i++ )

Definition at line 340 of file acb.h.

340#define Acb_NtkForEachCoDriver( p, iObj, i ) \
341 for ( i = 0; (i < Acb_NtkCoNum(p)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, i), 0)), 1); i++ )

◆ Acb_NtkForEachCoDriverVec

#define Acb_NtkForEachCoDriverVec ( vVec,
p,
iObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, Vec_IntEntry(vVec,i)), 0)), 1); i++ )

Definition at line 349 of file acb.h.

349#define Acb_NtkForEachCoDriverVec( vVec, p, iObj, i ) \
350 for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_ObjFanin(p, Acb_NtkCo(p, Vec_IntEntry(vVec,i)), 0)), 1); i++ )

◆ Acb_NtkForEachCoVec

#define Acb_NtkForEachCoVec ( vVec,
p,
iObj,
i )
Value:
for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCo(p, Vec_IntEntry(vVec,i))), 1); i++ )

Definition at line 347 of file acb.h.

347#define Acb_NtkForEachCoVec( vVec, p, iObj, i ) \
348 for ( i = 0; (i < Vec_IntSize(vVec)) && (((iObj) = Acb_NtkCo(p, Vec_IntEntry(vVec,i))), 1); i++ )

◆ Acb_NtkForEachNode

#define Acb_NtkForEachNode ( p,
i )
Value:
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) ) {} else

Definition at line 362 of file acb.h.

362#define Acb_NtkForEachNode( p, i ) \
363 for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) ) {} else

◆ Acb_NtkForEachNodeReverse

#define Acb_NtkForEachNodeReverse ( p,
i )
Value:
for ( i = Vec_StrSize(&p->vObjType)-1; i > 0; i-- ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) ) {} else

Definition at line 366 of file acb.h.

366#define Acb_NtkForEachNodeReverse( p, i ) \
367 for ( i = Vec_StrSize(&p->vObjType)-1; i > 0; i-- ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) ) {} else

◆ Acb_NtkForEachNodeSupp

#define Acb_NtkForEachNodeSupp ( p,
i,
nSuppSize )
Value:
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) || Acb_ObjFaninNum(p, i) != nSuppSize ) {} else

Definition at line 364 of file acb.h.

364#define Acb_NtkForEachNodeSupp( p, i, nSuppSize ) \
365 for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) || Acb_ObjIsCio(p, i) || Acb_ObjFaninNum(p, i) != nSuppSize ) {} else

◆ Acb_NtkForEachObj

#define Acb_NtkForEachObj ( p,
i )
Value:
for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) ) {} else

Definition at line 358 of file acb.h.

358#define Acb_NtkForEachObj( p, i ) \
359 for ( i = 1; i < Vec_StrSize(&p->vObjType); i++ ) if ( !Acb_ObjType(p, i) ) {} else

◆ Acb_NtkForEachObjReverse

#define Acb_NtkForEachObjReverse ( p,
i )
Value:
for ( i = Vec_StrSize(&p->vObjType)-1; i > 0; i-- ) if ( !Acb_ObjType(p, i) ) {} else

Definition at line 360 of file acb.h.

360#define Acb_NtkForEachObjReverse( p, i ) \
361 for ( i = Vec_StrSize(&p->vObjType)-1; i > 0; i-- ) if ( !Acb_ObjType(p, i) ) {} else

◆ Acb_NtkForEachObjType

#define Acb_NtkForEachObjType ( p,
Type,
i )
Value:
for ( i = 1; i < Vec_StrSize(&p->vObjType) && (((Type) = Acb_ObjType(p, i)), 1); i++ ) if ( !Type ) {} else

Definition at line 368 of file acb.h.

368#define Acb_NtkForEachObjType( p, Type, i ) \
369 for ( i = 1; i < Vec_StrSize(&p->vObjType) && (((Type) = Acb_ObjType(p, i)), 1); i++ ) if ( !Type ) {} else

◆ Acb_NtkForEachPi

#define Acb_NtkForEachPi ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkPiNum(p)) && (((iObj) = Acb_NtkCi(p, i)), 1); i++ )

Definition at line 331 of file acb.h.

331#define Acb_NtkForEachPi( p, iObj, i ) \
332 for ( i = 0; (i < Acb_NtkPiNum(p)) && (((iObj) = Acb_NtkCi(p, i)), 1); i++ )

◆ Acb_NtkForEachPo

#define Acb_NtkForEachPo ( p,
iObj,
i )
Value:
for ( i = 0; (i < Acb_NtkPoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1); i++ )

Definition at line 333 of file acb.h.

333#define Acb_NtkForEachPo( p, iObj, i ) \
334 for ( i = 0; (i < Acb_NtkPoNum(p)) && (((iObj) = Acb_NtkCo(p, i)), 1); i++ )

◆ Acb_ObjForEachFanin

#define Acb_ObjForEachFanin ( p,
iObj,
iFanin,
k )
Value:
for ( k = 0; k < Acb_ObjFaninNum(p, iObj) && ((iFanin = Acb_ObjFanin(p, iObj, k)), 1); k++ )

Definition at line 373 of file acb.h.

373#define Acb_ObjForEachFanin( p, iObj, iFanin, k ) \
374 for ( k = 0; k < Acb_ObjFaninNum(p, iObj) && ((iFanin = Acb_ObjFanin(p, iObj, k)), 1); k++ )

◆ Acb_ObjForEachFaninFast

#define Acb_ObjForEachFaninFast ( p,
iObj,
pFanins,
iFanin,
k )
Value:
for ( k = 0, pFanins = Acb_ObjFanins(p, iObj); k < pFanins[0] && ((iFanin = pFanins[k+1]), 1); k++ )

Definition at line 375 of file acb.h.

375#define Acb_ObjForEachFaninFast( p, iObj, pFanins, iFanin, k ) \
376 for ( k = 0, pFanins = Acb_ObjFanins(p, iObj); k < pFanins[0] && ((iFanin = pFanins[k+1]), 1); k++ )

◆ Acb_ObjForEachFanout

#define Acb_ObjForEachFanout ( p,
iObj,
iFanout,
k )
Value:
Vec_IntForEachEntry( Vec_WecEntry(&p->vFanouts, iObj), iFanout, k ) if ( !Acb_ObjType(p, iFanout) ) {} else
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54

Definition at line 378 of file acb.h.

378#define Acb_ObjForEachFanout( p, iObj, iFanout, k ) \
379 Vec_IntForEachEntry( Vec_WecEntry(&p->vFanouts, iObj), iFanout, k ) if ( !Acb_ObjType(p, iFanout) ) {} else

◆ Acb_ObjForEachFon

#define Acb_ObjForEachFon ( p,
iObj,
iFon )
Value:
for ( assert(Acb_ObjIsBox(p, iObj)), iFon = iObj + 1; iFon < Acb_NtkObjNum(p) && Acb_ObjIsFon(p, iFon); iFon++ )
#define assert(ex)
Definition util_old.h:213

Definition at line 381 of file acb.h.

381#define Acb_ObjForEachFon( p, iObj, iFon ) \
382 for ( assert(Acb_ObjIsBox(p, iObj)), iFon = iObj + 1; iFon < Acb_NtkObjNum(p) && Acb_ObjIsFon(p, iFon); iFon++ )

Typedef Documentation

◆ Acb_Aig_t

typedef typedefABC_NAMESPACE_HEADER_START struct Acb_Aig_t_ Acb_Aig_t

INCLUDES ///.

CFile****************************************************************

FileName [acb.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Hierarchical word-level netlist.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - July 21, 2015.]

Revision [

Id
acb.h,v 1.00 2014/11/29 00:00:00 alanmi Exp

] PARAMETERS /// BASIC TYPES ///

Definition at line 46 of file acb.h.

◆ Acb_Man_t

typedef struct Acb_Man_t_ Acb_Man_t

Definition at line 48 of file acb.h.

◆ Acb_Ntk_t

typedef struct Acb_Ntk_t_ Acb_Ntk_t

Definition at line 47 of file acb.h.

Function Documentation

◆ Acb_NtkComputeLevelD()

int Acb_NtkComputeLevelD ( Acb_Ntk_t * p,
Vec_Int_t * vTfo )
extern

Definition at line 340 of file acbUtil.c.

341{
342 // it is assumed that vTfo contains CO nodes and level of new nodes was already updated
343 int i, iObj, Level = 0;
344 if ( !Acb_NtkHasObjLevelD( p ) )
345 Acb_NtkCleanObjLevelD( p );
346 Vec_IntForEachEntryReverse( vTfo, iObj, i )
347 Acb_ObjComputeLevelD( p, iObj );
348 Acb_NtkForEachCo( p, iObj, i )
349 Level = Abc_MaxInt( Level, Acb_ObjLevelD(p, iObj) );
350 p->LevelMax = Level;
351 return Level;
352}
int Acb_ObjComputeLevelD(Acb_Ntk_t *p, int iObj)
Definition acbUtil.c:333
#define Acb_NtkForEachCo(p, iObj, i)
Definition acb.h:338
#define Vec_IntForEachEntryReverse(vVec, pEntry, i)
Definition vecInt.h:62
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_NtkCountPiBuffers()

int Acb_NtkCountPiBuffers ( Acb_Ntk_t * p,
Vec_Int_t * vObjs )
extern

Definition at line 139 of file acbUtil.c.

140{
141 int i, iObj, Count = 0;
142 Vec_IntForEachEntry( vObjs, iObj, i )
143 Count += Acb_NtkIsPiBuffers( p, iObj );
144 return Count;
145}
int Acb_NtkIsPiBuffers(Acb_Ntk_t *p, int iObj)
Definition acbUtil.c:131
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_NtkCountPoDrivers()

int Acb_NtkCountPoDrivers ( Acb_Ntk_t * p,
Vec_Int_t * vObjs )
extern

Definition at line 146 of file acbUtil.c.

147{
148 int i, iObj, Count = 0;
149 Acb_NtkIncTravId( p );
150 Acb_NtkForEachCo( p, iObj, i )
151 {
152 int Fanin0 = Acb_ObjFanin0(p, iObj);
153 Acb_ObjSetTravIdCur( p, iObj );
154 Acb_ObjSetTravIdCur( p, Fanin0 );
155 if ( Acb_ObjFaninNum(p, Fanin0) == 1 )
156 Acb_ObjSetTravIdCur( p, Acb_ObjFanin0(p, Fanin0) );
157 }
158 Vec_IntForEachEntry( vObjs, iObj, i )
159 Count += Acb_ObjIsTravIdCur(p, iObj);
160 return Count;
161}
Here is the caller graph for this function:

◆ Acb_NtkCreateNode()

int Acb_NtkCreateNode ( Acb_Ntk_t * p,
word uTruth,
Vec_Int_t * vSupp )
extern

Definition at line 636 of file acbUtil.c.

637{
638 int Pivot = Acb_ObjAlloc( p, ABC_OPER_LUT, Vec_IntSize(vSupp), 0 );
639 Acb_ObjSetTruth( p, Pivot, uTruth );
640 Acb_ObjAddFanins( p, Pivot, vSupp );
641 Acb_ObjAddFaninFanout( p, Pivot );
642 Acb_ObjComputeLevelD( p, Pivot );
643 return Pivot;
644}
@ ABC_OPER_LUT
Definition abcOper.h:127
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_NtkFindMffcSize()

int Acb_NtkFindMffcSize ( Acb_Ntk_t * p,
Vec_Int_t * vObjsRefed,
Vec_Int_t * vObjsDerefed,
int nGates[5] )
extern

◆ Acb_NtkPrintNode()

void Acb_NtkPrintNode ( Acb_Ntk_t * p,
int iObj )
extern

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 628 of file acbUtil.c.

629{
630 int k, iFanin, * pFanins;
631 printf( "Node %5d : ", iObj );
632 Acb_ObjForEachFaninFast( p, iObj, pFanins, iFanin, k )
633 printf( "%d ", iFanin );
634 printf( "LevelD = %d. LevelR = %d.\n", Acb_ObjLevelD(p, iObj), Acb_ObjLevelR(p, iObj) );
635}
#define Acb_ObjForEachFaninFast(p, iObj, pFanins, iFanin, k)
Definition acb.h:375
Here is the caller graph for this function:

◆ Acb_NtkUpdateLevelD()

void Acb_NtkUpdateLevelD ( Acb_Ntk_t * p,
int iObj )
extern

Definition at line 376 of file acbUtil.c.

377{
378 Vec_Int_t * vTfo = Acb_ObjCollectTfo( p, Pivot, 1 );
379 Acb_NtkComputeLevelD( p, vTfo );
380}
Vec_Int_t * Acb_ObjCollectTfo(Acb_Ntk_t *p, int iObj, int fTerm)
Definition acbUtil.c:96
int Acb_NtkComputeLevelD(Acb_Ntk_t *p, Vec_Int_t *vTfo)
Definition acbUtil.c:340
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_NtkUpdateNode()

void Acb_NtkUpdateNode ( Acb_Ntk_t * p,
int Pivot,
word uTruth,
Vec_Int_t * vSupp )
extern

Definition at line 681 of file acbUtil.c.

682{
683 //int Level = Acb_ObjLevelD(p, Pivot);
684 Acb_NtkSaveSupport( p, Pivot );
685 //Acb_NtkPrintNode( p, Pivot );
686 Acb_NtkResetNode( p, Pivot, uTruth, vSupp );
687 Acb_ObjComputeLevelD( p, Pivot );
688 //assert( Level > Acb_ObjLevelD(p, Pivot) );
689 //Acb_NtkPrintNode( p, Pivot );
690 if ( p->vQue == NULL )
691 Acb_NtkUpdateLevelD( p, Pivot );
692 else
693// Acb_NtkUpdateTiming( p, Pivot );
694 Acb_NtkUpdateTiming( p, -1 );
695 Vec_IntClear( &p->vSuppOld );
696}
void Acb_NtkSaveSupport(Acb_Ntk_t *p, int iObj)
Definition acbUtil.c:674
void Acb_NtkUpdateLevelD(Acb_Ntk_t *p, int Pivot)
Definition acbUtil.c:376
void Acb_NtkUpdateTiming(Acb_Ntk_t *p, int iObj)
Definition acbUtil.c:570
void Acb_NtkResetNode(Acb_Ntk_t *p, int Pivot, word uTruth, Vec_Int_t *vSupp)
Definition acbUtil.c:645
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_NtkUpdateTiming()

void Acb_NtkUpdateTiming ( Acb_Ntk_t * p,
int iObj )
extern

Definition at line 570 of file acbUtil.c.

571{
572 int i, Entry, LevelMax = p->LevelMax;
573 int LevelD, LevelR, nPaths1, nPaths2;
574 // assuming that direct level of the new nodes (including iObj) is up to date
575 Vec_Int_t * vTfi = Acb_ObjCollectTfi( p, iObj, 1 );
576 Vec_Int_t * vTfo = Acb_ObjCollectTfo( p, iObj, 1 );
577 if ( iObj > 0 )
578 {
579 assert( Vec_IntEntryLast(vTfi) == iObj );
580 assert( Vec_IntEntryLast(vTfo) == iObj );
581 Vec_IntPop( vTfo );
582 }
583 Acb_NtkComputeLevelD( p, vTfo );
584 LevelD = p->LevelMax;
585 Acb_NtkComputeLevelR( p, vTfi );
586 LevelR = p->LevelMax;
587 assert( LevelD == LevelR );
588 if ( iObj > 0 && LevelMax > p->LevelMax ) // reduced level
589 {
590 iObj = -1;
591 vTfi = Acb_ObjCollectTfi( p, -1, 1 );
592 vTfo = Acb_ObjCollectTfo( p, -1, 1 );
593 Vec_QueClear( p->vQue );
594 // add backup here
595 }
596 if ( iObj > 0 )
597 Acb_NtkComputePathsD( p, vTfi, 0 );
598 Acb_NtkComputePathsD( p, vTfo, 1 );
599 nPaths1 = p->nPaths;
600 if ( iObj > 0 )
601 Acb_NtkComputePathsR( p, vTfo, 0 );
602 Acb_NtkComputePathsR( p, vTfi, 1 );
603 nPaths2 = p->nPaths;
604 assert( nPaths1 == nPaths2 );
605 Vec_IntForEachEntry( vTfi, Entry, i )
606 Acb_ObjUpdatePriority( p, Entry );
607 if ( iObj > 0 )
608 Vec_IntForEachEntry( vTfo, Entry, i )
609 Acb_ObjUpdatePriority( p, Entry );
610
611// printf( "Updating timing for object %d.\n", iObj );
612// Acb_NtkPrintPaths( p );
613// while ( (Entry = (int)Vec_QueTopPriority(p->vQue)) > 0 )
614// printf( "Obj = %5d : Prio = %d.\n", Vec_QuePop(p->vQue), Entry );
615}
int Acb_NtkComputeLevelR(Acb_Ntk_t *p, Vec_Int_t *vTfi)
Definition acbUtil.c:361
int Acb_NtkComputePathsD(Acb_Ntk_t *p, Vec_Int_t *vTfo, int fReverse)
Definition acbUtil.c:409
Vec_Int_t * Acb_ObjCollectTfi(Acb_Ntk_t *p, int iObj, int fTerm)
Definition acbUtil.c:59
int Acb_NtkComputePathsR(Acb_Ntk_t *p, Vec_Int_t *vTfi, int fReverse)
Definition acbUtil.c:456
void Acb_ObjUpdatePriority(Acb_Ntk_t *p, int iObj)
Definition acbUtil.c:546
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_ObjCollectTfi()

Vec_Int_t * Acb_ObjCollectTfi ( Acb_Ntk_t * p,
int iObj,
int fTerm )
extern

Definition at line 59 of file acbUtil.c.

60{
61 int i, Node;
62 Vec_IntClear( &p->vArray0 );
63 Acb_NtkIncTravId( p );
64 if ( iObj > 0 )
65 {
66 Vec_IntForEachEntry( &p->vSuppOld, Node, i )
67 Acb_ObjCollectTfi_rec( p, Node, fTerm );
68 Acb_ObjCollectTfi_rec( p, iObj, fTerm );
69 }
70 else
71 Acb_NtkForEachCo( p, iObj, i )
72 Acb_ObjCollectTfi_rec( p, iObj, fTerm );
73 return &p->vArray0;
74}
ABC_NAMESPACE_IMPL_START void Acb_ObjCollectTfi_rec(Acb_Ntk_t *p, int iObj, int fTerm)
DECLARATIONS ///.
Definition acbUtil.c:48
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_ObjCollectTfiVec()

Vec_Int_t * Acb_ObjCollectTfiVec ( Acb_Ntk_t * p,
Vec_Int_t * vObjs )
extern

Definition at line 75 of file acbUtil.c.

76{
77 int i, iObj;
78 Vec_IntClear( &p->vArray0 );
79 Acb_NtkIncTravId( p );
80 Vec_IntForEachEntry( vObjs, iObj, i )
81 Acb_ObjCollectTfi_rec( p, iObj, 0 );
82 return &p->vArray0;
83}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_ObjCollectTfo()

Vec_Int_t * Acb_ObjCollectTfo ( Acb_Ntk_t * p,
int iObj,
int fTerm )
extern

Definition at line 96 of file acbUtil.c.

97{
98 int i;
99 Vec_IntClear( &p->vArray1 );
100 Acb_NtkIncTravId( p );
101 if ( iObj > 0 )
102 Acb_ObjCollectTfo_rec( p, iObj, fTerm );
103 else
104 Acb_NtkForEachCi( p, iObj, i )
105 Acb_ObjCollectTfo_rec( p, iObj, fTerm );
106 return &p->vArray1;
107}
void Acb_ObjCollectTfo_rec(Acb_Ntk_t *p, int iObj, int fTerm)
Definition acbUtil.c:85
#define Acb_NtkForEachCi(p, iObj, i)
Definition acb.h:336
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_ObjCollectTfoVec()

Vec_Int_t * Acb_ObjCollectTfoVec ( Acb_Ntk_t * p,
Vec_Int_t * vObjs )
extern

Definition at line 108 of file acbUtil.c.

109{
110 int i, iObj;
111 if ( !Acb_NtkHasObjFanout(p) )
112 Acb_NtkCreateFanout( p );
113 Vec_IntClear( &p->vArray1 );
114 Acb_NtkIncTravId( p );
115 Vec_IntForEachEntry( vObjs, iObj, i )
116 Acb_ObjCollectTfo_rec( p, iObj, 0 );
117 return &p->vArray1;
118}
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Acb_ObjComputeLevelD()

int Acb_ObjComputeLevelD ( Acb_Ntk_t * p,
int iObj )
extern

Function*************************************************************

Synopsis [Computing and updating direct and reverse logic level.]

Description []

SideEffects []

SeeAlso []

Definition at line 333 of file acbUtil.c.

334{
335 int * pFanins, iFanin, k, Level = 0;
336 Acb_ObjForEachFaninFast( p, iObj, pFanins, iFanin, k )
337 Level = Abc_MaxInt( Level, Acb_ObjLevelD(p, iFanin) );
338 return Acb_ObjSetLevelD( p, iObj, Level + !Acb_ObjIsCio(p, iObj) );
339}
Here is the caller graph for this function:

◆ Acb_VerilogSimpleRead()

Acb_Ntk_t * Acb_VerilogSimpleRead ( char * pFileName,
char * pFileNameW )
extern

Definition at line 622 of file acbFunc.c.

623{
624 extern Acb_Ntk_t * Acb_NtkFromNdr( char * pFileName, void * pModule, Abc_Nam_t * pNames, Vec_Int_t * vWeights, int nNameIdMax );
625 Acb_Ntk_t * pNtk;
626 Abc_Nam_t * pNames = Acb_VerilogStartNames();
627 Vec_Int_t * vBuffer = Acb_VerilogSimpleLex( pFileName, pNames );
628 void * pModule = vBuffer ? Acb_VerilogSimpleParse( vBuffer, pNames ) : NULL;
629 Vec_Int_t * vWeights = pFileNameW ? Acb_ReadWeightMap( pFileNameW, pNames ) : NULL;
630 if ( pFileName && pModule == NULL )
631 {
632 printf( "Cannot read input file \"%s\".\n", pFileName );
633 return NULL;
634 }
635 if ( pFileNameW && vWeights == NULL )
636 {
637 printf( "Cannot read weight file \"%s\".\n", pFileNameW );
638 return NULL;
639 }
640 if ( 0 )
641 {
642 char ** ppNames = Acb_PrepareNames(pNames);
643 Ndr_WriteVerilog( Extra_FileNameGenericAppend(pFileName, "_ndr.v"), pModule, ppNames, 1 );
644 ABC_FREE( ppNames );
645 }
646 pNtk = Acb_NtkFromNdr( pFileName, pModule, pNames, vWeights, Abc_NamObjNumMax(pNames) );
647 Ndr_Delete( pModule );
648 Vec_IntFree( vBuffer );
649 Vec_IntFreeP( &vWeights );
650 Abc_NamDeref( pNames );
651 return pNtk;
652}
#define ABC_FREE(obj)
Definition abc_global.h:267
Acb_Ntk_t * Acb_NtkFromNdr(char *pFileName, void *pModule, Abc_Nam_t *pNames, Vec_Int_t *vWeights, int nNameIdMax)
Definition acbAbc.c:164
Vec_Int_t * Acb_ReadWeightMap(char *pFileName, Abc_Nam_t *pNames)
Definition acbFunc.c:577
char ** Acb_PrepareNames(Abc_Nam_t *p)
Definition acbFunc.c:614
void * Acb_VerilogSimpleParse(Vec_Int_t *vBuffer, Abc_Nam_t *pNames)
Definition acbFunc.c:306
Abc_Nam_t * Acb_VerilogStartNames()
Definition acbFunc.c:189
Vec_Int_t * Acb_VerilogSimpleLex(char *pFileName, Abc_Nam_t *pNames)
Definition acbFunc.c:208
struct Acb_Ntk_t_ Acb_Ntk_t
Definition acb.h:47
char * Extra_FileNameGenericAppend(char *pBase, char *pSuffix)
int Abc_NamObjNumMax(Abc_Nam_t *p)
Definition utilNam.c:231
void Abc_NamDeref(Abc_Nam_t *p)
Definition utilNam.c:212
typedefABC_NAMESPACE_HEADER_START struct Abc_Nam_t_ Abc_Nam_t
INCLUDES ///.
Definition utilNam.h:39
Here is the call graph for this function:
Here is the caller graph for this function: