Commit 4e247281 by Alan Mishchenko

Updating new mapper.

parent 2d6d5a0f
......@@ -32303,7 +32303,7 @@ usage:
***********************************************************************/
int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
{
// Gia_Man_t * pTemp = NULL;
Gia_Man_t * pTemp = NULL;
int c, fVerbose = 0;
int nFrames = 3;
int fSwitch = 0;
......@@ -32315,7 +32315,6 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Gia_IsoTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose );
// extern void Unr_ManTest( Gia_Man_t * pGia );
extern void Mig_ManTest( Gia_Man_t * pGia );
// extern int Gia_ManVerify( Gia_Man_t * pGia );
// extern Gia_Man_t * Gia_ManOptimizeRing( Gia_Man_t * p );
// extern void Gia_ManCollectSeqTest( Gia_Man_t * p );
......@@ -32323,6 +32322,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern Gia_Man_t * Bmc_CexDepthTest( Gia_Man_t * p, Abc_Cex_t * pCex, int nFrames, int fVerbose );
// extern Gia_Man_t * Bmc_CexTarget( Gia_Man_t * p, int nFrames );
// extern void Gia_ManMuxProfiling( Gia_Man_t * p );
extern Gia_Man_t * Mig_ManTest( Gia_Man_t * pGia );
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "Fsvh" ) ) != EOF )
......@@ -32383,7 +32383,6 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Bmc_CexTest( pAbc->pGia, pAbc->pCex, fVerbose );
// Gia_IsoTest( pAbc->pGia, pAbc->pCex, 0 );
// Unr_ManTest( pAbc->pGia );
Mig_ManTest( pAbc->pGia );
// Gia_ManVerifyWithBoxes( pAbc->pGia );
// Gia_ManCollectSeqTest( pAbc->pGia );
// pTemp = Gia_ManOptimizeRing( pAbc->pGia );
......@@ -32393,6 +32392,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// pTemp = Bmc_CexTarget( pAbc->pGia, nFrames );
// Abc_FrameUpdateGia( pAbc, pTemp );
// Gia_ManMuxProfiling( pAbc->pGia );
pTemp = Mig_ManTest( pAbc->pGia );
Abc_FrameUpdateGia( pAbc, pTemp );
return 0;
usage:
Abc_Print( -2, "usage: &test [-F num] [-svh]\n" );
......@@ -93,8 +93,8 @@ static inline void Mmr_FlexStop( Mmr_Flex_t * p )
{
word * pPage;
int i;
if ( 1 && Vec_PtrSize(&p->vPages) )
printf( "Using %3d pages of %6d words each with %6d entries (max = %6d). Total memory %5.2f MB.\n",
if ( 0 && Vec_PtrSize(&p->vPages) )
printf( "Using %3d pages of %6d words each with %6d entries (max = %6d). Total memory = %5.2f MB.\n",
Vec_PtrSize(&p->vPages), p->nPageBase ? 1 << p->nPageBase : 0, p->nEntries, p->nEntriesMax,
1.0 * Vec_PtrSize(&p->vPages) * (1 << p->nPageBase) * 8 / (1 << 20) );
Vec_PtrForEachEntry( word *, &p->vPages, pPage, i )
......@@ -162,8 +162,8 @@ static inline void Mmr_FixedStop( Mmr_Fixed_t * p, int fFreeLast )
{
word * pPage;
int i;
if ( 1 && Vec_PtrSize(&p->vPages) )
printf( "Using %3d pages of %6d words each with %6d entries (max = %6d) of size %d. Total memory %5.2f MB.\n",
if ( 0 && Vec_PtrSize(&p->vPages) )
printf( "Using %3d pages of %6d words each with %6d entries (max = %6d) of size %d. Total memory = %5.2f MB.\n",
Vec_PtrSize(&p->vPages), p->nPageBase ? 1 << p->nPageBase : 0, p->nEntries, p->nEntriesMax, p->nEntryWords,
1.0 * Vec_PtrSize(&p->vPages) * (1 << p->nPageBase) * 8 / (1 << 20) );
Vec_PtrForEachEntry( word *, &p->vPages, pPage, i )
......@@ -198,6 +198,10 @@ static inline void Mmr_FixedRecycle( Mmr_Fixed_t * p, int h )
memset( Mmr_FixedEntry(p, h), 0xFF, sizeof(word) * p->nEntryWords );
Vec_IntPush( &p->vFrees, h );
}
static inline int Mmr_FixedMemory( Mmr_Fixed_t * p )
{
return Vec_PtrSize(&p->vPages) * (p->PageMask + 1);
}
/**Function*************************************************************
......@@ -247,6 +251,13 @@ static inline void Mmr_StepRecycle( Mmr_Step_t * p, int h )
p->nEntries--;
Mmr_FixedRecycle( p->pMems + (h & p->uMask), (h >> p->nBits) );
}
static inline int Mmr_StepMemory( Mmr_Step_t * p )
{
int i, Mem = 0;
for ( i = 1; i <= p->uMask; i++ )
Mem += Mmr_FixedMemory( p->pMems + i );
return Mem;
}
ABC_NAMESPACE_HEADER_END
......
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