summaryrefslogtreecommitdiffstats
path: root/src/aig/miniaig/abcOper.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/miniaig/abcOper.h')
-rw-r--r--src/aig/miniaig/abcOper.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/aig/miniaig/abcOper.h b/src/aig/miniaig/abcOper.h
index 2fd7ab24..c3d6e176 100644
--- a/src/aig/miniaig/abcOper.h
+++ b/src/aig/miniaig/abcOper.h
@@ -29,7 +29,9 @@
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
+#ifndef _YOSYS_
ABC_NAMESPACE_HEADER_START
+#endif
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
@@ -232,6 +234,26 @@ static inline const char * Abc_OperName( int Type )
return NULL;
}
+// printing operator types
+static inline const char * Abc_OperNameSimple( int Type )
+{
+ if ( Type == ABC_OPER_NONE ) return NULL;
+ if ( Type == ABC_OPER_CONST_F ) return "buf";
+ if ( Type == ABC_OPER_CONST_T ) return "buf";
+ if ( Type == ABC_OPER_CONST_X ) return "buf";
+ if ( Type == ABC_OPER_CONST_Z ) return "buf";
+ if ( Type == ABC_OPER_BIT_BUF ) return "buf";
+ if ( Type == ABC_OPER_BIT_INV ) return "not";
+ if ( Type == ABC_OPER_BIT_AND ) return "and";
+ if ( Type == ABC_OPER_BIT_OR ) return "or";
+ if ( Type == ABC_OPER_BIT_XOR ) return "xor";
+ if ( Type == ABC_OPER_BIT_NAND ) return "nand";
+ if ( Type == ABC_OPER_BIT_NOR ) return "nor";
+ if ( Type == ABC_OPER_BIT_NXOR ) return "xnor";
+ assert( 0 );
+ return NULL;
+}
+
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
@@ -244,9 +266,9 @@ static inline const char * Abc_OperName( int Type )
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-
+#ifndef _YOSYS_
ABC_NAMESPACE_HEADER_END
-
+#endif
#endif