abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mainFrame.c File Reference
#include "base/abc/abc.h"
#include "mainInt.h"
#include "bool/dec/dec.h"
#include "misc/extra/extraBdd.h"
#include "map/if/if.h"

Go to the source code of this file.

Functions

Vec_Ptr_tAbc_FrameReadStore ()
 FUNCTION DEFINITIONS ///. More...
 
int Abc_FrameReadStoreSize ()
 
void * Abc_FrameReadLibLut ()
 
void * Abc_FrameReadLibBox ()
 
void * Abc_FrameReadLibGen ()
 
void * Abc_FrameReadLibGen2 ()
 
void * Abc_FrameReadLibSuper ()
 
void * Abc_FrameReadLibScl ()
 
void * Abc_FrameReadManDd ()
 
void * Abc_FrameReadManDec ()
 
void * Abc_FrameReadManDsd ()
 
void * Abc_FrameReadManDsd2 ()
 
char * Abc_FrameReadFlag (char *pFlag)
 
int Abc_FrameReadBmcFrames (Abc_Frame_t *p)
 
int Abc_FrameReadProbStatus (Abc_Frame_t *p)
 
Abc_Cex_tAbc_FrameReadCex (Abc_Frame_t *p)
 
Vec_Ptr_tAbc_FrameReadCexVec (Abc_Frame_t *p)
 
Vec_Int_tAbc_FrameReadStatusVec (Abc_Frame_t *p)
 
Vec_Ptr_tAbc_FrameReadPoEquivs (Abc_Frame_t *p)
 
Vec_Int_tAbc_FrameReadPoStatuses (Abc_Frame_t *p)
 
Vec_Int_tAbc_FrameReadObjIds (Abc_Frame_t *p)
 
int Abc_FrameReadCexPiNum (Abc_Frame_t *p)
 
int Abc_FrameReadCexRegNum (Abc_Frame_t *p)
 
int Abc_FrameReadCexPo (Abc_Frame_t *p)
 
int Abc_FrameReadCexFrame (Abc_Frame_t *p)
 
void Abc_FrameSetLibLut (void *pLib)
 
void Abc_FrameSetLibBox (void *pLib)
 
void Abc_FrameSetLibGen (void *pLib)
 
void Abc_FrameSetLibGen2 (void *pLib)
 
void Abc_FrameSetLibSuper (void *pLib)
 
void Abc_FrameSetFlag (char *pFlag, char *pValue)
 
void Abc_FrameSetCex (Abc_Cex_t *pCex)
 
void Abc_FrameSetNFrames (int nFrames)
 
void Abc_FrameSetStatus (int Status)
 
void Abc_FrameSetManDsd (void *pMan)
 
void Abc_FrameSetManDsd2 (void *pMan)
 
int Abc_FrameIsBatchMode ()
 
int Abc_FrameIsBridgeMode ()
 
void Abc_FrameSetBridgeMode ()
 
char * Abc_FrameReadDrivingCell ()
 
float Abc_FrameReadMaxLoad ()
 
void Abc_FrameSetDrivingCell (char *pName)
 
void Abc_FrameSetMaxLoad (float Load)
 
int Abc_FrameIsFlagEnabled (char *pFlag)
 
Abc_Frame_tAbc_FrameAllocate ()
 
void Abc_FrameDeallocate (Abc_Frame_t *p)
 
void Abc_FrameRestart (Abc_Frame_t *p)
 
void Abc_FrameClearVerifStatus (Abc_Frame_t *p)
 
int Abc_FrameShowProgress (Abc_Frame_t *p)
 
Abc_Ntk_tAbc_FrameReadNtk (Abc_Frame_t *p)
 
Gia_Man_tAbc_FrameReadGia (Abc_Frame_t *p)
 
FILE * Abc_FrameReadOut (Abc_Frame_t *p)
 
FILE * Abc_FrameReadErr (Abc_Frame_t *p)
 
int Abc_FrameReadMode (Abc_Frame_t *p)
 
int Abc_FrameSetMode (Abc_Frame_t *p, int fNameMode)
 
void Abc_FrameSetCurrentNetwork (Abc_Frame_t *p, Abc_Ntk_t *pNtkNew)
 
void Abc_FrameSwapCurrentAndBackup (Abc_Frame_t *p)
 
void Abc_FrameReplaceCurrentNetwork (Abc_Frame_t *p, Abc_Ntk_t *pNtk)
 
void Abc_FrameUnmapAllNetworks (Abc_Frame_t *p)
 
void Abc_FrameDeleteAllNetworks (Abc_Frame_t *p)
 
void Abc_FrameSetGlobalFrame (Abc_Frame_t *p)
 
Abc_Frame_tAbc_FrameGetGlobalFrame ()
 
Abc_Frame_tAbc_FrameReadGlobalFrame ()
 
void Abc_FrameSetSave1 (void *pAig)
 
void Abc_FrameSetSave2 (void *pAig)
 
void * Abc_FrameReadSave1 ()
 
void * Abc_FrameReadSave2 ()
 
int Abc_FrameCheckPoConst (Abc_Frame_t *p, int iPoNum)
 
void Abc_FrameCheckPoConstTest (Abc_Frame_t *p)
 

Variables

static
ABC_NAMESPACE_IMPL_START
Abc_Frame_t
s_GlobalFrame = NULL
 DECLARATIONS ///. More...
 

Function Documentation

Abc_Frame_t* Abc_FrameAllocate ( )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 137 of file mainFrame.c.

138 {
139  Abc_Frame_t * p;
140  extern void define_cube_size( int n );
141  extern void set_espresso_flags();
142  // allocate and clean
143  p = ABC_CALLOC( Abc_Frame_t, 1 );
144  // get version
145  p->sVersion = Abc_UtilsGetVersion( p );
146  // set streams
147  p->Err = stderr;
148  p->Out = stdout;
149  p->Hst = NULL;
150  p->Status = -1;
151  p->nFrames = -1;
152  // set the starting step
153  p->nSteps = 1;
154  p->fBatchMode = 0;
155  // networks to be used by choice
156  p->vStore = Vec_PtrAlloc( 16 );
157  p->vAbcObjIds = Vec_IntAlloc( 0 );
158  // initialize decomposition manager
159 // define_cube_size(20);
160 // set_espresso_flags();
161  // initialize the trace manager
162 // Abc_HManStart();
163  p->vPlugInComBinPairs = Vec_PtrAlloc( 100 );
164  return p;
165 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
static Vec_Int_t * Vec_IntAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: bblif.c:149
void define_cube_size(int n)
Definition: cubehack.c:51
ABC_DLL char * Abc_UtilsGetVersion(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: mainUtils.c:52
static Vec_Ptr_t * Vec_PtrAlloc(int nCap)
FUNCTION DEFINITIONS ///.
Definition: vecPtr.h:83
void set_espresso_flags()
Definition: cubehack.c:129
#define ABC_CALLOC(type, num)
Definition: abc_global.h:230
int Abc_FrameCheckPoConst ( Abc_Frame_t p,
int  iPoNum 
)

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

Synopsis [Returns 0/1 if pNtkCur is an AIG and PO is 0/1; -1 otherwise.]

Description []

SideEffects []

SeeAlso []

Definition at line 684 of file mainFrame.c.

685 {
686  Abc_Obj_t * pObj;
687  if ( p->pNtkCur == NULL )
688  return -1;
689  if ( !Abc_NtkIsStrash(p->pNtkCur) )
690  return -1;
691  if ( iPoNum < 0 || iPoNum >= Abc_NtkPoNum(p->pNtkCur) )
692  return -1;
693  pObj = Abc_NtkPo( p->pNtkCur, iPoNum );
694  if ( !Abc_AigNodeIsConst(Abc_ObjFanin0(pObj)) )
695  return -1;
696  return !Abc_ObjFaninC0(pObj);
697 }
static int Abc_NtkIsStrash(Abc_Ntk_t *pNtk)
Definition: abc.h:251
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_ObjFaninC0(Abc_Obj_t *pObj)
Definition: abc.h:377
static int Abc_AigNodeIsConst(Abc_Obj_t *pNode)
Definition: abc.h:396
static Abc_Obj_t * Abc_ObjFanin0(Abc_Obj_t *pObj)
Definition: abc.h:373
static Abc_Obj_t * Abc_NtkPo(Abc_Ntk_t *pNtk, int i)
Definition: abc.h:316
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:286
void Abc_FrameCheckPoConstTest ( Abc_Frame_t p)

Definition at line 698 of file mainFrame.c.

699 {
700  Abc_Obj_t * pObj;
701  int i;
702  Abc_NtkForEachPo( p->pNtkCur, pObj, i )
703  printf( "%d = %d\n", i, Abc_FrameCheckPoConst(p, i) );
704 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
int Abc_FrameCheckPoConst(Abc_Frame_t *p, int iPoNum)
Definition: mainFrame.c:684
#define Abc_NtkForEachPo(pNtk, pPo, i)
Definition: abc.h:517
void Abc_FrameClearVerifStatus ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 247 of file mainFrame.c.

248 {
249  p->nFrames = -1;
250  p->Status = -1;
251  ABC_FREE( p->pCex );
252 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Abc_FrameDeallocate ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 179 of file mainFrame.c.

180 {
181  extern void Rwt_ManGlobalStop();
182  extern void undefine_cube_size();
183 // extern void Ivy_TruthManStop();
184 // Abc_HManStop();
185 // undefine_cube_size();
187 // Ivy_TruthManStop();
188  if ( p->vAbcObjIds) Vec_IntFree( p->vAbcObjIds );
189  if ( p->vCexVec ) Vec_PtrFreeFree( p->vCexVec );
190  if ( p->vPoEquivs ) Vec_VecFree( (Vec_Vec_t *)p->vPoEquivs );
191  if ( p->vStatuses ) Vec_IntFree( p->vStatuses );
192  if ( p->pManDec ) Dec_ManStop( (Dec_Man_t *)p->pManDec );
193  if ( p->dd ) Extra_StopManager( p->dd );
194  if ( p->vStore ) Vec_PtrFree( p->vStore );
195  if ( p->pSave1 ) Aig_ManStop( (Aig_Man_t *)p->pSave1 );
196  if ( p->pSave2 ) Aig_ManStop( (Aig_Man_t *)p->pSave2 );
197  if ( p->pSave3 ) Aig_ManStop( (Aig_Man_t *)p->pSave3 );
198  if ( p->pSave4 ) Aig_ManStop( (Aig_Man_t *)p->pSave4 );
199  if ( p->pManDsd ) If_DsdManFree( (If_DsdMan_t *)p->pManDsd, 0 );
200  if ( p->pManDsd2 ) If_DsdManFree( (If_DsdMan_t *)p->pManDsd2, 0 );
201  if ( p->pNtkBackup) Abc_NtkDelete( p->pNtkBackup );
202  if ( p->vPlugInComBinPairs )
203  {
204  char * pTemp;
205  int i;
206  Vec_PtrForEachEntry( char *, p->vPlugInComBinPairs, pTemp, i )
207  ABC_FREE( pTemp );
208  Vec_PtrFree( p->vPlugInComBinPairs );
209  }
210  Vec_IntFreeP( &p->vIndFlops );
211  Vec_PtrFreeP( &p->vLTLProperties_global );
213  ABC_FREE( p->pDrivingCell );
214  ABC_FREE( p->pCex2 );
215  ABC_FREE( p->pCex );
216  ABC_FREE( p );
217  s_GlobalFrame = NULL;
218 }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
DdManager * dd
Definition: llb3Image.c:52
typedefABC_NAMESPACE_HEADER_START struct Vec_Vec_t_ Vec_Vec_t
INCLUDES ///.
Definition: vecVec.h:42
void Abc_FrameDeleteAllNetworks(Abc_Frame_t *p)
Definition: mainFrame.c:551
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
void If_DsdManFree(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:316
static void Vec_PtrFreeFree(Vec_Ptr_t *p)
Definition: vecPtr.h:569
void Extra_StopManager(DdManager *dd)
Definition: extraBddMisc.c:223
static void Vec_VecFree(Vec_Vec_t *p)
Definition: vecVec.h:347
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
void Rwt_ManGlobalStop()
Definition: rwtMan.c:68
static void Vec_IntFreeP(Vec_Int_t **p)
Definition: vecInt.h:289
#define ABC_FREE(obj)
Definition: abc_global.h:232
static void Vec_PtrFreeP(Vec_Ptr_t **p)
Definition: vecPtr.h:240
Definition: dec.h:80
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
#define Vec_PtrForEachEntry(Type, vVec, pEntry, i)
MACRO DEFINITIONS ///.
Definition: vecPtr.h:55
void Dec_ManStop(Dec_Man_t *p)
Definition: decMan.c:70
void undefine_cube_size()
Definition: cubehack.c:111
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
void Abc_FrameDeleteAllNetworks ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 551 of file mainFrame.c.

552 {
553  Abc_Ntk_t * pNtk, * pNtk2;
554  // delete all the currently saved networks
555  for ( pNtk = p->pNtkCur,
556  pNtk2 = pNtk? Abc_NtkBackup(pNtk): NULL;
557  pNtk;
558  pNtk = pNtk2,
559  pNtk2 = pNtk? Abc_NtkBackup(pNtk): NULL )
560  Abc_NtkDelete( pNtk );
561  // set the current network empty
562  p->pNtkCur = NULL;
563 // fprintf( p->Out, "All networks have been deleted.\n" );
564 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
static Abc_Ntk_t * Abc_NtkBackup(Abc_Ntk_t *pNtk)
Definition: abc.h:273
Abc_Frame_t* Abc_FrameGetGlobalFrame ( )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 593 of file mainFrame.c.

594 {
595  if ( s_GlobalFrame == 0 )
596  {
597  // start the framework
599  // perform initializations
601  }
602  return s_GlobalFrame;
603 }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Abc_Frame_t * Abc_FrameAllocate()
Definition: mainFrame.c:137
void Abc_FrameInit(Abc_Frame_t *pAbc)
FUNCTION DEFINITIONS ///.
Definition: mainInit.c:94
int Abc_FrameIsBatchMode ( )

Definition at line 92 of file mainFrame.c.

92 { return s_GlobalFrame ? s_GlobalFrame->fBatchMode : 0; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameIsBridgeMode ( )

Definition at line 94 of file mainFrame.c.

94 { return s_GlobalFrame ? s_GlobalFrame->fBridgeMode : 0; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameIsFlagEnabled ( char *  pFlag)

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

Synopsis [Returns 1 if the flag is enabled without value or with value 1.]

Description []

SideEffects []

SeeAlso []

Definition at line 113 of file mainFrame.c.

114 {
115  char * pValue;
116  // if flag is not defined, it is not enabled
117  pValue = Abc_FrameReadFlag( pFlag );
118  if ( pValue == NULL )
119  return 0;
120  // if flag is defined but value is not empty (no parameter) or "1", it is not enabled
121  if ( strcmp(pValue, "") && strcmp(pValue, "1") )
122  return 0;
123  return 1;
124 }
int strcmp()
char * Abc_FrameReadFlag(char *pFlag)
Definition: mainFrame.c:64
int Abc_FrameReadBmcFrames ( Abc_Frame_t p)

Definition at line 66 of file mainFrame.c.

66 { return s_GlobalFrame->nFrames; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Abc_Cex_t* Abc_FrameReadCex ( Abc_Frame_t p)

Definition at line 68 of file mainFrame.c.

68 { return s_GlobalFrame->pCex; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadCexFrame ( Abc_Frame_t p)

Definition at line 78 of file mainFrame.c.

78 { return s_GlobalFrame->pCex->iFrame; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadCexPiNum ( Abc_Frame_t p)

Definition at line 75 of file mainFrame.c.

75 { return s_GlobalFrame->pCex->nPis; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadCexPo ( Abc_Frame_t p)

Definition at line 77 of file mainFrame.c.

77 { return s_GlobalFrame->pCex->iPo; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadCexRegNum ( Abc_Frame_t p)

Definition at line 76 of file mainFrame.c.

76 { return s_GlobalFrame->pCex->nRegs; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Vec_Ptr_t* Abc_FrameReadCexVec ( Abc_Frame_t p)

Definition at line 69 of file mainFrame.c.

69 { return s_GlobalFrame->vCexVec; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
char* Abc_FrameReadDrivingCell ( )

Definition at line 97 of file mainFrame.c.

97 { return s_GlobalFrame->pDrivingCell; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
FILE* Abc_FrameReadErr ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 330 of file mainFrame.c.

331 {
332  return p->Err;
333 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char* Abc_FrameReadFlag ( char *  pFlag)

Definition at line 64 of file mainFrame.c.

64 { return Cmd_FlagReadByName( s_GlobalFrame, pFlag ); }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
char * Cmd_FlagReadByName(Abc_Frame_t *pAbc, char *flag)
DECLARATIONS ///.
Definition: cmdFlag.c:47
Gia_Man_t* Abc_FrameReadGia ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 298 of file mainFrame.c.

299 {
300  return p->pGia;
301 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Abc_Frame_t* Abc_FrameReadGlobalFrame ( )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 616 of file mainFrame.c.

617 {
618  return s_GlobalFrame;
619 }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibBox ( )

Definition at line 55 of file mainFrame.c.

55 { return s_GlobalFrame->pLibBox; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibGen ( )

Definition at line 56 of file mainFrame.c.

56 { return s_GlobalFrame->pLibGen; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibGen2 ( )

Definition at line 57 of file mainFrame.c.

57 { return s_GlobalFrame->pLibGen2; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibLut ( )

Definition at line 54 of file mainFrame.c.

54 { return s_GlobalFrame->pLibLut; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibScl ( )

Definition at line 59 of file mainFrame.c.

59 { return s_GlobalFrame->pLibScl; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadLibSuper ( )

Definition at line 58 of file mainFrame.c.

58 { return s_GlobalFrame->pLibSuper; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadManDd ( )

Definition at line 60 of file mainFrame.c.

60 { if ( s_GlobalFrame->dd == NULL ) s_GlobalFrame->dd = Cudd_Init( 0, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 ); return s_GlobalFrame->dd; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
#define CUDD_UNIQUE_SLOTS
Definition: cudd.h:97
#define CUDD_CACHE_SLOTS
Definition: cudd.h:98
DdManager * Cudd_Init(unsigned int numVars, unsigned int numVarsZ, unsigned int numSlots, unsigned int cacheSize, unsigned long maxMemory)
Definition: cuddInit.c:125
void* Abc_FrameReadManDec ( )

Definition at line 61 of file mainFrame.c.

61 { if ( s_GlobalFrame->pManDec == NULL ) s_GlobalFrame->pManDec = Dec_ManStart(); return s_GlobalFrame->pManDec; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Dec_Man_t * Dec_ManStart()
DECLARATIONS ///.
Definition: decMan.c:45
void* Abc_FrameReadManDsd ( )

Definition at line 62 of file mainFrame.c.

62 { return s_GlobalFrame->pManDsd; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadManDsd2 ( )

Definition at line 63 of file mainFrame.c.

63 { return s_GlobalFrame->pManDsd2; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
float Abc_FrameReadMaxLoad ( )

Definition at line 98 of file mainFrame.c.

98 { return s_GlobalFrame->MaxLoad; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadMode ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 346 of file mainFrame.c.

347 {
348  int fShortNames;
349  char * pValue;
350  pValue = Cmd_FlagReadByName( p, "namemode" );
351  if ( pValue == NULL )
352  fShortNames = 0;
353  else
354  fShortNames = atoi(pValue);
355  return fShortNames;
356 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
char * Cmd_FlagReadByName(Abc_Frame_t *pAbc, char *flag)
DECLARATIONS ///.
Definition: cmdFlag.c:47
Abc_Ntk_t* Abc_FrameReadNtk ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 282 of file mainFrame.c.

283 {
284  return p->pNtkCur;
285 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Vec_Int_t* Abc_FrameReadObjIds ( Abc_Frame_t p)

Definition at line 73 of file mainFrame.c.

73 { return s_GlobalFrame->vAbcObjIds; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
FILE* Abc_FrameReadOut ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 314 of file mainFrame.c.

315 {
316  return p->Out;
317 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
Vec_Ptr_t* Abc_FrameReadPoEquivs ( Abc_Frame_t p)

Definition at line 71 of file mainFrame.c.

71 { return s_GlobalFrame->vPoEquivs; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Vec_Int_t* Abc_FrameReadPoStatuses ( Abc_Frame_t p)

Definition at line 72 of file mainFrame.c.

72 { return s_GlobalFrame->vStatuses; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadProbStatus ( Abc_Frame_t p)

Definition at line 67 of file mainFrame.c.

67 { return s_GlobalFrame->Status; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void* Abc_FrameReadSave1 ( )

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 670 of file mainFrame.c.

670 { void * pAig = Abc_FrameGetGlobalFrame()->pSave1; Abc_FrameGetGlobalFrame()->pSave1 = NULL; return pAig; }
Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
void* Abc_FrameReadSave2 ( )

Definition at line 671 of file mainFrame.c.

671 { void * pAig = Abc_FrameGetGlobalFrame()->pSave2; Abc_FrameGetGlobalFrame()->pSave2 = NULL; return pAig; }
Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
Vec_Int_t* Abc_FrameReadStatusVec ( Abc_Frame_t p)

Definition at line 70 of file mainFrame.c.

70 { return s_GlobalFrame->vStatuses; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
Vec_Ptr_t* Abc_FrameReadStore ( )

FUNCTION DEFINITIONS ///.

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

Synopsis [APIs to access parameters in the flobal frame.]

Description []

SideEffects []

SeeAlso []

Definition at line 52 of file mainFrame.c.

52 { return s_GlobalFrame->vStore; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameReadStoreSize ( )

Definition at line 53 of file mainFrame.c.

53 { return Vec_PtrSize(s_GlobalFrame->vStore); }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
static int Vec_PtrSize(Vec_Ptr_t *p)
Definition: vecPtr.h:295
void Abc_FrameReplaceCurrentNetwork ( Abc_Frame_t p,
Abc_Ntk_t pNtk 
)

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

Synopsis [Replaces the current network by the given one.]

Description [This procedure does not modify the stack of saved networks.]

SideEffects []

SeeAlso []

Definition at line 493 of file mainFrame.c.

494 {
495  if ( pNtk == NULL )
496  return;
497 
498  if ( Abc_NtkPoNum(pNtk) == 0 )
499  Abc_Print( 0, "The current network has no primary outputs. Some commands may not work correctly.\n" );
500 
501  // transfer the parameters to the new network
502  if ( p->pNtkCur && Abc_FrameIsFlagEnabled( "backup" ) )
503  {
504  Abc_NtkSetBackup( pNtk, Abc_NtkBackup(p->pNtkCur) );
505  Abc_NtkSetStep( pNtk, Abc_NtkStep(p->pNtkCur) );
506  // delete the current network
507  Abc_NtkDelete( p->pNtkCur );
508  }
509  else
510  {
511  Abc_NtkSetBackup( pNtk, NULL );
512  Abc_NtkSetStep( pNtk, ++p->nSteps );
513  // delete the current network if present but backup is disabled
514  if ( p->pNtkCur )
515  Abc_NtkDelete( p->pNtkCur );
516  }
517  // set the new current network
518  p->pNtkCur = pNtk;
519 }
static void Abc_NtkSetStep(Abc_Ntk_t *pNtk, int iStep)
Definition: abc.h:280
static Llb_Mgr_t * p
Definition: llb3Image.c:950
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
int Abc_FrameIsFlagEnabled(char *pFlag)
Definition: mainFrame.c:113
static void Abc_Print(int level, const char *format,...)
Definition: abc_global.h:313
static void Abc_NtkSetBackup(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNetBackup)
Definition: abc.h:279
static int Abc_NtkPoNum(Abc_Ntk_t *pNtk)
Definition: abc.h:286
static int Abc_NtkStep(Abc_Ntk_t *pNtk)
Definition: abc.h:274
static Abc_Ntk_t * Abc_NtkBackup(Abc_Ntk_t *pNtk)
Definition: abc.h:273
void Abc_FrameRestart ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 232 of file mainFrame.c.

233 {
234 }
void Abc_FrameSetBridgeMode ( )

Definition at line 95 of file mainFrame.c.

95 { if ( s_GlobalFrame ) s_GlobalFrame->fBridgeMode = 1; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetCex ( Abc_Cex_t pCex)

Definition at line 86 of file mainFrame.c.

86 { ABC_FREE( s_GlobalFrame->pCex ); s_GlobalFrame->pCex = pCex; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Abc_FrameSetCurrentNetwork ( Abc_Frame_t p,
Abc_Ntk_t pNtkNew 
)

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

Synopsis [Sets the given network to be the current one.]

Description [Takes the network and makes it the current network. The previous current network is attached to the given network as a backup copy. In the stack of backup networks contains too many networks (defined by the paramater "savesteps"), the bottom most network is deleted.]

SideEffects []

SeeAlso []

Definition at line 396 of file mainFrame.c.

397 {
398  Abc_Ntk_t * pNtk, * pNtk2, * pNtk3;
399  int nNetsPresent;
400  int nNetsToSave;
401  char * pValue;
402 
403  if ( p->pNtkCur == pNtkNew )
404  return;
405 
406  // link it to the previous network
407  Abc_NtkSetBackup( pNtkNew, p->pNtkCur );
408  // set the step of this network
409  Abc_NtkSetStep( pNtkNew, ++p->nSteps );
410  // set this network to be the current network
411  p->pNtkCur = pNtkNew;
412 
413  // remove any extra network that may happen to be in the stack
414  pValue = Cmd_FlagReadByName( p, "savesteps" );
415  // if the value of steps to save is not set, assume 1-level undo
416  if ( pValue == NULL )
417  nNetsToSave = 1;
418  else
419  nNetsToSave = atoi(pValue);
420 
421  // count the network, remember the last one, and the one before the last one
422  nNetsPresent = 0;
423  pNtk2 = pNtk3 = NULL;
424  for ( pNtk = p->pNtkCur; pNtk; pNtk = Abc_NtkBackup(pNtk2) )
425  {
426  nNetsPresent++;
427  pNtk3 = pNtk2;
428  pNtk2 = pNtk;
429  }
430 
431  // remove the earliest backup network if it is more steps away than we store
432  if ( nNetsPresent - 1 > nNetsToSave )
433  { // delete the last network
434  Abc_NtkDelete( pNtk2 );
435  // clean the pointer of the network before the last one
436  Abc_NtkSetBackup( pNtk3, NULL );
437  }
438 }
static void Abc_NtkSetStep(Abc_Ntk_t *pNtk, int iStep)
Definition: abc.h:280
static Llb_Mgr_t * p
Definition: llb3Image.c:950
ABC_DLL void Abc_NtkDelete(Abc_Ntk_t *pNtk)
Definition: abcNtk.c:1233
static void Abc_NtkSetBackup(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNetBackup)
Definition: abc.h:279
char * Cmd_FlagReadByName(Abc_Frame_t *pAbc, char *flag)
DECLARATIONS ///.
Definition: cmdFlag.c:47
static Abc_Ntk_t * Abc_NtkBackup(Abc_Ntk_t *pNtk)
Definition: abc.h:273
void Abc_FrameSetDrivingCell ( char *  pName)

Definition at line 99 of file mainFrame.c.

99 { ABC_FREE(s_GlobalFrame->pDrivingCell); s_GlobalFrame->pDrivingCell = pName; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Abc_FrameSetFlag ( char *  pFlag,
char *  pValue 
)

Definition at line 85 of file mainFrame.c.

85 { Cmd_FlagUpdateValue( s_GlobalFrame, pFlag, pValue ); }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Cmd_FlagUpdateValue(Abc_Frame_t *pAbc, const char *key, char *value)
Definition: cmdFlag.c:65
void Abc_FrameSetGlobalFrame ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 577 of file mainFrame.c.

578 {
579  s_GlobalFrame = p;
580 }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Abc_FrameSetLibBox ( void *  pLib)

Definition at line 81 of file mainFrame.c.

81 { s_GlobalFrame->pLibBox = pLib; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetLibGen ( void *  pLib)

Definition at line 82 of file mainFrame.c.

82 { s_GlobalFrame->pLibGen = pLib; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetLibGen2 ( void *  pLib)

Definition at line 83 of file mainFrame.c.

83 { s_GlobalFrame->pLibGen2 = pLib; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetLibLut ( void *  pLib)

Definition at line 80 of file mainFrame.c.

80 { s_GlobalFrame->pLibLut = pLib; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetLibSuper ( void *  pLib)

Definition at line 84 of file mainFrame.c.

84 { s_GlobalFrame->pLibSuper = pLib; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void Abc_FrameSetManDsd ( void *  pMan)

Definition at line 89 of file mainFrame.c.

89 { if (s_GlobalFrame->pManDsd && s_GlobalFrame->pManDsd != pMan) If_DsdManFree((If_DsdMan_t *)s_GlobalFrame->pManDsd, 0); s_GlobalFrame->pManDsd = pMan; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void If_DsdManFree(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:316
void Abc_FrameSetManDsd2 ( void *  pMan)

Definition at line 90 of file mainFrame.c.

90 { if (s_GlobalFrame->pManDsd2 && s_GlobalFrame->pManDsd2 != pMan) If_DsdManFree((If_DsdMan_t *)s_GlobalFrame->pManDsd2, 0); s_GlobalFrame->pManDsd2 = pMan; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
void If_DsdManFree(If_DsdMan_t *p, int fVerbose)
Definition: ifDsd.c:316
void Abc_FrameSetMaxLoad ( float  Load)

Definition at line 100 of file mainFrame.c.

100 { s_GlobalFrame->MaxLoad = Load; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
int Abc_FrameSetMode ( Abc_Frame_t p,
int  fNameMode 
)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 369 of file mainFrame.c.

370 {
371  char Buffer[2];
372  int fNameModeOld;
373  fNameModeOld = Abc_FrameReadMode( p );
374  Buffer[0] = '0' + fNameMode;
375  Buffer[1] = 0;
376  Cmd_FlagUpdateValue( p, "namemode", (char *)Buffer );
377  return fNameModeOld;
378 }
int Abc_FrameReadMode(Abc_Frame_t *p)
Definition: mainFrame.c:346
static Llb_Mgr_t * p
Definition: llb3Image.c:950
void Cmd_FlagUpdateValue(Abc_Frame_t *pAbc, const char *key, char *value)
Definition: cmdFlag.c:65
void Abc_FrameSetNFrames ( int  nFrames)

Definition at line 87 of file mainFrame.c.

87 { ABC_FREE( s_GlobalFrame->pCex ); s_GlobalFrame->nFrames = nFrames; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
#define ABC_FREE(obj)
Definition: abc_global.h:232
void Abc_FrameSetSave1 ( void *  pAig)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 632 of file mainFrame.c.

633 {
635  if ( pFrame->pSave1 )
636  Aig_ManStop( (Aig_Man_t *)pFrame->pSave1 );
637  pFrame->pSave1 = pAig;
638 }
Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
void Abc_FrameSetSave2 ( void *  pAig)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 651 of file mainFrame.c.

652 {
654  if ( pFrame->pSave2 )
655  Aig_ManStop( (Aig_Man_t *)pFrame->pSave2 );
656  pFrame->pSave2 = pAig;
657 }
Abc_Frame_t * Abc_FrameGetGlobalFrame()
Definition: mainFrame.c:593
typedefABC_NAMESPACE_HEADER_START struct Aig_Man_t_ Aig_Man_t
INCLUDES ///.
Definition: aig.h:50
void Aig_ManStop(Aig_Man_t *p)
Definition: aigMan.c:187
typedefABC_NAMESPACE_HEADER_START struct Abc_Frame_t_ Abc_Frame_t
INCLUDES ///.
void Abc_FrameSetStatus ( int  Status)

Definition at line 88 of file mainFrame.c.

88 { ABC_FREE( s_GlobalFrame->pCex ); s_GlobalFrame->Status = Status; }
static ABC_NAMESPACE_IMPL_START Abc_Frame_t * s_GlobalFrame
DECLARATIONS ///.
Definition: mainFrame.c:35
#define ABC_FREE(obj)
Definition: abc_global.h:232
int Abc_FrameShowProgress ( Abc_Frame_t p)

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

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 265 of file mainFrame.c.

266 {
267  return Abc_FrameIsFlagEnabled( "progressbar" );
268 }
int Abc_FrameIsFlagEnabled(char *pFlag)
Definition: mainFrame.c:113
void Abc_FrameSwapCurrentAndBackup ( Abc_Frame_t p)

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

Synopsis [This procedure swaps the current and the backup network.]

Description []

SideEffects []

SeeAlso []

Definition at line 451 of file mainFrame.c.

452 {
453  Abc_Ntk_t * pNtkCur, * pNtkBack, * pNtkBack2;
454  int iStepCur, iStepBack;
455 
456  pNtkCur = p->pNtkCur;
457  pNtkBack = Abc_NtkBackup( pNtkCur );
458  iStepCur = Abc_NtkStep ( pNtkCur );
459 
460  // if there is no backup nothing to reset
461  if ( pNtkBack == NULL )
462  return;
463 
464  // remember the backup of the backup
465  pNtkBack2 = Abc_NtkBackup( pNtkBack );
466  iStepBack = Abc_NtkStep ( pNtkBack );
467 
468  // set pNtkCur to be the next after the backup's backup
469  Abc_NtkSetBackup( pNtkCur, pNtkBack2 );
470  Abc_NtkSetStep ( pNtkCur, iStepBack );
471 
472  // set pNtkCur to be the next after the backup
473  Abc_NtkSetBackup( pNtkBack, pNtkCur );
474  Abc_NtkSetStep ( pNtkBack, iStepCur );
475 
476  // set the current network
477  p->pNtkCur = pNtkBack;
478 }
static void Abc_NtkSetStep(Abc_Ntk_t *pNtk, int iStep)
Definition: abc.h:280
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Abc_NtkSetBackup(Abc_Ntk_t *pNtk, Abc_Ntk_t *pNetBackup)
Definition: abc.h:279
static int Abc_NtkStep(Abc_Ntk_t *pNtk)
Definition: abc.h:274
static Abc_Ntk_t * Abc_NtkBackup(Abc_Ntk_t *pNtk)
Definition: abc.h:273
void Abc_FrameUnmapAllNetworks ( Abc_Frame_t p)

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

Synopsis [Removes library binding of all currently stored networks.]

Description [This procedure is called when the library is freed.]

SideEffects []

SeeAlso []

Definition at line 532 of file mainFrame.c.

533 {
534  Abc_Ntk_t * pNtk;
535  for ( pNtk = p->pNtkCur; pNtk; pNtk = Abc_NtkBackup(pNtk) )
536  if ( Abc_NtkHasMapping(pNtk) )
537  Abc_NtkMapToSop( pNtk );
538 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static int Abc_NtkHasMapping(Abc_Ntk_t *pNtk)
Definition: abc.h:256
ABC_DLL int Abc_NtkMapToSop(Abc_Ntk_t *pNtk)
Definition: abcFunc.c:1073
static Abc_Ntk_t * Abc_NtkBackup(Abc_Ntk_t *pNtk)
Definition: abc.h:273

Variable Documentation

ABC_NAMESPACE_IMPL_START Abc_Frame_t* s_GlobalFrame = NULL
static

DECLARATIONS ///.

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

FileName [mainFrame.c]

SystemName [ABC: Logic synthesis and verification system.]

PackageName [The main package.]

Synopsis [The global framework resides in this file.]

Author [Alan Mishchenko]

Affiliation [UC Berkeley]

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

Revision [

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

]

Definition at line 35 of file mainFrame.c.