ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcapis.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ABC_DLLIMPORT
 MACRO DEFINITIONS ///.
 
#define ABC_DLL   ABC_DLLIMPORT
 

Typedefs

typedef typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
 INCLUDES ///.
 

Functions

ABC_DLL void Abc_Start ()
 FUNCTION DECLARATIONS ///.
 
ABC_DLL void Abc_Stop ()
 
ABC_DLL Abc_Frame_tAbc_FrameGetGlobalFrame ()
 
ABC_DLL int Cmd_CommandExecute (Abc_Frame_t *pAbc, const char *pCommandLine)
 
ABC_DLL void Abc_NtkInputMiniAig (Abc_Frame_t *pAbc, void *pMiniAig)
 
ABC_DLL void * Abc_NtkOutputMiniAig (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameGiaInputMiniAig (Abc_Frame_t *pAbc, void *p)
 
ABC_DLL void * Abc_FrameGiaOutputMiniAig (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_NtkSetFlopNum (Abc_Frame_t *pAbc, int nFlops)
 
ABC_DLL void Abc_FrameGiaInputMiniLut (Abc_Frame_t *pAbc, void *pMiniLut)
 
ABC_DLL void Abc_FrameGiaInputMiniLut2 (Abc_Frame_t *pAbc, void *pMiniLut)
 
ABC_DLL void * Abc_FrameGiaOutputMiniLut (Abc_Frame_t *pAbc)
 
ABC_DLL char * Abc_FrameGiaOutputMiniLutAttr (Abc_Frame_t *pAbc, void *pMiniLut)
 
ABC_DLL int * Abc_FrameGiaOutputMiniLutObj (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameSetObjDelays (Abc_Frame_t *pAbc, int *pDelays, int nDelays)
 
ABC_DLL int * Abc_FrameReadMiniLutSwitching (Abc_Frame_t *pAbc)
 
ABC_DLL int * Abc_FrameReadMiniLutSwitching2 (Abc_Frame_t *pAbc, int nRandPiFactor)
 
ABC_DLL int * Abc_FrameReadMiniLutSwitchingPo (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameInputNdr (Abc_Frame_t *pAbc, void *pData)
 
ABC_DLL void * Abc_FrameOutputNdr (Abc_Frame_t *pAbc)
 
ABC_DLL int * Abc_FrameOutputNdrArray (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_NtkSetCiArrivalTime (Abc_Frame_t *pAbc, int iCi, float Rise, float Fall)
 
ABC_DLL void Abc_NtkSetCoRequiredTime (Abc_Frame_t *pAbc, int iCo, float Rise, float Fall)
 
ABC_DLL void Abc_NtkSetAndGateDelay (Abc_Frame_t *pAbc, float Delay)
 
ABC_DLL int * Abc_NtkOutputMiniMapping (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_NtkPrintMiniMapping (int *pArray)
 
ABC_DLL int * Abc_FrameReadArrayMapping (Abc_Frame_t *pAbc)
 
ABC_DLL int * Abc_FrameReadBoxes (Abc_Frame_t *pAbc)
 
ABC_DLL int Abc_FrameReadProbStatus (Abc_Frame_t *pAbc)
 
ABC_DLL void * Abc_FrameReadCex (Abc_Frame_t *pAbc)
 
ABC_DLL void Abc_FrameSetRetimingData (Abc_Frame_t *pAbc, int *pRst, int *pSet, int *pEna, int nRegs)
 
ABC_DLL int * Abc_FrameReadMiniAigEquivClasses (Abc_Frame_t *pAbc)
 

Macro Definition Documentation

◆ ABC_DLL

#define ABC_DLL   ABC_DLLIMPORT

Definition at line 57 of file abcapis.h.

◆ ABC_DLLIMPORT

#define ABC_DLLIMPORT

MACRO DEFINITIONS ///.

Definition at line 53 of file abcapis.h.

Typedef Documentation

◆ Abc_Frame_t

typedef typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t

INCLUDES ///.

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

FileName [abcapis.h]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [Include this file in the external code calling ABC.]

Synopsis [External declarations.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - September 29, 2012.]

Revision [

Id
abcapis.h,v 1.00 2012/09/29 00:00:00 alanmi Exp

] PARAMETERS /// BASIC TYPES ///

Definition at line 38 of file abcapis.h.

Function Documentation

◆ Abc_FrameGetGlobalFrame()

ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame ( )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 643 of file mainFrame.c.

644{
645 if ( s_GlobalFrame == 0 )
646 {
647 // start the framework
648 s_GlobalFrame = Abc_FrameAllocate();
649 // perform initializations
650 Abc_FrameInit( s_GlobalFrame );
651 }
652 return s_GlobalFrame;
653}
Abc_Frame_t * Abc_FrameAllocate()
Definition mainFrame.c:162
void Abc_FrameInit(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition mainInit.c:106
Here is the call graph for this function:

◆ Abc_FrameGiaInputMiniAig()

ABC_DLL void Abc_FrameGiaInputMiniAig ( Abc_Frame_t * pAbc,
void * p )
extern

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

Synopsis [Procedures to input/output MiniAIG into/from internal GIA.]

Description []

SideEffects []

SeeAlso []

Definition at line 151 of file giaMini.c.

152{
153 Gia_Man_t * pGia;
154 if ( pAbc == NULL )
155 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
156 Gia_ManStopP( &pAbc->pGiaMiniAig );
157 Vec_IntFreeP( &pAbc->vCopyMiniAig );
158 pGia = Gia_ManFromMiniAig( (Mini_Aig_t *)p, &pAbc->vCopyMiniAig, 0 );
159 Abc_FrameUpdateGia( pAbc, pGia );
160 pAbc->pGiaMiniAig = Gia_ManDup( pGia );
161// Gia_ManDelete( pGia );
162}
void Abc_FrameUpdateGia(Abc_Frame_t *pAbc, Gia_Man_t *pNew)
Definition abc.c:824
Cube * p
Definition exorList.c:222
Gia_Man_t * Gia_ManFromMiniAig(Mini_Aig_t *p, Vec_Int_t **pvCopies, int fGiaSimple)
Definition giaMini.c:62
Gia_Man_t * Gia_ManDup(Gia_Man_t *p)
Definition giaDup.c:720
void Gia_ManStopP(Gia_Man_t **p)
Definition giaMan.c:224
struct Gia_Man_t_ Gia_Man_t
Definition gia.h:96
struct Mini_Aig_t_ Mini_Aig_t
BASIC TYPES ///.
Definition miniaig.h:48
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameGiaInputMiniLut()

ABC_DLL void Abc_FrameGiaInputMiniLut ( Abc_Frame_t * pAbc,
void * p )
extern

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

Synopsis [Procedures to input/output MiniAIG into/from internal GIA.]

Description []

SideEffects []

SeeAlso []

Definition at line 515 of file giaMini.c.

516{
517 Gia_Man_t * pGia;
518 if ( pAbc == NULL )
519 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
520 pGia = Gia_ManFromMiniLut( (Mini_Lut_t *)p, NULL );
521 Abc_FrameUpdateGia( pAbc, pGia );
522// Gia_ManDelete( pGia );
523}
Gia_Man_t * Gia_ManFromMiniLut(Mini_Lut_t *p, Vec_Int_t **pvCopies)
Definition giaMini.c:259
struct Mini_Lut_t_ Mini_Lut_t
BASIC TYPES ///.
Definition minilut.h:47
Here is the call graph for this function:

◆ Abc_FrameGiaInputMiniLut2()

ABC_DLL void Abc_FrameGiaInputMiniLut2 ( Abc_Frame_t * pAbc,
void * pMiniLut )
extern

Definition at line 524 of file giaMini.c.

525{
526 if ( pAbc == NULL )
527 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
528 Vec_IntFreeP( &pAbc->vCopyMiniLut );
529 Gia_ManStopP( &pAbc->pGiaMiniLut );
530 pAbc->pGiaMiniLut = Gia_ManFromMiniLut2( (Mini_Lut_t *)p, &pAbc->vCopyMiniLut );
531// Abc_FrameUpdateGia( pAbc, pGia );
532}
Gia_Man_t * Gia_ManFromMiniLut2(Mini_Lut_t *p, Vec_Int_t **pvCopies)
Definition giaMini.c:325
Here is the call graph for this function:

◆ Abc_FrameGiaOutputMiniAig()

ABC_DLL void * Abc_FrameGiaOutputMiniAig ( Abc_Frame_t * pAbc)
extern

Definition at line 163 of file giaMini.c.

164{
165 Gia_Man_t * pGia;
166 if ( pAbc == NULL )
167 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
168 pGia = Abc_FrameReadGia( pAbc );
169 if ( pGia == NULL )
170 printf( "Current network in ABC framework is not defined.\n" );
171 return Gia_ManToMiniAig( pGia );
172}
ABC_DLL Gia_Man_t * Abc_FrameReadGia(Abc_Frame_t *p)
Definition mainFrame.c:343
Mini_Aig_t * Gia_ManToMiniAig(Gia_Man_t *pGia)
Definition giaMini.c:118
Here is the call graph for this function:

◆ Abc_FrameGiaOutputMiniLut()

ABC_DLL void * Abc_FrameGiaOutputMiniLut ( Abc_Frame_t * pAbc)
extern

Definition at line 533 of file giaMini.c.

534{
535 Mini_Lut_t * pRes = NULL;
536 Gia_Man_t * pGia;
537 if ( pAbc == NULL )
538 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
539 Gia_ManStopP( &pAbc->pGiaMiniLut );
540 Vec_IntFreeP( &pAbc->vCopyMiniLut );
541 pGia = Abc_FrameReadGia( pAbc );
542 if ( pGia == NULL )
543 printf( "Current network in ABC framework is not defined.\n" );
544 pRes = Gia_ManToMiniLut( pGia );
545 pAbc->pGiaMiniLut = Gia_ManFromMiniLut( pRes, &pAbc->vCopyMiniLut );
546 return pRes;
547}
Mini_Lut_t * Gia_ManToMiniLut(Gia_Man_t *pGia)
Definition giaMini.c:411
Here is the call graph for this function:

◆ Abc_FrameGiaOutputMiniLutAttr()

ABC_DLL char * Abc_FrameGiaOutputMiniLutAttr ( Abc_Frame_t * pAbc,
void * pMiniLut )
extern

Definition at line 548 of file giaMini.c.

549{
550 Gia_Man_t * pGia;
551 if ( pAbc == NULL )
552 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
553 pGia = Abc_FrameReadGia( pAbc );
554 if ( pGia == NULL )
555 printf( "Current network in ABC framework is not defined.\n" );
556 return Gia_ManToMiniLutAttr( pGia, pMiniLut );
557}
char * Gia_ManToMiniLutAttr(Gia_Man_t *pGia, void *pMiniLut)
Definition giaMini.c:494
Here is the call graph for this function:

◆ Abc_FrameGiaOutputMiniLutObj()

ABC_DLL int * Abc_FrameGiaOutputMiniLutObj ( Abc_Frame_t * pAbc)
extern

Definition at line 558 of file giaMini.c.

559{
560 int * pRes = NULL;
561 if ( pAbc == NULL )
562 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
563 if ( pAbc->vMiniLutObjs == NULL )
564 printf( "MiniLut objects are not defined.\n" );
565 pRes = Vec_IntReleaseArray( pAbc->vMiniLutObjs );
566 Vec_IntFreeP( &pAbc->vMiniLutObjs );
567 return pRes;
568}

◆ Abc_FrameInputNdr()

ABC_DLL void Abc_FrameInputNdr ( Abc_Frame_t * pAbc,
void * pData )
extern

Definition at line 89 of file mainFrame.c.

89{ Ndr_Delete(s_GlobalFrame->pNdr); s_GlobalFrame->pNdr = pData; }
Here is the caller graph for this function:

◆ Abc_FrameOutputNdr()

ABC_DLL void * Abc_FrameOutputNdr ( Abc_Frame_t * pAbc)
extern

Definition at line 90 of file mainFrame.c.

90{ void * pData = s_GlobalFrame->pNdr; s_GlobalFrame->pNdr = NULL; return pData; }

◆ Abc_FrameOutputNdrArray()

ABC_DLL int * Abc_FrameOutputNdrArray ( Abc_Frame_t * pAbc)
extern

Definition at line 91 of file mainFrame.c.

91{ int * pArray = s_GlobalFrame->pNdrArray; s_GlobalFrame->pNdrArray = NULL; return pArray; }

◆ Abc_FrameReadArrayMapping()

ABC_DLL int * Abc_FrameReadArrayMapping ( Abc_Frame_t * pAbc)
extern

Definition at line 121 of file mainFrame.c.

121{ return pAbc->pArray; }

◆ Abc_FrameReadBoxes()

ABC_DLL int * Abc_FrameReadBoxes ( Abc_Frame_t * pAbc)
extern

Definition at line 124 of file mainFrame.c.

124{ return pAbc->pBoxes; }

◆ Abc_FrameReadCex()

ABC_DLL void * Abc_FrameReadCex ( Abc_Frame_t * pAbc)
extern

Definition at line 75 of file mainFrame.c.

75{ return s_GlobalFrame->pCex; }
Here is the caller graph for this function:

◆ Abc_FrameReadMiniAigEquivClasses()

ABC_DLL int * Abc_FrameReadMiniAigEquivClasses ( Abc_Frame_t * pAbc)
extern

Definition at line 835 of file giaMini.c.

836{
837 Vec_Int_t * vRes;
838 int * pRes;
839 if ( pAbc->pGiaMiniAig == NULL )
840 printf( "GIA derived from MiniAig is not available.\n" );
841 if ( pAbc->vCopyMiniAig == NULL )
842 printf( "Mapping of MiniAig nodes is not available.\n" );
843 if ( pAbc->pGia2 == NULL )
844 printf( "Internal GIA with equivalence classes is not available.\n" );
845 if ( pAbc->pGia2->pReprs == NULL )
846 {
847 printf( "Equivalence classes of internal GIA are not available.\n" );
848 return NULL;
849 }
850 else if ( 0 )
851 {
852 int i;
853 for ( i = 1; i < Gia_ManObjNum(pAbc->pGia2); i++ )
854 if ( Gia_ObjHasRepr(pAbc->pGia2, i) )
855 printf( "Obj %3d : Repr %3d Proved %d Failed %d\n", i, Gia_ObjRepr(pAbc->pGia2, i), Gia_ObjProved(pAbc->pGia2, i), Gia_ObjFailed(pAbc->pGia2, i) );
856 }
857 if ( Gia_ManObjNum(pAbc->pGia2) != Gia_ManObjNum(pAbc->pGiaMiniAig) )
858 printf( "Internal GIA with equivalence classes is not directly derived from MiniAig.\n" );
859 // derive the set of equivalent node pairs
860 vRes = Gia_ManMapEquivAfterScorr( pAbc->pGia2, pAbc->vCopyMiniAig );
861 pRes = Vec_IntReleaseArray( vRes );
862 Vec_IntFree( vRes );
863 return pRes;
864}
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition bblif.c:37
Vec_Int_t * Gia_ManMapEquivAfterScorr(Gia_Man_t *p, Vec_Int_t *vMap)
Definition giaMini.c:796
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Abc_FrameReadMiniLutSwitching()

ABC_DLL int * Abc_FrameReadMiniLutSwitching ( Abc_Frame_t * pAbc)
extern

Definition at line 727 of file giaMini.c.

728{
729 Vec_Int_t * vSwitching;
730 int i, iObj, * pRes = NULL;
731 if ( pAbc->pGiaMiniLut == NULL )
732 {
733 printf( "GIA derived from MiniLut is not available.\n" );
734 return NULL;
735 }
736 vSwitching = Gia_ManComputeSwitchProbs( pAbc->pGiaMiniLut, 48, 16, 0 );
737 pRes = ABC_CALLOC( int, Vec_IntSize(pAbc->vCopyMiniLut) );
738 Vec_IntForEachEntry( pAbc->vCopyMiniLut, iObj, i )
739 if ( iObj >= 0 )
740 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, Abc_Lit2Var(iObj) ));
741 Vec_IntFree( vSwitching );
742 return pRes;
743}
#define ABC_CALLOC(type, num)
Definition abc_global.h:265
Vec_Int_t * Gia_ManComputeSwitchProbs(Gia_Man_t *pGia, int nFrames, int nPref, int fProbOne)
Definition giaSwitch.c:658
typedefABC_NAMESPACE_HEADER_START struct Vec_Flt_t_ Vec_Flt_t
INCLUDES ///.
Definition vecFlt.h:42
#define Vec_IntForEachEntry(vVec, Entry, i)
MACRO DEFINITIONS ///.
Definition vecInt.h:54
Here is the call graph for this function:

◆ Abc_FrameReadMiniLutSwitching2()

ABC_DLL int * Abc_FrameReadMiniLutSwitching2 ( Abc_Frame_t * pAbc,
int nRandPiFactor )
extern

Definition at line 744 of file giaMini.c.

745{
746 Vec_Int_t * vSwitching;
747 int i, iObj, * pRes = NULL;
748 if ( pAbc->pGiaMiniLut == NULL )
749 {
750 printf( "GIA derived from MiniLut is not available.\n" );
751 return NULL;
752 }
753 vSwitching = Gia_ManComputeSwitchProbs2( pAbc->pGiaMiniLut, 48, 16, 0, fRandPiFactor );
754 pRes = ABC_CALLOC( int, Vec_IntSize(pAbc->vCopyMiniLut) );
755 Vec_IntForEachEntry( pAbc->vCopyMiniLut, iObj, i )
756 if ( iObj >= 0 )
757 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, Abc_Lit2Var(iObj) ));
758 Vec_IntFree( vSwitching );
759 return pRes;
760}
Vec_Int_t * Gia_ManComputeSwitchProbs2(Gia_Man_t *pGia, int nFrames, int nPref, int fProbOne, int nRandPiFactor)
Definition giaSwitch.c:684
Here is the call graph for this function:

◆ Abc_FrameReadMiniLutSwitchingPo()

ABC_DLL int * Abc_FrameReadMiniLutSwitchingPo ( Abc_Frame_t * pAbc)
extern

Definition at line 761 of file giaMini.c.

762{
763 Vec_Int_t * vSwitching;
764 int i, iObj, * pRes = NULL;
765 if ( pAbc->pGiaMiniAig == NULL )
766 {
767 printf( "GIA derived from MiniAIG is not available.\n" );
768 return NULL;
769 }
770 vSwitching = Gia_ManComputeSwitchProbs( pAbc->pGiaMiniAig, 48, 16, 0 );
771 pRes = ABC_CALLOC( int, Gia_ManCoNum(pAbc->pGiaMiniAig) );
772 Gia_ManForEachCoDriverId( pAbc->pGiaMiniAig, iObj, i )
773 pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, iObj ));
774 Vec_IntFree( vSwitching );
775 return pRes;
776}
#define Gia_ManForEachCoDriverId(p, DriverId, i)
Definition gia.h:1246
Here is the call graph for this function:

◆ Abc_FrameReadProbStatus()

ABC_DLL int Abc_FrameReadProbStatus ( Abc_Frame_t * pAbc)
extern

Definition at line 74 of file mainFrame.c.

74{ return s_GlobalFrame->Status; }
Here is the caller graph for this function:

◆ Abc_FrameSetObjDelays()

ABC_DLL void Abc_FrameSetObjDelays ( Abc_Frame_t * pAbc,
int * pDelays,
int nDelays )
extern

Definition at line 569 of file giaMini.c.

570{
571 Vec_IntFreeP( &pAbc->vObjDelays );
572 pAbc->vObjDelays = Vec_IntAllocArrayCopy( pDelays, nDelays );
573}

◆ Abc_FrameSetRetimingData()

ABC_DLL void Abc_FrameSetRetimingData ( Abc_Frame_t * pAbc,
int * pRst,
int * pSet,
int * pEna,
int nRegs )
extern

Definition at line 1353 of file giaMini.c.

1354{
1355 Gia_Man_t * pGia;
1356 int * pRstNew = ABC_CALLOC( int, nRegs );
1357 int * pSetNew = ABC_CALLOC( int, nRegs );
1358 int * pEnaNew = ABC_CALLOC( int, nRegs );
1359 if ( pAbc == NULL )
1360 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1361 pGia = Abc_FrameReadGia( pAbc );
1362 if ( pGia == NULL )
1363 printf( "Current network in ABC framework is not defined.\n" );
1364 else {
1365 assert( nRegs == Gia_ManRegNum(pGia) );
1366 memmove( pRstNew, pRst, sizeof(int)*nRegs );
1367 memmove( pSetNew, pSet, sizeof(int)*nRegs );
1368 memmove( pEnaNew, pEna, sizeof(int)*nRegs );
1369 }
1370 if ( pAbc->vCopyMiniAig == NULL )
1371 printf( "Mapping of MiniAig nodes is not available.\n" );
1372 else {
1373 Abc_FrameRemapLits( pRstNew, nRegs, pAbc->vCopyMiniAig );
1374 Abc_FrameRemapLits( pSetNew, nRegs, pAbc->vCopyMiniAig );
1375 Abc_FrameRemapLits( pEnaNew, nRegs, pAbc->vCopyMiniAig );
1376 }
1377 assert( pGia->vStopsF == NULL );
1378 assert( pGia->vStopsB == NULL );
1379 pGia->vStopsF = Gia_ManRetimableF( pGia, pRstNew, pSetNew, pEnaNew );
1380 pGia->vStopsB = Gia_ManRetimableB( pGia, pRstNew, pSetNew, pEnaNew );
1381 ABC_FREE( pRstNew );
1382 ABC_FREE( pSetNew );
1383 ABC_FREE( pEnaNew );
1384}
#define ABC_FREE(obj)
Definition abc_global.h:267
void Abc_FrameRemapLits(int *pLits, int nLits, Vec_Int_t *vMap)
Definition giaMini.c:1348
Vec_Str_t * Gia_ManRetimableB(Gia_Man_t *p, int *pRst, int *pSet, int *pEna)
Definition giaMini.c:1299
Vec_Str_t * Gia_ManRetimableF(Gia_Man_t *p, int *pRst, int *pSet, int *pEna)
Definition giaMini.c:1276
Vec_Str_t * vStopsF
Definition gia.h:245
Vec_Str_t * vStopsB
Definition gia.h:246
#define assert(ex)
Definition util_old.h:213
char * memmove()
Here is the call graph for this function:

◆ Abc_NtkInputMiniAig()

ABC_DLL void Abc_NtkInputMiniAig ( Abc_Frame_t * pAbc,
void * p )
extern

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

Synopsis [Procedures to update internal ABC network using AIG node array.]

Description []

SideEffects []

SeeAlso []

Definition at line 175 of file abcMini.c.

176{
177 Abc_Ntk_t * pNtk;
178 if ( pAbc == NULL )
179 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
180 pNtk = Abc_NtkFromMiniAig( (Mini_Aig_t *)p );
181 Abc_FrameReplaceCurrentNetwork( pAbc, pNtk );
182// Abc_NtkDelete( pNtk );
183}
Abc_Ntk_t * Abc_NtkFromMiniAig(Mini_Aig_t *p)
Definition abcMini.c:60
struct Abc_Ntk_t_ Abc_Ntk_t
Definition abc.h:115
ABC_DLL void Abc_FrameReplaceCurrentNetwork(Abc_Frame_t *p, Abc_Ntk_t *pNet)
Definition mainFrame.c:538
Here is the call graph for this function:

◆ Abc_NtkOutputMiniAig()

ABC_DLL void * Abc_NtkOutputMiniAig ( Abc_Frame_t * pAbc)
extern

Definition at line 184 of file abcMini.c.

185{
186 Abc_Ntk_t * pNtk;
187 if ( pAbc == NULL )
188 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
189 pNtk = Abc_FrameReadNtk( pAbc );
190 if ( pNtk == NULL )
191 printf( "Current network in ABC framework is not defined.\n" );
192 return Abc_NtkToMiniAig( pNtk );
193}
Mini_Aig_t * Abc_NtkToMiniAig(Abc_Ntk_t *pNtk)
Definition abcMini.c:123
ABC_DLL Abc_Ntk_t * Abc_FrameReadNtk(Abc_Frame_t *p)
Definition mainFrame.c:327
Here is the call graph for this function:

◆ Abc_NtkOutputMiniMapping()

ABC_DLL int * Abc_NtkOutputMiniMapping ( Abc_Frame_t * pAbc)
extern

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

Synopsis [This procedure outputs an array representing mini-mapped network.]

Description []

SideEffects []

SeeAlso []

Definition at line 1103 of file abcMap.c.

1104{
1105 //Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
1106 Abc_Ntk_t * pNtk;
1107 Vec_Int_t * vMapping;
1108 int * pArray;
1109 if ( pAbc == NULL )
1110 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1111 pNtk = Abc_FrameReadNtk( pAbc );
1112 if ( pNtk == NULL )
1113 printf( "Current network in ABC framework is not defined.\n" );
1114 if ( !Abc_NtkHasMapping(pNtk) )
1115 printf( "Current network in ABC framework is not mapped.\n" );
1116 // derive mini-mapping
1117 vMapping = Abc_NtkWriteMiniMapping( pNtk );
1118 pArray = Vec_IntArray( vMapping );
1119 ABC_FREE( vMapping );
1120 // print mini-mapping (optional)
1121// Abc_NtkPrintMiniMapping( pArray );
1122 // return the array representation of mini-mapping
1123 return pArray;
1124}
Vec_Int_t * Abc_NtkWriteMiniMapping(Abc_Ntk_t *pNtk)
Definition abcMap.c:834
Here is the call graph for this function:

◆ Abc_NtkPrintMiniMapping()

ABC_DLL void Abc_NtkPrintMiniMapping ( int * pArray)
extern

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

Synopsis [Prints mapped network represented in mini-mapped format.]

Description []

SideEffects []

SeeAlso []

Definition at line 1030 of file abcMap.c.

1031{
1032 int nCis, nCos, nNodes, nFlops;
1033 int i, k, nLeaves, Pos = 4;
1034 char * pBuffer, * pName;
1035 nCis = pArray[0];
1036 nCos = pArray[1];
1037 nNodes = pArray[2];
1038 nFlops = pArray[3];
1039 printf( "Mapped network has %d CIs, %d COs, %d gates, and %d flops.\n", nCis, nCos, nNodes, nFlops );
1040 printf( "The first %d object IDs (from 0 to %d) are reserved for the CIs.\n", nCis, nCis - 1 );
1041 for ( i = 0; i < nNodes; i++ )
1042 {
1043 nLeaves = pArray[Pos++];
1044 printf( "Node %d has %d fanins {", nCis + i, nLeaves );
1045 for ( k = 0; k < nLeaves; k++ )
1046 printf( " %d", pArray[Pos++] );
1047 printf( " }\n" );
1048 }
1049 for ( i = 0; i < nCos; i++ )
1050 printf( "CO %d is driven by node %d\n", i, pArray[Pos++] );
1051 pBuffer = (char *)(pArray + Pos);
1052 for ( i = 0; i < nNodes; i++ )
1053 {
1054 pName = pBuffer;
1055 pBuffer += strlen(pName) + 1;
1056 printf( "Node %d has gate \"%s\"\n", nCis + i, pName );
1057 }
1058 for ( i = 0; i < nCis; i++ )
1059 {
1060 pName = pBuffer;
1061 pBuffer += strlen(pName) + 1;
1062 printf( "CI %d has name \"%s\"\n", i, pName );
1063 }
1064 for ( i = 0; i < nCos; i++ )
1065 {
1066 pName = pBuffer;
1067 pBuffer += strlen(pName) + 1;
1068 printf( "CO %d has name \"%s\"\n", i, pName );
1069 }
1070}
ush Pos
Definition deflate.h:88
int strlen()

◆ Abc_NtkSetAndGateDelay()

ABC_DLL void Abc_NtkSetAndGateDelay ( Abc_Frame_t * pAbc,
float Delay )
extern

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

Synopsis [This APIs set AND gate delay.]

Description []

SideEffects []

SeeAlso []

Definition at line 1217 of file abcMap.c.

1218{
1219 //Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
1220 Abc_Ntk_t * pNtk;
1221 if ( pAbc == NULL )
1222 {
1223 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1224 return;
1225 }
1226 pNtk = Abc_FrameReadNtk( pAbc );
1227 if ( pNtk == NULL )
1228 {
1229 printf( "Current network in ABC framework is not defined.\n" );
1230 return;
1231 }
1232 pNtk->AndGateDelay = Delay;
1233}
float AndGateDelay
Definition abc.h:194
Here is the call graph for this function:

◆ Abc_NtkSetCiArrivalTime()

ABC_DLL void Abc_NtkSetCiArrivalTime ( Abc_Frame_t * pAbc,
int iCi,
float Rise,
float Fall )
extern

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

Synopsis [These APIs set arrival/required times of CIs/COs.]

Description []

SideEffects []

SeeAlso []

Definition at line 1157 of file abcMap.c.

1158{
1159 //Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
1160 Abc_Ntk_t * pNtk;
1161 Abc_Obj_t * pNode;
1162 if ( pAbc == NULL )
1163 {
1164 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1165 return;
1166 }
1167 pNtk = Abc_FrameReadNtk( pAbc );
1168 if ( pNtk == NULL )
1169 {
1170 printf( "Current network in ABC framework is not defined.\n" );
1171 return;
1172 }
1173 if ( iCi < 0 || iCi >= Abc_NtkCiNum(pNtk) )
1174 {
1175 printf( "CI index is not valid.\n" );
1176 return;
1177 }
1178 pNode = Abc_NtkCi( pNtk, iCi );
1179 Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pNode), Rise, Fall );
1180}
struct Abc_Obj_t_ Abc_Obj_t
Definition abc.h:116
ABC_DLL void Abc_NtkTimeSetArrival(Abc_Ntk_t *pNtk, int ObjId, float Rise, float Fall)
Definition abcTiming.c:208
Here is the call graph for this function:

