ABC: A System for Sequential Synthesis and Verification
 
Loading...
Searching...
No Matches
abcOper.h
Go to the documentation of this file.
1
20
21#ifndef ABC__base__acb__acb__types_h
22#define ABC__base__acb__acb__types_h
23
27
31
32#ifndef _YOSYS_
34#endif
35
39
40// network objects
41typedef enum {
42 ABC_OPER_NONE = 0, // 00 unused
43 ABC_OPER_PI, // 01 input
44 ABC_OPER_PO, // 02 output
45 ABC_OPER_CI, // 03 combinational input
46 ABC_OPER_CO, // 04 combinational output
47 ABC_OPER_FON, // 05 output placeholder
48 ABC_OPER_BOX, // 06 box
49
54
65 ABC_OPER_BIT_MUX, // 21 fanins are: {Ctrl, Data1, Data0}
67
75
82
90
91 ABC_OPER_SEL_NMUX, // 43 fanins are: {Ctrl, Data0, Data1, Data2, ...}
98
110
118
125
130
139
145
150
154
156
159
160
161// printing operator types
162static inline const char * Abc_OperName( int Type )
163{
164 if ( Type == ABC_OPER_NONE ) return NULL;
165 if ( Type == ABC_OPER_PI ) return "pi";
166 if ( Type == ABC_OPER_PO ) return "po";
167 if ( Type == ABC_OPER_CI ) return "ci";
168 if ( Type == ABC_OPER_CO ) return "co";
169 if ( Type == ABC_OPER_FON ) return "fon";
170 if ( Type == ABC_OPER_BOX ) return "box";
171
172 if ( Type == ABC_OPER_BIT_BUF ) return "buf";
173 if ( Type == ABC_OPER_BIT_INV ) return "~";
174 if ( Type == ABC_OPER_BIT_MUX ) return "mux";
175 if ( Type == ABC_OPER_BIT_MAJ ) return "maj";
176 if ( Type == ABC_OPER_BIT_AND ) return "&";
177 if ( Type == ABC_OPER_BIT_OR ) return "|";
178 if ( Type == ABC_OPER_BIT_XOR ) return "^";
179 if ( Type == ABC_OPER_BIT_NAND ) return "~&";
180 if ( Type == ABC_OPER_BIT_NOR ) return "~|";
181 if ( Type == ABC_OPER_BIT_NXOR ) return "~^";
182
183 if ( Type == ABC_OPER_RED_AND ) return "&";
184 if ( Type == ABC_OPER_RED_OR ) return "|";
185 if ( Type == ABC_OPER_RED_XOR ) return "^";
186 if ( Type == ABC_OPER_RED_NAND ) return "~&";
187 if ( Type == ABC_OPER_RED_NOR ) return "~|";
188 if ( Type == ABC_OPER_RED_NXOR ) return "~^";
189
190 if ( Type == ABC_OPER_LOGIC_NOT ) return "!";
191 if ( Type == ABC_OPER_LOGIC_IMPL ) return "=>";
192 if ( Type == ABC_OPER_LOGIC_AND ) return "&&";
193 if ( Type == ABC_OPER_LOGIC_OR ) return "||";
194 if ( Type == ABC_OPER_LOGIC_XOR ) return "^^";
195
196 if ( Type == ABC_OPER_ARI_ADD ) return "+";
197 if ( Type == ABC_OPER_ARI_SUB ) return "-";
198 if ( Type == ABC_OPER_ARI_MUL ) return "*";
199 if ( Type == ABC_OPER_ARI_SMUL ) return "*";
200 if ( Type == ABC_OPER_ARI_DIV ) return "/";
201 if ( Type == ABC_OPER_ARI_REM ) return "%";
202 if ( Type == ABC_OPER_ARI_MOD ) return "mod";
203 if ( Type == ABC_OPER_ARI_POW ) return "**";
204 if ( Type == ABC_OPER_ARI_MIN ) return "-";
205 if ( Type == ABC_OPER_ARI_SQRT ) return "sqrt";
206 if ( Type == ABC_OPER_ARI_SQUARE ) return "squar";
207
208 if ( Type == ABC_OPER_COMP_EQU ) return "==";
209 if ( Type == ABC_OPER_COMP_NOTEQU ) return "!=";
210 if ( Type == ABC_OPER_COMP_LESS ) return "<";
211 if ( Type == ABC_OPER_COMP_MORE ) return ">";
212 if ( Type == ABC_OPER_COMP_LESSEQU ) return "<=";
213 if ( Type == ABC_OPER_COMP_MOREEQU ) return ">=";
214
215 if ( Type == ABC_OPER_SHIFT_L ) return "<<";
216 if ( Type == ABC_OPER_SHIFT_R ) return ">>";
217 if ( Type == ABC_OPER_SHIFT_LA ) return "<<<";
218 if ( Type == ABC_OPER_SHIFT_RA ) return ">>>";
219 if ( Type == ABC_OPER_SHIFT_ROTL ) return "rotL";
220 if ( Type == ABC_OPER_SHIFT_ROTR ) return "rotR";
221
222 if ( Type == ABC_OPER_DFFRSE ) return "DFFRSE";
223
224 if ( Type == ABC_OPER_SLICE ) return "[:]";
225 if ( Type == ABC_OPER_CONCAT ) return "{}";
226 if ( Type == ABC_OPER_ZEROPAD ) return "zPad";
227 if ( Type == ABC_OPER_SIGNEXT ) return "sExt";
228
229 if ( Type == ABC_OPER_BIT_MUX ) return "mux";
230 if ( Type == ABC_OPER_SEL_NMUX ) return "nmux";
231 if ( Type == ABC_OPER_SEL_SEL ) return "pmux";
232
233 if ( Type == ABC_OPER_CONST ) return "const";
234 if ( Type == ABC_OPER_TABLE ) return "table";
235 if ( Type == ABC_OPER_LUT ) return "lut";
236 if ( Type == ABC_OPER_LAST ) return NULL;
237 assert( 0 );
238 return NULL;
239}
240
241// printing operator types
242static inline const char * Abc_OperNameSimple( int Type )
243{
244 if ( Type == ABC_OPER_NONE ) return NULL;
245 if ( Type == ABC_OPER_CONST_F ) return "buf";
246 if ( Type == ABC_OPER_CONST_T ) return "buf";
247 if ( Type == ABC_OPER_CONST_X ) return "buf";
248 if ( Type == ABC_OPER_CONST_Z ) return "buf";
249 if ( Type == ABC_OPER_BIT_BUF ) return "buf";
250 if ( Type == ABC_OPER_BIT_INV ) return "not";
251 if ( Type == ABC_OPER_BIT_AND ) return "and";
252 if ( Type == ABC_OPER_BIT_OR ) return "or";
253 if ( Type == ABC_OPER_BIT_XOR ) return "xor";
254 if ( Type == ABC_OPER_BIT_NAND ) return "nand";
255 if ( Type == ABC_OPER_BIT_NOR ) return "nor";
256 if ( Type == ABC_OPER_BIT_NXOR ) return "xnor";
257 assert( 0 );
258 return NULL;
259}
260
264
268
272
273#ifndef _YOSYS_
275#endif
276
277#endif
278
282
Acb_ObjType_t
INCLUDES ///.
Definition abcOper.h:41
@ ABC_OPER_ABC
Definition abcOper.h:68
@ ABC_OPER_BO
Definition abcOper.h:70
@ ABC_OPER_DFF
Definition abcOper.h:142
@ ABC_OPER_ARI_SMUL
Definition abcOper.h:102
@ ABC_OPER_ZEROPAD
Definition abcOper.h:148
@ ABC_OPER_COMP_LESS
Definition abcOper.h:112
@ ABC_OPER_LOGIC_IMPL
Definition abcOper.h:151
@ ABC_OPER_LUT
Definition abcOper.h:127
@ ABC_OPER_CI
Definition abcOper.h:45
@ ABC_OPER_CONST_F
Definition abcOper.h:50
@ ABC_OPER_RAMS
Definition abcOper.h:137
@ ABC_OPER_SEL_ENC
Definition abcOper.h:94
@ ABC_OPER_LOGIC_OR
Definition abcOper.h:86
@ ABC_OPER_RED_XOR
Definition abcOper.h:80
@ ABC_OPER_COMP_EQU
Definition abcOper.h:116
@ ABC_OPER_ARI_ABS
Definition abcOper.h:109
@ ABC_OPER_BOA
Definition abcOper.h:74
@ ABC_OPER_ARI_MUL
Definition abcOper.h:101
@ ABC_OPER_SEL_PSEL
Definition abcOper.h:93
@ ABC_OPER_BN
Definition abcOper.h:72
@ ABC_OPER_RED_NAND
Definition abcOper.h:77
@ ABC_OPER_DFFRSE
Definition abcOper.h:143
@ ABC_OPER_BOX
Definition abcOper.h:48
@ ABC_OPER_CONST_X
Definition abcOper.h:52
@ ABC_OPER_SIGNEXT
Definition abcOper.h:149
@ ABC_OPER_BA
Definition abcOper.h:69
@ ABC_OPER_SEL_NMUX
Definition abcOper.h:91
@ ABC_OPER_LATCHRS
Definition abcOper.h:141
@ ABC_OPER_BIT_NAND
Definition abcOper.h:58
@ ABC_OPER_RAMWC
Definition abcOper.h:135
@ ABC_OPER_BIT_SHARP
Definition abcOper.h:63
@ ABC_OPER_SHIFT_RA
Definition abcOper.h:122
@ ABC_OPER_RAMW
Definition abcOper.h:134
@ ABC_OPER_ARI_REM
Definition abcOper.h:105
@ ABC_OPER_SEL_EDEC
Definition abcOper.h:97
@ ABC_OPER_BIT_XOR
Definition abcOper.h:61
@ ABC_OPER_COMP_MORE
Definition abcOper.h:115
@ ABC_OPER_LOGIC_XNOR
Definition abcOper.h:89
@ ABC_OPER_NONE
Definition abcOper.h:42
@ ABC_OPER_RED_NXOR
Definition abcOper.h:81
@ ABC_OPER_SHIFT_L
Definition abcOper.h:119
@ ABC_OPER_PO
Definition abcOper.h:44
@ ABC_OPER_LAST
Definition abcOper.h:157
@ ABC_OPER_SHIFT_ROTL
Definition abcOper.h:123
@ ABC_OPER_RED_NOR
Definition abcOper.h:79
@ ABC_OPER_LOGIC_NOT
Definition abcOper.h:83
@ ABC_OPER_ARI_DIV
Definition abcOper.h:103
@ ABC_OPER_RED_AND
Definition abcOper.h:76
@ ABC_OPER_RED_OR
Definition abcOper.h:78
@ ABC_OPER_COMP_SLESS
Definition abcOper.h:111
@ ABC_OPER_ARI_SQUARE
Definition abcOper.h:152
@ ABC_OPER_SEL_SEL
Definition abcOper.h:92
@ ABC_OPER_TRI
Definition abcOper.h:131
@ ABC_OPER_FON
Definition abcOper.h:47
@ ABC_OPER_TABLE
Definition abcOper.h:129
@ ABC_OPER_PI
Definition abcOper.h:43
@ ABC_OPER_ARI_POW
Definition abcOper.h:106
@ ABC_OPER_CONCAT
Definition abcOper.h:147
@ ABC_OPER_BIT_MUX
Definition abcOper.h:65
@ ABC_OPER_COMP_LESSEQU
Definition abcOper.h:113
@ ABC_OPER_RAMBOX
Definition abcOper.h:138
@ ABC_OPER_LOGIC_AND
Definition abcOper.h:84
@ ABC_OPER_CONST_T
Definition abcOper.h:51
@ ABC_OPER_COMP_MOREEQU
Definition abcOper.h:114
@ ABC_OPER_BIT_MAJ
Definition abcOper.h:66
@ ABC_OPER_ARI_MOD
Definition abcOper.h:104
@ ABC_OPER_BX
Definition abcOper.h:71
@ ABC_OPER_SHIFT_R
Definition abcOper.h:120
@ ABC_OPER_RAML
Definition abcOper.h:136
@ ABC_OPER_RAMR
Definition abcOper.h:133
@ ABC_OPER_SHIFT_LA
Definition abcOper.h:121
@ ABC_OPER_CONST_Z
Definition abcOper.h:53
@ ABC_OPER_BIT_INV
Definition abcOper.h:56
@ ABC_OPER_ARI_SQRT
Definition abcOper.h:108
@ ABC_OPER_BIT_AND
Definition abcOper.h:57
@ ABC_OPER_CONST
Definition abcOper.h:153
@ ABC_OPER_BIT_SHARPL
Definition abcOper.h:64
@ ABC_OPER_SEL_DEC
Definition abcOper.h:96
@ ABC_OPER_NODE
Definition abcOper.h:126
@ ABC_OPER_SLICE
Definition abcOper.h:146
@ ABC_OPER_ARI_ADDSUB
Definition abcOper.h:155
@ ABC_OPER_BAO
Definition abcOper.h:73
@ ABC_OPER_COMP_NOTEQU
Definition abcOper.h:117
@ ABC_OPER_DFFLAST
Definition abcOper.h:144
@ ABC_OPER_LOGIC_NAND
Definition abcOper.h:85
@ ABC_OPER_BIT_NOR
Definition abcOper.h:60
@ ABC_OPER_SHIFT_ROTR
Definition abcOper.h:124
@ ABC_OPER_GATE
Definition abcOper.h:128
@ ABC_OPER_BIT_OR
Definition abcOper.h:59
@ ABC_OPER_BIT_BUF
Definition abcOper.h:55
@ ABC_OPER_LATCH
Definition abcOper.h:140
@ ABC_OPER_LOGIC_XOR
Definition abcOper.h:88
@ ABC_OPER_ARI_SUB
Definition abcOper.h:100
@ ABC_OPER_SEL_PENC
Definition abcOper.h:95
@ ABC_OPER_LOGIC_NOR
Definition abcOper.h:87
@ ABC_OPER_BIT_NXOR
Definition abcOper.h:62
@ ABC_OPER_ARI_MIN
Definition abcOper.h:107
@ ABC_OPER_RAM
Definition abcOper.h:132
@ ABC_OPER_CO
Definition abcOper.h:46
@ ABC_OPER_ARI_ADD
Definition abcOper.h:99
#define ABC_NAMESPACE_HEADER_END
#define ABC_NAMESPACE_HEADER_START
NAMESPACES ///.
#define assert(ex)
Definition util_old.h:213