summaryrefslogtreecommitdiffstats
path: root/src/opt/cut/cutList.h
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2005-08-22 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2005-08-22 08:01:00 -0700
commitd01b1a0eee0ff49d18d8235f533fbb214c61d28a (patch)
treec302704cbd93586db8ab6398d50189b50b4e32c3 /src/opt/cut/cutList.h
parent0e4de190ff4e25f5904a571b79a225363d5fc369 (diff)
downloadabc-d01b1a0eee0ff49d18d8235f533fbb214c61d28a.tar.gz
abc-d01b1a0eee0ff49d18d8235f533fbb214c61d28a.tar.bz2
abc-d01b1a0eee0ff49d18d8235f533fbb214c61d28a.zip
Version abc50822
Diffstat (limited to 'src/opt/cut/cutList.h')
-rw-r--r--src/opt/cut/cutList.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/src/opt/cut/cutList.h b/src/opt/cut/cutList.h
new file mode 100644
index 00000000..eb008ef9
--- /dev/null
+++ b/src/opt/cut/cutList.h
@@ -0,0 +1,115 @@
+/**CFile****************************************************************
+
+ FileName [cutList.h]
+
+ SystemName [ABC: Logic synthesis and verification system.]
+
+ PackageName [Implementation of layered listed list of cuts.]
+
+ Synopsis [External declarations.]
+
+ Author [Alan Mishchenko]
+
+ Affiliation [UC Berkeley]
+
+ Date [Ver. 1.0. Started - June 20, 2005.]
+
+ Revision [$Id: cutList.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
+
+***********************************************************************/
+
+#ifndef __CUT_LIST_H__
+#define __CUT_LIST_H__
+
+////////////////////////////////////////////////////////////////////////
+/// INCLUDES ///
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+/// PARAMETERS ///
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+/// BASIC TYPES ///
+////////////////////////////////////////////////////////////////////////
+
+typedef struct Cut_ListStruct_t_ Cut_List_t;
+struct Cut_ListStruct_t_
+{
+ Cut_Cut_t * pHead[7];
+ Cut_Cut_t ** ppTail[7];
+};
+
+////////////////////////////////////////////////////////////////////////
+/// MACRO DEFITIONS ///
+////////////////////////////////////////////////////////////////////////
+
+////////////////////////////////////////////////////////////////////////
+/// FUNCTION DECLARATIONS ///
+////////////////////////////////////////////////////////////////////////
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline void Cut_ListStart( Cut_List_t * p )
+{
+ int i;
+ for ( i = 1; i <= 6; i++ )
+ {
+ p->pHead[i] = 0;
+ p->ppTail[i] = &p->pHead[i];
+ }
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline void Cut_ListAdd( Cut_List_t * p, Cut_Cut_t * pCut )
+{
+ assert( pCut->nLeaves > 0 && pCut->nLeaves < 7 );
+ *p->ppTail[pCut->nLeaves] = pCut;
+ p->ppTail[pCut->nLeaves] = &pCut->pNext;
+}
+
+/**Function*************************************************************
+
+ Synopsis []
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+static inline Cut_Cut_t * Cut_ListFinish( Cut_List_t * p )
+{
+ int i;
+ for ( i = 1; i < 6; i++ )
+ *p->ppTail[i] = p->pHead[i+1];
+ *p->ppTail[6] = NULL;
+ return p->pHead[1];
+}
+
+////////////////////////////////////////////////////////////////////////
+/// END OF FILE ///
+////////////////////////////////////////////////////////////////////////
+
+#endif
+