summaryrefslogtreecommitdiffstats
path: root/src/base/main
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2020-05-11 17:08:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2020-05-11 17:08:00 -0700
commit1c0ea1022f0dcb25b7985750a4b091b1a1c3b62a (patch)
tree76359bb0e1c27e7fc5110391f2b57b4b1af18965 /src/base/main
parenta3ada00d8648a53bb43676d89d1ac2fa7cead948 (diff)
downloadabc-1c0ea1022f0dcb25b7985750a4b091b1a1c3b62a.tar.gz
abc-1c0ea1022f0dcb25b7985750a4b091b1a1c3b62a.tar.bz2
abc-1c0ea1022f0dcb25b7985750a4b091b1a1c3b62a.zip
Adding new utility procedures.
Diffstat (limited to 'src/base/main')
-rw-r--r--src/base/main/main.h3
-rw-r--r--src/base/main/mainFrame.c5
-rw-r--r--src/base/main/mainInt.h2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/base/main/main.h b/src/base/main/main.h
index 2efb3358..9ef8b6ff 100644
--- a/src/base/main/main.h
+++ b/src/base/main/main.h
@@ -105,6 +105,8 @@ extern ABC_DLL void * Abc_FrameReadManDd();
extern ABC_DLL void * Abc_FrameReadManDec();
extern ABC_DLL void * Abc_FrameReadManDsd();
extern ABC_DLL void * Abc_FrameReadManDsd2();
+extern ABC_DLL Vec_Ptr_t * Abc_FrameReadSignalNames();
+extern ABC_DLL int * Abc_FrameReadGateCounts();
extern ABC_DLL char * Abc_FrameReadFlag( char * pFlag );
extern ABC_DLL int Abc_FrameIsFlagEnabled( char * pFlag );
@@ -147,6 +149,7 @@ extern ABC_DLL void Abc_FrameSetCnf( Vec_Int_t * vInv );
extern ABC_DLL void Abc_FrameSetStr( Vec_Str_t * vInv );
extern ABC_DLL void Abc_FrameSetJsonStrs( Abc_Nam_t * pStrs );
extern ABC_DLL void Abc_FrameSetJsonObjs( Vec_Wec_t * vObjs );
+extern ABC_DLL void Abc_FrameSetSignalNames( Vec_Ptr_t * vNames );
extern ABC_DLL int Abc_FrameCheckPoConst( Abc_Frame_t * p, int iPoNum );
diff --git a/src/base/main/mainFrame.c b/src/base/main/mainFrame.c
index 1d54f4e4..2743a90a 100644
--- a/src/base/main/mainFrame.c
+++ b/src/base/main/mainFrame.c
@@ -67,6 +67,8 @@ void * Abc_FrameReadManDec() { if ( s_GlobalFram
void * Abc_FrameReadManDsd() { return s_GlobalFrame->pManDsd; }
void * Abc_FrameReadManDsd2() { return s_GlobalFrame->pManDsd2; }
char * Abc_FrameReadFlag( char * pFlag ) { return Cmd_FlagReadByName( s_GlobalFrame, pFlag ); }
+Vec_Ptr_t * Abc_FrameReadSignalNames() { return s_GlobalFrame->vSignalNames; }
+int * Abc_FrameReadGateCounts() { return s_GlobalFrame->pGateCounts; }
int Abc_FrameReadBmcFrames( Abc_Frame_t * p ) { return s_GlobalFrame->nFrames; }
int Abc_FrameReadProbStatus( Abc_Frame_t * p ) { return s_GlobalFrame->Status; }
@@ -102,6 +104,7 @@ void Abc_FrameSetManDsd2( void * pMan ) { if (s_GlobalFrame
void Abc_FrameSetInv( Vec_Int_t * vInv ) { Vec_IntFreeP(&s_GlobalFrame->pAbcWlcInv); s_GlobalFrame->pAbcWlcInv = vInv; }
void Abc_FrameSetJsonStrs( Abc_Nam_t * pStrs ) { Abc_NamDeref( s_GlobalFrame->pJsonStrs ); s_GlobalFrame->pJsonStrs = pStrs; }
void Abc_FrameSetJsonObjs( Vec_Wec_t * vObjs ) { Vec_WecFreeP(&s_GlobalFrame->vJsonObjs ); s_GlobalFrame->vJsonObjs = vObjs; }
+void Abc_FrameSetSignalNames( Vec_Ptr_t * vNames ) { if ( s_GlobalFrame->vSignalNames ) Vec_PtrFreeFree( s_GlobalFrame->vSignalNames ); s_GlobalFrame->vSignalNames = vNames; }
int Abc_FrameIsBatchMode() { return s_GlobalFrame ? s_GlobalFrame->fBatchMode : 0; }
@@ -231,6 +234,8 @@ void Abc_FrameDeallocate( Abc_Frame_t * p )
}
Vec_IntFreeP( &p->vIndFlops );
Vec_PtrFreeP( &p->vLTLProperties_global );
+ if ( p->vSignalNames )
+ Vec_PtrFreeFree( p->vSignalNames );
Abc_FrameDeleteAllNetworks( p );
ABC_FREE( p->pDrivingCell );
ABC_FREE( p->pCex2 );
diff --git a/src/base/main/mainInt.h b/src/base/main/mainInt.h
index bc57ad2a..9eaa03d1 100644
--- a/src/base/main/mainInt.h
+++ b/src/base/main/mainInt.h
@@ -133,6 +133,8 @@ struct Abc_Frame_t_
int nFrames; // the number of time frames completed by BMC
Vec_Ptr_t * vPlugInComBinPairs; // pairs of command and its binary name
Vec_Ptr_t * vLTLProperties_global; // related to LTL
+ Vec_Ptr_t * vSignalNames; // temporary storage for signal names
+ int pGateCounts[5];// temporary gate counts
void * pSave1;
void * pSave2;
void * pSave3;