Commit d53161a7 by Alan Mishchenko

Enabling native Gia visualization in &show.

parent 9074d19d
......@@ -4339,6 +4339,10 @@ SOURCE=.\src\aig\gia\giaScript.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaShow.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaShrink.c
# End Source File
# Begin Source File
......
......@@ -1013,12 +1013,14 @@ static inline int Gia_ObjCellId( Gia_Man_t * p, int iLit ) { re
#define Gia_ManForEachLut2( p, i ) \
for ( i = 1; i < Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsLut2(p, i) ) {} else
#define Gia_LutForEachFanin2( p, i, iFan, k ) \
for ( k = 0; k < Gia_ObjLutSize2(p,i) && ((iFan = Gia_ObjLutFanin2(p,i,k)),1); k++ )
#define Gia_ManForEachLut2Reverse( p, i ) \
for ( i = Gia_ManObjNum(p) - 1; i > 0; i-- ) if ( !Gia_ObjIsLut2(p, i) ) {} else
#define Gia_ManForEachLut2Vec( vIds, p, vVec, iObj, i ) \
for ( i = 0; i < Vec_IntSize(vIds) && (vVec = Vec_WecEntry(p->vMapping2, (iObj = Vec_IntEntry(vIds, i)))); i++ )
#define Gia_ManForEachLut2VecReverse( vIds, p, vVec, iObj, i ) \
for ( i = Vec_IntSize(vIds)-1; i >= 0 && (vVec = Vec_WecEntry(p->vMapping2, (iObj = Vec_IntEntry(vIds, i)))); i-- )
#define Gia_LutForEachFanin2( p, i, iFan, k ) \
for ( k = 0; k < Gia_ObjLutSize2(p,i) && ((iFan = Gia_ObjLutFanin2(p,i,k)),1); k++ )
#define Gia_ManForEachCell( p, i ) \
for ( i = 2; i < 2*Gia_ManObjNum(p); i++ ) if ( !Gia_ObjIsCell(p, i) ) {} else
......@@ -1355,6 +1357,8 @@ extern Gia_Man_t * Gia_ManCleanup( Gia_Man_t * p );
extern Gia_Man_t * Gia_ManCleanupOutputs( Gia_Man_t * p, int nOutputs );
extern Gia_Man_t * Gia_ManSeqCleanup( Gia_Man_t * p );
extern Gia_Man_t * Gia_ManSeqStructSweep( Gia_Man_t * p, int fConst, int fEquiv, int fVerbose );
/*=== giaShow.c ===========================================================*/
extern void Gia_ManShow( Gia_Man_t * pMan, Vec_Int_t * vBold );
/*=== giaShrink.c ===========================================================*/
extern Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose );
extern Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, int fVerbose );
......
......@@ -58,6 +58,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaSatMap.c \
src/aig/gia/giaScl.c \
src/aig/gia/giaScript.c \
src/aig/gia/giaShow.c \
src/aig/gia/giaShrink.c \
src/aig/gia/giaShrink6.c \
src/aig/gia/giaShrink7.c \
......
......@@ -27519,7 +27519,7 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Show( Abc_Frame_t * pAbc, int argc, char ** argv )
{
Aig_Man_t * pMan;
Vec_Int_t * vBold = NULL;
int c;
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "h" ) ) != EOF )
......@@ -27542,14 +27542,19 @@ int Abc_CommandAbc9Show( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Show(): Cannot show GIA with barrier buffers.\n" );
return 1;
}
pMan = Gia_ManToAigSimple( pAbc->pGia );
Aig_ManShow( pMan, 0, NULL );
Aig_ManStop( pMan );
if ( Gia_ManHasMapping(pAbc->pGia) )
{
vBold = Vec_IntAlloc( 100 );
Gia_ManForEachLut( pAbc->pGia, c )
Vec_IntPush( vBold, c );
}
Gia_ManShow( pAbc->pGia, vBold );
Vec_IntFreeP( &vBold );
return 0;
usage:
Abc_Print( -2, "usage: &show [-h]\n" );
Abc_Print( -2, "\t shows the current AIG using GSView\n" );
Abc_Print( -2, "\t shows the current GIA using GSView\n" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment