diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-11-19 19:30:31 +0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-11-19 19:30:31 +0800 |
commit | 8752613e3ae41ae904efdb77889bc2fe52d872e0 (patch) | |
tree | ebd4220b844eee2620fcf7bc6f39e41af20c920a /src/base/abci/abcDec.c | |
parent | 0d24b4e4cab591e0b39862f5e4abd6f37725469a (diff) | |
download | abc-8752613e3ae41ae904efdb77889bc2fe52d872e0.tar.gz abc-8752613e3ae41ae904efdb77889bc2fe52d872e0.tar.bz2 abc-8752613e3ae41ae904efdb77889bc2fe52d872e0.zip |
Experiments with truth tables.
Diffstat (limited to 'src/base/abci/abcDec.c')
-rw-r--r-- | src/base/abci/abcDec.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c index 8bb04f16..dee773ab 100644 --- a/src/base/abci/abcDec.c +++ b/src/base/abci/abcDec.c @@ -439,6 +439,36 @@ Abc_TtStore_t * Abc_TtStoreLoad( char * pFileName, int nVarNum ) SeeAlso [] ***********************************************************************/ +void Abc_TtStoreLoadSave( char * pFileName ) +{ + Abc_TtStore_t * p; + char * pFileInput = pFileName; + char * pFileOutput = Extra_FileNameGenericAppend(pFileName, "_binary.data"); + + // read info from file + p = Abc_TtStoreLoad( pFileInput, -1 ); + if ( p == NULL ) + return; + + // write into another file + Abc_TtStoreWrite( pFileOutput, p, 1 ); + + // delete data-structure + Abc_TtStoreFree( p, -1 ); + printf( "Input file \"%s\" was copied into output file \"%s\".\n", pFileInput, pFileOutput ); +} + +/**Function************************************************************* + + Synopsis [Read truth tables from input file and write them into output file.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ void Abc_TtStoreTest( char * pFileName ) { Abc_TtStore_t * p; |