summaryrefslogtreecommitdiffstats
path: root/src/aig/gia
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-01-17 20:27:23 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-01-17 20:27:23 -0800
commit17610c039f79e30679b7950e7d91de166b34d2fa (patch)
tree3e9885c0fad76b1ca8f122323683fb11b87d290f /src/aig/gia
parent42cc56576b0ab244f0834fc8d80a3ced406576bd (diff)
downloadabc-17610c039f79e30679b7950e7d91de166b34d2fa.tar.gz
abc-17610c039f79e30679b7950e7d91de166b34d2fa.tar.bz2
abc-17610c039f79e30679b7950e7d91de166b34d2fa.zip
Organizing commands for barbuf-aware flow.
Diffstat (limited to 'src/aig/gia')
-rw-r--r--src/aig/gia/giaFx.c28
1 files changed, 16 insertions, 12 deletions
diff --git a/src/aig/gia/giaFx.c b/src/aig/gia/giaFx.c
index 9879b636..9985e51d 100644
--- a/src/aig/gia/giaFx.c
+++ b/src/aig/gia/giaFx.c
@@ -96,6 +96,20 @@ int Gia_ManSopToAig( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves )
iSum = Abc_LitNot(iSum);
return iSum;
}
+int Gia_ManFactorGraph( Gia_Man_t * p, Dec_Graph_t * pFForm, Vec_Int_t * vLeaves )
+{
+ Dec_Node_t * pFFNode;
+ int i, Lit;
+ // assign fanins
+ Dec_GraphForEachLeaf( pFForm, pFFNode, i )
+ {
+ assert( Vec_IntEntry(vLeaves, i) >= 0 );
+ pFFNode->iFunc = Vec_IntEntry(vLeaves, i);
+ }
+ // perform strashing
+ Lit = Gia_ManGraphToAig( p, pFForm );
+ return Lit;
+}
int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves )
{
if ( Kit_PlaGetVarNum(pSop) == 0 )
@@ -103,18 +117,8 @@ int Gia_ManFactorNode( Gia_Man_t * p, char * pSop, Vec_Int_t * vLeaves )
assert( Kit_PlaGetVarNum(pSop) == Vec_IntSize(vLeaves) );
if ( Kit_PlaGetVarNum(pSop) > 2 && Kit_PlaGetCubeNum(pSop) > 1 )
{
- Dec_Graph_t * pFForm;
- Dec_Node_t * pFFNode;
- int i, Lit;
- pFForm = Dec_Factor( pSop );
- // assign fanins
- Dec_GraphForEachLeaf( pFForm, pFFNode, i )
- {
- assert( Vec_IntEntry(vLeaves, i) >= 0 );
- pFFNode->iFunc = Vec_IntEntry(vLeaves, i);
- }
- // perform strashing
- Lit = Gia_ManGraphToAig( p, pFForm );
+ Dec_Graph_t * pFForm = Dec_Factor( pSop );
+ int Lit = Gia_ManFactorGraph( p, pFForm, vLeaves );
Dec_GraphFree( pFForm );
return Lit;
}