mirror of https://github.com/YosysHQ/abc.git
Propagating changes after updating flag of 'sop'.
This commit is contained in:
parent
ba6095ce61
commit
e3f87e189c
|
|
@ -654,14 +654,14 @@ extern ABC_DLL Abc_Ntk_t * Abc_NtkFraigRestore();
|
|||
extern ABC_DLL void Abc_NtkFraigStoreClean();
|
||||
/*=== abcFunc.c ==========================================================*/
|
||||
extern ABC_DLL int Abc_NtkSopToBdd( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL int Abc_NtkBddToSop( Abc_Ntk_t * pNtk, int fDirect, int nCubeLimit );
|
||||
extern ABC_DLL int Abc_NtkBddToSop( Abc_Ntk_t * pNtk, int fMode, int nCubeLimit );
|
||||
extern ABC_DLL void Abc_NodeBddToCnf( Abc_Obj_t * pNode, Mem_Flex_t * pMmMan, Vec_Str_t * vCube, int fAllPrimes, char ** ppSop0, char ** ppSop1 );
|
||||
extern ABC_DLL void Abc_NtkLogicMakeDirectSops( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL int Abc_NtkSopToAig( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL int Abc_NtkAigToBdd( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL Gia_Man_t * Abc_NtkAigToGia( Abc_Ntk_t * p );
|
||||
extern ABC_DLL int Abc_NtkMapToSop( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL int Abc_NtkToSop( Abc_Ntk_t * pNtk, int fDirect, int nCubeLimit );
|
||||
extern ABC_DLL int Abc_NtkToSop( Abc_Ntk_t * pNtk, int fMode, int nCubeLimit );
|
||||
extern ABC_DLL int Abc_NtkToBdd( Abc_Ntk_t * pNtk );
|
||||
extern ABC_DLL int Abc_NtkToAig( Abc_Ntk_t * pNtk );
|
||||
/*=== abcHaig.c ==========================================================*/
|
||||
|
|
|
|||
|
|
@ -1142,28 +1142,28 @@ int Abc_NtkSopToBlifMv( Abc_Ntk_t * pNtk )
|
|||
SeeAlso []
|
||||
|
||||
***********************************************************************/
|
||||
int Abc_NtkToSop( Abc_Ntk_t * pNtk, int fDirect, int nCubeLimit )
|
||||
int Abc_NtkToSop( Abc_Ntk_t * pNtk, int fMode, int nCubeLimit )
|
||||
{
|
||||
assert( !Abc_NtkIsStrash(pNtk) );
|
||||
if ( Abc_NtkHasBlackbox(pNtk) )
|
||||
return 1;
|
||||
if ( Abc_NtkHasSop(pNtk) )
|
||||
{
|
||||
if ( !fDirect )
|
||||
if ( fMode == -1 )
|
||||
return 1;
|
||||
if ( !Abc_NtkSopToBdd(pNtk) )
|
||||
return 0;
|
||||
return Abc_NtkBddToSop(pNtk, fDirect, nCubeLimit);
|
||||
return Abc_NtkBddToSop(pNtk, fMode, nCubeLimit);
|
||||
}
|
||||
if ( Abc_NtkHasMapping(pNtk) )
|
||||
return Abc_NtkMapToSop(pNtk);
|
||||
if ( Abc_NtkHasBdd(pNtk) )
|
||||
return Abc_NtkBddToSop(pNtk, fDirect, nCubeLimit);
|
||||
return Abc_NtkBddToSop(pNtk, fMode, nCubeLimit);
|
||||
if ( Abc_NtkHasAig(pNtk) )
|
||||
{
|
||||
if ( !Abc_NtkAigToBdd(pNtk) )
|
||||
return 0;
|
||||
return Abc_NtkBddToSop(pNtk, fDirect, nCubeLimit);
|
||||
return Abc_NtkBddToSop(pNtk, fMode, nCubeLimit);
|
||||
}
|
||||
assert( 0 );
|
||||
return 0;
|
||||
|
|
@ -1228,7 +1228,7 @@ int Abc_NtkToAig( Abc_Ntk_t * pNtk )
|
|||
}
|
||||
if ( Abc_NtkHasBdd(pNtk) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk,0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
return 0;
|
||||
return Abc_NtkSopToAig(pNtk);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ Abc_Ntk_t * Abc_NtkConvertOnehot( Abc_Ntk_t * pNtk )
|
|||
iState |= (1 << i);
|
||||
}
|
||||
// transfer logic to SOPs
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
// create new network
|
||||
pNtkNew = Abc_NtkStartFromNoLatches( pNtk, pNtk->ntkType, pNtk->ntkFunc );
|
||||
nStates = (1 << nFlops);
|
||||
|
|
|
|||
|
|
@ -740,7 +740,7 @@ int Abc_NtkEliminateSpecial( Abc_Ntk_t * pNtk, int nMaxSize, int fVerbose )
|
|||
Abc_NtkCleanup( pNtk, 0 );
|
||||
|
||||
// convert network to SOPs
|
||||
if ( !Abc_NtkToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
fprintf( stdout, "Converting to SOP has failed.\n" );
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ void Abc_NtkShow( Abc_Ntk_t * pNtk0, int fGateNames, int fSeq, int fUseReverse )
|
|||
// convert to logic SOP
|
||||
pNtk = Abc_NtkDup( pNtk0 );
|
||||
if ( Abc_NtkIsLogic(pNtk) && !Abc_NtkHasMapping(pNtk) )
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
|
||||
// collect all nodes in the network
|
||||
vNodes = Vec_PtrAlloc( 100 );
|
||||
|
|
|
|||
|
|
@ -10883,6 +10883,10 @@ int Abc_CommandTest( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
// extern void Cba_PrsReadBlifTest();
|
||||
// Cba_PrsReadBlifTest();
|
||||
}
|
||||
{
|
||||
extern void Tab_DecomposeTest();
|
||||
Tab_DecomposeTest();
|
||||
}
|
||||
return 0;
|
||||
usage:
|
||||
Abc_Print( -2, "usage: test [-CKDNM] [-aovwh] <file_name>\n" );
|
||||
|
|
@ -17240,7 +17244,7 @@ int Abc_CommandRetime( Abc_Frame_t * pAbc, int argc, char ** argv )
|
|||
}
|
||||
|
||||
// get the network in the SOP form
|
||||
if ( !Abc_NtkToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
Abc_Print( -1, "Converting to SOPs has failed.\n" );
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ Abc_Ntk_t * Abc_NtkAutoDebugModify( Abc_Ntk_t * pNtkInit, int Step, int fConst1
|
|||
|
||||
Abc_NtkSweep( pNtk, 0 );
|
||||
Abc_NtkCleanupSeq( pNtk, 0, 0, 0 );
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
Abc_NtkCycleInitStateSop( pNtk, 50, 0 );
|
||||
return pNtk;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ void Abc_NtkEspresso( Abc_Ntk_t * pNtk, int fVerbose )
|
|||
Abc_NtkMapToSop(pNtk);
|
||||
else if ( Abc_NtkHasBdd(pNtk) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Abc_NtkEspresso(): Converting to SOPs has failed.\n" );
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ int Abc_NtkFastExtract( Abc_Ntk_t * pNtk, Fxu_Data_t * p )
|
|||
// Abc_NtkBddToSop(pNtk);
|
||||
}
|
||||
// get the network in the SOP form
|
||||
if ( !Abc_NtkToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Abc_NtkFastExtract(): Converting to SOPs has failed.\n" );
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ Ivy_Man_t * Abc_NtkIvyBefore( Abc_Ntk_t * pNtk, int fSeq, int fUseDc )
|
|||
assert( !Abc_NtkIsNetlist(pNtk) );
|
||||
if ( Abc_NtkIsBddLogic(pNtk) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Abc_NtkIvyBefore(): Converting to SOPs has failed.\n" );
|
||||
return NULL;
|
||||
|
|
@ -634,7 +634,7 @@ Abc_Ntk_t * Abc_NtkIvy( Abc_Ntk_t * pNtk )
|
|||
assert( !Abc_NtkIsNetlist(pNtk) );
|
||||
if ( Abc_NtkIsBddLogic(pNtk) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
Vec_IntFree( vInit );
|
||||
printf( "Abc_NtkIvy(): Converting to SOPs has failed.\n" );
|
||||
|
|
|
|||
|
|
@ -561,7 +561,7 @@ Abc_Ntk_t * Abc_NtkFromMapSuperChoice( Map_Man_t * pMan, Abc_Ntk_t * pNtk )
|
|||
// duplicate the network
|
||||
pNtkNew2 = Abc_NtkDup( pNtk );
|
||||
pNtkNew = Abc_NtkMulti( pNtkNew2, 0, 20, 0, 0, 1, 0 );
|
||||
if ( !Abc_NtkBddToSop( pNtkNew, 0, ABC_INFINITY ) )
|
||||
if ( !Abc_NtkBddToSop( pNtkNew, -1, ABC_INFINITY ) )
|
||||
{
|
||||
printf( "Abc_NtkFromMapSuperChoice(): Converting to SOPs has failed.\n" );
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -389,7 +389,7 @@ void Abc_NktMffcPrint( char * pFileName, Abc_Obj_t ** pNodes, int nNodes, Vec_Pt
|
|||
Abc_Obj_t * pObj, * pFanin;
|
||||
int i, k;
|
||||
// convert the network
|
||||
Abc_NtkToSop( pNodes[0]->pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNodes[0]->pNtk, -1, ABC_INFINITY );
|
||||
// write the file
|
||||
pFile = fopen( pFileName, "wb" );
|
||||
fprintf( pFile, ".model %s_part\n", pNodes[0]->pNtk->pName );
|
||||
|
|
@ -430,7 +430,7 @@ void Abc_NktMffcPrintInt( char * pFileName, Abc_Ntk_t * pNtk, Vec_Int_t * vRoots
|
|||
Abc_Obj_t * pObj, * pFanin;
|
||||
int i, k;
|
||||
// convert the network
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
// write the file
|
||||
pFile = fopen( pFileName, "wb" );
|
||||
fprintf( pFile, ".model %s_part\n", pNtk->pName );
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ int Abc_NtkPerformMfs( Abc_Ntk_t * pNtk, Sfm_Par_t * pPars )
|
|||
return 0;
|
||||
}
|
||||
if ( !Abc_NtkHasSop(pNtk) )
|
||||
if ( !Abc_NtkToSop( pNtk, 0, ABC_INFINITY ) )
|
||||
if ( !Abc_NtkToSop( pNtk, -1, ABC_INFINITY ) )
|
||||
{
|
||||
printf( "Conversion to SOP has failed due to low resource limit.\n" );
|
||||
return 0;
|
||||
|
|
@ -442,7 +442,7 @@ int Abc_NtkMfsAfterICheck( Abc_Ntk_t * p, int nFrames, int nFramesAdd, Vec_Int_t
|
|||
return 0;
|
||||
}
|
||||
if ( !Abc_NtkHasSop(p) )
|
||||
Abc_NtkToSop( p, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( p, -1, ABC_INFINITY );
|
||||
// derive unfolded network
|
||||
pNtk = Abc_NtkUnrollAndDrop( p, nFrames, nFramesAdd, vFlops, &iPivot );
|
||||
Io_WriteBlifLogic( pNtk, "unroll_dump.blif", 0 );
|
||||
|
|
@ -466,7 +466,7 @@ int Abc_NtkMfsAfterICheck( Abc_Ntk_t * p, int nFrames, int nFramesAdd, Vec_Int_t
|
|||
// perform final sweep
|
||||
Abc_NtkSweep( p, 0 );
|
||||
if ( !Abc_NtkHasSop(p) )
|
||||
Abc_NtkToSop( p, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( p, -1, ABC_INFINITY );
|
||||
return 1;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1119,7 +1119,7 @@ void Abc_NtkPrintGates( Abc_Ntk_t * pNtk, int fUseLibrary )
|
|||
// transform logic functions from BDD to SOP
|
||||
if ( (fHasBdds = Abc_NtkIsBddLogic(pNtk)) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Abc_NtkPrintGates(): Converting to SOPs has failed.\n" );
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ Abc_Ntk_t * Abc_NtkConstructExdc( DdManager * dd, Abc_Ntk_t * pNtk, DdNode * bUn
|
|||
Abc_NtkLogicMakeSimpleCos( pNtkNew, 0 );
|
||||
|
||||
// transform the network to the SOP representation
|
||||
if ( !Abc_NtkBddToSop( pNtkNew, 0, ABC_INFINITY ) )
|
||||
if ( !Abc_NtkBddToSop( pNtkNew, -1, ABC_INFINITY ) )
|
||||
{
|
||||
printf( "Abc_NtkConstructExdc(): Converting to SOPs has failed.\n" );
|
||||
return NULL;
|
||||
|
|
|
|||
|
|
@ -1907,7 +1907,7 @@ int CmdCommandSis( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
|
||||
// write out the current network
|
||||
if ( Abc_NtkIsLogic(pNtk) )
|
||||
Abc_NtkToSop(pNtk, 0, ABC_INFINITY);
|
||||
Abc_NtkToSop(pNtk, -1, ABC_INFINITY);
|
||||
pNetlist = Abc_NtkToNetlist(pNtk);
|
||||
if ( pNetlist == NULL )
|
||||
{
|
||||
|
|
@ -2049,7 +2049,7 @@ int CmdCommandMvsis( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
|
||||
// write out the current network
|
||||
if ( Abc_NtkIsLogic(pNtk) )
|
||||
Abc_NtkToSop(pNtk, 0, ABC_INFINITY);
|
||||
Abc_NtkToSop(pNtk, -1, ABC_INFINITY);
|
||||
pNetlist = Abc_NtkToNetlist(pNtk);
|
||||
if ( pNetlist == NULL )
|
||||
{
|
||||
|
|
@ -2263,7 +2263,7 @@ int CmdCommandCapo( Abc_Frame_t * pAbc, int argc, char **argv )
|
|||
|
||||
// write out the current network
|
||||
if ( Abc_NtkIsLogic(pNtk) )
|
||||
Abc_NtkToSop(pNtk, 0, ABC_INFINITY);
|
||||
Abc_NtkToSop(pNtk, -1, ABC_INFINITY);
|
||||
pNetlist = Abc_NtkToNetlist(pNtk);
|
||||
if ( pNetlist == NULL )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@ Abc_Ntk_t * Io_ReadBenchNetwork( Extra_FileReader_t * p )
|
|||
Abc_NtkDelete( pNtk );
|
||||
return NULL;
|
||||
}
|
||||
if ( !Abc_NtkToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Io_ReadBenchNetwork(): Converting to SOP has failed.\n" );
|
||||
Abc_NtkDelete( pNtk );
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ void Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType )
|
|||
return;
|
||||
}
|
||||
if ( !Abc_NtkHasSop(pNtk) )
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
Io_WriteBblif( pNtk, pFileName );
|
||||
return;
|
||||
}
|
||||
|
|
@ -433,7 +433,7 @@ void Io_Write( Abc_Ntk_t * pNtk, char * pFileName, Io_FileType_t FileType )
|
|||
if ( FileType == IO_FILE_BLIF )
|
||||
{
|
||||
if ( !Abc_NtkHasSop(pNtkTemp) && !Abc_NtkHasMapping(pNtkTemp) )
|
||||
Abc_NtkToSop( pNtkTemp, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtkTemp, -1, ABC_INFINITY );
|
||||
Io_WriteBlif( pNtkTemp, pFileName, 1, 0, 0 );
|
||||
}
|
||||
else if ( FileType == IO_FILE_BLIFMV )
|
||||
|
|
@ -568,12 +568,12 @@ void Io_WriteHie( Abc_Ntk_t * pNtk, char * pBaseName, char * pFileName )
|
|||
{
|
||||
Vec_PtrForEachEntry( Abc_Ntk_t *, pNtkResult->pDesign->vModules, pNtkTemp, i )
|
||||
if ( !Abc_NtkHasSop(pNtkTemp) && !Abc_NtkHasMapping(pNtkTemp) )
|
||||
Abc_NtkToSop( pNtkTemp, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtkTemp, -1, ABC_INFINITY );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( !Abc_NtkHasSop(pNtkResult) && !Abc_NtkHasMapping(pNtkResult) )
|
||||
Abc_NtkToSop( pNtkResult, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtkResult, -1, ABC_INFINITY );
|
||||
}
|
||||
Io_WriteBlif( pNtkResult, pFileName, 1, 0, 0 );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1388,7 +1388,7 @@ void Io_WriteBlifSpecial( Abc_Ntk_t * pNtk, char * FileName, char * pLutStruct,
|
|||
{
|
||||
Abc_Ntk_t * pNtkTemp;
|
||||
assert( Abc_NtkIsLogic(pNtk) );
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
// derive the netlist
|
||||
pNtkTemp = Abc_NtkToNetlist(pNtk);
|
||||
if ( pNtkTemp == NULL )
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ void Io_WriteDotNtk( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
|
|||
// transform logic functions from BDD to SOP
|
||||
if ( (fHasBdds = Abc_NtkIsBddLogic(pNtk)) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Io_WriteDotNtk(): Converting to SOPs has failed.\n" );
|
||||
return;
|
||||
|
|
@ -463,7 +463,7 @@ void Io_WriteDotSeq( Abc_Ntk_t * pNtk, Vec_Ptr_t * vNodes, Vec_Ptr_t * vNodesSho
|
|||
// transform logic functions from BDD to SOP
|
||||
if ( (fHasBdds = Abc_NtkIsBddLogic(pNtk)) )
|
||||
{
|
||||
if ( !Abc_NtkBddToSop(pNtk, 0, ABC_INFINITY) )
|
||||
if ( !Abc_NtkBddToSop(pNtk, -1, ABC_INFINITY) )
|
||||
{
|
||||
printf( "Io_WriteDotNtk(): Converting to SOPs has failed.\n" );
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ int Abc_NtkRetimeDebug( Abc_Ntk_t * pNtk )
|
|||
extern int Abc_NtkSecFraig( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nSeconds, int nFrames, int fVerbose );
|
||||
Abc_Ntk_t * pNtkRet;
|
||||
assert( Abc_NtkIsLogic(pNtk) );
|
||||
Abc_NtkToSop( pNtk, 0, ABC_INFINITY );
|
||||
Abc_NtkToSop( pNtk, -1, ABC_INFINITY );
|
||||
// if ( !Abc_NtkCheck( pNtk ) )
|
||||
// fprintf( stdout, "Abc_NtkRetimeDebug(): Network check has failed.\n" );
|
||||
// Io_WriteBlifLogic( pNtk, "debug_temp.blif", 1 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue