summaryrefslogtreecommitdiffstats
path: root/src/base/wlc/wlcReadVer.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-04-02 17:43:57 -1000
committerAlan Mishchenko <alanmi@berkeley.edu>2019-04-02 17:43:57 -1000
commitc24fd01f19fdea21b2bb9dd494f7d1fa328261b3 (patch)
treece8f0bdf56dd9e706f869de9f6c7d0c24abd18fa /src/base/wlc/wlcReadVer.c
parent2feb5da23c817a65bbe08a8843768a4857a9b232 (diff)
downloadabc-c24fd01f19fdea21b2bb9dd494f7d1fa328261b3.tar.gz
abc-c24fd01f19fdea21b2bb9dd494f7d1fa328261b3.tar.bz2
abc-c24fd01f19fdea21b2bb9dd494f7d1fa328261b3.zip
Recognizing async reset in blasting (the case of constant 0 driver).
Diffstat (limited to 'src/base/wlc/wlcReadVer.c')
-rw-r--r--src/base/wlc/wlcReadVer.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/base/wlc/wlcReadVer.c b/src/base/wlc/wlcReadVer.c
index d831cb07..aff3eae8 100644
--- a/src/base/wlc/wlcReadVer.c
+++ b/src/base/wlc/wlcReadVer.c
@@ -1059,7 +1059,7 @@ startword:
p->pNtk->pInits = Wlc_PrsConvertInitValues( p->pNtk );
//printf( "%s\n", p->pNtk->pInits );
}
- if ( p->pNtk->vArsts )
+ if ( p->pNtk->vArsts && !p->pNtk->fAsyncRst )
{
int i, NameIdArst;
Vec_IntForEachEntry( p->pNtk->vArsts, NameIdArst, i )
@@ -1280,7 +1280,23 @@ startword:
pStart = Wlc_PrsFindSymbol( pStart, '(' );
if ( pStart == NULL )
return Wlc_PrsWriteErrorMessage( p, pStart, "Cannot read opening parenthesis in the flop description." );
- pStart = Wlc_PrsFindName( pStart+1, &pName );
+ pStart = Wlc_PrsSkipSpaces( pStart+1 );
+ if ( Wlc_PrsIsDigit(pStart) )
+ {
+ int Range, Signed, XValue;
+ Vec_Int_t * vFanins = Vec_IntAlloc( 100 );
+ pStart = Wlc_PrsReadConstant( p, pStart, vFanins, &Range, &Signed, &XValue );
+ if ( pStart && Vec_IntSize(vFanins) == 1 && Vec_IntEntry(vFanins, 0) == 0 )
+ {
+ Vec_IntFree( vFanins );
+ continue;
+ }
+ printf( "Detected async reset.\n" );
+ p->pNtk->fAsyncRst = 1;
+ Vec_IntFree( vFanins );
+ continue;
+ }
+ pStart = Wlc_PrsFindName( pStart, &pName );
if ( pStart == NULL )
return Wlc_PrsWriteErrorMessage( p, pStart, "Cannot read name inside flop description." );
NameIdArst = Abc_NamStrFindOrAdd( p->pNtk->pManName, pName, &fFound );