source: vis_dev/vis-2.3/src/restr/restrInt.h @ 99

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

vis2.3

File size: 7.8 KB
Line 
1/**CHeaderFile*****************************************************************
2
3  FileName    [restrInt.h]
4
5  PackageName [restr]
6
7  Synopsis [Internal declarations for state transition graph (STG)
8  restructuring package.]
9
10  Author      [Balakrishna Kumthekar <kumtheka@colorado.edu>]
11
12  Copyright   [This file was created at the University of Colorado at
13  Boulder.  The University of Colorado at Boulder makes no warranty
14  about the suitability of this software for any purpose.  It is
15  presented on an AS IS basis.]
16
17******************************************************************************/
18
19#ifndef _RESTRINT
20#define _RESTRINT
21
22/*---------------------------------------------------------------------------*/
23/* Nested includes                                                           */
24/*---------------------------------------------------------------------------*/
25#include "restr.h"
26#include "st.h"
27#include "mark.h"
28#include <string.h>
29
30/*---------------------------------------------------------------------------*/
31/* Constant declarations                                                     */
32/*---------------------------------------------------------------------------*/
33
34
35/*---------------------------------------------------------------------------*/
36/* Structure declarations                                                    */
37/*---------------------------------------------------------------------------*/
38
39
40/*---------------------------------------------------------------------------*/
41/* Type declarations                                                         */
42/*---------------------------------------------------------------------------*/
43/**Enum************************************************************************
44
45  Synopsis [Different heuristics to perform the restructuring of state
46  transition graph.]
47
48  SeeAlso     []
49
50******************************************************************************/
51typedef enum {
52  RestrHammingD_c,
53  RestrFanin_c,
54  RestrFaninFanout_c,
55  RestrCProjection_c
56} RestructureHeuristic;
57
58
59/*---------------------------------------------------------------------------*/
60/* Variable declarations                                                     */
61/*---------------------------------------------------------------------------*/
62
63
64/*---------------------------------------------------------------------------*/
65/* Macro declarations                                                        */
66/*---------------------------------------------------------------------------*/
67
68
69/**Macro***********************************************************************
70
71  Synopsis [Definition of a key to store a partition created solely for
72  internal use.]
73
74  SideEffects  [None]
75
76  SeeAlso      []
77
78******************************************************************************/
79#define RESTR_PART_NETWORK_APPL_KEY "Restr_PartNetworkApplKey"
80
81
82/**Macro***********************************************************************
83
84  Synopsis [Definition of a key to store an FSM created solely for internal
85  use.]
86
87  SideEffects  [None]
88
89  SeeAlso      []
90
91******************************************************************************/
92#define RESTR_FSM_NETWORK_APPL_KEY "Restr_FsmNetworkApplKey"
93
94
95/**Macro***********************************************************************
96
97  Synopsis [Returns the maximum value of the arguments.]
98
99  SideEffects  [None]
100
101  SeeAlso      []
102
103******************************************************************************/
104#define restrMax(x,y)   (((y) > (x)) ? (y) : (x))
105
106
107/**Macro***********************************************************************
108
109  Synopsis [Returns the minimum value of the arguments.]
110
111  SideEffects  [None]
112
113  SeeAlso      []
114
115******************************************************************************/
116#define restrMin(x,y)   (((y) > (x)) ? (x) : (y))
117
118#define MAX_NAME_LEN 256
119
120/**AutomaticStart*************************************************************/
121
122/*---------------------------------------------------------------------------*/
123/* Function prototypes                                                       */
124/*---------------------------------------------------------------------------*/
125
126EXTERN bdd_node * RestrMinimizeFsmByCProj(bdd_manager *ddManager, bdd_node *equivRel, bdd_node *originalTR, bdd_node *initBdd, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, bdd_node **piVars, int nVars, int nPi, array_t **outBdds, bdd_node **newInit);
127EXTERN void RestrNamePrintByMddId(Ntk_Network_t *network, array_t *array);
128EXTERN void RestrPrintMvfArray(mdd_manager *ddManager, Mvf_Function_t *mvfArray, array_t *nodeArray, array_t *idArray);
129EXTERN void RestrPrintAllVarNames(bdd_manager *ddManager);
130EXTERN void RestrPrintBddNode(bdd_manager *manager, bdd_node *ddNode);
131EXTERN void RestrVerifyFsmEquivBySimulation(bdd_manager *ddManager, bdd_node *oldTr, bdd_node *newTr, array_t *outBdds1, array_t *outBdds2, bdd_node *initBdd1, bdd_node *initBdd2, bdd_node **xVars, bdd_node **yVars, bdd_node **piVars, int nVars, int nPi);
132EXTERN void RestrTestIsEquivRelation(bdd_manager *ddManager, bdd_node *rel, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, int nVars);
133EXTERN void RestrPrintVarArrayNames(bdd_manager *ddManager, bdd_node **xVars, int nVars);
134EXTERN void RestrPrintNameArray(array_t *nameArray);
135EXTERN int RestrTestIsDeterministic(bdd_manager *ddManager, bdd_node *tr, bdd_node *initBdd, bdd_node **xVars, bdd_node **yVars, int nVars);
136EXTERN bdd_node * RestrMinimizeFsmByFaninFanout(bdd_manager *ddManager, bdd_node *equivRel, bdd_node *oldTR, bdd_node **addPTR, bdd_node **possessedProbMatrix, bdd_node *initBdd, bdd_node *reachable, bdd_node *stateProbs, bdd_node **piVars, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, int nVars, int nPi, RestructureHeuristic heuristic, array_t **outBdds, bdd_node **newInit);
137EXTERN bdd_node * RestrSelectLeastHammingDStates(bdd_manager *dd, bdd_node *oldTR, bdd_node *pTR, bdd_node **xVars, bdd_node **yVars, bdd_node **vVars, int nVars, int nPi);
138EXTERN int RestrCommandRestructureFsm(Fsm_Fsm_t *fsm, RestructureHeuristic heuristic, char *orderFileName, boolean equivClasses, boolean nonReachEquiv, boolean eqvMethod, st_table *inputProb, Synth_InfoData_t *synthInfo);
139EXTERN array_t * RestrGetOutputArray(Ntk_Network_t *network);
140EXTERN bdd_node * RestrCreateProductOutput(bdd_manager *ddManager, array_t *funArray, bdd_node **xVars, bdd_node **yVars, int nVars);
141EXTERN array_t * RestrComputeTRWithIds(bdd_manager *ddManager, array_t *nextBdds, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, int nVars);
142EXTERN bdd_node * RestrGetEquivRelation(bdd_manager *mgr, bdd_node *Lambda, bdd_node *tranRelation, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, bdd_node **piVars, int nVars, int nPi, boolean restrVerbose);
143EXTERN bdd_node * RestrComputeEquivRelationUsingCofactors(bdd_manager *mgr, bdd_node *Lambda, bdd_node *TR, bdd_node **xVars, bdd_node **yVars, bdd_node **uVars, bdd_node **vVars, bdd_node **piVars, int nVars, int nPi, boolean restrVerbose);
144EXTERN bdd_node * RestrComputeTrWithGhostEdges(bdd_manager *mgr, bdd_node **yVars, bdd_node **vVars, bdd_node *tr, bdd_node *equivRelation, int nVars);
145EXTERN bdd_node * RestrAddMaximum(bdd_manager *ddManager, bdd_node **f, bdd_node **g);
146EXTERN bdd_node * RestrAddEqual(bdd_manager *ddManager, bdd_node **f, bdd_node **g);
147EXTERN bdd_node ** RestrBddNodeArrayFromIdArray(bdd_manager *ddManager, array_t *idArray);
148EXTERN double RestrAverageBitChange(bdd_manager *manager, bdd_node *probTR, bdd_node **xVars, bdd_node **yVars, int nVars);
149EXTERN array_t * RestrCreateNewStateVars(Ntk_Network_t *network, bdd_manager *ddManager, bdd_node **xVars, bdd_node **yVars);
150EXTERN void RestrSetInitialOrder(Ntk_Network_t *network, bdd_manager *ddManager);
151
152/**AutomaticEnd***************************************************************/
153
154#endif /* _RESTRINT */
Note: See TracBrowser for help on using the repository browser.