abc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
mioInt.h
Go to the documentation of this file.
1 /**CFile****************************************************************
2 
3  FileName [mioInt.h]
4 
5  PackageName [MVSIS 2.0: Multi-valued logic synthesis system.]
6 
7  Synopsis [File reading/writing for technology mapping.]
8 
9  Author [MVSIS Group]
10 
11  Affiliation [UC Berkeley]
12 
13  Date [Ver. 1.0. Started - September 8, 2003.]
14 
15  Revision [$Id: mioInt.h,v 1.4 2004/06/28 14:20:25 alanmi Exp $]
16 
17 ***********************************************************************/
18 
19 #ifndef ABC__map__mio__mioInt_h
20 #define ABC__map__mio__mioInt_h
21 
22 
23 ////////////////////////////////////////////////////////////////////////
24 /// INCLUDES ///
25 ////////////////////////////////////////////////////////////////////////
26 
27 #include <stdio.h>
28 #include <stdlib.h>
29 #include <string.h>
30 #include <assert.h>
31 #include "misc/vec/vec.h"
32 #include "misc/mem/mem.h"
33 #include "misc/st/st.h"
34 #include "mio.h"
35 
37 
38 
39 ////////////////////////////////////////////////////////////////////////
40 /// PARAMETERS ///
41 ////////////////////////////////////////////////////////////////////////
42 
43 #define MIO_STRING_GATE "GATE"
44 #define MIO_STRING_LATCH "LATCH"
45 #define MIO_STRING_PIN "PIN"
46 #define MIO_STRING_NONINV "NONINV"
47 #define MIO_STRING_INV "INV"
48 #define MIO_STRING_UNKNOWN "UNKNOWN"
49 
50 #define MIO_STRING_CONST0 "CONST0"
51 #define MIO_STRING_CONST1 "CONST1"
52 
53 // the bit masks
54 #define MIO_MASK(n) ((~((unsigned)0)) >> (32-(n)))
55 #define MIO_FULL (~((unsigned)0))
56 
57 ////////////////////////////////////////////////////////////////////////
58 /// STRUCTURE DEFINITIONS ///
59 ////////////////////////////////////////////////////////////////////////
60 
62 {
63  char * pName; // the name of the library
64  int nGates; // the number of the gates
65  Mio_Gate_t ** ppGates0; // the array of gates in the original order
66  Mio_Gate_t ** ppGatesName; // the array of gates sorted by name
67  Mio_Gate_t * pGates; // the linked list of all gates in no particular order
68  Mio_Gate_t * pGate0; // the constant zero gate
69  Mio_Gate_t * pGate1; // the constant one gate
70  Mio_Gate_t * pGateBuf; // the buffer
71  Mio_Gate_t * pGateInv; // the inverter
72  Mio_Gate_t * pGateNand2; // the NAND2 gate
73  Mio_Gate_t * pGateAnd2; // the AND2 gate
74  st__table * tName2Gate; // the mapping of gate names into their pointer
75  Mem_Flex_t * pMmFlex; // the memory manaqer for SOPs
76  Vec_Str_t * vCube; // temporary cube
77 };
78 
80 {
81  // information derived from the genlib file
82  char * pName; // the name of the gate
83  double dArea; // the area of the gate
84  char * pForm; // the formula describing functionality of the gate
85  Mio_Pin_t * pPins; // the linked list of all pins (one pin if info is the same)
86  char * pOutName; // the name of the output pin
87  // the library to which this gate belongs
89  // the next gate in the list
92 
93  // the derived information
94  int nInputs; // the number of inputs
95  double dDelayMax; // the maximum delay
96  char * pSop; // sum-of-products
97  Vec_Int_t * vExpr; // boolean expression
98  union { word uTruth; // truth table
99  word * pTruth; }; // pointer to the truth table
100  int Value; // user's information
101 };
102 
104 {
105  char * pName;
107  double dLoadInput;
108  double dLoadMax;
115 };
116 
117 
118 ////////////////////////////////////////////////////////////////////////
119 /// GLOBAL VARIABLES ///
120 ////////////////////////////////////////////////////////////////////////
121 
122 ////////////////////////////////////////////////////////////////////////
123 /// MACRO DEFINITIONS ///
124 ////////////////////////////////////////////////////////////////////////
125 
126 ////////////////////////////////////////////////////////////////////////
127 /// FUNCTION DEFINITIONS ///
128 ////////////////////////////////////////////////////////////////////////
129 
130 /*=== mio.c =============================================================*/
131 /*=== mioRead.c =============================================================*/
132 /*=== mioUtils.c =============================================================*/
133 
134 
136 
137 #endif
138 
139 ////////////////////////////////////////////////////////////////////////
140 /// END OF FILE ///
141 ////////////////////////////////////////////////////////////////////////
Mio_Gate_t ** ppGates0
Definition: mioInt.h:65
char * pName
Definition: mioInt.h:82
Mio_Pin_t * pNext
Definition: mioInt.h:114
Mio_Gate_t * pTwin
Definition: mioInt.h:91
char * pOutName
Definition: mioInt.h:86
double dDelayBlockMax
Definition: mioInt.h:113
typedefABC_NAMESPACE_IMPL_START struct Vec_Int_t_ Vec_Int_t
DECLARATIONS ///.
Definition: bblif.c:37
Mio_Gate_t * pGates
Definition: mioInt.h:67
char * pSop
Definition: mioInt.h:96
Mio_PinPhase_t
INCLUDES ///.
Definition: mio.h:40
Mem_Flex_t * pMmFlex
Definition: mioInt.h:75
Mio_Library_t * pLib
Definition: mioInt.h:88
Mio_Gate_t * pGate0
Definition: mioInt.h:68
char * pName
Definition: mioInt.h:105
Mio_Pin_t * pPins
Definition: mioInt.h:85
double dDelayFanoutFall
Definition: mioInt.h:112
char * pForm
Definition: mioInt.h:84
Mio_Gate_t * pGateInv
Definition: mioInt.h:71
double dDelayBlockFall
Definition: mioInt.h:111
Definition: st.h:52
unsigned __int64 word
DECLARATIONS ///.
Definition: kitPerm.c:36
Vec_Str_t * vCube
Definition: mioInt.h:76
Mio_Gate_t * pGateNand2
Definition: mioInt.h:72
STRUCTURE DEFINITIONS ///.
Definition: mioInt.h:61
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
Definition: abc_global.h:105
#define ABC_NAMESPACE_HEADER_END
Definition: abc_global.h:106
Mio_PinPhase_t Phase
Definition: mioInt.h:106
double dDelayMax
Definition: mioInt.h:95
Mio_Gate_t * pGateAnd2
Definition: mioInt.h:73
double dLoadMax
Definition: mioInt.h:108
double dLoadInput
Definition: mioInt.h:107
Mio_Gate_t * pNext
Definition: mioInt.h:90
Vec_Int_t * vExpr
Definition: mioInt.h:97
double dDelayFanoutRise
Definition: mioInt.h:110
Mio_Gate_t * pGateBuf
Definition: mioInt.h:70
Mio_Gate_t ** ppGatesName
Definition: mioInt.h:66
double dArea
Definition: mioInt.h:83
word * pTruth
Definition: mioInt.h:99
double dDelayBlockRise
Definition: mioInt.h:109
st__table * tName2Gate
Definition: mioInt.h:74
Mio_Gate_t * pGate1
Definition: mioInt.h:69