abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
decAbc.c File Reference
#include "base/abc/abc.h"
#include "aig/ivy/ivy.h"
#include "dec.h"

Go to the source code of this file.

Functions

ABC_NAMESPACE_IMPL_START
Abc_Obj_t
Dec_GraphToNetwork (Abc_Ntk_t *pNtk, Dec_Graph_t *pGraph)
 DECLARATIONS ///. More...
 
Abc_Obj_tDec_SopToAig (Abc_Ntk_t *pNtk, char *pSop, Vec_Ptr_t *vFaninAigs)
 
Abc_Obj_tDec_GraphToAig (Abc_Ntk_t *pNtk, Dec_Graph_t *pFForm, Vec_Ptr_t *vFaninAigs)
 
Abc_Obj_tDec_GraphToNetworkNoStrash (Abc_Ntk_t *pNtk, Dec_Graph_t *pGraph)
 
int Dec_GraphToNetworkCount (Abc_Obj_t *pRoot, Dec_Graph_t *pGraph, int NodeMax, int LevelMax)
 
void Dec_GraphUpdateNetwork (Abc_Obj_t *pRoot, Dec_Graph_t *pGraph, int fUpdateLevel, int nGain)
 
Hop_Obj_tDec_GraphToNetworkAig (Hop_Man_t *pMan, Dec_Graph_t *pGraph)
 
Hop_Obj_tDec_GraphFactorSop (Hop_Man_t *pMan, char *pSop)
 
Ivy_Obj_tDec_GraphToNetworkIvy (Ivy_Man_t *pMan, Dec_Graph_t *pGraph)
 

Function Documentation

Hop_Obj_t* Dec_GraphFactorSop ( Hop_Man_t pMan,
char *  pSop 
)

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

Synopsis [Strashes one logic node using its SOP.]

Description []

SideEffects []

SeeAlso []

Definition at line 301 of file decAbc.c.

302 {
303  Hop_Obj_t * pFunc;
304  Dec_Graph_t * pFForm;
305  Dec_Node_t * pNode;
306  int i;
307  // perform factoring
308  pFForm = Dec_Factor( pSop );
309  // collect the fanins
310  Dec_GraphForEachLeaf( pFForm, pNode, i )
311  pNode->pFunc = Hop_IthVar( pMan, i );
312  // perform strashing
313  pFunc = Dec_GraphToNetworkAig( pMan, pFForm );
314  Dec_GraphFree( pFForm );
315  return pFunc;
316 }
Dec_Graph_t * Dec_Factor(char *pSop)
FUNCTION DECLARATIONS ///.
Definition: decFactor.c:55
Definition: hop.h:65
#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)
ITERATORS ///.
Definition: dec.h:98
static void Dec_GraphFree(Dec_Graph_t *pGraph)
Definition: dec.h:307
Hop_Obj_t * Hop_IthVar(Hop_Man_t *p, int i)
FUNCTION DEFINITIONS ///.
Definition: hopOper.c:63
Hop_Obj_t * Dec_GraphToNetworkAig(Hop_Man_t *pMan, Dec_Graph_t *pGraph)
Definition: decAbc.c:268
Abc_Obj_t* Dec_GraphToAig ( Abc_Ntk_t pNtk,
Dec_Graph_t pFForm,
Vec_Ptr_t vFaninAigs 
)

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

