Skip to content

Commit

Permalink
New aliases.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanminko committed May 14, 2024
1 parent 554da94 commit daf3313
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 8 deletions.
2 changes: 2 additions & 0 deletions abc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ alias resyn2rs "b; rs -K 6; rw; rs -K 6 -N 2; rf; rs -K 8; b; rs -K 8 -N 2; r
alias r2rs "b; rs -K 6; rw; rs -K 6 -N 2; rf; rs -K 8; b; rs -K 8 -N 2; rw; rs -K 10; rwz; rs -K 10 -N 2; b; rs -K 12; rfz; rs -K 12 -N 2; rwz; b"
alias compress2rs "b -l; rs -K 6 -l; rw -l; rs -K 6 -N 2 -l; rf -l; rs -K 8 -l; b -l; rs -K 8 -N 2 -l; rw -l; rs -K 10 -l; rwz -l; rs -K 10 -N 2 -l; b -l; rs -K 12 -l; rfz -l; rs -K 12 -N 2 -l; rwz -l; b -l"
alias c2rs "b -l; rs -K 6 -l; rw -l; rs -K 6 -N 2 -l; rf -l; rs -K 8 -l; b -l; rs -K 8 -N 2 -l; rw -l; rs -K 10 -l; rwz -l; rs -K 10 -N 2 -l; b -l; rs -K 12 -l; rfz -l; rs -K 12 -N 2 -l; rwz -l; b -l"
alias &resyn2rs "&put; resyn2rs; &get"
alias &compress2rs "&put; compress2rs; &get"

# use this script to convert 1-valued and DC-valued flops for an AIG
alias fix_aig "logic; undc; strash; zero"
Expand Down
24 changes: 16 additions & 8 deletions src/base/abci/abc.c
Original file line number Diff line number Diff line change
Expand Up @@ -43939,12 +43939,15 @@ int Abc_CommandAbc9LNetMap( Abc_Frame_t * pAbc, int argc, char ** argv )
int Abc_CommandAbc9Unmap( Abc_Frame_t * pAbc, int argc, char ** argv )
{
extern void Gia_ManTestStruct( Gia_Man_t * p );
int c, fVerbose = 0;
int c, fConvert = 0, fVerbose = 0;
Extra_UtilGetoptReset();
while ( ( c = Extra_UtilGetopt( argc, argv, "vh" ) ) != EOF )
while ( ( c = Extra_UtilGetopt( argc, argv, "cvh" ) ) != EOF )
{
switch ( c )
{
case 'c':
fConvert ^= 1;
break;
case 'v':
fVerbose ^= 1;
break;
Expand All @@ -43959,16 +43962,21 @@ int Abc_CommandAbc9Unmap( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Abc_CommandAbc9Struct(): There is no AIG to map.\n" );
return 1;
}
Vec_IntFreeP( &pAbc->pGia->vMapping );
Vec_IntFreeP( &pAbc->pGia->vPacking );
Vec_IntFreeP( &pAbc->pGia->vCellMapping );
Vec_IntFreeP( &pAbc->pGia->vEdge1 );
Vec_IntFreeP( &pAbc->pGia->vEdge2 );
if ( fConvert )
Cmd_CommandExecute( pAbc, "&put; unmap; &get -m" );
else {
Vec_IntFreeP( &pAbc->pGia->vMapping );
Vec_IntFreeP( &pAbc->pGia->vPacking );
Vec_IntFreeP( &pAbc->pGia->vCellMapping );
Vec_IntFreeP( &pAbc->pGia->vEdge1 );
Vec_IntFreeP( &pAbc->pGia->vEdge2 );
}
return 0;

usage:
Abc_Print( -2, "usage: &unmap [-vh]\n" );
Abc_Print( -2, "usage: &unmap [-cvh]\n" );
Abc_Print( -2, "\t removes mapping from the current network\n" );
Abc_Print( -2, "\t-c : toggle converting cell mapping into LUT mapping [default = %s]\n", fConvert? "yes": "no" );
Abc_Print( -2, "\t-v : toggle printing optimization summary [default = %s]\n", fVerbose? "yes": "no" );
Abc_Print( -2, "\t-h : print the command usage\n");
return 1;
Expand Down

0 comments on commit daf3313

Please sign in to comment.