abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
fxu.h File Reference
#include "misc/vec/vec.h"

Go to the source code of this file.

Data Structures

struct  FxuDataStruct
 

Typedefs

typedef
typedefABC_NAMESPACE_HEADER_START
struct FxuDataStruct 
Fxu_Data_t
 INCLUDES ///. More...
 

Functions

void Abc_NtkSetDefaultFxParams (Fxu_Data_t *p)
 MACRO DEFINITIONS ///. More...
 
int Abc_NtkFastExtract (Abc_Ntk_t *pNtk, Fxu_Data_t *p)
 
void Abc_NtkFxuFreeInfo (Fxu_Data_t *p)
 

Typedef Documentation

typedef typedefABC_NAMESPACE_HEADER_START struct FxuDataStruct Fxu_Data_t

INCLUDES ///.

CFile****************************************************************

FileName [fxu.h]

PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]

Synopsis [External declarations of fast extract for unate covers.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

Date [Ver. 1.0. Started - February 1, 2003.]

Revision [

Id:
fxu.h,v 1.0 2003/02/01 00:00:00 alanmi Exp

]PARAMETERS ///STRUCTURE DEFINITIONS ///

Definition at line 42 of file fxu.h.

Function Documentation

int Abc_NtkFastExtract ( Abc_Ntk_t pNtk,
Fxu_Data_t p 
)

Function*************************************************************

Synopsis [Performs fast_extract on the current network.]

Description [Takes the network and the maximum number of nodes to extract. Uses the concurrent double-cube and single cube divisor extraction procedure. Modifies the network in the end, after extracting all nodes. Note that Ntk_NetworkSweep() may increase the performance of this procedure because the single-literal nodes will not be created in the sparse matrix. Returns 1 if the network has been changed.]

SideEffects []

SeeAlso []

Definition at line 83 of file abcFxu.c.

84 {
85  assert( Abc_NtkIsLogic(pNtk) );
86  // if the network is already in the SOP form, it may come from BLIF file
87  // and it may not be SCC-free, in which case FXU will not work correctly
88  if ( Abc_NtkIsSopLogic(pNtk) )
89  { // to make sure the SOPs are SCC-free
90 // Abc_NtkSopToBdd(pNtk);
91 // Abc_NtkBddToSop(pNtk);
92  }
93  // get the network in the SOP form
94  if ( !Abc_NtkToSop(pNtk, 0) )
95  {
96  printf( "Abc_NtkFastExtract(): Converting to SOPs has failed.\n" );
97  return 0;
98  }
99  // check if the network meets the requirements
100  if ( !Abc_NtkFxuCheck(pNtk) )
101  {
102  printf( "Abc_NtkFastExtract: Nodes have duplicated or complemented fanins. FXU is not performed.\n" );
103  return 0;
104  }
105  // sweep removes useless nodes
106  Abc_NtkCleanup( pNtk, 0 );
107  // collect information about the covers
108  Abc_NtkFxuCollectInfo( pNtk, p );
109  // call the fast extract procedure
110  if ( Fxu_FastExtract(p) > 0 )
111  {
112  // update the network
113  Abc_NtkFxuReconstruct( pNtk, p );
114  // make sure everything is okay
115  if ( !Abc_NtkCheck( pNtk ) )
116  printf( "Abc_NtkFastExtract: The network check has failed.\n" );
117  return 1;
118  }
119  else
120  printf( "Warning: The network has not been changed by \"fx\".\n" );
121  return 0;
122 }
static int Abc_NtkIsLogic(Abc_Ntk_t *pNtk)
Definition: abc.h:250
static Llb_Mgr_t * p
Definition: llb3Image.c:950
static void Abc_NtkFxuReconstruct(Abc_Ntk_t *pNtk, Fxu_Data_t *p)
Definition: abcFxu.c:234
ABC_DLL int Abc_NtkCheck(Abc_Ntk_t *pNtk)
FUNCTION DEFINITIONS ///.
Definition: abcCheck.c:61
static int Abc_NtkIsSopLogic(Abc_Ntk_t *pNtk)
Definition: abc.h:264
ABC_DLL int Abc_NtkCleanup(Abc_Ntk_t *pNtk, int fVerbose)
Definition: abcSweep.c:476
ABC_DLL int Abc_NtkToSop(Abc_Ntk_t *pNtk, int fDirect)
Definition: abcFunc.c:1124
static ABC_NAMESPACE_IMPL_START int Abc_NtkFxuCheck(Abc_Ntk_t *pNtk)
DECLARATIONS ///.
Definition: abcFxu.c:136
#define assert(ex)
Definition: util_old.h:213
int Fxu_FastExtract(Fxu_Data_t *pData)
FUNCTION DEFINITIONS ///.
Definition: fxu.c:58
static void Abc_NtkFxuCollectInfo(Abc_Ntk_t *pNtk, Fxu_Data_t *p)
Definition: abcFxu.c:169
void Abc_NtkFxuFreeInfo ( Fxu_Data_t p)

Function*************************************************************

Synopsis []

Description []

SideEffects []

SeeAlso []

Definition at line 207 of file abcFxu.c.

208 {
209  int i;
210  // free the arrays of new fanins
211  if ( p->vFaninsNew )
212  for ( i = 0; i < p->vFaninsNew->nSize; i++ )
213  if ( p->vFaninsNew->pArray[i] )
214  Vec_IntFree( (Vec_Int_t *)p->vFaninsNew->pArray[i] );
215  // free the arrays
216  if ( p->vSops ) Vec_PtrFree( p->vSops );
217  if ( p->vSopsNew ) Vec_PtrFree( p->vSopsNew );
218  if ( p->vFanins ) Vec_PtrFree( p->vFanins );
219  if ( p->vFaninsNew ) Vec_PtrFree( p->vFaninsNew );
220 // ABC_FREE( p );
221 }
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
static void Vec_IntFree(Vec_Int_t *p)
Definition: bblif.c:235
static void Vec_PtrFree(Vec_Ptr_t *p)
Definition: vecPtr.h:223
void Abc_NtkSetDefaultFxParams ( Fxu_Data_t p)

MACRO DEFINITIONS ///.

FUNCTION DEFINITIONS ///

MACRO DEFINITIONS ///.

Function*************************************************************

Synopsis [Sets default values of the FXU parameters.]

Description []

SideEffects []

SeeAlso []

Definition at line 52 of file abcFxu.c.

53 {
54  memset( p, 0, sizeof(Fxu_Data_t) );
55  p->nSingleMax = 20000;
56  p->nPairsMax = 30000;
57  p->nNodesExt =1000000;
58  p->WeightMin = 0;
59  p->LitCountMax= 0;
60  p->fOnlyS = 0;
61  p->fOnlyD = 0;
62  p->fUse0 = 0;
63  p->fUseCompl = 1;
64  p->fVerbose = 0;
65 }
char * memset()
static Llb_Mgr_t * p
Definition: llb3Image.c:950
typedefABC_NAMESPACE_HEADER_START struct FxuDataStruct Fxu_Data_t
INCLUDES ///.
Definition: fxu.h:42