Synopsis [Transforms the decomposition graph into the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 104 of file decAbc.c.

105 {
106  Abc_Obj_t * pFunc;
107  Dec_Node_t * pNode;
108  int i;
109  Dec_GraphForEachLeaf( pFForm, pNode, i )
110  pNode->pFunc = Vec_PtrEntry( vFaninAigs, i );
111  pFunc = Dec_GraphToNetwork( pNtk, pFForm );
112  return pFunc;
113 }
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
ABC_NAMESPACE_IMPL_START Abc_Obj_t * Dec_GraphToNetwork(Abc_Ntk_t *pNtk, Dec_Graph_t *pGraph)
DECLARATIONS ///.
Definition: decAbc.c:46
#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)
ITERATORS ///.
Definition: dec.h:98
ABC_NAMESPACE_IMPL_START Abc_Obj_t* Dec_GraphToNetwork ( Abc_Ntk_t pNtk,
Dec_Graph_t pGraph 
)

DECLARATIONS ///.

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

FileName [decAbc.c]

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

Synopsis [Interface between the decomposition package and ABC network.]

Author [MVSIS Group]

Affiliation [UC Berkeley]

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

Revision [

Id:
decAbc.c,v 1.1 2003/05/22 19:20:05 alanmi Exp

]FUNCTION DEFINITIONS /// Function*************************************************************

Synopsis [Transforms the decomposition graph into the AIG.]

Description [AIG nodes for the fanins should be assigned to pNode->pFunc of the leaves of the graph before calling this procedure.]

SideEffects []

SeeAlso []

Definition at line 46 of file decAbc.c.

47 {
48  Abc_Obj_t * pAnd0, * pAnd1;
49  Dec_Node_t * pNode = NULL; // Suppress "might be used uninitialized"
50  int i;
51  // check for constant function
52  if ( Dec_GraphIsConst(pGraph) )
53  return Abc_ObjNotCond( Abc_AigConst1(pNtk), Dec_GraphIsComplement(pGraph) );
54  // check for a literal
55  if ( Dec_GraphIsVar(pGraph) )
56  return Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphVar(pGraph)->pFunc, Dec_GraphIsComplement(pGraph) );
57  // build the AIG nodes corresponding to the AND gates of the graph
58  Dec_GraphForEachNode( pGraph, pNode, i )
59  {
60  pAnd0 = Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge0.Node)->pFunc, pNode->eEdge0.fCompl );
61  pAnd1 = Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge1.Node)->pFunc, pNode->eEdge1.fCompl );
62  pNode->pFunc = Abc_AigAnd( (Abc_Aig_t *)pNtk->pManFunc, pAnd0, pAnd1 );
63  }
64  // complement the result if necessary
65  return Abc_ObjNotCond( (Abc_Obj_t *)pNode->pFunc, Dec_GraphIsComplement(pGraph) );
66 }
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition: abcAig.c:683
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
DECLARATIONS ///.
Definition: abcAig.c:52
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
Definition: dec.h:372
void * pManFunc
Definition: abc.h:191
ABC_DLL Abc_Obj_t * Abc_AigAnd(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
Definition: abcAig.c:700
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: dec.h:517
Dec_Edge_t eEdge0
Definition: dec.h:52
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition: dec.h:101
void * pFunc
Definition: dec.h:56
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
Definition: abc.h:325
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Dec_Edge_t eEdge1
Definition: dec.h:53
Hop_Obj_t* Dec_GraphToNetworkAig ( Hop_Man_t pMan,
Dec_Graph_t pGraph 
)

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

Synopsis [Transforms the decomposition graph into the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 268 of file decAbc.c.

269 {
270  Dec_Node_t * pNode = NULL; // Suppress "might be used uninitialized"
271  Hop_Obj_t * pAnd0, * pAnd1;
272  int i;
273  // check for constant function
274  if ( Dec_GraphIsConst(pGraph) )
275  return Hop_NotCond( Hop_ManConst1(pMan), Dec_GraphIsComplement(pGraph) );
276  // check for a literal
277  if ( Dec_GraphIsVar(pGraph) )
278  return Hop_NotCond( (Hop_Obj_t *)Dec_GraphVar(pGraph)->pFunc, Dec_GraphIsComplement(pGraph) );
279  // build the AIG nodes corresponding to the AND gates of the graph
280  Dec_GraphForEachNode( pGraph, pNode, i )
281  {
282  pAnd0 = Hop_NotCond( (Hop_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge0.Node)->pFunc, pNode->eEdge0.fCompl );
283  pAnd1 = Hop_NotCond( (Hop_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge1.Node)->pFunc, pNode->eEdge1.fCompl );
284  pNode->pFunc = Hop_And( pMan, pAnd0, pAnd1 );
285  }
286  // complement the result if necessary
287  return Hop_NotCond( (Hop_Obj_t *)pNode->pFunc, Dec_GraphIsComplement(pGraph) );
288 }
static Hop_Obj_t * Hop_ManConst1(Hop_Man_t *p)
Definition: hop.h:132
Hop_Obj_t * Hop_And(Hop_Man_t *p, Hop_Obj_t *p0, Hop_Obj_t *p1)
Definition: hopOper.c:104
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
Definition: hop.h:65
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
Definition: dec.h:372
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: dec.h:517
Dec_Edge_t eEdge0
Definition: dec.h:52
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition: dec.h:101
void * pFunc
Definition: dec.h:56
static Hop_Obj_t * Hop_NotCond(Hop_Obj_t *p, int c)
Definition: hop.h:128
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Dec_Edge_t eEdge1
Definition: dec.h:53
int Dec_GraphToNetworkCount ( Abc_Obj_t pRoot,
Dec_Graph_t pGraph,
int  NodeMax,
int  LevelMax 
)

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

Synopsis [Counts the number of new nodes added when using this graph.]

Description [AIG nodes for the fanins should be assigned to pNode->pFunc of the leaves of the graph before calling this procedure. Returns -1 if the number of nodes and levels exceeded the given limit or the number of levels exceeded the maximum allowed level.]

SideEffects []

SeeAlso []

Definition at line 167 of file decAbc.c.

168 {
169  Abc_Aig_t * pMan = (Abc_Aig_t *)pRoot->pNtk->pManFunc;
170  Dec_Node_t * pNode, * pNode0, * pNode1;
171  Abc_Obj_t * pAnd, * pAnd0, * pAnd1;
172  int i, Counter, LevelNew, LevelOld;
173  // check for constant function or a literal
174  if ( Dec_GraphIsConst(pGraph) || Dec_GraphIsVar(pGraph) )
175  return 0;
176  // set the levels of the leaves
177  Dec_GraphForEachLeaf( pGraph, pNode, i )
178  pNode->Level = Abc_ObjRegular((Abc_Obj_t *)pNode->pFunc)->Level;
179  // compute the AIG size after adding the internal nodes
180  Counter = 0;
181  Dec_GraphForEachNode( pGraph, pNode, i )
182  {
183  // get the children of this node
184  pNode0 = Dec_GraphNode( pGraph, pNode->eEdge0.Node );
185  pNode1 = Dec_GraphNode( pGraph, pNode->eEdge1.Node );
186  // get the AIG nodes corresponding to the children
187  pAnd0 = (Abc_Obj_t *)pNode0->pFunc;
188  pAnd1 = (Abc_Obj_t *)pNode1->pFunc;
189  if ( pAnd0 && pAnd1 )
190  {
191  // if they are both present, find the resulting node
192  pAnd0 = Abc_ObjNotCond( pAnd0, pNode->eEdge0.fCompl );
193  pAnd1 = Abc_ObjNotCond( pAnd1, pNode->eEdge1.fCompl );
194  pAnd = Abc_AigAndLookup( pMan, pAnd0, pAnd1 );
195  // return -1 if the node is the same as the original root
196  if ( Abc_ObjRegular(pAnd) == pRoot )
197  return -1;
198  }
199  else
200  pAnd = NULL;
201  // count the number of added nodes
202  if ( pAnd == NULL || Abc_NodeIsTravIdCurrent(Abc_ObjRegular(pAnd)) )
203  {
204  if ( ++Counter > NodeMax )
205  return -1;
206  }
207  // count the number of new levels
208  LevelNew = 1 + Abc_MaxInt( pNode0->Level, pNode1->Level );
209  if ( pAnd )
210  {
211  if ( Abc_ObjRegular(pAnd) == Abc_AigConst1(pRoot->pNtk) )
212  LevelNew = 0;
213  else if ( Abc_ObjRegular(pAnd) == Abc_ObjRegular(pAnd0) )
214  LevelNew = (int)Abc_ObjRegular(pAnd0)->Level;
215  else if ( Abc_ObjRegular(pAnd) == Abc_ObjRegular(pAnd1) )
216  LevelNew = (int)Abc_ObjRegular(pAnd1)->Level;
217  LevelOld = (int)Abc_ObjRegular(pAnd)->Level;
218 // assert( LevelNew == LevelOld );
219  }
220  if ( LevelNew > LevelMax )
221  return -1;
222  pNode->pFunc = pAnd;
223  pNode->Level = LevelNew;
224  }
225  return Counter;
226 }
ABC_DLL Abc_Obj_t * Abc_AigAndLookup(Abc_Aig_t *pMan, Abc_Obj_t *p0, Abc_Obj_t *p1)
Definition: abcAig.c:403
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition: abcAig.c:683
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
static int Abc_MaxInt(int a, int b)
Definition: abc_global.h:238
DECLARATIONS ///.
Definition: abcAig.c:52
unsigned Level
Definition: abc.h:142
void * pManFunc
Definition: abc.h:191
if(last==0)
Definition: sparse_int.h:34
static int Counter
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition: dec.h:101
static int Abc_NodeIsTravIdCurrent(Abc_Obj_t *p)
Definition: abc.h:411
static Abc_Obj_t * Abc_ObjRegular(Abc_Obj_t *p)
Definition: abc.h:323
Abc_Ntk_t * pNtk
Definition: abc.h:130
#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)
ITERATORS ///.
Definition: dec.h:98
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
Definition: abc.h:325
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Ivy_Obj_t* Dec_GraphToNetworkIvy ( Ivy_Man_t pMan,
Dec_Graph_t pGraph 
)

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

Synopsis [Transforms the decomposition graph into the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 329 of file decAbc.c.

330 {
331  Dec_Node_t * pNode = NULL; // Suppress "might be used uninitialized"
332  Ivy_Obj_t * pAnd0, * pAnd1;
333  int i;
334  // check for constant function
335  if ( Dec_GraphIsConst(pGraph) )
336  return Ivy_NotCond( Ivy_ManConst1(pMan), Dec_GraphIsComplement(pGraph) );
337  // check for a literal
338  if ( Dec_GraphIsVar(pGraph) )
339  return Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphVar(pGraph)->pFunc, Dec_GraphIsComplement(pGraph) );
340  // build the AIG nodes corresponding to the AND gates of the graph
341  Dec_GraphForEachNode( pGraph, pNode, i )
342  {
343  pAnd0 = Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge0.Node)->pFunc, pNode->eEdge0.fCompl );
344  pAnd1 = Ivy_NotCond( (Ivy_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge1.Node)->pFunc, pNode->eEdge1.fCompl );
345  pNode->pFunc = Ivy_And( pMan, pAnd0, pAnd1 );
346  }
347  // complement the result if necessary
348  return Ivy_NotCond( (Ivy_Obj_t *)pNode->pFunc, Dec_GraphIsComplement(pGraph) );
349 }
static Ivy_Obj_t * Ivy_ManConst1(Ivy_Man_t *p)
Definition: ivy.h:199
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
Definition: dec.h:372
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: dec.h:517
Definition: ivy.h:73
Dec_Edge_t eEdge0
Definition: dec.h:52
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition: dec.h:101
void * pFunc
Definition: dec.h:56
static Ivy_Obj_t * Ivy_NotCond(Ivy_Obj_t *p, int c)
Definition: ivy.h:195
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Dec_Edge_t eEdge1
Definition: dec.h:53
Ivy_Obj_t * Ivy_And(Ivy_Man_t *p, Ivy_Obj_t *p0, Ivy_Obj_t *p1)
Definition: ivyOper.c:84
Abc_Obj_t* Dec_GraphToNetworkNoStrash ( Abc_Ntk_t pNtk,
Dec_Graph_t pGraph 
)

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

