mirror of https://github.com/YosysHQ/abc.git
Recommended changes for portability.
This commit is contained in:
parent
bc4164a466
commit
3ac8aa9c12
|
|
@ -31,13 +31,48 @@ ABC_NAMESPACE_IMPL_START
|
|||
extern int Abc_ConvertZddToSop( DdManager * dd, DdNode * zCover, char * pSop, int nFanins, Vec_Str_t * vCube, int fPhase );
|
||||
extern int Abc_CountZddCubes( DdManager * dd, DdNode * zCover );
|
||||
extern int Abc_NtkDeriveFlatGiaSop( Gia_Man_t * pGia, int * gFanins, char * pSop );
|
||||
extern Vec_Ptr_t * Abc_NodeGetFakeNames( int nNames );
|
||||
extern int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves );
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// FUNCTION DEFINITIONS ///
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
Vec_Ptr_t * Gia_GetFakeNames( int nNames )
|
||||
{
|
||||
Vec_Ptr_t * vNames;
|
||||
char Buffer[5];
|
||||
int i;
|
||||
|
||||
vNames = Vec_PtrAlloc( nNames );
|
||||
for ( i = 0; i < nNames; i++ )
|
||||
{
|
||||
if ( nNames < 26 )
|
||||
{
|
||||
Buffer[0] = 'a' + i;
|
||||
Buffer[1] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
Buffer[0] = 'a' + i%26;
|
||||
Buffer[1] = '0' + i/26;
|
||||
Buffer[2] = 0;
|
||||
}
|
||||
Vec_PtrPush( vNames, Extra_UtilStrsav(Buffer) );
|
||||
}
|
||||
return vNames;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis []
|
||||
|
|
@ -338,8 +373,8 @@ Gia_Man_t * Gia_ManCollapseTest( Gia_Man_t * p, int fVerbose )
|
|||
Dsd_Decompose( pManDsd, (DdNode **)Vec_PtrArray(vFuncs), Vec_PtrSize(vFuncs) );
|
||||
if ( fVerbose )
|
||||
{
|
||||
Vec_Ptr_t * vNamesCi = Abc_NodeGetFakeNames( Gia_ManCiNum(p) );
|
||||
Vec_Ptr_t * vNamesCo = Abc_NodeGetFakeNames( Gia_ManCoNum(p) );
|
||||
Vec_Ptr_t * vNamesCi = Gia_GetFakeNames( Gia_ManCiNum(p) );
|
||||
Vec_Ptr_t * vNamesCo = Gia_GetFakeNames( Gia_ManCoNum(p) );
|
||||
char ** ppNamesCi = (char **)Vec_PtrArray( vNamesCi );
|
||||
char ** ppNamesCo = (char **)Vec_PtrArray( vNamesCo );
|
||||
Dsd_TreePrint( stdout, pManDsd, ppNamesCi, ppNamesCo, 0, -1 );
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#include "misc/util/utilTruth.h"
|
||||
#include "misc/extra/extra.h"
|
||||
#include "sat/cnf/cnf.h"
|
||||
#include "opt/dau/dau.h"
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
|
|
@ -96,7 +97,6 @@ static inline int Mf_CutIsTriv( int * pCut, int i ) { return Mf
|
|||
#define Mf_ObjForEachCut( pCuts, i, nCuts ) for ( i = 0, i < nCuts; i++ )
|
||||
|
||||
extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash );
|
||||
extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit );
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
/// FUNCTION DEFINITIONS ///
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
#include "base/main/main.h"
|
||||
#include "exp.h"
|
||||
#include "misc/util/utilTruth.h"
|
||||
#include "opt/dau/dau.h"
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
|
|
@ -966,7 +967,6 @@ void Nf_ManPreparePrint( int nVars, int * pComp, int * pPerm, char Line[2*720*64
|
|||
|
||||
void Nf_ManPrepareLibrary( Mio_Library_t * pLib )
|
||||
{
|
||||
extern void Dau_DsdPrintFromTruth( word * pTruth, int nVarsInit );
|
||||
// char Lines[2*720*64][8];
|
||||
// Nf_ManPreparePrint( 6, pComp, pPerm, Lines );
|
||||
int * pComp[7];
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include <assert.h>
|
||||
#include "misc/vec/vec.h"
|
||||
#include "misc/vec/vecWec.h"
|
||||
#include "extra.h"
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
|
|
@ -302,7 +303,6 @@ void Abc_SuppTest( int nOnes, int nVars, int fUseSimple, int fCheck, int fVerbos
|
|||
***********************************************************************/
|
||||
Vec_Wrd_t * Abc_SuppReadMin( char * pFileName, int * pnVars )
|
||||
{
|
||||
extern char * Extra_FileReadContents( char * pFileName );
|
||||
Vec_Wrd_t * vRes; word uCube;
|
||||
int nCubes = 0, nVars = -1, iVar;
|
||||
char * pCur, * pToken, * pStart = "INPUT F-COVER";
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
#include <sys/stat.h>
|
||||
|
||||
#if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
#include <Windows.h>
|
||||
#include <windows.h>
|
||||
#include <process.h>
|
||||
#include <io.h>
|
||||
#else
|
||||
|
|
|
|||
|
|
@ -883,8 +883,8 @@ static void Vec_PtrUniqify( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)() )
|
|||
p->pArray[k++] = p->pArray[i];
|
||||
p->nSize = k;
|
||||
}
|
||||
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(), void (*Vec_PtrObjFree)(), Vec_Int_t * vCounts ) ___unused;
|
||||
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(), void (*Vec_PtrObjFree)(), Vec_Int_t * vCounts )
|
||||
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts ) ___unused;
|
||||
static void Vec_PtrUniqify2( Vec_Ptr_t * p, int (*Vec_PtrSortCompare)(void**, void**), void (*Vec_PtrObjFree)(void*), Vec_Int_t * vCounts )
|
||||
{
|
||||
int i, k;
|
||||
if ( vCounts )
|
||||
|
|
|
|||
Loading…
Reference in New Issue