summaryrefslogtreecommitdiffstats
path: root/src/base/abci/abcDar.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-09-11 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-09-11 08:01:00 -0700
commitd62ee0a90d14fe762015906b6b3a5ad23421d390 (patch)
tree0bf1f4bf286559c3cca61661d29d7ea312548778 /src/base/abci/abcDar.c
parente8cf8415c5c8c31db650f549e54fd7a3aad48be0 (diff)
downloadabc-d62ee0a90d14fe762015906b6b3a5ad23421d390.tar.gz
abc-d62ee0a90d14fe762015906b6b3a5ad23421d390.tar.bz2
abc-d62ee0a90d14fe762015906b6b3a5ad23421d390.zip
Version abc70911
Diffstat (limited to 'src/base/abci/abcDar.c')
-rw-r--r--src/base/abci/abcDar.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index 356a5565..06e425d5 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -49,10 +49,10 @@ Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fRegisters )
Aig_Man_t * pMan;
Aig_Obj_t * pObjNew;
Abc_Obj_t * pObj;
- int i, nNodes;
+ int i, nNodes, nDontCares;
// make sure the latches follow PIs/POs
- if ( fRegisters )
- {
+ if ( fRegisters )
+ {
assert( Abc_NtkBoxNum(pNtk) == Abc_NtkLatchNum(pNtk) );
Abc_NtkForEachCi( pNtk, pObj, i )
if ( i < Abc_NtkPiNum(pNtk) )
@@ -64,6 +64,21 @@ Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fRegisters )
assert( Abc_ObjIsPo(pObj) );
else
assert( Abc_ObjIsBi(pObj) );
+ // print warning about initial values
+ nDontCares = 0;
+ Abc_NtkForEachLatch( pNtk, pObj, i )
+ if ( Abc_LatchIsInitDc(pObj) )
+ {
+ Abc_LatchSetInit0(pObj);
+ nDontCares++;
+ }
+ if ( nDontCares )
+ {
+ printf( "Warning: %d registers in this network have don't-care init values.\n", nDontCares );
+ printf( "The don't-care are assumed to be 0. The result may not verify.\n" );
+ printf( "Use command \"print_latch\" to see the init values of registers.\n" );
+ printf( "Use command \"init\" to change the values.\n" );
+ }
}
// create the manager
pMan = Aig_ManStart( Abc_NtkNodeNum(pNtk) + 100 );
@@ -985,7 +1000,7 @@ Abc_Ntk_t * Abc_NtkDarLcorr( Abc_Ntk_t * pNtk, int nFramesP, int nConfMax, int f
pMan = Abc_NtkToDar( pNtk, 1 );
if ( pMan == NULL )
return NULL;
- pMan = Fra_FraigLatchCorrespondence( pTemp = pMan, nFramesP, nConfMax, fVerbose, NULL );
+ pMan = Fra_FraigLatchCorrespondence( pTemp = pMan, nFramesP, nConfMax, 0, fVerbose, NULL );
Aig_ManStop( pTemp );
if ( Aig_ManRegNum(pMan) < Abc_NtkLatchNum(pNtk) )
pNtkAig = Abc_NtkFromDarSeqSweep( pNtk, pMan );