Skip to content

Commit

Permalink
Merge pull request #3 from berkeley-abc/master
Browse files Browse the repository at this point in the history
Update from upstream
  • Loading branch information
maliberty authored Jan 24, 2024
2 parents 4700df8 + 5fa9192 commit d3916ac
Show file tree
Hide file tree
Showing 58 changed files with 5,658 additions and 146 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@ tags

/cmake
/cscope
abc.history
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MODULES := \
$(wildcard src/ext*) \
src/base/abc src/base/abci src/base/cmd src/base/io src/base/main src/base/exor \
src/base/ver src/base/wlc src/base/wln src/base/acb src/base/bac src/base/cba src/base/pla src/base/test \
src/map/mapper src/map/mio src/map/super src/map/if \
src/map/mapper src/map/mio src/map/super src/map/if src/map/if/acd \
src/map/amap src/map/cov src/map/scl src/map/mpm \
src/misc/extra src/misc/mvc src/misc/st src/misc/util src/misc/nm \
src/misc/vec src/misc/hash src/misc/tim src/misc/bzlib src/misc/zlib \
Expand Down Expand Up @@ -152,7 +152,7 @@ ifdef ABC_USE_LIBSTDCXX
endif

$(info $(MSG_PREFIX)Using CFLAGS=$(CFLAGS))
CXXFLAGS += $(CFLAGS)
CXXFLAGS += $(CFLAGS) -std=c++17

SRC :=
GARBAGE := core core.* *.stackdump ./tags $(PROG) arch_flags
Expand Down
4 changes: 4 additions & 0 deletions abclib.dsp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/aig/aig/aigOper.c
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ Aig_Obj_t * Aig_Miter( Aig_Man_t * p, Vec_Ptr_t * vPairs )
Aig_Obj_t * Aig_MiterTwo( Aig_Man_t * p, Vec_Ptr_t * vNodes1, Vec_Ptr_t * vNodes2 )
{
int i;
assert( vNodes1->nSize > 0 && vNodes1->nSize > 0 );
assert( vNodes1->nSize > 0 && vNodes2->nSize > 0 );
assert( vNodes1->nSize == vNodes2->nSize );
for ( i = 0; i < vNodes1->nSize; i++ )
vNodes1->pArray[i] = Aig_Not( Aig_Exor( p, (Aig_Obj_t *)vNodes1->pArray[i], (Aig_Obj_t *)vNodes2->pArray[i] ) );
Expand Down
5 changes: 4 additions & 1 deletion src/aig/gia/gia.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,9 @@ struct Gia_Man_t_
Vec_Int_t vSuppVars; // used variables
Vec_Int_t vVarMap; // used variables
Gia_Dat_t * pUData;
// retiming data
Vec_Str_t * vStopsF;
Vec_Str_t * vStopsB;
};


