From 32314347bae6ddcd841a268e797ec4da45726abb Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Tue, 10 Mar 2009 08:01:00 -0700 Subject: Version abc90310 --- src/opt/dec/decAbc.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to 'src/opt') diff --git a/src/opt/dec/decAbc.c b/src/opt/dec/decAbc.c index 2886668e..158dc70a 100644 --- a/src/opt/dec/decAbc.c +++ b/src/opt/dec/decAbc.c @@ -62,6 +62,53 @@ Abc_Obj_t * Dec_GraphToNetwork( Abc_Ntk_t * pNtk, Dec_Graph_t * pGraph ) return Abc_ObjNotCond( pNode->pFunc, Dec_GraphIsComplement(pGraph) ); } +/**Function************************************************************* + + Synopsis [Transforms the decomposition graph into the AIG.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Abc_Obj_t * Dec_SopToAig( Abc_Ntk_t * pNtk, char * pSop, Vec_Ptr_t * vFaninAigs ) +{ + Abc_Obj_t * pFunc; + Dec_Graph_t * pFForm; + Dec_Node_t * pNode; + int i; + pFForm = Dec_Factor( pSop ); + Dec_GraphForEachLeaf( pFForm, pNode, i ) + pNode->pFunc = Vec_PtrEntry( vFaninAigs, i ); + pFunc = Dec_GraphToNetwork( pNtk, pFForm ); + Dec_GraphFree( pFForm ); + return pFunc; +} + +/**Function************************************************************* + + Synopsis [Transforms the decomposition graph into the AIG.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Abc_Obj_t * Dec_GraphToAig( Abc_Ntk_t * pNtk, Dec_Graph_t * pFForm, Vec_Ptr_t * vFaninAigs ) +{ + Abc_Obj_t * pFunc; + Dec_Node_t * pNode; + int i; + Dec_GraphForEachLeaf( pFForm, pNode, i ) + pNode->pFunc = Vec_PtrEntry( vFaninAigs, i ); + pFunc = Dec_GraphToNetwork( pNtk, pFForm ); + return pFunc; +} + /**Function************************************************************* Synopsis [Transforms the decomposition graph into the AIG.] -- cgit v1.2.3