summaryrefslogtreecommitdiffstats
path: root/src/bool/rpo/rpo.h
blob: 363e43b44d6b102c82ce83c000e740d6208012f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/**CFile****************************************************************

  FileName    [rpo.h]

  SystemName  [ABC: Logic synthesis and verification system.]

  PackageName [RPO]

  Synopsis    [Rpo Header]

  Author      [Mayler G. A. Martins / Vinicius Callegaro]
  
  Affiliation [UFRGS]

  Date        [Ver. 1.0. Started - May 08, 2013.]

  Revision    [$Id: rpo.h,v 1.00 2013/05/08 00:00:00 mgamartins Exp $]

***********************************************************************/
 
#ifndef ABC__bool__rpo__rpo_h
#define ABC__bool__rpo__rpo_h

////////////////////////////////////////////////////////////////////////
///                          INCLUDES                                ///
////////////////////////////////////////////////////////////////////////

#include "literal.h"

ABC_NAMESPACE_HEADER_START

////////////////////////////////////////////////////////////////////////
///                        DECLARATIONS                              ///
////////////////////////////////////////////////////////////////////////

typedef struct Rpo_LCI_Edge_t_ Rpo_LCI_Edge_t;

struct Rpo_LCI_Edge_t_ {
    unsigned long visited : 1;
    unsigned long connectionType : 2;
    unsigned long reserved : 1;
    unsigned long idx1 : 30;
    unsigned long idx2 : 30;
};

void Rpo_PrintEdge(Rpo_LCI_Edge_t* edge);
int Rpo_CheckANDGroup(Literal_t* lit1, Literal_t* lit2, int nVars);
int Rpo_CheckORGroup(Literal_t* lit1, Literal_t* lit2, int nVars);
Literal_t* Rpo_Factorize(unsigned* target, int nVars, int nThreshold, int verbose);
Literal_t* Rpo_Recursion(unsigned* target, Literal_t** vecLit, int nLit, int nLitCount, int nVars, int* thresholdCount, int thresholdMax, int verbose);
Rpo_LCI_Edge_t* Rpo_CreateEdge(Operator_t op, int i, int j, int* vertexDegree);
int Rpo_computeMinEdgeCost(Rpo_LCI_Edge_t** edges, int edgeCount, int* vertexDegree);

ABC_NAMESPACE_HEADER_END
        
#endif

////////////////////////////////////////////////////////////////////////
///                       END OF FILE                                ///
////////////////////////////////////////////////////////////////////////