◆ Abc_NtkSetCoRequiredTime()

ABC_DLL void Abc_NtkSetCoRequiredTime ( Abc_Frame_t * pAbc,
int iCo,
float Rise,
float Fall )
extern

Definition at line 1181 of file abcMap.c.

1182{
1183 //Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
1184 Abc_Ntk_t * pNtk;
1185 Abc_Obj_t * pNode;
1186 if ( pAbc == NULL )\
1187 {
1188 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
1189 return;
1190 }
1191 pNtk = Abc_FrameReadNtk( pAbc );
1192 if ( pNtk == NULL )
1193 {
1194 printf( "Current network in ABC framework is not defined.\n" );
1195 return;
1196 }
1197 if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) )
1198 {
1199 printf( "CO index is not valid.\n" );
1200 return;
1201 }
1202 pNode = Abc_NtkCo( pNtk, iCo );
1203 Abc_NtkTimeSetRequired( pNtk, Abc_ObjId(pNode), Rise, Fall );
1204}
ABC_DLL void Abc_NtkTimeSetRequired(Abc_Ntk_t *pNtk, int ObjId, float Rise, float Fall)
Definition abcTiming.c:224
Here is the call graph for this function:

◆ Abc_NtkSetFlopNum()

ABC_DLL void Abc_NtkSetFlopNum ( Abc_Frame_t * pAbc,
int nFlops )
extern

