summaryrefslogtreecommitdiffstats
path: root/src/aig/fsim
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2010-11-01 01:35:04 -0700
commit6130e39b18b5f53902e4eab14f6d5cdde5219563 (patch)
tree0db0628479a1b750e9af1f66cb8379ebd0913d31 /src/aig/fsim
parentf0e77f6797c0504b0da25a56152b707d3357f386 (diff)
downloadabc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.gz
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.tar.bz2
abc-6130e39b18b5f53902e4eab14f6d5cdde5219563.zip
initial commit of public abc
Diffstat (limited to 'src/aig/fsim')
-rw-r--r--src/aig/fsim/fsim.h16
-rw-r--r--src/aig/fsim/fsimCore.c5
-rw-r--r--src/aig/fsim/fsimFront.c5
-rw-r--r--src/aig/fsim/fsimInt.h16
-rw-r--r--src/aig/fsim/fsimMan.c5
-rw-r--r--src/aig/fsim/fsimSim.c16
-rw-r--r--src/aig/fsim/fsimSwitch.c5
-rw-r--r--src/aig/fsim/fsimTsim.c5
8 files changed, 55 insertions, 18 deletions
diff --git a/src/aig/fsim/fsim.h b/src/aig/fsim/fsim.h
index 4e1588a7..fabc5254 100644
--- a/src/aig/fsim/fsim.h
+++ b/src/aig/fsim/fsim.h
@@ -21,6 +21,7 @@
#ifndef __FSIM_H__
#define __FSIM_H__
+
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -29,9 +30,10 @@
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-extern "C" {
-#endif
+
+
+ABC_NAMESPACE_HEADER_START
+
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
@@ -85,9 +87,11 @@ extern Vec_Int_t * Fsim_ManSwitchSimulate( Aig_Man_t * pAig, Fsim_ParSwitch_t
/*=== fsimTsim.c ==========================================================*/
extern Vec_Ptr_t * Fsim_ManTerSimulate( Aig_Man_t * pAig, int fVerbose );
-#ifdef __cplusplus
-}
-#endif
+
+
+ABC_NAMESPACE_HEADER_END
+
+
#endif
diff --git a/src/aig/fsim/fsimCore.c b/src/aig/fsim/fsimCore.c
index 2a159cbe..9516f09e 100644
--- a/src/aig/fsim/fsimCore.c
+++ b/src/aig/fsim/fsimCore.c
@@ -20,6 +20,9 @@
#include "fsimInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -81,3 +84,5 @@ void Fsim_ManSetDefaultParamsSwitch( Fsim_ParSwitch_t * p )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/aig/fsim/fsimFront.c b/src/aig/fsim/fsimFront.c
index 14906c0b..6169543c 100644
--- a/src/aig/fsim/fsimFront.c
+++ b/src/aig/fsim/fsimFront.c
@@ -20,6 +20,9 @@
#include "fsimInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -362,3 +365,5 @@ void Fsim_ManFront( Fsim_Man_t * p, int fCompressAig )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/aig/fsim/fsimInt.h b/src/aig/fsim/fsimInt.h
index f46a9024..f5dee298 100644
--- a/src/aig/fsim/fsimInt.h
+++ b/src/aig/fsim/fsimInt.h
@@ -21,6 +21,7 @@
#ifndef __FSIM_INT_H__
#define __FSIM_INT_H__
+
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -32,9 +33,10 @@
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
-#ifdef __cplusplus
-extern "C" {
-#endif
+
+
+ABC_NAMESPACE_HEADER_START
+
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
@@ -122,9 +124,11 @@ extern Fsim_Man_t * Fsim_ManCreate( Aig_Man_t * pAig );
extern void Fsim_ManDelete( Fsim_Man_t * p );
extern void Fsim_ManTest( Aig_Man_t * pAig );
-#ifdef __cplusplus
-}
-#endif
+
+
+ABC_NAMESPACE_HEADER_END
+
+
#endif
diff --git a/src/aig/fsim/fsimMan.c b/src/aig/fsim/fsimMan.c
index 872e1604..ea0cab43 100644
--- a/src/aig/fsim/fsimMan.c
+++ b/src/aig/fsim/fsimMan.c
@@ -20,6 +20,9 @@
#include "fsimInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -205,3 +208,5 @@ void Fsim_ManTest( Aig_Man_t * pAig )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/aig/fsim/fsimSim.c b/src/aig/fsim/fsimSim.c
index 52dedc6d..2da7db15 100644
--- a/src/aig/fsim/fsimSim.c
+++ b/src/aig/fsim/fsimSim.c
@@ -21,6 +21,9 @@
#include "fsimInt.h"
#include "ssw.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -426,9 +429,9 @@ static inline int Fsim_ManCheckPos( Fsim_Man_t * p, int * piPo, int * piPat )
SeeAlso []
***********************************************************************/
-Ssw_Cex_t * Fsim_ManGenerateCounter( Aig_Man_t * pAig, int iFrame, int iOut, int nWords, int iPat, Vec_Int_t * vCis2Ids )
+Abc_Cex_t * Fsim_ManGenerateCounter( Aig_Man_t * pAig, int iFrame, int iOut, int nWords, int iPat, Vec_Int_t * vCis2Ids )
{
- Ssw_Cex_t * p;
+ Abc_Cex_t * p;
unsigned * pData;
int f, i, w, iPioId, Counter;
p = Ssw_SmlAllocCounterExample( Aig_ManRegNum(pAig), Saig_ManPiNum(pAig), iFrame+1 );
@@ -514,7 +517,7 @@ int Fsim_ManSimulate( Aig_Man_t * pAig, Fsim_ParSim_t * pPars )
p->pDataSimCos = ABC_ALLOC( unsigned, p->nWords * p->nCos );
Fsim_ManSimInfoInit( p );
for ( i = 0; i < pPars->nIters; i++ )
- {
+ {
Fsim_ManSimulateRound( p );
if ( pPars->fVerbose )
{
@@ -530,15 +533,14 @@ int Fsim_ManSimulate( Aig_Man_t * pAig, Fsim_ParSim_t * pPars )
break;
}
if ( (clock() - clkTotal)/CLOCKS_PER_SEC >= pPars->TimeLimit )
- {
- printf( "No bug detected after %d frames with time limit %d seconds.\n", i+1, pPars->TimeLimit );
break;
- }
clk2 = clock();
if ( i < pPars->nIters - 1 )
Fsim_ManSimInfoTransfer( p );
clk2Total += clock() - clk2;
}
+ if ( pAig->pSeqModel == NULL )
+ printf( "No bug detected after %d frames with time limit %d seconds.\n", i+1, pPars->TimeLimit );
if ( pPars->fVerbose )
{
printf( "Maxcut = %8d. AigMem = %7.2f Mb. SimMem = %7.2f Mb. ",
@@ -561,3 +563,5 @@ int Fsim_ManSimulate( Aig_Man_t * pAig, Fsim_ParSim_t * pPars )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/aig/fsim/fsimSwitch.c b/src/aig/fsim/fsimSwitch.c
index 97cb612f..3eef2d4c 100644
--- a/src/aig/fsim/fsimSwitch.c
+++ b/src/aig/fsim/fsimSwitch.c
@@ -20,6 +20,9 @@
#include "fsimInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -33,3 +36,5 @@
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+
diff --git a/src/aig/fsim/fsimTsim.c b/src/aig/fsim/fsimTsim.c
index 0de283e4..e05e6409 100644
--- a/src/aig/fsim/fsimTsim.c
+++ b/src/aig/fsim/fsimTsim.c
@@ -20,6 +20,9 @@
#include "fsimInt.h"
+ABC_NAMESPACE_IMPL_START
+
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -408,3 +411,5 @@ Vec_Ptr_t * Fsim_ManTerSimulate( Aig_Man_t * pAig, int fVerbose )
////////////////////////////////////////////////////////////////////////
+ABC_NAMESPACE_IMPL_END
+