Synopsis [Transforms the decomposition graph into the AIG.]

Description [AIG nodes for the fanins should be assigned to pNode->pFunc of the leaves of the graph before calling this procedure.]

SideEffects []

SeeAlso []

Definition at line 127 of file decAbc.c.

128 {
129  Abc_Obj_t * pAnd, * pAnd0, * pAnd1;
130  Dec_Node_t * pNode = NULL; // Suppress "might be used uninitialized"
131  int i;
132  // check for constant function
133  if ( Dec_GraphIsConst(pGraph) )
134  return Abc_ObjNotCond( Abc_AigConst1(pNtk), Dec_GraphIsComplement(pGraph) );
135  // check for a literal
136  if ( Dec_GraphIsVar(pGraph) )
137  return Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphVar(pGraph)->pFunc, Dec_GraphIsComplement(pGraph) );
138  // build the AIG nodes corresponding to the AND gates of the graph
139  Dec_GraphForEachNode( pGraph, pNode, i )
140  {
141  pAnd0 = Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge0.Node)->pFunc, pNode->eEdge0.fCompl );
142  pAnd1 = Abc_ObjNotCond( (Abc_Obj_t *)Dec_GraphNode(pGraph, pNode->eEdge1.Node)->pFunc, pNode->eEdge1.fCompl );
143 // pNode->pFunc = Abc_AigAnd( (Abc_Aig_t *)pNtk->pManFunc, pAnd0, pAnd1 );
144  pAnd = Abc_NtkCreateNode( pNtk );
145  Abc_ObjAddFanin( pAnd, pAnd0 );
146  Abc_ObjAddFanin( pAnd, pAnd1 );
147  pNode->pFunc = pAnd;
148  }
149  // complement the result if necessary
150  return Abc_ObjNotCond( (Abc_Obj_t *)pNode->pFunc, Dec_GraphIsComplement(pGraph) );
151 }
ABC_DLL Abc_Obj_t * Abc_AigConst1(Abc_Ntk_t *pNtk)
Definition: abcAig.c:683
static int Dec_GraphIsConst(Dec_Graph_t *pGraph)
Definition: dec.h:324
ABC_DLL void Abc_ObjAddFanin(Abc_Obj_t *pObj, Abc_Obj_t *pFanin)
Definition: abcFanio.c:84
static int Dec_GraphIsComplement(Dec_Graph_t *pGraph)
Definition: dec.h:372
static Dec_Node_t * Dec_GraphVar(Dec_Graph_t *pGraph)
Definition: dec.h:517
Dec_Edge_t eEdge0
Definition: dec.h:52
#define Dec_GraphForEachNode(pGraph, pAnd, i)
Definition: dec.h:101
void * pFunc
Definition: dec.h:56
static Abc_Obj_t * Abc_NtkCreateNode(Abc_Ntk_t *pNtk)
Definition: abc.h:308
static int Dec_GraphIsVar(Dec_Graph_t *pGraph)
Definition: dec.h:485
static Abc_Obj_t * Abc_ObjNotCond(Abc_Obj_t *p, int c)
Definition: abc.h:325
static Dec_Node_t * Dec_GraphNode(Dec_Graph_t *pGraph, int i)
Definition: dec.h:437
Dec_Edge_t eEdge1
Definition: dec.h:53
void Dec_GraphUpdateNetwork ( Abc_Obj_t pRoot,
Dec_Graph_t pGraph,
int  fUpdateLevel,
int  nGain 
)

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

