diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2018-11-21 13:12:01 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2018-11-21 13:12:01 -0800 |
commit | 5aa3025ce7264a172a070a78d7b7db0cd1fca3f0 (patch) | |
tree | 9a54b8971c74cea29c1752aefdc7d650348f7ff4 /src/base | |
parent | 73695c79619fae580fa0f465ba28e1ea51f0b5e1 (diff) | |
download | abc-5aa3025ce7264a172a070a78d7b7db0cd1fca3f0.tar.gz abc-5aa3025ce7264a172a070a78d7b7db0cd1fca3f0.tar.bz2 abc-5aa3025ce7264a172a070a78d7b7db0cd1fca3f0.zip |
Adding switch &w -n to modify the comment section of the AIGER file written.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 29 | ||||
-rw-r--r-- | src/base/abci/abcDetect.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcTim.c | 6 | ||||
-rw-r--r-- | src/base/acb/acbCom.c | 2 | ||||
-rw-r--r-- | src/base/acb/acbFunc.c | 8 | ||||
-rw-r--r-- | src/base/bac/bacCom.c | 2 | ||||
-rw-r--r-- | src/base/cba/cbaCom.c | 2 | ||||
-rw-r--r-- | src/base/cmd/cmdPlugin.c | 2 | ||||
-rw-r--r-- | src/base/wlc/wlcBlast.c | 4 | ||||
-rw-r--r-- | src/base/wlc/wlcMem.c | 2 | ||||
-rw-r--r-- | src/base/wlc/wlcReadVer.c | 2 |
11 files changed, 33 insertions, 28 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 753bf2ae..3a3ccac6 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -10727,7 +10727,7 @@ int Abc_CommandExpand( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_NtkDelete( pNtk2 ); // convert it into an AIG pGia = Abc_NtkClpGia( pStrash ); - //Gia_AigerWrite( pGia, "aig_dump.aig", 0, 0 ); + //Gia_AigerWrite( pGia, "aig_dump.aig", 0, 0, 0 ); Abc_NtkDelete( pStrash ); // get the new network Abc_NtkExpandCubes( pNtk, pGia, fVerbose ); @@ -16857,7 +16857,7 @@ int Abc_CommandRecDump3( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( 0, "No structure in the library.\n" ); return 1; } - Gia_AigerWrite( pGia, FileName, 0, 0 ); + Gia_AigerWrite( pGia, FileName, 0, 0, 0 ); } return 0; @@ -30070,9 +30070,10 @@ int Abc_CommandAbc9Write( Abc_Frame_t * pAbc, int argc, char ** argv ) int fVerilog = 0; int fMiniAig = 0; int fMiniLut = 0; + int fWriteNewLine = 0; int fVerbose = 0; Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "upmlvh" ) ) != EOF ) + while ( ( c = Extra_UtilGetopt( argc, argv, "upmlcvh" ) ) != EOF ) { switch ( c ) { @@ -30088,6 +30089,9 @@ int Abc_CommandAbc9Write( Abc_Frame_t * pAbc, int argc, char ** argv ) case 'l': fMiniLut ^= 1; break; + case 'c': + fWriteNewLine ^= 1; + break; case 'v': fVerbose ^= 1; break; @@ -30123,16 +30127,17 @@ int Abc_CommandAbc9Write( Abc_Frame_t * pAbc, int argc, char ** argv ) else if ( fMiniLut ) Gia_ManWriteMiniLut( pAbc->pGia, pFileName ); else - Gia_AigerWrite( pAbc->pGia, pFileName, 0, 0 ); + Gia_AigerWrite( pAbc->pGia, pFileName, 0, 0, fWriteNewLine ); return 0; usage: - Abc_Print( -2, "usage: &w [-upmlvh] <file>\n" ); + Abc_Print( -2, "usage: &w [-upmlcvh] <file>\n" ); Abc_Print( -2, "\t writes the current AIG into the AIGER file\n" ); Abc_Print( -2, "\t-u : toggle writing canonical AIG structure [default = %s]\n", fUnique? "yes" : "no" ); Abc_Print( -2, "\t-p : toggle writing Verilog with 'and' and 'not' [default = %s]\n", fVerilog? "yes" : "no" ); Abc_Print( -2, "\t-m : toggle writing MiniAIG rather than AIGER [default = %s]\n", fMiniAig? "yes" : "no" ); Abc_Print( -2, "\t-l : toggle writing MiniLUT rather than AIGER [default = %s]\n", fMiniLut? "yes" : "no" ); + Abc_Print( -2, "\t-c : toggle writing \'\\n\' after \'c\' in the AIGER file [default = %s]\n", fWriteNewLine? "yes": "no" ); Abc_Print( -2, "\t-v : toggle verbose output [default = %s]\n", fVerbose? "yes": "no" ); Abc_Print( -2, "\t-h : print the command usage\n"); Abc_Print( -2, "\t<file> : the file name\n"); @@ -34710,7 +34715,7 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv ) pTemp = Gia_ManSeqStructSweep( pAux = pTemp, 1, 1, 0 ); Gia_ManStop( pAux ); } - Gia_AigerWrite( pTemp, pFileNameIn ? pFileNameIn : pFileName, 0, 0 ); + Gia_AigerWrite( pTemp, pFileNameIn ? pFileNameIn : pFileName, 0, 0, 0 ); Abc_Print( 1, "Speculatively reduced model was written into file \"%s\".\n", pFileName ); Gia_ManPrintStatsShort( pTemp ); Gia_ManStop( pTemp ); @@ -34723,7 +34728,7 @@ int Abc_CommandAbc9Srm( Abc_Frame_t * pAbc, int argc, char ** argv ) pTemp = Gia_ManSeqStructSweep( pAux = pTemp, 1, 1, 0 ); Gia_ManStop( pAux ); - Gia_AigerWrite( pTemp, pFileName2, 0, 0 ); + Gia_AigerWrite( pTemp, pFileName2, 0, 0, 0 ); Abc_Print( 1, "Reduced original network was written into file \"%s\".\n", pFileName2 ); Gia_ManPrintStatsShort( pTemp ); Gia_ManStop( pTemp ); @@ -34824,7 +34829,7 @@ int Abc_CommandAbc9Srm2( Abc_Frame_t * pAbc, int argc, char ** argv ) pTemp = Gia_ManSeqStructSweep( pAux = pTemp, 1, 1, 0 ); Gia_ManStop( pAux ); - Gia_AigerWrite( pTemp, pFileName, 0, 0 ); + Gia_AigerWrite( pTemp, pFileName, 0, 0, 0 ); Abc_Print( 1, "Speculatively reduced model was written into file \"%s\".\n", pFileName ); Gia_ManPrintStatsShort( pTemp ); Gia_ManStop( pTemp ); @@ -35281,7 +35286,7 @@ int Abc_CommandAbc9Cec( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fDumpMiter ) { Abc_Print( 0, "The verification miter is written into file \"%s\".\n", "cec_miter.aig" ); - Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0 ); + Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0, 0 ); } pAbc->Status = Cec_ManVerify( pMiter, pPars ); Abc_FrameReplaceCex( pAbc, &pGias[0]->pCexComb ); @@ -40538,7 +40543,7 @@ int Abc_CommandAbc9Cone( Abc_Frame_t * pAbc, int argc, char ** argv ) { Gia_Man_t * pOne = Gia_ManDupDfsCone( pAbc->pGia, pObj ); sprintf( Buffer, "%s_%0*d.aig", Extra_FileNameGeneric(pAbc->pGia->pSpec), nDigits, i ); - Gia_AigerWrite( pOne, Buffer, 0, 0 ); + Gia_AigerWrite( pOne, Buffer, 0, 0, 0 ); Gia_ManStop( pOne ); } printf( "Dumped all outputs into individual AIGER files.\n" ); @@ -42929,8 +42934,8 @@ int Abc_CommandAbc9Demiter( Abc_Frame_t * pAbc, int argc, char ** argv ) sprintf( pName1, "%s_2.aig", pGen ); ABC_FREE( pGen ); } - Gia_AigerWrite( pPart1, pName0, 0, 0 ); - Gia_AigerWrite( pPart2, pName1, 0, 0 ); + Gia_AigerWrite( pPart1, pName0, 0, 0, 0 ); + Gia_AigerWrite( pPart2, pName1, 0, 0, 0 ); Gia_ManStop( pPart1 ); Gia_ManStop( pPart2 ); if ( fDumpFilesTwo ) diff --git a/src/base/abci/abcDetect.c b/src/base/abci/abcDetect.c index 7adbed5d..089d3fe2 100644 --- a/src/base/abci/abcDetect.c +++ b/src/base/abci/abcDetect.c @@ -914,7 +914,7 @@ Vec_Int_t * Abc_NtkFinCheckPair( Abc_Ntk_t * pNtk, Vec_Int_t * vTypes, Vec_Int_t int i, nConfLimit = 10000; Vec_Int_t * vPat = NULL; int status, iVarBeg = pCnf->nVars - Gia_ManPiNum(pGia);// - 1; - //Gia_AigerWrite( pGia, "temp_detect.aig", 0, 0 ); + //Gia_AigerWrite( pGia, "temp_detect.aig", 0, 0, 0 ); Gia_ManStop( pGia ); Cnf_DataFree( pCnf ); status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, 0, 0, 0 ); diff --git a/src/base/abci/abcTim.c b/src/base/abci/abcTim.c index 3f68b815..c850cc56 100644 --- a/src/base/abci/abcTim.c +++ b/src/base/abci/abcTim.c @@ -170,7 +170,7 @@ void Abc_NtkTestPinGia( Abc_Ntk_t * pNtk, int fWhiteBoxOnly, int fVerbose ) Gia_Man_t * pGia; char * pFileName = "testpin.aig"; pGia = Abc_NtkTestPinDeriveGia( pNtk, fWhiteBoxOnly, fVerbose ); - Gia_AigerWrite( pGia, pFileName, 0, 0 ); + Gia_AigerWrite( pGia, pFileName, 0, 0, 0 ); Gia_ManStop( pGia ); printf( "AIG with pins derived from mapped network \"%s\" was written into file \"%s\".\n", Abc_NtkName(pNtk), pFileName ); @@ -391,7 +391,7 @@ Gia_Man_t * Abc_NtkTestTimDeriveGia( Abc_Ntk_t * pNtk, int fVerbose ) Vec_FltFree( vArrTimes ); Vec_FltFree( vReqTimes ); -Gia_AigerWrite( pHoles, "holes00.aig", 0, 0 ); +Gia_AigerWrite( pHoles, "holes00.aig", 0, 0, 0 ); // return pGia->pAigExtra = pHoles; @@ -560,7 +560,7 @@ void Abc_NtkTestTimByWritingFile( Gia_Man_t * pGia, char * pFileName ) Gia_ManReverseClasses( pGia, 0 ); } // write file - Gia_AigerWrite( pGia, pFileName, 0, 0 ); + Gia_AigerWrite( pGia, pFileName, 0, 0, 0 ); // unnormalize choices if ( Gia_ManHasChoices(pGia) ) Gia_ManReverseClasses( pGia, 1 ); diff --git a/src/base/acb/acbCom.c b/src/base/acb/acbCom.c index c2eae924..3d62454d 100644 --- a/src/base/acb/acbCom.c +++ b/src/base/acb/acbCom.c @@ -664,7 +664,7 @@ int Acb_CommandCec( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fDumpMiter ) { Abc_Print( 0, "The verification miter is written into file \"%s\".\n", "cec_miter.aig" ); - Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0 ); + Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0, 0 ); } pAbc->Status = Cec_ManVerify( pMiter, pPars ); //Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexComb ); diff --git a/src/base/acb/acbFunc.c b/src/base/acb/acbFunc.c index 1efb5807..f6fcf2b0 100644 --- a/src/base/acb/acbFunc.c +++ b/src/base/acb/acbFunc.c @@ -2036,14 +2036,14 @@ Cnf_Dat_t * Acb_NtkEcoCompute( Gia_Man_t * p, int iTar, int nTars ) Gia_ManStop( p ); pCof1 = Acb_NtkEcoSynthesize( p = pCof1 ); Gia_ManStop( p ); - Gia_AigerWrite( pCof0, "eco_qbf0.aig", 0, 0 ); - Gia_AigerWrite( pCof1, "eco_qbf1.aig", 0, 0 ); + Gia_AigerWrite( pCof0, "eco_qbf0.aig", 0, 0, 0 ); + Gia_AigerWrite( pCof1, "eco_qbf1.aig", 0, 0, 0 ); Gia_ManStop( pCof0 ); Gia_ManStop( pCof1 ); printf( "Dumped cof0 into file \"%s\".\n", "eco_qbf0.aig" ); printf( "Dumped cof1 into file \"%s\".\n", "eco_qbf1.aig" ); } -// Gia_AigerWrite( pCof, "eco_qbf.aig", 0, 0 ); +// Gia_AigerWrite( pCof, "eco_qbf.aig", 0, 0, 0 ); // printf( "Dumped the result of quantification into file \"%s\".\n", "eco_qbf.aig" ); pCnf = (Cnf_Dat_t *)Mf_ManGenerateCnf( pCof, 8, 0, 0, 0, 0 ); Gia_ManStop( pCof ); @@ -2445,7 +2445,7 @@ int Acb_NtkEcoPerform( Acb_Ntk_t * pNtkF, Acb_Ntk_t * pNtkG, char * pFileNameF, // generate output files Acb_GenerateFilePatch( vPatch, "patch.v" ); Acb_GenerateFileOut( vInst, pFileNameF, "out.v", vPatch ); - //Gia_AigerWrite( pGiaG, "test.aig", 0, 0 ); + //Gia_AigerWrite( pGiaG, "test.aig", 0, 0, 0 ); cleanup: // cleanup if ( vGias ) diff --git a/src/base/bac/bacCom.c b/src/base/bac/bacCom.c index e7d94d54..f1e3be5f 100644 --- a/src/base/bac/bacCom.c +++ b/src/base/bac/bacCom.c @@ -651,7 +651,7 @@ int Bac_CommandCec( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fDumpMiter ) { Abc_Print( 0, "The verification miter is written into file \"%s\".\n", "cec_miter.aig" ); - Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0 ); + Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0, 0 ); } pAbc->Status = Cec_ManVerify( pMiter, pPars ); //Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexComb ); diff --git a/src/base/cba/cbaCom.c b/src/base/cba/cbaCom.c index b6a8c802..fa13030a 100644 --- a/src/base/cba/cbaCom.c +++ b/src/base/cba/cbaCom.c @@ -662,7 +662,7 @@ int Cba_CommandCec( Abc_Frame_t * pAbc, int argc, char ** argv ) if ( fDumpMiter ) { Abc_Print( 0, "The verification miter is written into file \"%s\".\n", "cec_miter.aig" ); - Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0 ); + Gia_AigerWrite( pMiter, "cec_miter.aig", 0, 0, 0 ); } pAbc->Status = Cec_ManVerify( pMiter, pPars ); //Abc_FrameReplaceCex( pAbc, &pAbc->pGia->pCexComb ); diff --git a/src/base/cmd/cmdPlugin.c b/src/base/cmd/cmdPlugin.c index ab517ed8..efee671d 100644 --- a/src/base/cmd/cmdPlugin.c +++ b/src/base/cmd/cmdPlugin.c @@ -502,7 +502,7 @@ int Cmd_CommandAbcPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv ) } // create input file - Gia_AigerWrite( pAbc->pGia, pFileIn, 0, 0 ); + Gia_AigerWrite( pAbc->pGia, pFileIn, 0, 0, 0 ); // create command line vCommand = Vec_StrAlloc( 100 ); diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index 4b59379b..c5c351c4 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -2361,8 +2361,8 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) assert( Gia_ManPoNum(pNew) % 2 == 0 ); sprintf( pFileName0, "%s_lhs_.aig", pNameGeneric ); sprintf( pFileName1, "%s_rhs_.aig", pNameGeneric ); - Gia_AigerWrite( pGia0, pFileName0, 0, 0 ); - Gia_AigerWrite( pGia1, pFileName1, 0, 0 ); + Gia_AigerWrite( pGia0, pFileName0, 0, 0, 0 ); + Gia_AigerWrite( pGia1, pFileName1, 0, 0, 0 ); Gia_ManStop( pGia0 ); Gia_ManStop( pGia1 ); Vec_IntFree( vOrder ); diff --git a/src/base/wlc/wlcMem.c b/src/base/wlc/wlcMem.c index ccc319e5..fd844b62 100644 --- a/src/base/wlc/wlcMem.c +++ b/src/base/wlc/wlcMem.c @@ -1006,7 +1006,7 @@ int Wlc_NtkMemAbstract( Wlc_Ntk_t * p, int nIterMax, int fDumpAbs, int fPdrVerbo if ( fDumpAbs ) { char * pFileName = "mem_abs.aig"; - Gia_AigerWrite( pAbs, pFileName, 0, 0 ); + Gia_AigerWrite( pAbs, pFileName, 0, 0, 0 ); printf( "Iteration %3d: Dumped abstraction in file \"%s\" after finding CEX in frame %d.\n", nIters, pFileName, pCex ? pCex->iFrame : -1 ); } diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c index 42332819..d8187bd4 100644 --- a/src/base/wlc/wlcReadVer.c +++ b/src/base/wlc/wlcReadVer.c @@ -1663,7 +1663,7 @@ void Io_ReadWordTest( char * pFileName ) Wlc_WriteVer( pNtk, "test.v", 0, 0 ); pNew = Wlc_NtkBitBlast( pNtk, NULL ); - Gia_AigerWrite( pNew, "test.aig", 0, 0 ); + Gia_AigerWrite( pNew, "test.aig", 0, 0, 0 ); Gia_ManStop( pNew ); Wlc_NtkFree( pNtk ); |