diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-13 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-04-13 08:01:00 -0700 |
commit | 77fab468ad32d15de5c065c211f6f74371670940 (patch) | |
tree | 2a39a0480942bb597048513f72b2a23b0fcacde8 /src/base/abci/abcXsim.c | |
parent | ccd1b57264d3bf1514410747cdcf6e4731ac7f2a (diff) | |
download | abc-77fab468ad32d15de5c065c211f6f74371670940.tar.gz abc-77fab468ad32d15de5c065c211f6f74371670940.tar.bz2 abc-77fab468ad32d15de5c065c211f6f74371670940.zip |
Version abc90413
Diffstat (limited to 'src/base/abci/abcXsim.c')
-rw-r--r-- | src/base/abci/abcXsim.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/base/abci/abcXsim.c b/src/base/abci/abcXsim.c index e63b296a..76a82b51 100644 --- a/src/base/abci/abcXsim.c +++ b/src/base/abci/abcXsim.c @@ -181,15 +181,15 @@ void Abc_NtkXValueSimulate( Abc_Ntk_t * pNtk, int nFrames, int fXInputs, int fXS Synopsis [Cycles the circuit to create a new initial state.] - Description [Simulates the circuit with random input for the given - number of timeframes to get a better initial state.] + Description [Simulates the circuit with random (or ternary) input + for the given number of timeframes to get a better initial state.] SideEffects [] SeeAlso [] ***********************************************************************/ -void Abc_NtkCycleInitState( Abc_Ntk_t * pNtk, int nFrames, int fVerbose ) +void Abc_NtkCycleInitState( Abc_Ntk_t * pNtk, int nFrames, int fUseXval, int fVerbose ) { Abc_Obj_t * pObj; int i, f; @@ -198,13 +198,12 @@ void Abc_NtkCycleInitState( Abc_Ntk_t * pNtk, int nFrames, int fVerbose ) // initialize the values Abc_ObjSetXsim( Abc_AigConst1(pNtk), XVS1 ); Abc_NtkForEachLatch( pNtk, pObj, i ) -// Abc_ObjSetXsim( Abc_ObjFanout0(pObj), Abc_LatchIsInit1(pObj)? XVS1 : XVS0 ); Abc_ObjSetXsim( Abc_ObjFanout0(pObj), Abc_LatchInit(pObj) ); // simulate for the given number of timeframes for ( f = 0; f < nFrames; f++ ) { Abc_NtkForEachPi( pNtk, pObj, i ) - Abc_ObjSetXsim( pObj, Abc_XsimRand2() ); + Abc_ObjSetXsim( pObj, fUseXval? ABC_INIT_DC : Abc_XsimRand2() ); Abc_AigForEachAnd( pNtk, pObj, i ) Abc_ObjSetXsim( pObj, Abc_XsimAnd(Abc_ObjGetXsimFanin0(pObj), Abc_ObjGetXsimFanin1(pObj)) ); Abc_NtkForEachCo( pNtk, pObj, i ) |