Definition at line 194 of file abcMini.c.

195{
196 extern void Abc_NtkMakeSeq( Abc_Ntk_t * pNtk, int nFlops );
197 Abc_Ntk_t * pNtk;
198 if ( pAbc == NULL )
199 printf( "ABC framework is not initialized by calling Abc_Start()\n" );
200 pNtk = Abc_FrameReadNtk( pAbc );
201 if ( pNtk == NULL )
202 printf( "Current network in ABC framework is not defined.\n" );
203 Abc_NtkMakeSeq( pNtk, nFlops );
204}
void Abc_NtkMakeSeq(Abc_Ntk_t *pNtk, int nLatchesToAdd)
Definition abcNtk.c:1729
Here is the call graph for this function:

◆ Abc_Start()

ABC_DLL void Abc_Start ( )
extern

FUNCTION DECLARATIONS ///.

FUNCTION DECLARATIONS ///.

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

FileName [main.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [The main package.]

Synopsis [Here everything starts.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - June 20, 2005.]

Revision [

Id
main.c,v 1.00 2005/06/20 00:00:00 alanmi Exp

] FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Initialization procedure for the library project.]

Description [Note that when Abc_Start() is run in a static library project, it does not load the resource file by default. As a result, ABC is not set up the same way, as when it is run on a command line. For example, some error messages while parsing files will not be produced, and intermediate networks will not be checked for consistancy. One possibility is to load the resource file after Abc_Start() as follows: Abc_UtilsSource( Abc_FrameGetGlobalFrame() );]

