diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-28 11:05:12 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2014-03-28 11:05:12 -0700 |
commit | 6cb3817a91d7fd14fc93fb02b80e82b5598e9f79 (patch) | |
tree | 40e27af3b53ad9cf3b7a8aff79ceff44b66e5dee /src/base | |
parent | c6663b04c7bd11482f3beb50ee99ff39c839a6bc (diff) | |
download | abc-6cb3817a91d7fd14fc93fb02b80e82b5598e9f79.tar.gz abc-6cb3817a91d7fd14fc93fb02b80e82b5598e9f79.tar.bz2 abc-6cb3817a91d7fd14fc93fb02b80e82b5598e9f79.zip |
Ternary simulation for multi-output miters.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/abci/abc.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 27ccd247..31e4a647 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -403,6 +403,7 @@ static int Abc_CommandAbc9FFTest ( Abc_Frame_t * pAbc, int argc, cha static int Abc_CommandAbc9Inse ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Maxi ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int Abc_CommandAbc9Bmci ( Abc_Frame_t * pAbc, int argc, char ** argv ); +static int Abc_CommandAbc9PoXsim ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9PoPart2 ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9CexCut ( Abc_Frame_t * pAbc, int argc, char ** argv ); //static int Abc_CommandAbc9CexMerge ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -970,6 +971,7 @@ void Abc_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "ABC9", "&inse", Abc_CommandAbc9Inse, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&maxi", Abc_CommandAbc9Maxi, 0 ); Cmd_CommandAdd( pAbc, "ABC9", "&bmci", Abc_CommandAbc9Bmci, 0 ); + Cmd_CommandAdd( pAbc, "ABC9", "&poxsim", Abc_CommandAbc9PoXsim, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&popart2", Abc_CommandAbc9PoPart2, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&cexcut", Abc_CommandAbc9CexCut, 0 ); // Cmd_CommandAdd( pAbc, "ABC9", "&cexmerge", Abc_CommandAbc9CexMerge, 0 ); @@ -33239,6 +33241,69 @@ usage: SeeAlso [] ***********************************************************************/ +int Abc_CommandAbc9PoXsim( Abc_Frame_t * pAbc, int argc, char ** argv ) +{ + extern Vec_Int_t * Gia_ManPoXSim( Gia_Man_t * p, int nFrames, int fVerbose ); + int c, nFrames = 1000, fVerbose = 0; + Extra_UtilGetoptReset(); + while ( ( c = Extra_UtilGetopt( argc, argv, "Fvh" ) ) != EOF ) + { + switch ( c ) + { + case 'F': + if ( globalUtilOptind >= argc ) + { + Abc_Print( -1, "Command line switch \"-F\" should be followed by an integer.\n" ); + goto usage; + } + nFrames = atoi(argv[globalUtilOptind]); + globalUtilOptind++; + if ( nFrames < 0 ) + goto usage; + break; + case 'v': + fVerbose ^= 1; + break; + case 'h': + goto usage; + default: + goto usage; + } + } + if ( pAbc->pGia == NULL ) + { + Abc_Print( -1, "Abc_CommandAbc9Bmci(): There is no AIG.\n" ); + return 0; + } + if ( Gia_ManRegNum(pAbc->pGia) == 0 ) + { + Abc_Print( -1, "Abc_CommandAbc9Bmci(): AIG is combinational.\n" ); + return 0; + } + Vec_IntFreeP( &pAbc->vAbcObjIds ); + pAbc->vAbcObjIds = Gia_ManPoXSim( pAbc->pGia, nFrames, fVerbose ); + return 0; + +usage: + Abc_Print( -2, "usage: &poxsim [-F num] [-vh]\n" ); + Abc_Print( -2, "\t X-valued simulation of the multi-output sequential miter\n" ); + Abc_Print( -2, "\t-F num : the number of timeframes [default = %d]\n", nFrames ); + Abc_Print( -2, "\t-v : toggles printing verbose information [default = %s]\n", fVerbose? "yes": "no" ); + Abc_Print( -2, "\t-h : print the command usage\n"); + return 1; +} + +/**Function************************************************************* + + Synopsis [] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv ) { return -1; |