source: vis_dev/vis-2.3/src/ntk/ntkInt.h @ 35

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

vis2.3

File size: 6.5 KB
Line 
1/**CHeaderFile*****************************************************************
2
3  FileName    [ntkInt.h]
4
5  PackageName [ntk]
6
7  Synopsis    [Internal declarations for the network package.]
8
9  Author      [Adnan Aziz, Tom Shiple]
10
11  Copyright   [Copyright (c) 1994-1996 The Regents of the Univ. of California.
12  All rights reserved.
13
14  Permission is hereby granted, without written agreement and without license
15  or royalty fees, to use, copy, modify, and distribute this software and its
16  documentation for any purpose, provided that the above copyright notice and
17  the following two paragraphs appear in all copies of this software.
18
19  IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
20  DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
21  OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
22  CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24  THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
25  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
26  FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN
27  "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE
28  MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.]
29
30  Revision    [$Id: ntkInt.h,v 1.9 2002/03/05 23:24:35 awedh Exp $]
31
32******************************************************************************/
33
34#ifndef _NTKINT
35#define _NTKINT
36
37/*---------------------------------------------------------------------------*/
38/* Nested includes                                                           */
39/*---------------------------------------------------------------------------*/
40#include <time.h>
41#include "ntk.h"
42#include "cmd.h"
43#include <string.h>
44
45extern int NtkDebug;
46
47/*---------------------------------------------------------------------------*/
48/* Structure declarations                                                    */
49/*---------------------------------------------------------------------------*/
50
51/**Enum************************************************************************
52
53  Synopsis    [Types of network nodes.]
54
55  Description [Types of network nodes.  See the corresponding
56  Ntk_NodeTestIs<type> functions for a description of each type.]
57
58******************************************************************************/
59typedef enum {
60  NtkLatch_c,         
61  NtkShadow_c,         
62  NtkCombinational_c,
63  NtkPrimaryInput_c,
64  NtkPseudoInput_c,
65  NtkUnassigned_c
66} NtkNodeType;
67
68
69/**Struct**********************************************************************
70
71  Synopsis    [A network of nodes.]
72
73  Description [A network is a directed graph of nodes.  Lists are maintained
74  to provide easy access to various groups of nodes.  Applications can
75  associate information with a network via the application info mechanism.]
76
77******************************************************************************/
78struct NtkNetworkStruct {
79  char           *name;            /* name of network */
80  lsList          nodes;           /* all nodes of network */
81  lsList          combInputs;      /* all primary inputs and latch outputs */
82  lsList          combOutputs;     /* all primary outputs and latch inputs */
83  lsList          latches;         /* all latches */
84  lsList          primaryInputs;   /* all primary inputs */
85  lsList          pseudoInputs;    /* all pseduo inputs */
86  lsList          inputs;          /* all primary and pseudo inputs */
87  lsList          primaryOutputs;  /* all primary outputs */
88  st_table       *combOutputsTable;/* membership for combOutputs list */
89  st_table       *mddIdToNode;     /* int to Ntk_Node_t * */
90  st_table       *actualNameToNode;/* char * to Ntk_Node_t * */
91  st_table       *formalNameToActualName;  /* char * to char * */
92  mdd_manager    *mddManager;      /* MDD manager of network */
93  bdd_reorder_type_t dynVarOrdMethod; /* method to perform dynamic variable ordering */
94  st_table       *applInfoTable;   /* char * to ApplInfo_t * */
95  mAig_Manager_t *mAigManager;     /* AndInv graph manager [MHA] */
96  void           *undef;           /* for programmer's use; make no assumptions */
97};
98 
99
100/**Struct**********************************************************************
101
102  Synopsis    [A network node.]
103
104  Description [A node is a vertex in the directed graph represented by a
105  network.  Edges of the graph are given by the fanin and fanout arrays of a
106  node.  A node has a type describing its role in the context of a
107  circuit.  Also, a node has a unique name, and a unique MDD id (unless it's
108  undefined).]
109
110******************************************************************************/
111struct NtkNodeStruct {
112  char           *name;        /* actual name of output of node */
113  Ntk_Network_t  *network;     /* network to which this node belongs */
114  Var_Variable_t *variable;    /* info about the multi-valued variable of this node */
115  NtkNodeType     type;        /* type of node */
116  array_t        *fanins;      /* array of Ntk_Node_t * giving fanins of this node */
117  array_t        *fanouts;     /* array of Ntk_Node_t * giving fanouts of this node */
118  Tbl_Table_t    *table;       /* table in which the function of this node is defined */
119  int             outputIndex; /* column of table which defines this node */
120  int             mddId;       /* mddId of the output variable of this node */
121  union {
122    Ntk_Node_t   *shadow;      /* if type is not shadow, corr. shadow node (may be NULL) */
123    Ntk_Node_t   *origin;      /* if type is shadow, corresponding node */
124  } shadowInfo;
125  boolean         outputFlag;  /* 1 if node is a primary output, else 0 */
126  boolean         constant;    /* 1 if node is a constant, else 0 */
127  boolean         latchDataInput; /* 1 if node is the data input to some latch, else 0 */
128  boolean         latchInitialInput; /* 1 if node is the init input to some latch, else 0 */
129  mAigEdge_t      mAigId;     /*Node Id of this node in the AndInv graph */
130  void           *undef;       /* for programmer's use; make no assumptions */
131};
132
133/**AutomaticStart*************************************************************/
134
135/*---------------------------------------------------------------------------*/
136/* Function prototypes                                                       */
137/*---------------------------------------------------------------------------*/
138
139EXTERN boolean NtkNodeDeleteFromList(lsList nodeList, Ntk_Node_t *node);
140
141/**AutomaticEnd***************************************************************/
142
143#endif /* _NTKINT */
144
145
146
147
Note: See TracBrowser for help on using the repository browser.