Expand Down Expand Up @@ -1526,7 +1529,7 @@ extern void Gia_ManPrintStatsMiter( Gia_Man_t * p, int fVerbose )
extern void Gia_ManSetRegNum( Gia_Man_t * p, int nRegs );
extern void Gia_ManReportImprovement( Gia_Man_t * p, Gia_Man_t * pNew );
extern void Gia_ManPrintNpnClasses( Gia_Man_t * p );
extern void Gia_ManDumpVerilog( Gia_Man_t * p, char * pFileName, Vec_Int_t * vObjs, int fVerBufs, int fInter );
extern void Gia_ManDumpVerilog( Gia_Man_t * p, char * pFileName, Vec_Int_t * vObjs, int fVerBufs, int fInter, int fInterComb, int fAssign, int fReverse );
/*=== giaMem.c ===========================================================*/
extern Gia_MmFixed_t * Gia_MmFixedStart( int nEntrySize, int nEntriesMax );
extern void Gia_MmFixedStop( Gia_MmFixed_t * p, int fVerbose );
Expand Down
13 changes: 7 additions & 6 deletions src/aig/gia/giaDeep.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,23 +55,24 @@ Gia_Man_t * Gia_ManDeepSynOne( int nNoImpr, int TimeOut, int nAnds, int Seed, in
Abc_Random(0);
for ( i = 0; i < IterMax; i++ )
{
char * pCompress2rs = "balance -l; resub -K 6 -l; rewrite -l; resub -K 6 -N 2 -l; refactor -l; resub -K 8 -l; balance -l; resub -K 8 -N 2 -l; rewrite -l; resub -K 10 -l; rewrite -z -l; resub -K 10 -N 2 -l; balance -l; resub -K 12 -l; refactor -z -l; resub -K 12 -N 2 -l; rewrite -z -l; balance -l";
unsigned Rand = Abc_Random(0);
int fDch = Rand & 1;
//int fCom = (Rand >> 1) & 3;
int fCom = (Rand >> 1) & 1;
int fFx = (Rand >> 2) & 1;
int KLut = fUseTwo ? 2 + (i % 5) : 3 + (i % 4);
int fChange = 0;
char Command[1000];
char * pComp = NULL;
char Command[2000];
char pComp[1000];
if ( fCom == 3 )
pComp = "; &put; compress2rs; compress2rs; compress2rs; &get";
sprintf( pComp, "; &put; %s; %s; %s; &get", pCompress2rs, pCompress2rs, pCompress2rs );
else if ( fCom == 2 )
pComp = "; &put; compress2rs; compress2rs; &get";
sprintf( pComp, "; &put; %s; %s; &get", pCompress2rs, pCompress2rs );
else if ( fCom == 1 )
pComp = "; &put; compress2rs; &get";
sprintf( pComp, "; &put; %s; &get", pCompress2rs );
else if ( fCom == 0 )
pComp = "; &dc2";
sprintf( pComp, "; &dc2" );
sprintf( Command, "&dch%s; &if -a -K %d; &mfs -e -W 20 -L 20%s%s",
fDch ? " -f" : "", KLut, fFx ? "; &fx; &st" : "", pComp );
if ( Abc_FrameIsBatchMode() )
Expand Down
9 changes: 7 additions & 2 deletions src/aig/gia/giaDup.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,11 @@ Gia_Man_t * Gia_ManDupWithAttributes( Gia_Man_t * p )
pNew->vConfigs = Vec_IntDup( p->vConfigs );
if ( p->pCellStr )
pNew->pCellStr = Abc_UtilStrsav( p->pCellStr );
// copy names if present
if ( p->vNamesIn )
pNew->vNamesIn = Vec_PtrDupStr( p->vNamesIn );
if ( p->vNamesOut )
pNew->vNamesOut = Vec_PtrDupStr( p->vNamesOut );
return pNew;
}
Gia_Man_t * Gia_ManDupRemovePis( Gia_Man_t * p, int nRemPis )
Expand Down Expand Up @@ -5708,8 +5713,8 @@ Gia_Man_t * Gia_ManBoundaryMiter( Gia_Man_t * p1, Gia_Man_t * p2, int fVerbose )
}
Gia_ManForEachCo( p2, pObj, i )
Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
Gia_ManForEachCo( p1, pObj, i )
Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
//Gia_ManForEachCo( p1, pObj, i )
// Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
Vec_IntForEachEntry( vLits, iLit, i )
Gia_ManAppendCo( pNew, iLit );
Vec_IntFree( vLits );
Expand Down
2 changes: 1 addition & 1 deletion src/aig/gia/giaIso3.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ Vec_Wec_t * Gia_Iso4Gia( Gia_Man_t * p )
Vec_WecForEachLevel( vLevs, vLevel, l )
{
Gia_Obj_t * pObj; int i;
int RandC[2] = { Abc_Random(0), Abc_Random(0) };
unsigned RandC[2] = { Abc_Random(0), Abc_Random(0) };
if ( l == 0 )
{
Gia_ManForEachObjVec( vLevel, p, pObj, i )
Expand Down
Loading

0 comments on commit d3916ac

Please sign in to comment.