mirror of
https://github.com/YosysHQ/abc.git
synced 2026-09-03 08:25:20 +02:00
merge changes from main branch
This commit is contained in:
+486
-153
File diff suppressed because it is too large
Load Diff
@@ -68,7 +68,7 @@ Abc_Ntk_t * Abc_NtkBalance( Abc_Ntk_t * pNtk, int fDuplicate, int fSelective, in
|
||||
// perform balancing
|
||||
Abc_NtkBalancePerform( pNtk, pNtkAig, fDuplicate, fSelective, fUpdateLevel );
|
||||
Abc_NtkFinalize( pNtk, pNtkAig );
|
||||
Abc_AigCleanup( pNtkAig->pManFunc );
|
||||
Abc_AigCleanup( (Abc_Aig_t *)pNtkAig->pManFunc );
|
||||
// undo the required times
|
||||
if ( fSelective )
|
||||
{
|
||||
|
||||
@@ -173,7 +173,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
|
||||
// continue;
|
||||
Extra_ProgressBarUpdate( pProgress, i, NULL );
|
||||
// compute the cuts to the internal node
|
||||
pList = Abc_NodeGetCuts( p, pObj, pParams->fDag, pParams->fTree );
|
||||
pList = (Cut_Cut_t *)Abc_NodeGetCuts( p, pObj, pParams->fDag, pParams->fTree );
|
||||
if ( pParams->fNpnSave && pList )
|
||||
{
|
||||
extern void Npn_ManSaveOne( unsigned * puTruth, int nVars );
|
||||
|
||||
+42
-14
@@ -35,6 +35,7 @@
|
||||
#include "cec.h"
|
||||
#include "csw.h"
|
||||
#include "giaAbs.h"
|
||||
#include "pdr.h"
|
||||
|
||||
ABC_NAMESPACE_IMPL_START
|
||||
|
||||
@@ -2245,14 +2246,6 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
|
||||
return RetValue;
|
||||
}
|
||||
|
||||
typedef struct Pdr_Par_t_ Pdr_Par_t;
|
||||
struct Pdr_Par_t_
|
||||
{
|
||||
int fAbstract; // perform abstraction
|
||||
int fVerbose; // enable verbose output
|
||||
int fVeryVerbose; // enable verbose output
|
||||
};
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Gives the current ABC network to AIG manager for processing.]
|
||||
@@ -2264,14 +2257,10 @@ struct Pdr_Par_t_
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex )
|
||||
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars, Abc_Cex_t ** ppCex )
|
||||
{
|
||||
// extern void Pdr_ManSetDefaultParams( Pdr_Par_t * pPars );
|
||||
// extern int Pdr_ManSolve( Aig_Man_t * pAig, Abc_Cex_t ** ppCex, Pdr_Par_t * pPars );
|
||||
int RetValue = -1, clk = clock();
|
||||
Pdr_Par_t Pars, * pPars = &Pars;
|
||||
Aig_Man_t * pMan;
|
||||
// Pdr_ManSetDefaultParams( pPars );
|
||||
*ppCex = NULL;
|
||||
pMan = Abc_NtkToDar( pNtk, 0, 1 );
|
||||
if ( pMan == NULL )
|
||||
@@ -2279,7 +2268,18 @@ int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Abc_Cex_t ** ppCex )
|
||||
printf( "Converting network into AIG has failed.\n" );
|
||||
return -1;
|
||||
}
|
||||
// RetValue = Pdr_ManSolve( pMan, ppCex, pPars );
|
||||
// perform ORing the primary outputs
|
||||
if ( pPars->iOutput == -1 )
|
||||
{
|
||||
Aig_Man_t * pTemp = Saig_ManDupOrpos( pMan );
|
||||
RetValue = Pdr_ManSolve( pTemp, pPars, ppCex );
|
||||
if ( RetValue == 0 )
|
||||
(*ppCex)->iPo = Ssw_SmlFindOutputCounterExample( pMan, *ppCex );
|
||||
Aig_ManStop( pTemp );
|
||||
}
|
||||
else
|
||||
RetValue = Pdr_ManSolve( pMan, pPars, ppCex );
|
||||
// output the result
|
||||
if ( RetValue == 1 )
|
||||
printf( "Property proved. " );
|
||||
else if ( RetValue == 0 )
|
||||
@@ -2929,6 +2929,34 @@ Abc_Ntk_t * Abc_NtkDarEnlarge( Abc_Ntk_t * pNtk, int nFrames, int fVerbose )
|
||||
return pNtkAig;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Performs targe enlargement.]
|
||||
|
||||
Description []
|
||||
|
||||
SideEffects []
|
||||
|
||||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
Abc_Ntk_t * Abc_NtkDarTempor( Abc_Ntk_t * pNtk, int nFrames, int TimeOut, int nConfLimit, int fUseBmc, int fVerbose, int fVeryVerbose )
|
||||
{
|
||||
extern Aig_Man_t * Saig_ManTempor( Aig_Man_t * pAig, int nFrames, int TimeOut, int nConfLimit, int fUseBmc, int fVerbose, int fVeryVerbose );
|
||||
Abc_Ntk_t * pNtkAig;
|
||||
Aig_Man_t * pMan, * pTemp;
|
||||
pMan = Abc_NtkToDar( pNtk, 0, 1 );
|
||||
if ( pMan == NULL )
|
||||
return NULL;
|
||||
pTemp = Saig_ManTempor( pMan, nFrames, TimeOut, nConfLimit, fUseBmc, fVerbose, fVeryVerbose );
|
||||
Aig_ManStop( pMan );
|
||||
if ( pTemp == NULL )
|
||||
return Abc_NtkDup( pNtk );
|
||||
pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pTemp );
|
||||
Aig_ManStop( pTemp );
|
||||
return pNtkAig;
|
||||
}
|
||||
|
||||
/**Function*************************************************************
|
||||
|
||||
Synopsis [Performs induction for property only.]
|
||||
|
||||
@@ -508,7 +508,7 @@ int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars )
|
||||
// pParams->fUseBdds = 1;
|
||||
// pParams->fBddReorder = 1;
|
||||
// pParams->nTotalBacktrackLimit = 10000;
|
||||
|
||||
|
||||
// strash the network if it is not strashed already
|
||||
if ( !Abc_NtkIsStrash(pNtk) )
|
||||
{
|
||||
|
||||
@@ -136,7 +136,7 @@ char * Abc_GetBinaryName( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||
{
|
||||
i++;
|
||||
if ( strcmp( pTemp, argv[0] ) == 0 )
|
||||
return Vec_PtrEntry( pAbc->vPlugInComBinPairs, i );
|
||||
return (char *)Vec_PtrEntry( pAbc->vPlugInComBinPairs, i );
|
||||
}
|
||||
assert( 0 );
|
||||
return NULL;
|
||||
|
||||
@@ -232,6 +232,7 @@ Abc_Ntk_t * Io_ReadBlifMv( char * pFileName, int fBlifMv, int fCheck )
|
||||
|
||||
Vec_PtrForEachEntry( char *, vGlobalLtlArray, pLtlProp, i )
|
||||
Vec_PtrPush( pNtk->vLtlProperties, pLtlProp );
|
||||
Vec_PtrFreeP( &vGlobalLtlArray );
|
||||
return pNtk;
|
||||
}
|
||||
|
||||
|
||||
+11
-2
@@ -51,6 +51,7 @@ Abc_Ntk_t * Io_ReadPla( char * pFileName, int fZeros, int fCheck )
|
||||
|
||||
// start the file
|
||||
p = Extra_FileReaderAlloc( pFileName, "#", "\n\r", " \t|" );
|
||||
// p = Extra_FileReaderAlloc( pFileName, "", "\n\r", " \t|" );
|
||||
if ( p == NULL )
|
||||
return NULL;
|
||||
|
||||
@@ -91,7 +92,7 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros )
|
||||
int nInputs = -1, nOutputs = -1, nProducts = -1;
|
||||
char * pCubeIn, * pCubeOut;
|
||||
int i, k, iLine, nDigits, nCubes;
|
||||
|
||||
|
||||
// allocate the empty network
|
||||
pNtk = Abc_NtkStartRead( Extra_FileReaderGetFileName(p) );
|
||||
|
||||
@@ -103,9 +104,17 @@ Abc_Ntk_t * Io_ReadPlaNetwork( Extra_FileReader_t * p, int fZeros )
|
||||
Extra_ProgressBarUpdate( pProgress, Extra_FileReaderGetCurPosition(p), NULL );
|
||||
|
||||
// if it is the end of file, quit the loop
|
||||
if ( strcmp( (char *)vTokens->pArray[0], ".e" ) == 0 )
|
||||
if ( strncmp( (char *)vTokens->pArray[0], ".e", 2 ) == 0 )
|
||||
break;
|
||||
|
||||
// if it is the model name, get the name
|
||||
if ( strcmp( (char *)vTokens->pArray[0], ".model" ) == 0 )
|
||||
{
|
||||
ABC_FREE( pNtk->pName );
|
||||
pNtk->pName = Extra_UtilStrsav( (char *)vTokens->pArray[1] );
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( vTokens->nSize == 1 )
|
||||
{
|
||||
printf( "%s (line %d): Wrong number of token.\n",
|
||||
|
||||
Reference in New Issue
Block a user