Synopsis [Replaces MFFC of the node by the new factored form.]

Description []

SideEffects []

SeeAlso []

Definition at line 240 of file decAbc.c.

241 {
242  extern Abc_Obj_t * Dec_GraphToNetwork( Abc_Ntk_t * pNtk, Dec_Graph_t * pGraph );
243  Abc_Obj_t * pRootNew;
244  Abc_Ntk_t * pNtk = pRoot->pNtk;
245  int nNodesNew, nNodesOld;
246  nNodesOld = Abc_NtkNodeNum(pNtk);
247  // create the new structure of nodes
248  pRootNew = Dec_GraphToNetwork( pNtk, pGraph );
249  // remove the old nodes
250  Abc_AigReplace( (Abc_Aig_t *)pNtk->pManFunc, pRoot, pRootNew, fUpdateLevel );
251  // compare the gains
252  nNodesNew = Abc_NtkNodeNum(pNtk);
253  assert( nGain <= nNodesOld - nNodesNew );
254 }
DECLARATIONS ///.
Definition: abcAig.c:52
void * pManFunc
Definition: abc.h:191
static int Abc_NtkNodeNum(Abc_Ntk_t *pNtk)
Definition: abc.h:293
Abc_Ntk_t * pNtk
Definition: abc.h:130
ABC_NAMESPACE_IMPL_START Abc_Obj_t * Dec_GraphToNetwork(Abc_Ntk_t *pNtk, Dec_Graph_t *pGraph)
DECLARATIONS ///.
Definition: decAbc.c:46
#define assert(ex)
Definition: util_old.h:213
ABC_DLL void Abc_AigReplace(Abc_Aig_t *pMan, Abc_Obj_t *pOld, Abc_Obj_t *pNew, int fUpdateLevel)
Definition: abcAig.c:850
Abc_Obj_t* Dec_SopToAig ( Abc_Ntk_t pNtk,
char *  pSop,
Vec_Ptr_t vFaninAigs 
)

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

