diff options
Diffstat (limited to 'src/base/wlc')
-rw-r--r-- | src/base/wlc/wlcBlast.c | 33 | ||||
-rw-r--r-- | src/base/wlc/wlcCom.c | 68 |
2 files changed, 3 insertions, 98 deletions
diff --git a/src/base/wlc/wlcBlast.c b/src/base/wlc/wlcBlast.c index ff7e9242..01b6e64c 100644 --- a/src/base/wlc/wlcBlast.c +++ b/src/base/wlc/wlcBlast.c @@ -1150,8 +1150,6 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) int i, k, b, iFanin, iLit, nAndPrev, * pFans0, * pFans1, * pFans2, * pFans3; int nFFins = 0, nFFouts = 0, curPi = 0, curPo = 0, nFf2Regs = 0; int nBitCis = 0, nBitCos = 0, fAdded = 0; - int iFirstAddPi = -1; // remembers the first additional PI that stands for DC-flop output - int iFirstFlop = -1; // remembers the first flop of the design Wlc_BstPar_t Par, * pPar = &Par; Wlc_BstParDefault( pPar ); pPar = pParIn ? pParIn : pPar; @@ -2119,21 +2117,14 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) if ( p->pInits ) { int Length = strlen(p->pInits); - // remember the place in the array where the first PI begins - iFirstAddPi = Vec_PtrSize(pNew->vNamesIn); for ( i = 0; i < Length; i++ ) if ( p->pInits[i] == 'x' || p->pInits[i] == 'X' ) { - //char Buffer[100]; - //sprintf( Buffer, "%s%d", "init", i ); - //Vec_PtrPush( pNew->vNamesIn, Abc_UtilStrsav(Buffer) ); - // save NULL at this time - to be overwritten later - //printf( "Adding NULL in position %d\n", Vec_PtrSize(pNew->vNamesIn) ); - Vec_PtrPush( pNew->vNamesIn, NULL ); + char Buffer[100]; + sprintf( Buffer, "%s%d", "init", i ); + Vec_PtrPush( pNew->vNamesIn, Abc_UtilStrsav(Buffer) ); fAdded = 1; } - // remember the place in the array where the first real flop is - iFirstFlop = Vec_PtrSize(pNew->vNamesIn); } Wlc_NtkForEachCi( p, pObj, i ) if ( !Wlc_ObjIsPi(pObj) ) @@ -2150,7 +2141,6 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) Vec_PtrPush( pNew->vNamesIn, Abc_UtilStrsav(Buffer) ); } } -/* Wlc_NtkForEachFf2( p, pObj, i ) { char * pName = Wlc_ObjName(p, Wlc_ObjId(p, pObj)); @@ -2169,7 +2159,6 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) Vec_PtrPush( pNew->vNamesIn, Abc_UtilStrsav(Buffer) ); } } -*/ Wlc_NtkForEachFf2( p, pObj, i ) { char * pName = Wlc_ObjName(p, Wlc_ObjId(p, pObj)); @@ -2202,22 +2191,6 @@ Gia_Man_t * Wlc_NtkBitBlast( Wlc_Ntk_t * p, Wlc_BstPar_t * pParIn ) } } assert( Vec_PtrSize(pNew->vNamesIn) == Gia_ManCiNum(pNew) ); - // finish creating names of additional primary inputs - if ( p->pInits ) - { - int k = iFirstAddPi, Length = strlen(p->pInits); - assert( iFirstAddPi >= 0 && iFirstFlop >= 0 ); - for ( i = 0; i < Length; i++ ) - if ( p->pInits[i] == 'x' || p->pInits[i] == 'X' ) - { - char Buffer[1000]; - sprintf( Buffer, "%s_init", (char *)Vec_PtrEntry(pNew->vNamesIn, iFirstFlop+i) ); - assert( Vec_PtrEntry(pNew->vNamesIn, k) == NULL ); - Vec_PtrWriteEntry( pNew->vNamesIn, k++, Abc_UtilStrsav(Buffer) ); - //printf( "Replacing NULL in position %d\n", iFirstAddPi-Length+i ); - } - assert( k == iFirstFlop ); - } // create output names pNew->vNamesOut = Vec_PtrAlloc( Gia_ManCoNum(pNew) ); Wlc_NtkForEachFf2( p, pObj, i ) diff --git a/src/base/wlc/wlcCom.c b/src/base/wlc/wlcCom.c index 80313c7a..5e69000f 100644 --- a/src/base/wlc/wlcCom.c +++ b/src/base/wlc/wlcCom.c @@ -51,7 +51,6 @@ static int Abc_CommandInvCheck ( Abc_Frame_t * pAbc, int argc, char ** argv ) static int Abc_CommandInvGet ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandInvPut ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandInvMin ( Abc_Frame_t * pAbc, int argc, char ** argv ); -static int Abc_CommandCexFix ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandTest ( Abc_Frame_t * pAbc, int argc, char ** argv ); static inline Wlc_Ntk_t * Wlc_AbcGetNtk( Abc_Frame_t * pAbc ) { return (Wlc_Ntk_t *)pAbc->pAbcWlc; } @@ -100,7 +99,6 @@ void Wlc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "Word level", "inv_get", Abc_CommandInvGet, 0 ); Cmd_CommandAdd( pAbc, "Word level", "inv_put", Abc_CommandInvPut, 0 ); Cmd_CommandAdd( pAbc, "Word level", "inv_min", Abc_CommandInvMin, 0 ); - Cmd_CommandAdd( pAbc, "Word level", "cexfix", Abc_CommandCexFix, 0 ); } /**Function******************************************************************** @@ -1124,7 +1122,6 @@ int Abc_CommandBlast( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Print( 1, "Finished dumping file \"pio_name_map.txt\" containing PI/PO name mapping.\n" ); } } - Abc_FrameSetCexCiNames( Vec_PtrDupStr(pNew->vNamesIn) ); Abc_FrameUpdateGia( pAbc, pNew ); return 0; usage: @@ -1796,71 +1793,6 @@ usage: return 1; } -/**Function************************************************************* - - Synopsis [] - - Description [] - - SideEffects [] - - SeeAlso [] - -***********************************************************************/ -int Abc_CommandCexFix( Abc_Frame_t * pAbc, int argc, char ** argv ) -{ - Wlc_Ntk_t * pNtk = NULL; - Abc_Cex_t * pCexNew; - char * pFileName; - int c, fVerbose = 0; - Extra_UtilGetoptReset(); - while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF ) - { - switch ( c ) - { - case 'v': - fVerbose ^= 1; - break; - case 'h': - goto usage; - default: - Abc_Print( -2, "Unknown switch.\n"); - goto usage; - } - } - if ( pAbc->pCex == NULL ) - { - fprintf( pAbc->Out, "Counter-example is not available.\n" ); - goto usage; - } - if ( argc != globalUtilOptind + 1 ) - { - fprintf( pAbc->Out, "File name with the original design is missing on the command line.\n" ); - goto usage; - } - pFileName = argv[globalUtilOptind]; - pNtk = Wlc_ReadVer( pFileName, NULL ); - if ( pNtk == NULL ) - { - fprintf( pAbc->Out, "Cannot parse the incoming design in Verilog.\n" ); - goto usage; - } - pCexNew = Abc_CexTransformUndc( pAbc->pCex, pNtk->pInits ); - Wlc_NtkFree( pNtk ); - Abc_FrameReplaceCex( pAbc, &pCexNew ); - printf( "Replaced the current CEX by a new one generated using the original design.\n" ); - return 0; - -usage: - Abc_Print( -2, "usage: cexfix [-vh] <file>\n" ); - Abc_Print( -2, "\t updates CEX after to match the original design\n" ); - Abc_Print( -2, "\t<file> : the file with the original design\n" ); - Abc_Print( -2, "\t-v : toggle printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); - Abc_Print( -2, "\t-h : print the command usage\n"); - return 1; -} - - /**Function******************************************************************** Synopsis [] |