dsdInt.h 3.75 KB
Newer Older
Alan Mishchenko committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/**CFile****************************************************************

  FileName    [dsdInt.h]

  PackageName [DSD: Disjoint-support decomposition package.]

  Synopsis    [Internal declarations of the package.]

  Author      [Alan Mishchenko]
  
  Affiliation [UC Berkeley]

  Date        [Ver. 8.0. Started - September 22, 2003.]

  Revision    [$Id: dsdInt.h,v 1.0 2002/22/09 00:00:00 alanmi Exp $]

***********************************************************************/

19 20
#ifndef ABC__bdd__dsd__dsdInt_h
#define ABC__bdd__dsd__dsdInt_h
Alan Mishchenko committed
21

22

23
#include "misc/extra/extraBdd.h"
Alan Mishchenko committed
24 25
#include "dsd.h"

26 27 28
ABC_NAMESPACE_HEADER_START


Alan Mishchenko committed
29
////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
30
///                      TYPEDEF DEFINITIONS                         ///
Alan Mishchenko committed
31 32 33 34 35 36 37 38 39 40 41 42
////////////////////////////////////////////////////////////////////////
 
typedef unsigned char byte;

////////////////////////////////////////////////////////////////////////
///                    STRUCTURE DEFINITIONS                         ///
////////////////////////////////////////////////////////////////////////

// DSD manager
struct Dsd_Manager_t_ 
{
    DdManager *    dd;         // the BDD manager
43
    st__table *     Table;      // the mapping of BDDs into their DEs
Alan Mishchenko committed
44 45 46 47 48
    int            nInputs;    // the number of primary inputs
    int            nRoots;     // the number of primary outputs
    int            nRootsAlloc;// the number of primary outputs
    Dsd_Node_t **  pInputs;    // the primary input nodes
    Dsd_Node_t **  pRoots;     // the primary output nodes
Alan Mishchenko committed
49
    Dsd_Node_t *   pConst1;    // the constant node
Alan Mishchenko committed
50 51 52 53 54 55 56
    int            fVerbose;   // the verbosity level 
};

// DSD node
struct Dsd_Node_t_
{
    Dsd_Type_t     Type;       // decomposition type
57
    DdNode *       G;          // function of the node   
Alan Mishchenko committed
58 59 60 61 62 63 64 65
    DdNode *       S;          // support of this function
    Dsd_Node_t **  pDecs;      // pointer to structures for formal inputs
    int            Mark;       // the mark used by CASE 4 of disjoint decomposition
    short          nDecs;      // the number of formal inputs
    short          nVisits;    // the counter of visits
};

////////////////////////////////////////////////////////////////////////
Alan Mishchenko committed
66
///                       MACRO DEFINITIONS                          ///
Alan Mishchenko committed
67 68
////////////////////////////////////////////////////////////////////////

Alan Mishchenko committed
69 70
#define MAXINPUTS 1000

Alan Mishchenko committed
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89
////////////////////////////////////////////////////////////////////////
///                         PARAMETERS                               ///
////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////
///                     FUNCTION DECLARATIONS                        ///
////////////////////////////////////////////////////////////////////////

/*=== dsdCheck.c =======================================================*/
extern void         Dsd_CheckCacheAllocate( int nEntries );
extern void         Dsd_CheckCacheDeallocate();
extern void         Dsd_CheckCacheClear();
extern int          Dsd_CheckRootFunctionIdentity( DdManager * dd, DdNode * bF1, DdNode * bF2, DdNode * bC1, DdNode * bC2 );
/*=== dsdTree.c =======================================================*/
extern Dsd_Node_t * Dsd_TreeNodeCreate( int Type, int nDecs, int BlockNum );
extern void         Dsd_TreeNodeDelete( DdManager * dd, Dsd_Node_t * pNode );
extern void         Dsd_TreeUnmark( Dsd_Manager_t * dMan );
extern DdNode *     Dsd_TreeGetPrimeFunctionOld( DdManager * dd, Dsd_Node_t * pNode, int fRemap );

90 91 92 93


ABC_NAMESPACE_HEADER_END

Alan Mishchenko committed
94 95
#endif

Alan Mishchenko committed
96 97 98 99
////////////////////////////////////////////////////////////////////////
///                           END OF FILE                            ///
////////////////////////////////////////////////////////////////////////