summaryrefslogtreecommitdiffstats
path: root/src/opt/sim/simMan.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 20:01:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2008-01-30 20:01:00 -0800
commit0c6505a26a537dc911b6566f82d759521e527c08 (patch)
treef2687995efd4943fe3b1307fce7ef5942d0a57b3 /src/opt/sim/simMan.c
parent4d30a1e4f1edecff86d5066ce4653a370e59e5e1 (diff)
downloadabc-0c6505a26a537dc911b6566f82d759521e527c08.tar.gz
abc-0c6505a26a537dc911b6566f82d759521e527c08.tar.bz2
abc-0c6505a26a537dc911b6566f82d759521e527c08.zip
Version abc80130_2
Diffstat (limited to 'src/opt/sim/simMan.c')
-rw-r--r--src/opt/sim/simMan.c43
1 files changed, 22 insertions, 21 deletions
diff --git a/src/opt/sim/simMan.c b/src/opt/sim/simMan.c
index 780ecfd8..3b50ad84 100644
--- a/src/opt/sim/simMan.c
+++ b/src/opt/sim/simMan.c
@@ -26,12 +26,12 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFITIONS ///
+/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
- Synopsis [Starts the simulatin manager.]
+ Synopsis [Starts the simulation manager.]
Description []
@@ -83,7 +83,7 @@ Sym_Man_t * Sym_ManStart( Abc_Ntk_t * pNtk, int fVerbose )
/**Function*************************************************************
- Synopsis [Stops the simulatin manager.]
+ Synopsis [Stops the simulation manager.]
Description []
@@ -149,11 +149,9 @@ void Sym_ManPrintStats( Sym_Man_t * p )
}
-
-
/**Function*************************************************************
- Synopsis [Starts the simulatin manager.]
+ Synopsis [Starts the simulation manager.]
Description []
@@ -162,7 +160,7 @@ void Sym_ManPrintStats( Sym_Man_t * p )
SeeAlso []
***********************************************************************/
-Sim_Man_t * Sim_ManStart( Abc_Ntk_t * pNtk )
+Sim_Man_t * Sim_ManStart( Abc_Ntk_t * pNtk, int fLightweight )
{
Sim_Man_t * p;
// start the manager
@@ -175,24 +173,27 @@ Sim_Man_t * Sim_ManStart( Abc_Ntk_t * pNtk )
p->nSimBits = 2048;
p->nSimWords = SIM_NUM_WORDS(p->nSimBits);
p->vSim0 = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
- p->vSim1 = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
- // support information
- p->nSuppBits = Abc_NtkCiNum(pNtk);
- p->nSuppWords = SIM_NUM_WORDS(p->nSuppBits);
- p->vSuppStr = Sim_ComputeStrSupp( pNtk );
- p->vSuppFun = Sim_UtilInfoAlloc( Abc_NtkCoNum(p->pNtk), p->nSuppWords, 1 );
- // other data
- p->pMmPat = Extra_MmFixedStart( sizeof(Sim_Pat_t) + p->nSuppWords * sizeof(unsigned) );
- p->vFifo = Vec_PtrAlloc( 100 );
- p->vDiffs = Vec_IntAlloc( 100 );
- // allocate support targets (array of unresolved outputs for each input)
- p->vSuppTargs = Vec_VecStart( p->nInputs );
+ p->fLightweight = fLightweight;
+ if (!p->fLightweight) {
+ p->vSim1 = Sim_UtilInfoAlloc( Abc_NtkObjNumMax(pNtk), p->nSimWords, 0 );
+ // support information
+ p->nSuppBits = Abc_NtkCiNum(pNtk);
+ p->nSuppWords = SIM_NUM_WORDS(p->nSuppBits);
+ p->vSuppStr = Sim_ComputeStrSupp( pNtk );
+ p->vSuppFun = Sim_UtilInfoAlloc( Abc_NtkCoNum(p->pNtk), p->nSuppWords, 1 );
+ // other data
+ p->pMmPat = Extra_MmFixedStart( sizeof(Sim_Pat_t) + p->nSuppWords * sizeof(unsigned) );
+ p->vFifo = Vec_PtrAlloc( 100 );
+ p->vDiffs = Vec_IntAlloc( 100 );
+ // allocate support targets (array of unresolved outputs for each input)
+ p->vSuppTargs = Vec_VecStart( p->nInputs );
+ }
return p;
}
/**Function*************************************************************
- Synopsis [Stops the simulatin manager.]
+ Synopsis [Stops the simulation manager.]
Description []
@@ -209,7 +210,7 @@ void Sim_ManStop( Sim_Man_t * p )
if ( p->vSuppStr ) Sim_UtilInfoFree( p->vSuppStr );
// if ( p->vSuppFun ) Sim_UtilInfoFree( p->vSuppFun );
if ( p->vSuppTargs ) Vec_VecFree( p->vSuppTargs );
- if ( p->pMmPat ) Extra_MmFixedStop( p->pMmPat, 0 );
+ if ( p->pMmPat ) Extra_MmFixedStop( p->pMmPat );
if ( p->vFifo ) Vec_PtrFree( p->vFifo );
if ( p->vDiffs ) Vec_IntFree( p->vDiffs );
free( p );