[27] | 1 | /**CHeaderFile***************************************************************** |
---|
| 2 | |
---|
| 3 | FileName [debug.h] |
---|
| 4 | |
---|
| 5 | PackageName [debug] |
---|
| 6 | |
---|
| 7 | Synopsis [Test package illustrating VIS conventions.] |
---|
| 8 | |
---|
| 9 | Description [This is a test package illustrating how to create a package in |
---|
| 10 | VIS. It shows how to create commands, and illustrates naming conventions.] |
---|
| 11 | |
---|
| 12 | Author [Originated from SIS.] |
---|
| 13 | |
---|
| 14 | Copyright [Copyright (c) 1994-1996 The Regents of the Univ. of California. |
---|
| 15 | All rights reserved. |
---|
| 16 | |
---|
| 17 | Permission is hereby granted, without written agreement and without license |
---|
| 18 | or royalty fees, to use, copy, modify, and distribute this software and its |
---|
| 19 | documentation for any purpose, provided that the above copyright notice and |
---|
| 20 | the following two paragraphs appear in all copies of this software. |
---|
| 21 | |
---|
| 22 | IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR |
---|
| 23 | DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT |
---|
| 24 | OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF |
---|
| 25 | CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
---|
| 26 | |
---|
| 27 | THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, |
---|
| 28 | INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
---|
| 29 | FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN |
---|
| 30 | "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE |
---|
| 31 | MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.] |
---|
| 32 | |
---|
| 33 | Revision [$Id: debug.h,v 1.2 2011/04/12 00:12:06 braun Exp $] |
---|
| 34 | |
---|
| 35 | ******************************************************************************/ |
---|
| 36 | |
---|
| 37 | #ifndef _DBG |
---|
| 38 | #define _DBG |
---|
| 39 | |
---|
| 40 | /*---------------------------------------------------------------------------*/ |
---|
| 41 | /* Nested includes */ |
---|
| 42 | /*---------------------------------------------------------------------------*/ |
---|
| 43 | #include "vm.h" |
---|
| 44 | #include "../ntk/ntkInt.h" |
---|
| 45 | #include "../hrc/hrcInt.h" |
---|
| 46 | #include "../fsm/fsmInt.h" |
---|
| 47 | #include "../bmc/bmcInt.h" |
---|
| 48 | #include "../sat/sat.h" |
---|
| 49 | #include "../sat/satInt.h" |
---|
| 50 | #include "../rob/Robust.h" |
---|
| 51 | #include "mdd.h" |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | /*---------------------------------------------------------------------------*/ |
---|
| 55 | /* Constant declarations */ |
---|
| 56 | /*---------------------------------------------------------------------------*/ |
---|
[40] | 57 | #define DBG_NETWORK_APPL_KEY "Dbg_NetworkApplKey" |
---|
[27] | 58 | |
---|
| 59 | /*---------------------------------------------------------------------------*/ |
---|
| 60 | /* Structure declarations */ |
---|
| 61 | /*---------------------------------------------------------------------------*/ |
---|
| 62 | |
---|
| 63 | |
---|
| 64 | /*---------------------------------------------------------------------------*/ |
---|
| 65 | /* Type declarations */ |
---|
| 66 | /*---------------------------------------------------------------------------*/ |
---|
[36] | 67 | typedef struct DbgAbnormalStruct Dbg_Abnormal_t; |
---|
[27] | 68 | |
---|
| 69 | /*---------------------------------------------------------------------------*/ |
---|
| 70 | /* Variable declarations */ |
---|
| 71 | /*---------------------------------------------------------------------------*/ |
---|
| 72 | |
---|
| 73 | |
---|
| 74 | /*---------------------------------------------------------------------------*/ |
---|
| 75 | /* Macro declarations */ |
---|
| 76 | /*---------------------------------------------------------------------------*/ |
---|
| 77 | |
---|
[36] | 78 | /**Macro*********************************************************************** |
---|
[27] | 79 | |
---|
[36] | 80 | Synopsis [Iterates over the abnormal predicates.] |
---|
| 81 | |
---|
| 82 | Description [This macro iterates over the abnormal predicates. It is an error |
---|
| 83 | ] |
---|
| 84 | |
---|
| 85 | SideEffects [This macro instantiates macros from the array package. Hence |
---|
| 86 | it is advisable not to nest this macro within array macros.] |
---|
| 87 | |
---|
| 88 | SeeAlso [Ntk_NodeForFreeInputs] |
---|
| 89 | |
---|
| 90 | ******************************************************************************/ |
---|
| 91 | #define Dbg_ForEachAbnormal( \ |
---|
| 92 | /* Dbg_Abnormal_t * */ abnormal /* abnormal to iterate abn */, \ |
---|
| 93 | /* int */ i /* local variable for iterator */, \ |
---|
| 94 | /* Ntk_Node_t * */ abn /* abn of node */ \ |
---|
| 95 | ) \ |
---|
| 96 | arrayForEachItem(Ntk_Node_t *, Dbg_ReadAbn(abnormal), i, abn) |
---|
| 97 | /**Macro*********************************************************************** |
---|
| 98 | |
---|
| 99 | Synopsis [Iterates over the abnormal predicates.] |
---|
| 100 | |
---|
| 101 | Description [This macro iterates over the abnormal predicates. It is an error |
---|
| 102 | ] |
---|
| 103 | |
---|
| 104 | SideEffects [This macro instantiates macros from the array package. Hence |
---|
| 105 | it is advisable not to nest this macro within array macros.] |
---|
| 106 | |
---|
| 107 | SeeAlso [Ntk_NodeForFreeInputs] |
---|
| 108 | |
---|
| 109 | ******************************************************************************/ |
---|
| 110 | #define Dbg_ForEachFreeInputs( \ |
---|
| 111 | /* Dbg_Abnormal_t * */ abnormal /* abnormal to iterate abn */, \ |
---|
| 112 | /* int */ i /* local variable for iterator */, \ |
---|
| 113 | /* Ntk_Node_t * */ abn /* abn of node */ \ |
---|
| 114 | ) \ |
---|
| 115 | arrayForEachItem(Ntk_Node_t *, Dbg_ReadFreeInputs(abnormal), i, abn) |
---|
| 116 | |
---|
[27] | 117 | /**AutomaticStart*************************************************************/ |
---|
| 118 | |
---|
| 119 | /*---------------------------------------------------------------------------*/ |
---|
| 120 | /* Function prototypes */ |
---|
| 121 | /*---------------------------------------------------------------------------*/ |
---|
| 122 | |
---|
| 123 | EXTERN void Debug_Init(void); |
---|
| 124 | EXTERN void Debug_End(void); |
---|
[36] | 125 | EXTERN Dbg_Abnormal_t * Dbg_DebugAbnormalAlloc(Ntk_Network_t * network); |
---|
[40] | 126 | EXTERN void Dbg_DebugAbnormalFree(Dbg_Abnormal_t * abn); |
---|
| 127 | EXTERN void Dbg_AbnormalFreeCallback(void *data); |
---|
[44] | 128 | EXTERN void Dbg_AddAbnormalPredicatetoNetwork(Dbg_Abnormal_t* abnormal,array_t* |
---|
| 129 | excludes); |
---|
[36] | 130 | EXTERN void Dbg_AddAbnormalPredicate(Dbg_Abnormal_t * abn, Ntk_Node_t* abnNode); |
---|
| 131 | EXTERN void Dbg_AddFreeInput(Dbg_Abnormal_t * abn, Ntk_Node_t* fNode); |
---|
| 132 | EXTERN array_t* Dbg_ReadFreeInputs(Dbg_Abnormal_t *abnormal); |
---|
| 133 | EXTERN array_t* Dbg_ReadAbn(Dbg_Abnormal_t *abnormal); |
---|
[40] | 134 | EXTERN Dbg_Abnormal_t * Dbg_NetworkReadAbnormal(Ntk_Network_t * network); |
---|
[41] | 135 | EXTERN void Dbg_InitAbn(Dbg_Abnormal_t * abn, bAig_Manager_t * manager, |
---|
[44] | 136 | st_table * nodeToMvfAigTable, int k, BmcCnfClauses_t *cnfClauses); |
---|
[42] | 137 | EXTERN int Dbg_SatCheck(char * forceAssigName, char * cnfFileName, int verbose); |
---|
[41] | 138 | EXTERN BmcCnfClauses_t* Dbg_GenerateCNF(Ntk_Network_t * network, |
---|
| 139 | BmcOption_t * option, st_table *CoiTable); |
---|
[42] | 140 | EXTERN int Dbg_GetDefaultValue(Tbl_Table_t * table); |
---|
[41] | 141 | |
---|
| 142 | |
---|
[27] | 143 | /**AutomaticEnd***************************************************************/ |
---|
| 144 | |
---|
| 145 | #endif /* _DBG */ |
---|