mirror of https://github.com/YosysHQ/abc.git
Fix in reading flop classes.
This commit is contained in:
parent
cf2f9364c5
commit
df83fb5e04
|
|
@ -655,11 +655,12 @@ Gia_Man_t * Gia_AigerReadFromMemory( char * pContents, int nFileSize, int fSkipS
|
||||||
// read register classes
|
// read register classes
|
||||||
else if ( *pCur == 'r' )
|
else if ( *pCur == 'r' )
|
||||||
{
|
{
|
||||||
int nRegs;
|
int i, nRegs;
|
||||||
pCur++;
|
pCur++;
|
||||||
nRegs = Gia_AigerReadInt(pCur); pCur += 4;
|
nRegs = Gia_AigerReadInt(pCur)/4; pCur += 4;
|
||||||
pNew->vRegClasses = Vec_IntStart( nRegs );
|
pNew->vRegClasses = Vec_IntAlloc( nRegs );
|
||||||
memcpy(Vec_IntArray(pNew->vRegClasses), pCur, 4*nRegs); pCur += 4*nRegs;
|
for ( i = 0; i < nRegs; i++ )
|
||||||
|
Vec_IntPush( pNew->vRegClasses, Gia_AigerReadInt(pCur) ), pCur += 4;
|
||||||
if ( fVerbose ) printf( "Finished reading extension \"r\".\n" );
|
if ( fVerbose ) printf( "Finished reading extension \"r\".\n" );
|
||||||
}
|
}
|
||||||
// read choices
|
// read choices
|
||||||
|
|
@ -1252,9 +1253,11 @@ void Gia_AigerWrite( Gia_Man_t * pInit, char * pFileName, int fWriteSymbols, int
|
||||||
// write register classes
|
// write register classes
|
||||||
if ( p->vRegClasses )
|
if ( p->vRegClasses )
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
fprintf( pFile, "r" );
|
fprintf( pFile, "r" );
|
||||||
Gia_FileWriteBufferSize( pFile, Vec_IntSize(p->vRegClasses) );
|
Gia_FileWriteBufferSize( pFile, 4*Vec_IntSize(p->vRegClasses) );
|
||||||
fwrite( Vec_IntArray(p->vRegClasses), 1, 4*Vec_IntSize(p->vRegClasses), pFile );
|
for ( i = 0; i < Vec_IntSize(p->vRegClasses); i++ )
|
||||||
|
Gia_FileWriteBufferSize( pFile, Vec_IntEntry(p->vRegClasses, i) );
|
||||||
}
|
}
|
||||||
// write choices
|
// write choices
|
||||||
if ( Gia_ManHasChoices(p) )
|
if ( Gia_ManHasChoices(p) )
|
||||||
|
|
|
||||||
|
|
@ -332,13 +332,6 @@ box = array containing model name, instance name, followed by pairs of formal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static inline int Abc_Ptr2Int( void * p ) { return (int)(ABC_PTRINT_T)p; }
|
|
||||||
static inline void * Abc_Int2Ptr( int i ) { return (void *)(ABC_PTRINT_T)i; }
|
|
||||||
|
|
||||||
static inline word Abc_Ptr2Wrd( void * p ) { return (word)(ABC_PTRUINT_T)p; }
|
|
||||||
static inline void * Abc_Wrd2Ptr( word i ) { return (void *)(ABC_PTRUINT_T)i; }
|
|
||||||
|
|
||||||
|
|
||||||
/**Function*************************************************************
|
/**Function*************************************************************
|
||||||
|
|
||||||
Synopsis [Node type conversions.]
|
Synopsis [Node type conversions.]
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,10 @@ static inline int Abc_LitRegular( int Lit ) { return Lit & ~01
|
||||||
static inline int Abc_Lit2LitV( int * pMap, int Lit ) { return Abc_Var2Lit( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
|
static inline int Abc_Lit2LitV( int * pMap, int Lit ) { return Abc_Var2Lit( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
|
||||||
static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNotCond( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
|
static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNotCond( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
|
||||||
|
|
||||||
|
static inline int Abc_Ptr2Int( void * p ) { return (int)(ABC_PTRINT_T)p; }
|
||||||
|
static inline void * Abc_Int2Ptr( int i ) { return (void *)(ABC_PTRINT_T)i; }
|
||||||
|
static inline word Abc_Ptr2Wrd( void * p ) { return (word)(ABC_PTRUINT_T)p; }
|
||||||
|
static inline void * Abc_Wrd2Ptr( word i ) { return (void *)(ABC_PTRUINT_T)i; }
|
||||||
|
|
||||||
// time counting
|
// time counting
|
||||||
typedef ABC_INT64_T abctime;
|
typedef ABC_INT64_T abctime;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue