diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2018-10-09 14:18:18 +0200 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2018-10-09 14:18:18 +0200 |
commit | af62d29d5e4a8336b7a9d81d17f647cf3ce3b4b8 (patch) | |
tree | 52e0d1df1e9011c5999fedff65afbe1b3d96134a | |
parent | bc65461cc9bce96d3e6ff36b5fecd37fb3f3094b (diff) | |
download | abc-af62d29d5e4a8336b7a9d81d17f647cf3ce3b4b8.tar.gz abc-af62d29d5e4a8336b7a9d81d17f647cf3ce3b4b8.tar.bz2 abc-af62d29d5e4a8336b7a9d81d17f647cf3ce3b4b8.zip |
Corner-case bug fix in LUT to AIG translation.
-rw-r--r-- | src/opt/dau/dauGia.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opt/dau/dauGia.c b/src/opt/dau/dauGia.c index 424ec53f..eebfa9a8 100644 --- a/src/opt/dau/dauGia.c +++ b/src/opt/dau/dauGia.c @@ -449,6 +449,10 @@ int Dsm_ManTruthToGia( void * p, word * pTruth, Vec_Int_t * vLeaves, Vec_Int_t * Abc_TtCopy( pTruthCopy, pTruth, Abc_TtWordNum(Vec_IntSize(vLeaves)), 0 ); m_Calls++; assert( Vec_IntSize(vLeaves) <= DAU_DSD_MAX_VAR ); + if ( Vec_IntSize(vLeaves) == 0 ) + return (int)(pTruth[0] & 1); + if ( Vec_IntSize(vLeaves) == 1 ) + return Abc_LitNotCond( Vec_IntEntry(vLeaves, 0), (int)(pTruth[0] & 1) ); // collect delay information if ( fDelayBalance && fUseMuxes ) { |