source: vis_dev/vis-2.3/src/maig/maig.h @ 57

Last change on this file since 57 was 14, checked in by cecile, 13 years ago

vis2.3

File size: 4.4 KB
Line 
1/**CHeaderFile*****************************************************************
2
3  FileName    [maig.h]
4
5  PackageName [maig]
6
7  Synopsis    [multi-valued AND/INVERTER graph]
8
9  Description []
10
11  SeeAlso     []
12
13  Author      [Mohammad Awedh]
14
15  Copyright [This file was created at the University of Colorado at
16  Boulder.  The University of Colorado at Boulder makes no warranty
17  about the suitability of this software for any purpose.  It is
18  presented on an AS IS basis.]
19
20  Revision    [$Id: maig.h,v 1.8 2005/05/18 18:11:59 jinh Exp $]
21
22
23******************************************************************************/
24
25#ifndef _MAIG
26#define _MAIG
27
28#include "vm.h"
29#include "util.h"
30#include "var_set.h"
31
32/*---------------------------------------------------------------------------*/
33/* Constant declarations                                                     */
34/*---------------------------------------------------------------------------*/
35 
36#define mAig_And   bAig_And
37#define mAig_Or    bAig_Or
38#define mAig_Xor   bAig_Xor
39#define mAig_Not   bAig_Not
40#define mAig_Eq    bAig_Eq
41#define mAig_Then  bAig_Then
42#define mAig_Zero  bAig_Zero
43#define mAig_One   bAig_One
44#define mAig_NULL  bAig_NULL
45
46/*---------------------------------------------------------------------------*/
47/* Type declarations                                                         */
48/*---------------------------------------------------------------------------*/
49
50typedef struct mAigMvarStruct mAigMvar_t;
51typedef struct mAigBvarStruct mAigBvar_t;
52
53typedef long     mAigEdge_t;
54typedef struct bAigManagerStruct mAig_Manager_t;
55
56/*---------------------------------------------------------------------------*/
57/* Structure declarations                                                    */
58/*---------------------------------------------------------------------------*/
59
60/**Struct**********************************************************************
61
62  Synopsis    [Multi-valued Variable]
63
64  Description [This structure stores an information about a Multi-value variable.]
65
66******************************************************************************/
67struct mAigMvarStruct {
68    int  mVarId;          /* Uniquely identifies this mVar node in mVarList*/
69    char *name;           /* Name of multi-value node */
70    int  values;          /* This mvar takes vlaues from 0 -- values-1 */
71    int  encodeLength;    /* Number of binary variables needed to encode this
72                             mvar */
73    int  bVars;          /* The array index of the first bVar in the bVarList
74                            the size of the binary encoding equal encodeLength
75                            and code arrange from  most significant bit to
76                            least significant bit */
77};
78
79/**Struct**********************************************************************
80
81  Synopsis    [Binary-valued varaible]
82
83  Description [Thsi structure contians information about binary-vlaue node]
84
85*****************************************************************************/
86struct mAigBvarStruct {
87    mAigEdge_t node;  /* Binary function of this node in the AndInv graph */
88    int mVarId;          /* This bVar node belongs to mVar node mVarId       */
89};
90
91
92/*---------------------------------------------------------------------------*/
93/* Macro declarations                                                        */
94/*---------------------------------------------------------------------------*/
95
96
97/**AutomaticStart*************************************************************/
98
99/*---------------------------------------------------------------------------*/
100/* Function prototypes                                                       */
101/*---------------------------------------------------------------------------*/
102
103EXTERN void mAig_Init(void);
104EXTERN void mAig_End(void);
105EXTERN array_t * mAig_ArrayDuplicate(array_t *mAigArray);
106EXTERN mAig_Manager_t * mAig_initAig(void);
107EXTERN void mAig_quit(mAig_Manager_t *manager);
108EXTERN mAigEdge_t mAig_EquC(mAig_Manager_t * mgr, mAigEdge_t mVarId, int constant);
109EXTERN mAigEdge_t mAig_CreateVar(mAig_Manager_t * mgr, char * name, int value);
110EXTERN array_t * mAigReadBinVarList(mAig_Manager_t * manager);
111EXTERN array_t * mAigReadMulVarList(mAig_Manager_t * manager);
112EXTERN mAigEdge_t mAig_CreateVarFromAig(mAig_Manager_t * mgr, char * name, array_t *mvfAig);
113
114/**AutomaticEnd***************************************************************/
115
116#endif /* _MAIG */
117
118
119
120
121
122
123
124
125
126
127
128
Note: See TracBrowser for help on using the repository browser.