SideEffects []

SeeAlso []

Definition at line 52 of file mainLib.c.

53{
54 Abc_Frame_t * pAbc;
55 // added to detect memory leaks:
56#if defined(_DEBUG) && defined(_MSC_VER)
57 _CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
58#endif
59 // start the glocal frame
61 // source the resource file
62// Abc_UtilsSource( pAbc );
63}
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
Definition abcapis.h:38
ABC_DLL Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition mainFrame.c:643
Here is the call graph for this function:

◆ Abc_Stop()

ABC_DLL void Abc_Stop ( )
extern

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

Synopsis [Deallocation procedure for the library project.]

Description []

SideEffects []

SeeAlso []

Definition at line 76 of file mainLib.c.

77{
78 Abc_Frame_t * pAbc;
80 // perform uninitializations
81 Abc_FrameEnd( pAbc );
82 // stop the framework
83 Abc_FrameDeallocate( pAbc );
84}
void Abc_FrameDeallocate(Abc_Frame_t *p)
Definition mainFrame.c:204
void Abc_FrameEnd(Abc_Frame_t *pAbc)
Definition mainInit.c:145
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Cmd_CommandExecute()

ABC_DLL int Cmd_CommandExecute ( Abc_Frame_t * pAbc,
const char * sCommand )
extern

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 193 of file cmdApi.c.

