Commit 70a23637 by Alan Mishchenko

Tuning LUT mapping flow.

parent 17343bf1
...@@ -348,7 +348,7 @@ void Gia_ManPerformMap( int nAnds, int nLutSize, int nCutNum, int fVerbose ) ...@@ -348,7 +348,7 @@ void Gia_ManPerformMap( int nAnds, int nLutSize, int nCutNum, int fVerbose )
printf( "Mapping with &lf:\n" ); printf( "Mapping with &lf:\n" );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" );
} }
if ( nAnds < 100000 ) if ( (nLutSize == 4 && nAnds < 100000) || (nLutSize == 6 && nAnds < 2000) )
{ {
sprintf( Command, "&unmap; &if -sz -S %d%d -K %d -C %d", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum ); sprintf( Command, "&unmap; &if -sz -S %d%d -K %d -C %d", nLutSize, nLutSize, 2*nLutSize-1, 2*nCutNum );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command );
...@@ -375,26 +375,28 @@ void Gia_ManPerformRound( int fIsMapped, int nAnds, int nLevels, int nLutSize, i ...@@ -375,26 +375,28 @@ void Gia_ManPerformRound( int fIsMapped, int nAnds, int nLevels, int nLutSize, i
if ( nAnds < 50000 ) if ( nAnds < 50000 )
{ {
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "" ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "" );
sprintf( Command, "&dsdb; &dch -f; &if -K %d -C %d; &save; &st", nLutSize, nCutNum ); sprintf( Command, "&dsdb; &dch -f; &if -K %d -C %d; &save", nLutSize, nCutNum );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command );
if ( fVerbose ) if ( fVerbose )
{ {
printf( "Mapping with &dch -f; &if -K %d -C %d:\n", nLutSize, nCutNum ); printf( "Mapping with &dch -f; &if -K %d -C %d:\n", nLutSize, nCutNum );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" );
} }
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st" );
} }
// perform AIG-based synthesis // perform AIG-based synthesis
if ( nAnds < 20000 ) if ( nAnds < 20000 )
{ {
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "" ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "" );
sprintf( Command, "&dsdb; &dch -f; &if -K %d -C %d; &save; &st", nLutSize, nCutNum ); sprintf( Command, "&dsdb; &dch -f; &if -K %d -C %d; &save", nLutSize, nCutNum );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), Command );
if ( fVerbose ) if ( fVerbose )
{ {
printf( "Mapping with &dch -f; &if -K %d -C %d:\n", nLutSize, nCutNum ); printf( "Mapping with &dch -f; &if -K %d -C %d:\n", nLutSize, nCutNum );
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" ); Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&ps" );
} }
Cmd_CommandExecute( Abc_FrameGetGlobalFrame(), "&st" );
} }
// perform first round of mapping // perform first round of mapping
......
...@@ -25552,7 +25552,7 @@ int Abc_CommandAbc9Save( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -25552,7 +25552,7 @@ int Abc_CommandAbc9Save( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
if ( !Gia_ManHasMapping(pAbc->pGia) ) if ( !Gia_ManHasMapping(pAbc->pGia) )
{ {
Abc_Print( -1, "GIA has not mapping.\n" ); Abc_Print( -1, "GIA has no mapping.\n" );
return 1; return 1;
} }
if ( !Gia_ManCompareWithBest( pAbc->pGiaBest, pAbc->pGia, &pAbc->nBestLuts, &pAbc->nBestEdges, &pAbc->nBestLevels ) ) if ( !Gia_ManCompareWithBest( pAbc->pGiaBest, pAbc->pGia, &pAbc->nBestLuts, &pAbc->nBestEdges, &pAbc->nBestLevels ) )
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