summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2022-08-30 13:19:14 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2022-08-30 13:19:14 -0700
commit138c381f76bcc1106a2fd3dcd40fcaee89c84e81 (patch)
tree80412f2c853d99aeed3445a22a45363a6de8da6f /src/aig
parent34d571a562dffbec17c97c788bcfaede5b8734f8 (diff)
downloadabc-138c381f76bcc1106a2fd3dcd40fcaee89c84e81.tar.gz
abc-138c381f76bcc1106a2fd3dcd40fcaee89c84e81.tar.bz2
abc-138c381f76bcc1106a2fd3dcd40fcaee89c84e81.zip
Testing utility code.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/giaUtil.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index d8130550..dfddc693 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -3130,6 +3130,37 @@ void Gia_ManWriteResub( Gia_Man_t * p, char * pFileName )
}
}
+
+/**Function*************************************************************
+
+ Synopsis [Transform flops.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Gia_ManPrintArray( Gia_Man_t * p )
+{
+ Gia_Obj_t * pObj; int i, nSize = Gia_ManObjNum(p);
+ printf( "static int s_ArraySize = %d;\n", nSize );
+ printf( "static int s_ArrayData[%d] = {\n", 2*nSize );
+ printf( " 0, 0," );
+ printf( "\n " );
+ Gia_ManForEachCi( p, pObj, i )
+ printf( "0, 0, " );
+ printf( "\n " );
+ Gia_ManForEachAnd( p, pObj, i )
+ printf( "%d, %d, ", Gia_ObjFaninLit0p(p, pObj), Gia_ObjFaninLit1p(p, pObj) );
+ printf( "\n " );
+ Gia_ManForEachCo( p, pObj, i )
+ printf( "%d, %d, ", Gia_ObjFaninLit0p(p, pObj), Gia_ObjFaninLit0p(p, pObj) );
+ printf( "\n" );
+ printf( "};\n" );
+
+}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////