Synopsis [Transforms the decomposition graph into the AIG.]

Description []

SideEffects []

SeeAlso []

Definition at line 79 of file decAbc.c.

80 {
81  Abc_Obj_t * pFunc;
82  Dec_Graph_t * pFForm;
83  Dec_Node_t * pNode;
84  int i;
85  pFForm = Dec_Factor( pSop );
86  Dec_GraphForEachLeaf( pFForm, pNode, i )
87  pNode->pFunc = Vec_PtrEntry( vFaninAigs, i );
88  pFunc = Dec_GraphToNetwork( pNtk, pFForm );
89  Dec_GraphFree( pFForm );
90  return pFunc;
91 }
Dec_Graph_t * Dec_Factor(char *pSop)
FUNCTION DECLARATIONS ///.
Definition: decFactor.c:55
static void * Vec_PtrEntry(Vec_Ptr_t *p, int i)
Definition: vecPtr.h:362
ABC_NAMESPACE_IMPL_START Abc_Obj_t * Dec_GraphToNetwork(Abc_Ntk_t *pNtk, Dec_Graph_t *pGraph)
DECLARATIONS ///.
Definition: decAbc.c:46
#define Dec_GraphForEachLeaf(pGraph, pLeaf, i)
ITERATORS ///.
Definition: dec.h:98
static void Dec_GraphFree(Dec_Graph_t *pGraph)
Definition: dec.h:307