summaryrefslogtreecommitdiffstats
path: root/src/aig/kit/kitHop.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-09-06 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-09-06 08:01:00 -0700
commit9be1b076934b0410689c857cd71ef7d21a714b5f (patch)
treec342242ad3c5ea9d35e6e682f9026534ec73fcbe /src/aig/kit/kitHop.c
parentb2470dd3da962026fd874e13c2cf78c10099fe68 (diff)
downloadabc-9be1b076934b0410689c857cd71ef7d21a714b5f.tar.gz
abc-9be1b076934b0410689c857cd71ef7d21a714b5f.tar.bz2
abc-9be1b076934b0410689c857cd71ef7d21a714b5f.zip
Version abc70906
Diffstat (limited to 'src/aig/kit/kitHop.c')
-rw-r--r--src/aig/kit/kitHop.c31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/aig/kit/kitHop.c b/src/aig/kit/kitHop.c
index 95461c4e..f914fbab 100644
--- a/src/aig/kit/kitHop.c
+++ b/src/aig/kit/kitHop.c
@@ -29,7 +29,6 @@
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
-
/**Function*************************************************************
Synopsis [Transforms the decomposition graph into the AIG.]
@@ -87,6 +86,36 @@ Hop_Obj_t * Kit_GraphToHop( Hop_Man_t * pMan, Kit_Graph_t * pGraph )
/**Function*************************************************************
+ Synopsis [Strashed onen logic nodes using its truth table.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+Hop_Obj_t * Kit_TruthToHop( Hop_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory )
+{
+ Hop_Obj_t * pObj;
+ Kit_Graph_t * pGraph;
+ // transform truth table into the decomposition tree
+ if ( vMemory == NULL )
+ {
+ vMemory = Vec_IntAlloc( 0 );
+ pGraph = Kit_TruthToGraph( pTruth, nVars, vMemory );
+ Vec_IntFree( vMemory );
+ }
+ else
+ pGraph = Kit_TruthToGraph( pTruth, nVars, vMemory );
+ // derive the AIG for the decomposition tree
+ pObj = Kit_GraphToHop( pMan, pGraph );
+ Kit_GraphFree( pGraph );
+ return pObj;
+}
+
+/**Function*************************************************************
+
Synopsis [Strashes one logic node using its SOP.]
Description []