194{
195 int fStatus = 0, argc, loop;
196 const char * sCommandNext;
197 char **argv;
198
199 if ( !pAbc->fAutoexac && !pAbc->fSource )
200 Cmd_HistoryAddCommand(pAbc, sCommand);
201 sCommandNext = sCommand;
202 do
203 {
204 if ( sCommandNext[0] == '#' && Cmd_CommandHandleSpecial( pAbc, sCommandNext ) )
205 break;
206 sCommandNext = CmdSplitLine( pAbc, sCommandNext, &argc, &argv );
207 loop = 0;
208 fStatus = CmdApplyAlias( pAbc, &argc, &argv, &loop );
209 if ( fStatus == 0 )
210 fStatus = CmdCommandDispatch( pAbc, &argc, &argv );
211 CmdFreeArgv( argc, argv );
212 }
213 while ( fStatus == 0 && *sCommandNext != '\0' );
214 return fStatus;
215}
int Cmd_CommandHandleSpecial(Abc_Frame_t *pAbc, const char *sCommand)
Definition cmdApi.c:99
int CmdCommandDispatch(Abc_Frame_t *pAbc, int *argc, char ***argv)
Definition cmdUtils.c:97
const char * CmdSplitLine(Abc_Frame_t *pAbc, const char *sCommand, int *argc, char ***argv)
Definition cmdUtils.c:185
int CmdApplyAlias(Abc_Frame_t *pAbc, int *argc, char ***argv, int *loop)
Definition cmdUtils.c:271
void CmdFreeArgv(int argc, char **argv)
Definition cmdUtils.c:489
void Cmd_HistoryAddCommand(Abc_Frame_t *pAbc, const char *command)
FUNCTION DEFINITIONS ///.
Definition cmdHist.c:50